Announcing Momenta v0.3.0 โ€” Fine-grained reactive UI framework with SSR, hydration, and a client-side router

โš“ Rust    ๐Ÿ“… 2026-03-17    ๐Ÿ‘ค surdeus    ๐Ÿ‘๏ธ 2      

surdeus

Hi 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_string for buffered HTML output
  • render_to_chunks for streamed/chunked HTML
  • render_to_hydration_string with stable data-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

Feedback, issues, and contributions are very welcome. Thanks for checking it out!

1 post - 1 participant

Read full topic

๐Ÿท๏ธ Rust_feed