React
- 500KB+ bundle for a simple app
- Complex state management
- Build tooling overhead
- Client does all the work
5KB
Server-side reactivity. Zero dependencies.
A linear, unidirectional architecture that keeps complexity where it belongs: on the server.
User action on client
Business logic on server
HTML updates to client
Linear, unidirectional
<htma-actor name="Counter"> {% let value: i32 = 0 %} <htma-template> <div class="counter"> <h1>{{ value }}</h1> <button htma-action="decrement">-</button> <button htma-action="increment">+</button> </div> </htma-template> {% action increment sync %} {% value += 1 %} {% endaction %} {% action decrement sync %} {% value -= 1 %} {% endaction %} </htma-actor>
No npm, no node_modules, no build step. Just include the script.
Catch errors at compile time. No runtime surprises.
Real-time bidirectional or unidirectional streaming. Your choice.
Isolated state, message passing, no shared mutable state.
Start simple with HTTP. Upgrade to WebSocket when ready.
75x smaller than React. Fast on any connection.
Three steps. That's all it takes.
cargo new my-app
cd my-app
cargo add htma
<script src="htma.js"></script>
<htma-endpoint url="/ws"> <htma-actor name="Counter"></htma-actor> </htma-endpoint>