so I was talking on a recent podcast episode about Roc in the browser, and it got me thinking about how compiling to wasm makes doing any DOM interaction slower due to having to go back and forth between JS and wasm etc...and then I started thinking about https://makepad.dev
which basically doesn't manage DOM nodes for the UI and instead renders everything in webgl
which is also what Zed does outside the browser with gpui
both makepad and gpui are missing accessibility features, but they can both offer those features without necessarily using the OS or browser ways of doing that
Thats how this is rendered https://lukewilliamboswell.github.io/roc-ray-ball-physics/
yeah, so maybe a better use case to focus on for web is like "native app but it runs in a browser too"
as opposed to like "integrates into the JS and compile-to-JS DOM ecosystem"
I've still been following along with the zig mach graphics project which I think will be really nice for this kind of project.
Lot's of cool project ideas I'm keen to build with roc... just need to implement a few features before we can get back to these experiments. :sweat_smile:
Richard Feldman said:
how compiling to wasm makes doing any DOM interaction slower
While it does make things slower the Rust impls (Leptos, Dioxus) turn in reasonable scores on perf benchmarks. They're not as fast as they should be given the raw perf but they're still competitive with the fastest JS impls. I've seen UI in webgl demos but AFAIK that leaves screen readers out in the cold which causes problems for accessibility requirements.
you can implement your own screen reader functionality in userspace though, that's what I was referring to earlier
This is also what Flutter on the Web is doing now - rendering directly to Canvas (after years of trying to get it rendering native DOM nodes to work). The framework has an a11y layer baked into it, so I believe they use that to help the browser. I haven't really read deeply on it, as I haven't been on the team in 5+ years at this point
But basically, yes, this is well-trodden territory, but requires you building a framework that handles all of that
Can't wait until v0.1.0 so we can build cool experiments like this! (In terms of time available)
it's gonna be awesome! :grinning_face_with_smiling_eyes:
I assume that this would need to be supplemented by an additional website or further development that serves as a landing page, among other functions, to achieve effective SEO and related benefits?
Definitely would not be meant for general web development, it would be for rich web applications
Last updated: Jun 16 2026 at 16:19 UTC