Minimal server-driven UI in Rust.
NanoRust renders HTML on the server, keeps state in Rust, and updates the browser through SSE plus small DOM patches. No WASM, no hydration step, no client framework runtime.
Example
use nanorust::prelude::*; use nanorust::{component, signal}; signal!(Counter, i32, 0); component! { CounterWidget { <div nano:id="counter-widget"> <h2>"Counter: " $count</h2> <button on:click=increment>"+"</button> </div> } action increment() { Counter::update(|n| *n += 1); } }
What It Is
- SSR-first
- signal-based state
- server actions
- SSE updates
- tiny client script
Run
cargo run --bin nanorust-demo
The demo listens on http://0.0.0.0:3002.
Test
cargo testLayout
src/runtime, signals, client scriptnanorust-macros/component!proc macrosrc/main.rsreference app


















