-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Comments
Oh, oh, oh, hard. Currently we have not built using Emcripten. Try to assemble using Rust/C++. |
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. |
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.
|
@levlam can you share how situation with WASM looks like at this point? |
@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. |
eg: #18 |
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. |
@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. |
@levlam is there any update on this? Also looking to get started on a Telegram client project soon! |
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. |
@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. |
@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. |
@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 |
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. |
@Niek I have a docs site with the latest layer: https://schema.horner.tj Open source, too: https://github.com/tjhorner/schema.tl |
@tjhorner that's amazing, thanks for linking it in here |
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?
The text was updated successfully, but these errors were encountered: