tokio-rs/topcoat

▲ 192 stars today★ 6,573⑂ 235

A batteries-included framework for building web apps

About tokio-rs/topcoat

tokio-rs/topcoat is an open-source project on GitHub, mainly written in Rust. A batteries-included framework for building web apps It currently holds 6,573 stars and 235 forks with 56 open issues, and was last pushed on 2026-11-09 (repository created 2026-04-03).

Project Overview

Git Homed tracks it on the Today's Trending board, currently at rank #30 with 192 new stars today.

GitHub Repository Details

Repository tokio-rs/topcoat · default branch main · size 7583 KB · watchers 42 · source: GitHub REST API and repository README

README

https://github.com/tokio-rs/topcoat/blob/HEAD/Topcoat

The full full-stack framework for Rust

[![Crates.io][crates-badge]][crates-url] [![Docs.rs][docs-badge]][docs-url] [![MIT licensed][mit-badge]][mit-url] [![Build Status][actions-badge]][actions-url] [![Discord chat][discord-badge]][discord-url]

[crates-badge]: https://img.shields.io/crates/v/topcoat.svg?style=flat-square [crates-url]: https://crates.io/crates/topcoat [docs-badge]: https://img.shields.io/docsrs/topcoat?style=flat-square [docs-url]: https://docs.rs/topcoat/latest/topcoat [mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square [mit-url]: https://github.com/tokio-rs/topcoat/blob/main/LICENSE [actions-badge]: https://img.shields.io/github/actions/workflow/status/tokio-rs/topcoat/ci.yml?branch=main&style=flat-square [actions-url]: https://github.com/tokio-rs/topcoat/actions?query=workflow%3ACI+branch%3Amain [discord-badge]: https://img.shields.io/discord/500028886025895936.svg?logo=discord&style=flat-square [discord-url]: https://discord.gg/tokio

Topcoat is a modular, batteries-included Rust framework for building full-stack apps. It prioritizes simplicity and productivity. See Learn Topcoat to get started, or the Roadmap for what's coming next.

Early-stage and experimental. Expect breaking changes.

```rust,ignore use topcoat::{ Result, context::Cx, router::{module_router, page}, view::{View, component, view}, };

[tokio::main]

async fn main() { topcoat::start(module_router!().build()).await.unwrap(); }

[page]

async fn home(cx: &Cx) -> Result { Ok(view! { <!DOCTYPE html> hello(name: "World") }) }

[component]

async fn hello(cx: &Cx, name: &str) -> Result { Ok(view! {

"Hello, " (name) "!"

}) }

What makes Topcoat different

Client reactivity without the boilerplate

Topcoat renders all markup on the server: components can be async and query the database directly, eliminating all the traditional boilerplate needed for a separate API layer. Interactivity does not have to cost a round-trip, though. A $(...) expression is ordinary type-checked Rust that Topcoat evaluates on the server for the initial render and also translates to JavaScript, so it re-runs instantly in the browser. No wasm bundle, no client build step:

rust,ignore

[component]

async fn faq(cx: &Cx) -> Result { let open = signal(cx, || false);

Ok(view! { // Runs entirely in the browser; no server round-trip. "What is Topcoat?"

"A full-stack Rust framework."

}) }

When an update does need the server, like fresh search results, mark the component as a #[shard]. Topcoat re-renders it on the server whenever one of its $(...) arguments changes and swaps the new HTML in place:

rust,ignore

[component]

async fn search(cx: &Cx) -> Result { let query = signal(cx, String::new);

Ok(view! {

// Updates as the user types. search_results(query: $(query.get())) }) }

[shard]

async fn search_results(cx: &Cx, query: String) -> Result { Ok(view! { }) }

Powerful, unsurprising HTML templates

The view! macro stays true to HTML and Rust. Use familiar Rust control flow as part of your templates:

rust,ignore view! { for item in nav_items { (item.label) } }

Use the topcoat fmt CLI command to automatically format view! snippets (and other macros) across your codebase.

Module-based routing

Topcoat can optionally infer your route tree from your app's module structure (without a build step):

text src/ |-- app.rs -> / (and the root layout) `-- app/ |-- about.rs -> /about |-- _marketing.rs (layout, no URL segment) |-- _marketing/ | `-- pricing.rs -> /pricing |-- posts.rs -> /posts |-- posts/ | `-- id.rs -> /posts/{post_id} `-- api/ `-- health.rs -> GET /api/health

Premade components you can edit

Topcoat UI is a component library based on Tailwind inspired by shadcn/ui. Components are copied into your project via the topcoat ui CLI command, meaning you can freely change their design and functionality to fit your use case:

rust,ignore

[component]

async fn delete_card(cx: &Cx) -> Result { Ok(view! { card( card_header( card_title("Delete workspace") card_description( "This permanently removes the workspace and all of its data." ) ) card_footer( attrs: attributes! { class="justify-end" }, button(variant: ButtonVariant::Ghost, "Cancel") button(variant: ButtonVariant::Destructive, "Delete workspace") ) ) }) }

Asset bundling

The bundler scans your compiled binary for asset! calls, copies (or even downloads) every file into a local asset directory, and allows Topcoat to serve them efficiently with aggressive browser caching.

rust,ignore const FERRIS: Asset = asset!("./ferris.png");

view! { }


Topcoat also ships with utilities for web fonts and icons, as well as easy integrations for Fontsource (Google Fonts) and Iconify.

Built-in Tailwind support

Enable the tailwind feature to integrate Tailwind into your project:

rust,ignore view! { } ```

Learn Topcoat

Start here

Rendering Routing Working with requests Asset system Client reactivity Miscellaneous Third-party integrations

Roadmap

Planned features we'd like to bring to Topcoat. Have an idea? Open an issue.

GitHub Stars & Activity

6,573Stars
235Forks
56Open issues
RustLanguage

GitHub Popularity

GitHub stars6,573
Forks235
Open issues56
Primary languageRust
LicenseMIT
Stars gained today192
Created2026-04-03
Last pushed2026-11-09

Trending History

Daily boardrank #30 · ▲ 192 stars

Related GitHub Projects

1

rustdesk / rustdesk

Rust★ 128,999⑂ 20,549▲ 135 stars
→
2

ruvnet / RuView

Rust★ 103,982⑂ 13,533▲ 627 stars
→
3

vercel-labs / agent-browser

Rust★ 49,554⑂ 3,470▲ 780 stars
→
4

GyulyVGC / sniffnet

Rust★ 42,374⑂ 1,992▲ 139 stars
→
5

ShayanAbbas1 / dbdelve

Rust★ 1,043⑂ 55▲ 106 stars
→
6

mattpocock / skills

Shell★ 321,452⑂ 26,944▲ 1,225 stars
→
7

obra / superpowers

Shell★ 315,986⑂ 28,108▲ 656 stars
→
8

anthropics / skills

Python★ 192,782⑂ 22,682▲ 1,679 stars
→

More Trending Repositories