DEV Community

Discussion on: Qt for WebAssembly

Collapse
 
trusktr profile image
Joe Pea

I think Qt will result in heavy WebAssembly modules, especially if you need a simple UI.

I'm looking forward to using AssemblyScript with github.com/infamous/glas For WebGL-based rendering, and reference types (github.com/WebAssembly/reference-t...) which will allow direct manipulation of the DOM (or any JS objects) from inside a WebAssembly module.

AssemblyScript is a strict subset of TypeScript that compiles to WebAssembly (and by extension, to other native assembly formats). assemblyscript.org/

Of course, if you have many tools already written in Qt (UI components or something) that you'd like to re-use, then now you can use them for web too, to some extent (not everything in Qt can be ported to WebAssembly). :)

Collapse
 
deciduously profile image
Ben Lovy

I think Qt will result in heavy WebAssembly modules, especially if you need a simple UI.

I definitely made a mistake in comparing this tool to React Native and Flutter. It's not for the same sort of thing at all, and I agree that AssemblyScript is much more interesting there. I do think, though, that this will enable people to leverage WASM for much more complex concerns where bundle size is not a primary concern but the flexibility of a complicated desktop application, like photo manipulation software, to be created in a way that wasn't previously feasible.

Collapse
 
trusktr profile image
Joe Pea

Plus, eventually, once WebAssembly Interface Types are out and Wasm gains the ability to work directly with DOM references, this will make it possible to write web applications in Qt using C++ (for example, suppose they integrate something like gccx into the toolchain, which would allow developers to write functional components with HTML-like syntax embedded inside the functions).

Collapse
 
trusktr profile image
Joe Pea

Coincidentally I just stumbled on this article on writing web interfaces with Qt + WebAssembly: opensource.com/article/20/2/wasm-p...

Thread Thread
 
chilarai profile image
Chilarai

At this point, Qt WebAssembly lacks a lot of modules that are available in other Qt desktop and mobile projects. Its at a nascent stage and still has a lot to go before being adopted by the mass