0.1008029.1 • Published 5 days ago

prebuilt-tdlib v0.1008029.1

Weekly downloads
-
License
MIT
Repository
github
Last release
5 days ago

Prebuilt TDLib

This package distributes pre-built TDLib shared libraries through npm. The libraries are built on GitHub Actions: prebuilt-tdlib.yml.

The shared libraries are statically linked against OpenSSL and zlib to prevent compatibility issues in Node.js.

Supported systems:

  • GNU/Linux x86_64 (requires glibc >= 2.17)
  • macOS x86_64, arm64 (universal, requires macOS >= 10.14)
  • Windows x86_64

To install prebuilt-tdlib for the latest TDLib version that prebuilt-tdlib supports, run:

$ npm install prebuilt-tdlib

To install prebuilt-tdlib for a specific TDLib version, e.g. TDLib v1.8.29, run:

$ npm install prebuilt-tdlib@td-1.8.29

prebuilt-tdlib can be installed for other TDLib versions, execute $ npm info prebuilt-tdlib dist-tags to get the list of available versions.

The TDLib version is important: there is no backward compatibility and the interface you use can considerably change after an update.

Usage

The prebuilt-tdlib package exports a single function getTdjson, which returns the path to the tdjson shared library.

const { getTdjson } = require('prebuilt-tdlib')
console.log(getTdjson())
// Prints a path like:
// '/home/user/proj/node_modules/prebuilt-tdlib/prebuilds/tdlib-linux-x64/libtdjson.so'

This package can be used with, for example, tdl. You can pass the path to tdl.configure (since tdl v7.3.0):

const tdl = require('tdl')
const { getTdjson } = require('prebuilt-tdlib')
tdl.configure({ tdjson: getTdjson() })
// ...

The pre-built libraries can also be extracted and used with any other library or programming language.

Versioning conventions

This information is present mostly for maintaining prebuilt-tdlib, it is not necessary for using this package.

Because TDLib does not follow SemVer, not to require the users to manually specify the exact version of prebuilt-tdlib in their package.json, the TDLib version is packed into a single minor version.

prebuilt-tdlib is published to npm under versions 0.xyyyzzz.v, where

  • x, y, z correspond to the x.y.z TDLib version (e.g., 1.8.0). The leading zeros are appended to y and z (y=8 becomes y=008).
  • v corresponds to the version of prebuilt-tdlib itself, these updates can contain fixes in case some of the builds were broken or include new pre-built libraries for other platforms.
  • The major version is always 0.

Example: the npm release for TDLib v1.8.5 is 0.1008005.0.

For convenience, td-X dist-tags are available. To install prebuilt-tdlib for TDLib v1.8.5, just run npm install prebuilt-tdlib@td-1.8.5, or npm install prebuilt-tdlib@td-1.8.0 for TDLib v1.8.0. This will automatically install the needed version of prebuilt-tdlib.

The releases of the prebuilt-tdlib npm package are not git-tagged.

Additionaly, TDLib's releasing process is unusual, and the updates generally do not have a specific git-tagged release. Most prebuilt-tdlib releases are not connected to a tag release in the TDLib repository. Usually, the prebuilt packages are generated based on the "Update version to x.y.z." TDLib commits (example). Otherwise, the commit hash is indicated in the list below.

prebuilt-tdlib versions

  • npm
  • npm

For the always up-to-date list, check npm info prebuilt-tdlib dist-tags.

Or, for all ever published versions, see npm info prebuilt-tdlib versions.

An incomplete list is available below (mostly exceptions or "stable" / notable versions):

npm tagnotes
npm[tdlib b1b33cf42790ca10ef34abc2ac8828ae704f1f56]
npm
npm[tdlib 66234ae2537a99ec0eaf7b0857245a6e5c2d2bc9]
npm[tdlib 70bee089d492437ce931aa78446d89af3da182fc]
npm[tdlib de5379f00b6af7686f197037ca3b494e6277e523]
npmlast released 2023-10-10

Changes

Changes to the building process of prebuilt-tdlib are noted below.

2024-05-08

First published as prebuil-tdlib@td-1.8.29.

  • Added a tdlib: { commit: ..., version: ... } field to package.json. This allows to query information using npm info prebuilt-tdlib tdlib.commit, for example.
  • Added commit as an alias for ref to tdlib.json.
  • The packages are now published with --provenance.

2023-09-26

First published as prebuilt-tdlib@td-1.8.19.

  • The packages now include a prebuilds/tdlib.json file specifying the TDLib commit hash and version.

2023-06-26

First published as prebuilt-tdlib@td-1.8.14.

  • Added support for macOS arm64 (M1 / Apple silicon); a universal binary is shipped. However, the arm64 binary is not tested in the CI.
  • The Linux binaries are now built on environment with glibc 2.17 instead of 2.31 and work on older Linux distributions. Some cloud environments such as Amazon Linux 2 or Google Cloud Functions (nodejs <= 16) use older glibc, prebuilt-tdlib should run out of the box on these systems now.
  • Restored support for older versions of macOS, >= 10.14 is now supported.
0.1008029.1

5 days ago

0.1008029.0

7 days ago

0.1008027.0

27 days ago

0.1008028.0

16 days ago

0.1008026.0

2 months ago

0.1008025.0

2 months ago

0.1008023.0

4 months ago

0.1008000.1

7 months ago

0.1008019.0

8 months ago

0.1006000.0

11 months ago

0.1005000.0

11 months ago

0.1008014.0

11 months ago

0.1007000.0

11 months ago

0.1008012.0

1 year ago

0.1008007.0

2 years ago

0.1008005.0

2 years ago

0.1008000.0

2 years ago

0.0.1

2 years ago