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
Arseny Smirnov 071e8b1d6d tdweb: 0.2.24 (unstable), automatic wasm streaming support, and experiments with private mode in firefox
GitOrigin-RevId: caafea864dc13fe881a90d3db19ddf442c3bd0ac
2018-12-27 20:27:26 +03:00
..
tdweb tdweb: 0.2.24 (unstable), automatic wasm streaming support, and experiments with private mode in firefox 2018-12-27 20:27:26 +03:00
build-openssl.sh example/web/build-openssl.sh minor fix 2018-12-26 13:32:13 +03:00
build-tdlib.sh tdweb: build TDLib for release. 2018-12-24 02:50:12 +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 web example README. 2018-12-24 05:02:53 +03:00

TDLib Web example

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

Building TDLib

  • 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