Fullstack in Rust Without the Pain and Unnecessary Abstractions
That familiar feeling: you want to write a small web app in Rust, but setting up the infrastructure takes longer than the actual logic. First you pick a web framework (Axum or Actix-web), then a templating engine (Askama or Tera), then figure out how to pass data to the frontend without turning your code into endless API endpoint descriptions. In the end, a project with 10 lines of logic grows to hundreds of lines of configuration.
The Tokio development team (yes, the folks who wrote the async runtime for half the Rust ecosystem) decided to fix this. They introduced Topcoat — a framework that tries to make Rust development as fast and pleasant as Ruby on Rails or Next.js, while keeping all the benefits of type safety.
What Is It Anyway
Topcoat is a modular fullstack framework that follows the "batteries included" principle. It doesn't force you to choose between server-side rendering (SSR) and client-side reactivity. Instead, it offers a hybrid approach: you write code in Rust, and the framework decides on its own what should run on the server and what should become JavaScript for the browser.
The project is currently in early stages (experimental status), so the API may change. But the architectural ideas baked into it look very sound for anyone tired of the technology zoo.
Reactivity Without Pain and WASM Bundles
Usually, if you want to make a button on a page come alive, you have two paths: either write in JS/TS, or drag in heavy WebAssembly. Topcoat offers a third option.
A special expression $(...) inside the view! macro is regular Rust code. It's checked by the compiler, but Topcoat knows how to translate it to JavaScript. When you write a click handler that changes state (signal), you don't need to set up a frontend build or describe an API. The framework itself will make it work instantly in the browser.
If an update requires data from the server (for example, a database search), "shards" come to the rescue. You mark a component with the #[shard] attribute, and Topcoat will automatically re-render it on the server when arguments change, then carefully swap the HTML piece in the browser.
Routing That Brings Order
Instead of describing a path tree in one huge main.rs file, Topcoat suggests using folder structure. If you've worked with Next.js, you'll feel right at home.
A src/app/about.rs file will automatically become available at /about, and src/app/posts/id.rs will turn into a route with a /posts/{post_id} parameter. There's no runtime magic involved — it's an optional feature you can enable if you like that kind of order.
Templates That Stay HTML
Many templating engines in Rust are either too far from HTML or force you to write a lot of extra code. The view! macro in Topcoat tries to be as close to markup as possible, while still allowing you to use regular Rust constructs like loops for and conditions if.
By the way, for those worried about code cleanliness: the package includes a CLI utility topcoat fmt that can format code even inside macros. It's a small thing that's often missing in other projects.
Ready-Made Components and Assets
The developers went the shadcn/ui route. Instead of pulling in a heavy component library as a dependency, you use the topcoat ui command. It copies the code for the components you need (buttons, cards, forms) right into your project. This lets you change the design to your liking without fighting with library styles. Everything is built on Tailwind CSS, which is integrated directly into the build pipeline.
Working with images and fonts is simplified too:
Frameworks will add hashes to filenames for caching and ensure assets are available.
Is It Worth Trying Now
Topcoat looks like an attempt to make a "correct" web framework for Rust, where typing helps rather than getting in the way of development speed.
Who it's definitely for:
- Those who want to quickly build a prototype or internal tool in Rust.
- Developers who are tired of the gap between backend and frontend.
- Those who value the Tokio ecosystem and trust their architectural decisions.
The project is actively growing right now. The authors plan to add WebSocket support, background jobs, and even OpenAPI spec generation. If you've been looking for a reason to write something for the web in Rust, maybe the arrival of Topcoat is that very sign.
Check out the tokio-rs/topcoat repository — there's an excellent guide to get started. But remember: the project is experimental, so using it for mission-critical systems is still a bit premature.
Related projects