Update WebAssembly section in build.html.

GitOrigin-RevId: 2fec19ab7de21cccc7c34fb9fd83aeaadf9de1f0
This commit is contained in:
levlam 2019-04-25 18:56:01 +03:00
parent 7105ad5a06
commit d280e6a5cc
2 changed files with 7 additions and 6 deletions

View File

@ -161,7 +161,7 @@ function getSupportedOs(language) {
case 'Choose a programming language:':
return [];
case 'JavaScript':
return ['Windows (Node.js)', 'Linux (Node.js)', 'macOS (Node.js)', 'FreeBSD (Node.js)', 'Browser (Chrome, Firefox, Safari, Edge, Opera)'];
return ['Windows (Node.js)', 'Linux (Node.js)', 'macOS (Node.js)', 'FreeBSD (Node.js)', 'Browser'];
case 'Java':
return ['Windows', 'Linux', 'macOS', 'FreeBSD', 'Android'];
case 'C#':
@ -189,7 +189,7 @@ function getExampleAnchor(language) {
case 'Ruby':
case 'D':
case 'Elixir':
case 'Ñ':
case 'C':
return language.toLowerCase();
case 'C#':
return 'csharp';
@ -301,11 +301,12 @@ function onOsChanged() {
if (language === 'Other') {
language = 'any other programming language';
}
var text = 'TDLib can be used from ' + language + ' on ' + os + ' through the ' + getTargetName(target) + ' interface.<BR>' +
'See <a href="https://github.com/tdlib/td/blob/master/example/README.md#' + getExampleAnchor(language) + '">examples</a> of such usage and already available third-party frameworks.<BR>';
var text = 'TDLib can be used from ' + language + ' on ' + os + ' through the ' + getTargetName(target) + ' interface.<br>' +
'See <a href="https://github.com/tdlib/td/blob/master/example/README.md#' + getExampleAnchor(language) + '">examples</a> of such usage and already available third-party frameworks.<br>';
if (target === 'WebAssembly') {
text = 'Complete instruction for TDLib building for browsers will be published soon.';
text = 'TDLib is available in a prebuilt form as an <a href="https://www.npmjs.com/">NPM</a> package <a href="https://www.npmjs.com/package/@arseny30/tdweb">tdweb</a>.<br>' +
'If you want to build it manually, take a look at our <a href="https://github.com/tdlib/td/blob/master/example/web/">example</a>';
target = '';
}
if (target === 'Android') {

View File

@ -1,7 +1,7 @@
# TDLib Web example
This is an example of building `TDLib` for browsers using [Emscripten](https://github.com/kripken/emscripten).
These scripts build `TDLib` and creates [NPM](https://www.npmjs.com/) package [tdweb](https://www.npmjs.com/package/@arseny30/tdweb).
These scripts build `TDLib` and creates an [NPM](https://www.npmjs.com/) package [tdweb](https://www.npmjs.com/package/@arseny30/tdweb).
You need Unix shell with `sed`, `tar` and `wget` utilities to run provided scripts.
## Building tdweb NPM package