example/web/README.md
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.
emscripten package, because it contains a too old emsdk version.TDLib build dependencies described in Building and sed, tar and wget utilities.source ./emsdk_env.sh from emsdk directory to set up the correct build environment.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
cd <path to TDLib sources>/example/web
./build-openssl.sh
./build-tdlib.sh
./copy-tdlib.sh
./build-tdweb.sh
tdweb directory.