opensourceprojects.dev

A broadsheet for software that doesn't ask for your email

A Rust full-stack framework that skips the wasm bundle and client build step
GitHub RepoViews6

Project Description

View on GitHub

Topcoat: Full-Stack Rust Without the Wasm Bundle

You've probably heard the pitch for Rust on the web before, and you've probably also seen what it costs: a wasm toolchain, a separate client build step, and a pile of glue code to keep the frontend and backend in sync. Topcoat, a new framework from the tokio-rs organization, is betting you don't need most of that. It renders your markup on the server and translates small expressions into JavaScript for the browser, which means no wasm bundle and no client build step.

What It Does

Topcoat is a modular, batteries-included Rust framework for building full-stack apps, with a stated focus on simplicity and productivity. You write components as async Rust functions, and they render entirely on the server. Because of that, components can query the database directly, which removes the usual need for a separate API layer between your UI and your data.

The interesting part is how it handles interactivity. A $(...) expression is ordinary, type-checked Rust. Topcoat evaluates it on the server for the initial render and also translates it to JavaScript so it can re-run instantly in the browser. For updates that genuinely need the server, like fresh search results, you mark a component with #[shard]. Topcoat re-renders that component on the server whenever one of its $(...) arguments changes, then swaps the new HTML into place. The framework ships as a crate on crates.io, is MIT licensed, and the README points to an llms.txt file covering its APIs and conventions if you want to feed it to a coding agent.

Why It's Cool

The reactivity model is the whole pitch, and it's a good one. Most full-stack frameworks make you choose between a round-trip to the server or shipping a client-side runtime. Topcoat splits the difference per expression: simple state changes like toggling a boolean run entirely in the browser, while anything that needs your server-side code gets re-rendered server-side and swapped in. You get the latency of a client app where it matters and the simplicity of server rendering everywhere else.

No wasm bundle, no client build step. This is the line that'll get most people's attention. If you've set up a Rust web project before, you know the wasm build can be its own afternoon of yak-shaving. Topcoat sidesteps it by compiling the $(...) expressions to JavaScript rather than shipping Rust to the browser.

Components are async functions that touch the database directly. No REST endpoints, no serialization layer, no fetching JSON from your own server. The search example in the README shows an input handler and a search_results shard updating as the user types, with your own server-side code (like a database query) running right there in the component.

The syntax is readable. The view! macro looks close to HTML, with Rust expressions slotted in. Attributes like @click and :hidden will feel familiar if you've used other reactive frameworks, and the hello(name: "World") component call syntax is pleasantly plain.

How to Try It

The README is upfront that Topcoat is early-stage and experimental, and you should expect breaking changes. Keep that in mind before you start rewriting anything production-critical.

  1. Head to the repository at github.com/tokio-rs/topcoat and follow the "Learn Topcoat" section for getting-started material.
  2. Add the crate to your project from crates.io, and check the docs on docs.rs for the API surface.
  3. Start with the minimal example from the README: a #[tokio::main] function that calls topcoat::start(module_router!().build()), a #[page] for your route, and a #[component] for reusable pieces.
  4. When you want interactivity, add a signal and wire it up with a $(...) expression. When you need the server, reach for #[shard].

If you get stuck, there's a Discord link in the README badges.

Final Thoughts

Topcoat is aimed at people who like Rust, want the ergonomics of a full-stack framework, and would rather not maintain a separate frontend build. The server-rendered-everything approach with selective client reactivity is a coherent design, and doing it without wasm removes a real friction point. That said, it's experimental, the README is honest about breaking changes, and the truncated examples here only scratch the surface of what the framework can do. It's worth a look if you're curious where full-stack Rust is heading, and worth following if you want to shape it early.


Follow @githubprojects for more developer tools and open source projects.

Back to Projects
Project ID: topcoatLast updated: November 11, 2026 at 02:49 AM