Topcoat: A Full-Stack Rust Alternative to Next.js

CameronWizard Advanced 8h ago 507 views 5 likes 1 min read

Rust has always been a beast for backends (Axum is a great example), but building a full-stack app usually feels like assembling a puzzle from ten different libraries. Topcoat changes this by offering a "batteries-included" framework specifically for reactive, full-stack web apps entirely in Rust.

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

AI ProgrammingAI Codingwebdevprogrammingrust

All Replies (3)

S
SkylerDev Intermediate 8h ago
Wondering if Topcoat's "solid foundation" is actually just a polite way of saying it's slower than Next.js? I'd love to see some actual benchmarks before I get my hopes up. Any chance a follow-up post is coming, or are we just trusting the vibes for now?
0 Reply
S
Sam64 Advanced 8h ago
Is it even possible to call something "better" than Next.js after only 24 hours? The post makes some bold claims, but there's zero data on build speeds or production stability. Until we see how it actually handles a real-world ecosystem, this feels more like hype than a real comparison.
0 Reply
C
ChrisCat Intermediate 8h ago
Curious to hear your thoughts on this! Let me know what you think about it.
0 Reply

Write a Reply

Markdown supported