Announcing Momenta v0.3.0 โ Fine-grained reactive UI framework with SSR, hydration, and a client-side router
โ Rust ๐ 2026-03-17 ๐ค surdeus ๐๏ธ 2Hi everyone! I'm excited to announce Momenta v0.3.0, a fine-grained reactive framework for building user interfaces in Rust.
Momenta gives you element-level reactivity, JSX-like rsx! templates, and a familiar component model โ all backed by Rust's type system and ownership guarantees.
What's new in v0.3.0
Server-Side Rendering & Hydration โ The new momenta-ssr crate ships with:
render_to_stringfor buffered HTML outputrender_to_chunksfor streamed/chunked HTMLrender_to_hydration_stringwith stabledata-momenta-*markers and embedded JSON state for client-side resume- Thin adapters for Axum, Actix, and Hyper
Client-Side Router โ The new momenta-router crate provides:
- Hash and pathname routing modes
- Base path support
- Automatic link interception for SPA navigation
- Pattern-based route matching via
matchit
Major Performance Improvements โ Benchmarked against v0.2.3:
| Area | Improvement |
|---|---|
| Effects | 99.5% faster (585ฮผs โ 2.7ฮผs) |
| Signal reads | 80% faster |
| Signal updates | 58% faster |
| List rendering (small) | 48% faster |
| Element-to-string | 55% faster |
| List rendering (large) | 18% faster |
| Component with state | 22% faster |
Other highlights:
- Improved RSX whitespace handling
- Better event propagation
- Optimized HTML writer with minimal allocations
- Transient scope cleanup for improved DOM rendering
Quick look
use momenta::prelude::*;
#[component]
fn Counter() -> Node {
let count = create_signal(0);
rsx! {
<div class="counter">
<h1>"Count: " {count}</h1>
<button on:click={move |_| count += 1}>"Increment"</button>
</div>
}
}
fn main() {
momenta::dom::render_root::<Counter>("#app");
}
SSR with Axum is just as straightforward:
use momenta::prelude::*;
use momenta_ssr::render_to_string;
let html = render_to_string(|| {
rsx!(<main><h1>"Hello from Momenta SSR"</h1></main>)
});
Links
- Crates.io: crates.io: Rust Package Registry
- Docs: momenta - Rust
- GitHub: GitHub - elcharitas/momenta: Simple and performant reactivity for building user interfaces in rust ยท GitHub
- License: MIT
Feedback, issues, and contributions are very welcome. Thanks for checking it out!
1 post - 1 participant
๐ท๏ธ Rust_feed