React
- 500KB+ bundle for a simple app
- Complex state management
- Build tooling overhead
- Client does all the work
4KB
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>
htm/a
0
No npm, no node_modules, no bundler. Just one script tag.
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.
35x smaller than React. Fast on any connection.
Combine with minline.js for templating, i18n and preferences.
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>