2 min read

Topcoat aims to make Rust full-stack simpler

Topcoat is an early-stage Rust framework for full-stack apps with server-rendered HTML, reactive client updates, and module-based routing.

Image: Hacker News

Topcoat is a new full-stack Rust framework from the tokio-rs ecosystem that tries to cut boilerplate without giving up Rust-first development. The project describes itself as modular and batteries-included, with a focus on simplicity and productivity — but it is also explicit that it is early-stage and experimental, and users should expect breaking changes.

At its core, Topcoat renders markup on the server, letting components stay async and talk directly to a database instead of forcing developers to build a separate API layer. For client-side interactivity, the framework says $(…) expressions are written as ordinary, type-checked Rust, evaluated on the server for the initial render and then translated to JavaScript for instant browser updates. The pitch is straightforward: no wasm bundle and no client build step.

When updates do need fresh server data, Topcoat uses #[shard] components. Those components are re-rendered on the server whenever one of their $(…) arguments changes, with the updated HTML swapped into place. The example in the project documentation shows a search input updating results as the user types.

The framework also leans heavily on HTML-like templating through its view! macro, which mixes familiar HTML structure with Rust control flow and conditional attributes. There is also a topcoat fmt CLI command to format view! snippets and other macros across a codebase.

Recommended reading

Windows 11 24H2 loses support on Oct. 13, 2026

Other built-in pieces include:

  • Module-based routing, with optional route discovery from an app’s module tree and no build step
  • Asset bundling, which scans the compiled binary for asset! calls and serves files with aggressive browser caching
  • Tailwind support, enabled through a feature flag
  • Utilities for fonts and icons, including integrations for Fontsource and Iconify
  • Support for cookies, sessions, memoization, and request-scoped context
  • htmx integrations for server-driven partial HTML swaps

For Rust developers looking for an opinionated full-stack stack, Topcoat’s main selling point is clear: keep most of the app in Rust, render on the server, and add browser reactivity only where needed — while accepting that the project is still experimental.

Tomas Berg

Computing Editor

Tomas lives in the terminal. He covers chips, laptops, and operating systems with a focus on performance and efficiency. He reads kernel changelogs the way other people read fiction, and he's always on the hunt for the perfect mechanical keyboard switch. If it processes data, Tomas has an opinion on it.

via Hacker News

// Keep reading