topcoat: Full-stack web apps in Rust, without an API layer
tokio-rs/topcoat
About the project
Topcoat, a Rust-based full-stack framework, handles server-side rendering and client-side interactivity within a single codebase. Without the need to design a separate API layer or build WASM bundles, you can query the database directly from within components. Initial rendering is performed on the server, while in the browser, the same Rust code is converted to JavaScript and executed immediately.
The view! macro allows Rust's control flow to be used naturally within HTML templates. Routes are automatically inferred based on the module structure, mapping URL paths without a build step. It includes the Topcoat UI component library, inspired by Tailwind CSS and shadcn/ui, which can be freely modified after copying the project via a CLI command.
Signals and $(...) expressions are used to handle state changes in the browser without server round-trips. When server re-rendering is required, specifying the #[shard] attribute ensures that only the HTML is partially replaced when arguments change. It has built-in utilities for web development, such as session authentication, cookie management, asset bundling, and localization.
It is released under the MIT license and is currently in an early stage, so breaking changes may occur. It is suitable for developers in the Rust ecosystem who prioritize productivity and want to simplify complex full-stack structures. Unlike existing approaches, it features no client build step and allows server and client logic to be written in the same language.
tokio-rs/topcoat
A batteries-included framework for building web apps
Rust
This introduction was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.
Our guide explains how the AI works. Report errors, attribution issues, or removal requests via Contact.