7f325dbd04
GitOrigin-RevId: 64647e21f5ba3e985c7dd50ea055a5cdb031b6cf |
||
---|---|---|
.. | ||
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 creates an NPM package tdweb.
You need Unix shell with sed
, tar
and wget
utilities to run provided scripts.
Building tdweb NPM package
- 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
fromemsdk
directory to set up correct build environment. - On
macOS
installcoreutils
Homebrew package and replacerealpath
usages 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
tdweb
directory.