tdlight/example/web
levlam 7f325dbd04 Add note about correct OpenSSL version for Node.js on Linux.
GitOrigin-RevId: 64647e21f5ba3e985c7dd50ea055a5cdb031b6cf
2019-04-29 00:13:36 +03:00
..
tdweb Add note about correct OpenSSL version for Node.js on Linux. 2019-04-29 00:13:36 +03:00
.gitignore tdweb: add .gitignore. 2019-04-24 17:59:43 +03:00
build-openssl.sh example/web/build-openssl.sh minor fix 2018-12-26 13:32:13 +03:00
build-tdlib.sh tdweb 0.2.43 2019-04-23 20:59:56 +03:00
build-tdweb.sh Minor tdweb script improvements. 2018-12-24 04:34:19 +03:00
copy-tdlib.sh Minor tdweb script improvements. 2018-12-24 04:34:19 +03:00
README.md Add README to tdweb package. 2019-04-28 02:38:43 +03:00

TDLib Web example

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

Building tdweb NPM package

  • Install latest emsdk. Do not use system-provided emscripten package, because it contains too old version.
  • Install all TDLib build dependencies as described in Building.
  • Run source ./emsdk_env.sh from emsdk directory to set up correct build environment.
  • On macOS install coreutils Homebrew package and replace realpath usages 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 tdweb directory.

Using tdweb NPM package

See tdweb or README.md for the package documentation.