tdlight/example/web
Andrea Cavalli 45e855f89d Remove most memory related features
I can't maintain anymore this amount of features while keeping the library constantly updated and without bugs. Every merge was taking me multiple hours of revisioning the code. I give up.
From this commit onwards TDLight will only have small useful customizations that are easy to maintain.
Now the people relying on the OptimizeMemory method can restart the session every N hours to free up the memory.
The real way to keep a low memory usage must involve a huge refactoring to allow the unloading of the caches into the sqlite database, similar to what's already happening with messages data. Only Levlam has the ability to implement this without needing to merge the upstream everytime.
2021-09-25 22:11:42 +02:00
..
tdweb Remove most memory related features 2021-09-25 22:11:42 +02:00
.gitignore tdweb: add .gitignore. 2019-04-24 17:59:43 +03:00
README.md Remove most memory related features 2021-09-25 22:11:42 +02:00
build-openssl.sh Fix example/tdweb build 2019-12-23 21:33:03 +04:00
build-tdlib.sh Using emcmake in build-tdlib.sh 2020-07-26 15:13:09 +03:00
build-tdweb.sh Add --no-save flag to npm install call. 2019-04-30 14:44:43 +03:00
copy-tdlib.sh Minor tdweb script improvements. 2018-12-24 04:34:19 +03:00

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 2.0.6 emsdk, which is known to work. Do not use the system-provided emscripten package, because it contains a too old emsdk version.
  • Install all TDLib build dependencies described in Building.
  • Run source ./emsdk_env.sh from emsdk directory to set up the correct build environment.
  • On 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
  • 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.

Using tdweb NPM package

See tdweb or README.md for package documentation.