Show HN: Replacing HTML/CSS/JS with Rust

zionsati2 pts0 comments

I ve previously launched FUI-AS (retained UI in AssemblyScript) as a browser-only canvas framework. However, the dream was always something substantially bigger. It s to have a retained mode UI framework for the web, native and iOS/Android with SDKs available in multiple languages.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 canvasThere 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-fuiCargo-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 devThere 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/

cargo https rust retained crates native

Related Articles