This is the second slice of that dream.
FUI-RS (retained UI in Rust) now runs the same retained application model (via the same EffinDOM runtime as FUI-AS) in browsers (including mobile browsers, so it has extensive touch gesture support / event system) and as native desktop applications without embedding a browser, thus no Electron/WebView. Major OSes supported are Windows (D3D12), macOS (Metal) and Linux (Vulkan). Comes with packaging tools for their respective OSes too (MSIX, DMG and AppImage).
In the FUI-RS demo, have a play around to see and feel what a typical web app looks like with FUI-RS. Try: - VoiceOver on macOS (yes, we have extensive semantic roles / customization support in the SDK) - bring up the page inspector (Cmd/Ctrl+Shift+F12) and inspect the mirrored DOM elements - multiline text editor with the various options - password manager compatible text inputs - drag-drop reorder - external file drop site - worker with progress reporting - HTTP fetch (POST/GET demo) - Copy the rich text in the demo and paste it in a word doc - Immediate mode tab with real time graphs and interactive dancing yarn - A mouse painter canvas
There's also a virtual list that demos 100k rows. If you're on your phone, pinch to zoom, fling scroll, pull to refresh will work as usual too.
How's FUI-RS different?
In the UI land of Rust, FUI-RS fills a gap for people who want a clean modern fluent syntax that is unencumbered by HTML/CSS on the web as well as native apps (iOS and Android are definitely in my view), and want to code purely in Rust. The same Rust code that runs on the web browser also runs natively without Electron or WebView, giving you retained controls with persistent identity and state (you'd probably guessed by now I'm not a big fan of React along with its many fragmented state management libs).
Try it out via crates.io: https://crates.io/crates/cargo-fui
Cargo-fui scaffolds and builds web and native apps.
cargo install --locked cargo-fui cargo fui new my-app --target universal cd my-app cargo fui dev
There's also a community created Galaga game based on an early version of FUI-RS here: Galaga-RS - https://jatm80.github.io/galaga-rs/
FUI-RS repo: https://github.com/zion-sati/fui-rs/
frabia•40m ago
zionsati•28m ago
Porting HTML/CSS/JS to native apps is another big problem, which is why we ended up with Electron/WebView. The amount of RAM it gobbles up just to run simple apps is pretty horrible.
Why Rust? It's a strongly typed application language across browser and native. It also has a massive ecosystem and this allows us access to all of it.
BTW canvas is only the renderer. There's a lot of engineering that went into making the canvas not a typical "canvas UI app". We have solved accessibility, touch gestures, direct/immediate draw etc.
There's more reasons behind this if you're keen, I've written up a more comprehensive doc https://dev.to/zionsati/html-javascript-css-should-have-died...
frabia•20m ago
On the web, I get that CSS is not straightforward, and HTML is not the coolest technology, but by using the canvas you also lose a lot stuff that you need to rebuild from scratch: accessibility and interactivity, responsiveness, etc. So the only argument that I'd buy is that it has lighter & more performant UIs, which I get it might, given that the canvas uses the GPU, but is it worth the effort? Like, is it THAT much better?
I get the argument of native apps though. I guess if you want to build one interface and serve it both as a web and native app, it could make sense.
Edit: thanks for the link - I'll look it up. Also I didn't mean to sound too annoying. I'm starting to see UIs built in Rust but I'm still struggling to see the hype.