← Back to context

Comment by lioeters

10 days ago

> make it a native library that can compile to the web (using actual DOM/HTML elements there, not canvas/WebGL/WGPU)

How interesting to hear. I've been exploring a way to write cross-platform GUI apps in C, using the Sokol library and possibly DearImgui. It's very convenient how it can build to WebAssembly and run the same way as the native app. But for larger canvas sizes it does eat more processing power, more than a typical website, and I was considering using DOM elements instead of canvas.

Good point about better accessibility too, and leveraging the feature set of modern web browsers.

A cross-platform GUI library that works with native and the web, so that the same application can be built for these targets with minimal changes. With the maturity and adoption of Wasm, I expect we'll see growing development in this direction. And some people have cautioned that treating the web as a blob of canvas and compile target to deploy opaque binaries is a step back from the potential of the web, like seeing the source (or source map at least), consistent handling of text, scrolling, accessibility features.

So I like your idea to "flip the script", I think in my own way I'm finding a similar approach.