Release 0.2.2 - 2026-10-10
This release adds major new functionality supporting binding views to models. The Auric build now generates a Leptos derived signal for every HTMLbars expression term.
It also includes built-in helper support for ember-cli-string-helpers, ember-math-helpers, and
ember-truth-helpers helper collections, which are popular within the Ember ecosystem.
Helper expression terms become Leptos derived signals
Helpers are pre-packaged Rust functions that you can call within your HTMLbars expressions. They streamline your development experience by helping to keep your templates clean, highly readable, and maintainable.
Consider this HTMLbars template:
{{!-- src/templates/customer.hbs --}}
<h2>Customer</h2>
<li>Name: {{titleize (trim this.model.name)}}</li>
<li>Address: {{trim this.model.address}}</li>
When you build your Auric project, let's look at the Leptos view that is generated for you, and some of its complexities that you won't have to face directly:
$ make
$ cat src/generated/views/customer.rs
// This file is @generated by auric-build.
use auric_runtime::{*, components::*, data::*, routing::*};
use leptos::prelude::*;
use leptos_router::{path, components::*};
#[component]
pub fn CustomerView() -> impl IntoView {
let model = LocalResource::new(async move || {
let router = use_context::<Arc<Router>>().expect("Router not found");
let params = move || use_params_map().get();
router.set_params_for("customer", params().into());
router.model_for("customer").await.expect("Failed loading model")
});
let signal0 = move || model.get().map(|model| model.get("name")).unwrap_or_default();
let signal1 = move || auric_runtime::helpers::string::trim(&signal0());
let signal2 = move || auric_runtime::helpers::string::titleize(&signal1());
let signal3 = move || auric_runtime::helpers::to_leptos_string(&signal2());
let signal4 = move || model.get().map(|model| model.get("address")).unwrap_or_default();
let signal5 = move || auric_runtime::helpers::string::trim(&signal4());
let signal6 = move || auric_runtime::helpers::to_leptos_string(&signal5());
view! {
<h2>"Customer"</h2>
<li>"Name: " {move || signal3()} </li>
<li>"Address: " {move || signal6()} </li>
}
}
The Auric Guide has a new Templates/Helpers page with this content, and also documents the built-in helpers.
HTMLbars Expression Grammar
To support this major new functionality, the Auric project's htmlbars crate had to be extended to support full HTMLbars expressions within the XHTML grammar and its AST.
In HTMLbars, mustaches can appear in two different places: (1) in an HTML snippet body such as
<div>{{ this.model.name }}</div>, or (2) in a class attribute such as <div class="text-muted {{color}}"/>.
So far, only the first case is supported. Future work still has to figure out how to translate HTMLbars
expressions into the way Leptos handles dynamic class attributes.
What's Next?
Take a peek at the 0.2.3 Roadmap.
The goal is to support more built-in helpers such as array and concat, and maybe take a stab at supporting
HTMLbars conditional logic and iterations, or even handling events with controllers.