1a3d31949e
GitOrigin-RevId: a93238e7ee66c6403f67a212ef296c5c89f5e05a |
||
---|---|---|
.. | ||
tdweb | ||
.gitignore | ||
build-openssl.sh | ||
build-tdlib.sh | ||
build-tdweb.sh | ||
copy-tdlib.sh | ||
README.md |
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
fromemsdk
directory to set up the correct build environment. - On
macOS
, install thecoreutils
Homebrew package and replacerealpath
in scripts withgrealpath
:
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.