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.
Arseny Smirnov 75f323e2f6 tdweb: bugfix
GitOrigin-RevId: ed7c94b8fea115b62776c3d3f44fe7f323961a66
2019-03-21 22:58:52 +13:00
..
2019-03-21 22:58:52 +13:00
2018-12-24 04:34:19 +03:00
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