Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebAssembly build instructions #127

Closed
JoseExposito opened this issue Mar 6, 2018 · 18 comments
Closed

WebAssembly build instructions #127

JoseExposito opened this issue Mar 6, 2018 · 18 comments

Comments

@JoseExposito
Copy link

The README.md file indicates that TDLib is compatible with WebAssembly, however, I was not able to find instructions of how to build it.

Any advice to build a WebAssembly version of the library?

@isopen
Copy link
Contributor

isopen commented Mar 6, 2018

Oh, oh, oh, hard. Currently we have not built using Emcripten. Try to assemble using Rust/C++.
But let's wait for the answers of the experts on the assemblies.

@levlam
Copy link
Contributor

levlam commented Mar 6, 2018

Instructions for WebAssembly will be published later when they will be production-ready. We have verified that all basic TDLib functionality works in browsers when it is compiled to WebAssembly, but we can't publish our WebAssembly examples now because of existing technical limitations. We will likely mitigate them in 1-2 months and publish build instructions for WebAssembly and/or TDLib npm package.

@isopen
Copy link
Contributor

isopen commented Mar 7, 2018

WebAssembly is still under development. The technology is relatively fresh. If this technology is completed, then javascript can smoke.

@JoseExposito Try to build based on WebAssembly now. If you succeed, then I have a beer for you.

P.S.

"Recently pinned a moment as laravel bypassed symfony. For one year. The saddest thing is that he's promoting Slack."

@jansowinski
Copy link

@levlam can you share how situation with WASM looks like at this point?

@levlam
Copy link
Contributor

levlam commented May 25, 2018

@iansowinski Situation is pretty the same. Currently, to use TDLib in a browser, additional Websocket to TCP proxies are needed. They IPs need to be hard coded to TDLib source code, which is acceptable only for testing purposes. When we resolve this issue, we publish detailed build instructions along with supporting TDLib npm package.

@UnblockerUsername
Copy link

eg: #18

@levlam
Copy link
Contributor

levlam commented Sep 5, 2018

TDLib 1.3.0 doesn't require additional WebSocket to TCP proxies anymore, so there is no need to change TDLib source code to use it in a browser. Full build and usage instructions still aren't ready and they will be published later.

@isopen
Copy link
Contributor

isopen commented Sep 20, 2018

@halkliff
Copy link

@levlam So, how is the status upon support on WebAssembly? I've got a new Telegram client project, and I wanted it to be also available on the web using TDLib.

@MattNguyen
Copy link

@levlam is there any update on this? Also looking to get started on a Telegram client project soon!

@Niek
Copy link

Niek commented Apr 2, 2019

TDLib hasn't been updated in over 7 months... Webogram (Telegram for web) not in 5 months. Is it dead or closed source now?

https://core.telegram.org/scheme is also stuck on layer 23, which is a few years old.

@levlam
Copy link
Contributor

levlam commented Apr 2, 2019

@MattNguyen Since 1.3.0 there was a lot of improvements in interaction of TDLib with browser's API. TDLib has been successfully used to create a web client for Telegram with all of benefits provided by TDLib: https://evgeny-nadymov.github.io/telegram-react / https://github.com/evgeny-nadymov/telegram-react. The underluying JS library tdweb will be made public along with TDLib 1.4.0 release. Source code and build instructions for tdweb was already added as an example of TDLib usage in a browser to TDLib development version. The only part there, that we need to improve before release, is tdweb's documentation and usage instructions.

TDLib 1.4.0 is expected to be released after Telegram X stable release and Bot API 4.2.0 release.

@levlam
Copy link
Contributor

levlam commented Apr 2, 2019

@Niek TDLib source code will be updated soon, likely this month.

I can tell nothing about Webogram future, but API scheme on the site will not be updated. You can find the actual scheme in a published source code of any Telegram client, but writing a good Telegram client using these methods is a really hard task. Having the actual scheme doesn't help at all to achieve that. Instead, TDLib provides a simple to use and fully-documented API for interaction with Telegram servers, which makes the interaction very simple.

@Niek
Copy link

Niek commented Apr 2, 2019

@levlam good to hear you're preparing to release the updated source of TDlib and the TDweb source that is unavailable right now. The telegram-react project looks promising, in my tests I've been able to reach much higher downloads speeds compared to Webogram.

If you're not going to update the scheme on the site, maybe change it to link to something like https://github.com/telegramdesktop/tdesktop/blob/dev/Telegram/Resources/scheme.tl

@isopen
Copy link
Contributor

isopen commented Apr 3, 2019

Maybe #508 helps understand that tdlib works fine in browsers (long ago). It remains the case for small. Design the architecture of the screens and adjust their switching.

@tjhorner
Copy link

@Niek I have a docs site with the latest layer: https://schema.horner.tj

Open source, too: https://github.com/tjhorner/schema.tl

@Niek
Copy link

Niek commented Apr 13, 2019

@tjhorner that's amazing, thanks for linking it in here

@levlam
Copy link
Contributor

levlam commented May 1, 2019

TDLib 1.4.0 includes an example of TDLib usage in a browser. You can also use NPM package tdweb if you don't want to build TDLib yourself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants