Topcoat: A Full-Stack Rust Alternative to Next.js
The core differentiator here is the reactivity model. While Leptos or Dioxus lean heavily on WebAssembly (Wasm) to run Rust in the browser, Topcoat avoids that complexity. It uses server-side rendering (SSR) combined with small reactive instructions to update the UI—similar to the philosophy of HTMX or Hotwire. This means you get a responsive feel without the overhead of a full Wasm binary on the client.
Here is what a basic page looks like in Topcoat:
#[tokio::main]
async fn main() {
topcoat::start(Router::builder().discover().build())
.await
.unwrap();
}
#[page("/")]
async fn home() -> Result {
view! {
"Hello world"
topcoat::dev::script()
"Hello from Topcoat!"
}
}Because it's server-rendered, your components can directly hit the database or check user permissions without needing a separate API layer. It's a massive productivity gain for specific use cases:
- Admin dashboards and internal tools
- Content-heavy sites or blogs
- E-commerce storefronts
- Data-intensive apps
To be clear, this isn't an "Axum killer." Axum is still the go-to for lean APIs. Topcoat is more of a high-level abstraction that handles routing, assets, and HTML rendering in one package. It's trying to bring that "Rails" or "Next.js" integrated experience to the Rust ecosystem, complete with an asset pipeline and Tailwind integration.
For a real-world deployment, this is a strong candidate for any project where you want the type safety and performance of Rust but don't want to manage the friction of a decoupled frontend/backend architecture. It's still early days, but moving away from the Wasm-dependency for reactivity makes it feel much more pragmatic.
https://github.com/tokio-rs/topcoat