1.06 GB
1,825 files
Updated about 2 months ago
Name
Size
tdweb
README.md1.47 kB
xet
build-openssl.sh1.44 kB
xet
build-tdlib.sh1.61 kB
xet
build-tdweb.sh109 Bytes
xet
copy-tdlib.sh151 Bytes
xet
README.md

TDLib Web example

This is an example of building TDLib for browsers using Emscripten. These scripts build TDLib and create an NPM package tdweb. You need a Unix shell with sed, tar and wget utilities to run the provided scripts.

Building tdweb NPM package

  • Install the 3.1.1 emsdk, which is known to work. Do not use the system-provided emscripten package, because it contains a too old emsdk version.
  • Install all TDLib build dependencies described in Building and sed, tar and wget utilities.
  • Run source ./emsdk_env.sh from emsdk directory to set up the correct build environment.
  • On macOS, install the coreutils Homebrew package and replace realpath in scripts with grealpath:
brew install coreutils
sed -i.bak 's/[(]realpath/(grealpath/g' build-tdlib.sh
  • Run build scripts in the following order:
cd <path to TDLib sources>/example/web
./build-openssl.sh
./build-tdlib.sh
./copy-tdlib.sh
./build-tdweb.sh
  • The built package is now located in the tdweb directory.

Using tdweb NPM package

See tdweb or README.md for package documentation.

Total size
1.06 GB
Files
1,825
Last updated
Sep 19
Pre-warmed CDN
US EU US EU

Contributors