Back
Topcoat 0.9 brings client signals and server push to Rust web apps
SiTech AI Team3 წთ. საკითხავი

Topcoat 0.9 brings client signals and server push to Rust web apps

Tokio has released Topcoat 0.9, the batteries-included full-stack Rust framework, two months after announcing it. The post by Carl Lerche and Julien Scholz explains signals, shards, streaming UI updates and new Toasty features.

On September 24, 2026, the Tokio project published a post on Topcoat, its batteries-included full-stack framework for Rust, marking two months since it was announced and the release of version 0.9. The authors are Carl Lerche and Julien Scholz.

Topcoat bundles views, components, mailers, an asset pipeline and an ORM called Toasty, and all markup is rendered on the server, so components can be async and query the database directly.

Client signals and shards, without WebAssembly

Interactivity comes from signals, state variables initialised on the server that live in the browser, and from runtime expressions inside the view! macro. That syntax is a fully type-checked subset of Rust that Topcoat evaluates on the server for the first render and also compiles to JavaScript, so simple behaviour such as toggling a panel needs no round trip and no WebAssembly bundle.

When part of the interface needs fresh data, the component is marked as a shard: as its argument changes, the browser sends the new value and the server re-renders the component, replying with updated HTML that is swapped in place. Since version 0.8 a shard can read a signal while rendering, and Topcoat then refetches only the parts of the page that track that value. Updated elements are morphed rather than replaced.

Streaming updates and server push in 0.9

Updates that originate on the server use the live! and emit! macros: a live! view can emit an unlimited number of UI updates in a single response, so a loading indicator can be sent first and replaced by the real content once the data arrives.

Version 0.9 adds server push: the browser can open a WebSocket connection and subscribe to UI changes over a long-lived connection, as in the chat component the authors describe.

Toasty: new macros, document fields and polymorphic relations

The post also covers Toasty, the ORM that has been available since April 2026. An update! macro generates a single statement that sets fields and increments counters without loading the row first. Document fields give first-class support for JSON columns, with filters translated into PostgreSQL JSONB queries, and polymorphic relations are expressed by combining Rust enums with ordinary relations.

Why the framework exists

Lerche, a former member of the Ruby on Rails core team, frames the project as an attempt to carry the productivity of that era into Rust, where a web application can run in tens of megabytes of memory. His argument for a batteries-included framework is tied to AI-assisted development: well-defined conventions and abstractions help a model work faster, with fewer tokens and fewer errors. Topcoat and Toasty are open source on GitHub.

SSiTech

SiTech — AI-powered web development

We build fast, modern websites and bring AI into real business workflows. Have a project or a question? We'd love to help.