This repository has been archived on 2020-05-25. You can view files and clone it, but cannot push or open issues or pull requests.
tdlib-fork/example/web
Dylan Staley 36e98f31a2 Fix call to log.warn in asmjs mode
When attempting to run tdweb in asmjs mode, a call to `log.warning` is made. However, the correct call is `log.warn`.
2019-09-08 04:37:29 +03:00
..
tdweb Fix call to log.warn in asmjs mode 2019-09-08 04:37:29 +03:00
.gitignore tdweb: add .gitignore. 2019-04-24 17:59:43 +03:00
build-openssl.sh tdweb: do not link with libssl, only with libcrypto 2019-06-28 13:03:06 +02:00
build-tdlib.sh tdweb: remove old comment. 2019-04-30 02:13:26 +03:00
build-tdweb.sh Add --no-save flag to npm install call. 2019-04-30 14:44:43 +03:00
copy-tdlib.sh Minor tdweb script improvements. 2018-12-24 04:34:19 +03:00
README.md @arseny30/tdweb -> tdweb 2019-04-30 18:02:08 +03:00

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 latest emsdk. Do not use the system-provided emscripten package, because it contains a version that is too old.
  • Install all TDLib build dependencies as described in Building.
  • 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.