airgram/airgram

Aigram using WASM TDLib for Browser or Node?

Opened this issue ยท 5 comments

๐Ÿš€ Feature Request

[1.4.0] TDLib version

Is your feature request related to a problem? Please describe.
I do not want to compile TDLib on my own. Is it possible to use WASM version of TDLib.
According to this thread TDLib now supports WASM package named as tdweb. Is it possible to use new tdweb for airgram? (Probably make it by default - so each developer should not compile anything for quick start)

And as of using TDLib (WASM) is it possible to use Airgram for Browser? Related to this

So excellent DX would be: install airgram from npm (tdweb will be installed as WASM as peer dependency) - develop on TS - compile to JS for Browser or Node.

If you want use it on a server, you have to compile TDLib, tdweb is available only in browser environment.

There is new tdweb-airgram wrapper, which make possible to use airgram in a browser. Examples will come later.

But NodeJS supports WASM too, isn't it?

I want to use airgram on the client and on the back too. That is why I want to use WASM on both sides without any compilation steps.

Well, default tdweb build will work only for browsers. I will check if we can compile wasm and use it for Airgram.

At the moment, wasm does not support NodeJs, so we will wait for updates.