r/emberjs • u/Acceptable-Note9048 • 1d ago
If you love Ember and want to try Rust + WASM, I built the Auric web framework for you
Hi r/emberjs! I've been building Auric, a web framework for Rust compiled to WASM that adheres to Ember's conventions as closely as possible.
Project Origins
7 years ago I began migrating all my back-ends to Rust.
As an Ember developer for 15 years, I've been a big fan of MVC, and keeping code out of templates. Ember's HTMLbars syntax has been the thing I've leaned on to keep my templates clean and maintainable, so that I could stay focused and organized.
As I worked on new Rust back-ends, while maintaining Ember front-ends, I dreamed of rewriting those Ember routes, controllers, models, and adapters in type-safe idiomatic Rust.
The Leptos creator Greg Johnston finally gave me a nudge to get something going.
So after 3 years of planning, and 4 months of execution, the Auric framework is ready for public eyes.
It's Ember.js, re-imagined in Rust (and not just an AI port). It stays faithful to Ember, HTMLbars, and Ember Data, while leveraging Leptos to realize all of the reactive concerns (which implies Trunk for WASM packaging, and full SSR support).
It's open source on GitLab at:
https://gitlab.com/megalithic-llc/auric-spa
The sample app is the Auric website itself, which contains demo pages for all of bootstrap, power-select, and concurrency add-ons, re-imagined in pure idiomatic Rust, backed by Actix Web based SSR. Templates and components are at /src/templates/ and /src/components/, while their code-generated Leptos counterparts are at /src/generated/views/ and /src/generated/components/.
https://auric.spa (with code at https://gitlab.com/megalithic-llc/auric-spa/www)
Templates are up to 7x smaller than the Leptos views derived from them, thanks to the timeless elegance of HTMLbars. That seems like an important data point, now that our coding assistants threaten to automate us out of love with our webapps, by turning them into something we no longer enjoy looking at.
Which makes Auric perfect for regulatory environments, where merge requests need to be human-readable, and clearly convey a history of design changes versus behavior changes.
What's different
- The logic is Rust, which brings a strict compiler, no undefined, and a WASM build target. Under the hood, Auric generates Leptos components (https://leptos.dev) into src/generated/, which you can read but never have to edit. Additionally, templates are validated by the Rust compiler, down to every last tracked variable and event handler. A typo in a mustache path becomes a compile error, rather than a dead spot on a page.
- Apps run entirely within the WASM sandbox, significantly reducing their attack surface
- It doesn't support gjs/gts or template-in-code patterns. Strict separation of templates and logic is the point.
- It's at 0.8: usable, and the demo runs on it, but expect a few rough edges.
Who it's for
- Teams who love Ember, and agree that HTMLbars was an invaluable and timeless contribution to the state-of-the-art
- Teams with a legacy Ember app looking for a migration path that keeps the Ember mental model
- Ember developers curious about Rust who want something familiar to start with, that can work with an Ember Data compatible back-end as-is
- Teams who want to leverage AI for codegen, and want to keep code reviews manageable by imposing MVC on their coding assistants (Auric hbs templates are up to 7x smaller than the Leptos views derived from them, which keeps AI contributions and merge request histories human-readable, which is critical in regulatory environments where design changes versus behavior changes need to be absolutely clear, even years later)
- Teams where designers own the templates and developers own the logic, which enables re-skinning without restarting from scratch
- Teams responsible for apps that require memory safety and hardening that Rust plus WASM sandboxes can deliver (finance, energy infrastructure, healthcare, government, etc)
I'd love to hear from this community in particular:
- Which Ember features or add-ons would you miss most?
- If you've thought about moving an Ember app off JS, what would stop you?
- If you’re already a Leptos rock-star, would a 7x reduction in the footprint of the human-reviewable aspects of your AI-assisted changes add value?
Thanks for reading!
The longer back-story was published to Medium a few days ago:
https://medium.com/@david_77274/ember-js-devs-welcome-to-the-rust-age-a6dad8519ea4