Skip to content
CAI
Software that uses CAICheck a score

tokio-rs/topcoat

59.7

Adequate · 30 September 2026

86.3k

lines of production code

Rust

primary language

2

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Topcoat is a Rust-based web framework designed for building high-performance, interactive server-rendered applications. It provides a full-stack toolkit featuring a declarative view system, a flexible router with module-based discovery, and a reactive runtime that enables client-side state management and real-time updates via WebSockets. The framework includes extensive integrations for modern web development, such as Tailwind CSS, UI component libraries, and compatibility with libraries like HTMX and Alpine.js.

Features

Add Alpine AJAX integration crate

The new \topcoat-alpine-ajax\ crate provides utilities for handling requests from Alpine AJAX. It exposes functions to detect if a request originates from Alpine AJAX (\ajax\_request\) and to read the target element IDs from the \X-Alpine-Target\ header (\ajax\_targets\, \ajax\_target\), allowing server-side handlers to return matching HTML fragments. The crate also defines constants for the relevant HTTP header names.

crates/topcoat-alpine-ajax · high confidence

Add Alpine AJAX integration example

A new example application in \examples/alpine-ajax\ demonstrates how to integrate Alpine.js with the framework's AJAX capabilities. The example shows how to detect AJAX requests to return only targeted HTML fragments for partial updates, while falling back to a full page render with Post/Redirect/Get for non-JavaScript users. It includes specific configuration for loading Alpine.js and the Alpine AJAX library via CDN.

examples/alpine-ajax · high confidence

Add Axum + Maud storefront benchmark implementation

A new Axum + Maud application has been added to the benchmarks suite to serve as a Rust-based baseline for server-rendered storefront performance. This implementation includes a product catalog, routing for home, product detail, and paginated product listing pages, and a shared UI component library (layout, product cards, pagination, ratings) styled with Tailwind CSS. It uses the same deterministic product data and rendering logic as the Topcoat, Next.js, and Leptos apps to ensure comparable benchmark results.

benchmarks · high confidence

Add Datastar example demonstrating streaming SSR and client-side state management

The examples/datastar directory now includes a working example that integrates the Datastar library to manage client-side state (a counter) and append log entries via Server-Sent Events (SSE). The home page loads the Datastar script and uses data attributes to bind state and handle clicks, while the increment route demonstrates streaming responses that patch signals and append DOM elements.

examples/datastar · high confidence

Add Datastar integration support

Introduces a new \topcoat-datastar\ crate that enables server-side updates for Datastar clients. This includes request extraction via the \Signals\ type (reading JSON from query parameters on GET or the body on other methods), response helpers like \PatchElements\ and \PatchSignals\ to send DOM and state updates over Server-Sent Events, and an \ExecuteScript\ type to run JavaScript in the browser. It also provides response header types (\DatastarSelector\, \DatastarMode\, etc.) to control how standard HTML/JSON responses are patched by the client, and enforces that CSS selectors do not contain line breaks to ensure valid Datastar command formatting.

crates/topcoat-datastar/src · high confidence

Add Fontsource font integration with grammar and runtime support

This change introduces the \fontsource\ module to the \topcoat-font\ crate, enabling users to load fonts from the Fontsource catalog. It adds a new \fontsource\_font!\ macro for selecting families with optional weight, style, subset, and display strategy, and a \fontsource\_font\_face!\ macro for targeting specific faces. The implementation includes grammar definitions for parsing these arguments, runtime metadata for catalog families (including weights, styles, and subsets), and logic to resolve font sources from the jsDelivr CDN or as self-hosted assets.

crates/topcoat-font/grammar/src/fontsource, crates/topcoat-font/src/fontsource · high confidence

Add HTMX example demonstrating partial updates and triggers

The examples/htmx directory now includes a working example that integrates HTMX (v2.0.10) with the Topcoat framework. The application features a counter that increments via an HTMX POST request, returning a specific HTML fragment to update the page without a full reload. It also demonstrates the use of HX-Trigger headers to fire custom browser events (e.g., 'counted') from the server response, showcasing how to handle partial page updates and client-side event handling within the framework.

examples/htmx · high confidence

Add Leptos storefront benchmark using islands mode

A new Leptos-based storefront benchmark has been added to the benchmarks suite. It implements a product catalog application featuring a home page, a paginated and sortable products list, and product detail views. The implementation uses Leptos islands mode for rendering, with server functions handling data fetching for the catalog, and includes a server-side product catalog loaded from shared JSON data.

benchmarks/leptos · high confidence

Add StripPrefixLayer to rewrite request URIs

A new \StripPrefixLayer\ is available in the router to automatically remove a specified prefix from the request URI before it reaches the handler. This allows mounted services or handlers to operate using paths relative to their mount point; for example, registering the layer with a prefix of \/res\ ensures that a request to \/res/logo.svg\ is processed by the handler as \/logo.svg\. The layer supports static segments, parameters, groups, and catch-all patterns for matching the prefix, and it preserves the original query string and captured path parameters while leaving response headers and generated URLs unchanged.

crates/topcoat-router/src/layer · high confidence

Add Tailwind CSS example project

Introduces a new example project in \examples/tailwind\ that demonstrates integrating Topcoat with Tailwind CSS. The example shows how to configure a module-based router, serve a generated stylesheet via an asset bundle, and apply Tailwind utility classes within Rust-defined views and layouts.

examples/tailwind · high confidence

Add Tailwind CSS integration crate

Introduces the \topcoat-tailwind\ crate, providing a \stylesheet!\ macro that generates a Topcoat asset for the Tailwind CSS output file (defaulting to \$OUT\_DIR/tailwind.css\). The crate exposes build-related modules (\command\, \config\, \error\, \executable\) behind a \build\ feature flag, enabling users to integrate Tailwind stylesheets into their Topcoat views.

crates/topcoat-tailwind/src · high confidence

Add Topcoat Icon macro crate with Iconify support

Introduces the \topcoat-icon/macro\ crate, providing two new procedural macros, \include\ and \iconify\_icon\, which are available when the \iconify\ feature is enabled. These macros allow users to parse and generate icon-related code using the \topcoat\_icon\_grammar\ definitions, with documentation sourced from local markdown files.

crates/topcoat-icon/macro/src · high confidence

Add WebSocket support to the router

The router now includes a new WebSocket content handler, allowing routes to accept and handle WebSocket connections. This introduces \WebSocketUpgrade\ as a route parameter to validate the handshake and \WebSocket\ for sending and receiving messages. The implementation supports configuring buffer sizes, message limits, subprotocols, and provides a clean API for bidirectional communication.

crates/topcoat-router/src/content/websocket · high confidence

Add app-context example demonstrating shared state via module router

A new example located at examples/app-context demonstrates how to register a shared application context using the module router. The example initializes a global page-view counter via app\_context and increments it on each request to the home page, illustrating how state can be shared across requests in a Topcoat application.

examples/app-context · high confidence

Add context example demonstrating request data access via Cx

A new example located at examples/context/src/main.rs has been added to demonstrate how to access current request information, such as the URI path and user-agent header, by passing the Cx context to helper functions within a page component.

examples/context · high confidence

Add font system for loading and serving web fonts

The new \topcoat-font\ crate introduces a complete system for managing web fonts. It provides types for defining font faces, sources (URLs or local), formats, weights, styles, and display strategies, which are rendered into CSS \@font-face\ rules. The \link\ component allows pages to load fonts and optionally preload them. When the \router\ feature is enabled, the crate integrates with the application router to serve the generated CSS at immutable, content-hashed URLs under \/\_topcoat/fonts/\, ensuring efficient browser caching.

crates/topcoat-font/src · high confidence

Add grammar parsing for @font-face descriptor properties

The \crates/topcoat-font/grammar/src/font\_face\ module now includes parsers for key \@font-face\ descriptors, enabling the library to parse \font-display\, \font-family\, \font-style\, \font-weight\, \unicode-range\, \src\ (including \url\ and \local\ sources with \format\ and \tech\ hints), and \font-variant\. This adds the ability to parse CSS-like syntax for these properties into structured Rust types, supporting both literal CSS values and dynamic expressions.

_crates/topcoat-font/grammar/src/font\face · high confidence

Add htmx support for reading request headers and constructing response headers

The new \topcoat-htmx\ crate provides first-class support for the htmx library. It exposes constants for all htmx HTTP header names and offers helper functions to read request headers (such as \hx\_request\, \hx\_boosted\, and \hx\_target\) from the Topcoat context. For responses, it provides builder types like \HxLocation\, \HxPushUrl\, \HxRedirect\, \HxRefresh\, \HxReswap\, \HxRetarget\, \HxReselect\, and \HxResponseTrigger\ that implement \IntoResponseParts\, allowing developers to easily configure client-side behaviors like redirects, history updates, DOM swapping, and event triggering via htmx-specific headers.

crates/topcoat-htmx/src · high confidence

Add mail example demonstrating email sending and viewing

A new mail example has been added to the examples directory, showcasing how to integrate email functionality into a Topcoat application. The example uses a file-based transport to write sent emails as .eml files to an outbox directory, allowing users to send a welcome email via a form and subsequently view the generated files in a list. It demonstrates the use of the mail module for constructing messages with HTML content, inline attachments, and headers, as well as routing and layout components for the user interface.

examples/mail · high confidence

Add manual router example project

A new example project demonstrating how to configure the router manually by explicitly registering layouts, pages, and routes using builder methods like \.layout()\, \.page()\, and \.route()\, rather than relying on automatic discovery.

examples/manual-router, examples/module-router · high confidence

Add request-response example demonstrating content parsing and custom types

The new \examples/request-response\ project provides a comprehensive guide on handling HTTP requests and responses in Topcoat. It demonstrates parsing various content types including JSON (\Json\<T\>\), URL-encoded forms (\Form\<T\>\), raw bytes (\Bytes\), and multipart file uploads (\Multipart\). The example also shows how to handle optional JSON bodies, raw form data, and query-string parameters. Additionally, it illustrates how to implement custom request parsers (like \SignedJson\ for header validation) and custom response types (like \Csv\) by implementing the \FromRequest\ and \IntoResponse\ traits.

examples/request-response · high confidence

Add session management example

The examples/session directory now includes a complete demonstration of session handling, featuring login and logout routes that manage user sessions via an in-memory database. The example configures session cookies and provides a UI that displays the current login status, allowing users to authenticate and deauthenticate.

examples/session · high confidence

Add storefront benchmark with product listing and navigation

The Topcoat benchmark application now includes a storefront UI featuring a site navigation bar, a footer, and a paginated products page. Users can browse products, filter by category, sort by name, price, or rating, and navigate through paginated results. The products page displays product cards with ratings and prices, and includes query parameter handling for pagination, sorting, and category filtering.

benchmarks/topcoat/src/app · high confidence

Add toasty-todo example application

Introduces a new example application in \examples/toasty-todo\ that demonstrates a todo list feature using the \topcoat\ framework and \toasty\ ORM. The app provides a home page to view, toggle, and delete todos, along with a route to create new items, utilizing an in-memory SQLite database for self-contained operation.

examples/toasty-todo/src · high confidence

Add vendored font catalog and build-time code generation

The \topcoat-font\ crate now includes a build script (\build.rs\) and a \fonts.json\ catalog that generates Rust source code at compile time. This allows the crate to provide a comprehensive, type-safe API for accessing a large set of open-source fonts (including families like 42dot Sans, ABeeZee, and Abel) with their specific unicode ranges, weights, and styles, without requiring runtime network access or external font files.

crates/topcoat-font · high confidence

Added Iconify grammar support for compile-time icon resolution

The \topcoat-icon/grammar\ crate now includes a new \iconify\ module that enables parsing and code generation for Iconify icon sets at compile time. This addition introduces procedural macro support for selecting icons via string literals (e.g., \"mdi:delete"\), supporting full set inclusion, glob patterns (\"mdi:\*"\), and specific icon selection. The implementation includes logic to resolve icon data into const-evaluable \IconData\ expressions, validate icon names, and provide helpful error messages with "did you mean" suggestions for typos. It also handles edge cases like hidden icons, unsupported transformations (rotations/flips), and naming conflicts (e.g., leading digits or Rust keywords). This feature is gated behind the \iconify\ feature flag.

crates/topcoat-icon/grammar/src · high confidence

Added Topcoat storefront benchmark

A new benchmark application has been added to \benchmarks/topcoat/src\ to measure the Topcoat framework's performance. This implementation includes a product catalog loaded from \products.json\, a router with a root layout and home page, and logic for paginated product listings with sorting and filtering. The benchmark is configured to use jemalloc for memory allocation and explicitly disables compression to ensure fair comparison with other frameworks.

benchmarks/topcoat/src · high confidence

Added neutral theme with design tokens and dark mode support

The Topcoat UI registry now includes a built-in 'neutral' theme defined in \crates/topcoat-ui/registry/themes/neutral.css\. This theme exposes a comprehensive set of design tokens (such as \--background\, \--primary\, \--sidebar\, and \--destructive\) that map to Tailwind utilities, allowing components to derive their appearance from these values rather than hardcoded colors. It supports both light and dark modes via a \.dark\ class, providing distinct color palettes and shadow definitions for each state to ensure consistent styling across the application.

crates/topcoat-ui/registry/themes · high confidence

Client-side navigation, WebSocket streaming, and hot reload

The browser runtime now supports client-side navigation that updates the page without changing the URL, along with pre-fetching of linked pages to improve perceived performance. It introduces WebSocket-based streaming for live updates, allowing the server to push incremental HTML frames (snapshots and region swaps) to the client in real-time. Additionally, a new hot reload mechanism preserves component state and signal values during development, enabling instant UI updates without a full page refresh.

crates/topcoat-runtime/browser/src/render · high confidence

Coffee shop demo adds interactive menu and ordering pages

The coffee shop demo now includes a searchable menu page at /menu and a detailed drink page at /menu/{slug}. Users can filter drinks by name, view individual drink details with dynamic price calculation based on quantity, and place orders via a server-side procedure that returns a confirmation message.

demos/coffee-shop/src/app · high confidence

Font example demonstrates self-hosted and CDN font loading

The font example now includes a working implementation showing how to load fonts in Topcoat applications. It demonstrates two approaches: using the \fontsource\_font!\ macro to self-host a font via the asset bundle, and manually declaring a font face with \font!\ to load directly from a CDN (jsDelivr). The example also shows how to use the \topcoat::font::link\ helper to automatically generate the necessary preload and style elements in the HTML head.

examples/font · high confidence

Initial browser runtime build configuration

The browser runtime crate now includes the necessary configuration files to build and bundle the JavaScript output for browser environments. This setup uses \tsup\ to compile TypeScript sources into an ES module (ESM) bundle, targeting ES2022, and includes specific configuration for a separate coherence test bundle. Additionally, project tooling is standardized with \biome.json\ for formatting and linting, and a \tsconfig.json\ defining strict TypeScript compiler options.

crates/topcoat-runtime/browser · high confidence

Introduce Tailwind CSS build integration with configurable CLI execution

This change adds the \topcoat-tailwind\ build module, enabling automatic Tailwind CSS processing during the Cargo build process. Users can now configure the Tailwind CLI executable source (defaulting to downloading version 4.3.2 from GitHub with optional SHA-256 checksum verification), specify input/output CSS paths, set the working directory for class scanning, and toggle optimization and minification flags. The implementation handles caching of the CLI binary in a shared Topcoat cache directory, manages concurrent downloads via file locking, and ensures build script integrity by checking environment variables like \OUT\_DIR\ and \CARGO\_MANIFEST\_DIR\.

crates/topcoat-tailwind/src/build · high confidence

Introduce Topcoat CLI UI management commands

This change introduces the \topcoat ui\ subcommand suite, providing a new way to manage UI components and themes directly from the command line. Users can now run \topcoat ui init\ to scaffold a project with a selected theme and component directory, \topcoat ui add\ to install specific components or all available ones (using the new \--all\ flag), \topcoat ui list\ to view installed and available components with their status, and \topcoat ui remove\ to uninstall specific components. The commands support interactive prompts for theme selection and confirmation, as well as non-interactive flags like \--theme\, \--registry\, and \--overwrite\ for automation.

crates/topcoat-cli/src/ui · high confidence

Introduce Topcoat CLI with dev server, formatting, and asset management

The Topcoat CLI is now available, providing a unified command-line interface for development workflows. Users can start a development server that watches for file changes and supports manual reloads, format Topcoat macro bodies (such as view, class, and live) with optional rustfmt integration, and manage embedded assets through list, bundle, and clean commands. The CLI also includes a UI component manager for adding, listing, and removing premade components, along with a version mismatch warning to ensure compatibility between the CLI and the Topcoat runtime.

crates/topcoat-cli/src · high confidence

Introduce Topcoat Icon component with optional Iconify build-time integration

This change adds the \topcoat-icon\ crate, providing an \icon\ component that renders \IconData\ as an inline \\<svg\>\ element. The component supports configurable size (defaulting to 1em) and accessible labeling via \aria-label\ and \role="img"\, while hiding the icon from assistive technology when no label is provided. When the \iconify\ feature is enabled, the crate includes build-time tooling (\BuildConfig\) that stages Iconify icon sets from jsDelivr into the build output directory, allowing developers to pin specific icon sets and versions for reproducible, offline-capable builds.

crates/topcoat-icon/src · high confidence

Introduce Topcoat UI component management crate

The \crates/topcoat-ui/src/manage\ module now provides the core logic for managing UI components within a Cargo workspace. It introduces an \init\ command to initialize a package with a theme and install state, an \add\ command to install components from registries (including a new \--all\ flag to install every available component), and a \remove\ command to uninstall them. The system tracks installed components and themes in a \components.toml\ state file, handles module declaration updates automatically, and supports multiple registries with conflict resolution and status listing.

crates/topcoat-ui/src/manage · high confidence

Introduce Topcoat UI component registry crate

A new registry crate has been added to expose the default Topcoat UI component library. This module aggregates 31 distinct UI components—including layout primitives like sidebar and card, form controls such as input and select, and feedback elements like alert and spinner—making them available for use when the \ui\ feature is enabled.

crates/topcoat-ui/registry/src · high confidence

Introduce Topcoat UI registry and component management crate

The new \topcoat-ui\ crate provides the core infrastructure for managing UI components in Topcoat applications. It introduces a registry system that loads component definitions from \registry.toml\ manifests, allowing users to browse available components and themes. The crate exposes APIs to install, list, and remove components, tracking their state via content hashes to detect updates. It also defines callback types for handling user confirmation prompts and theme selection during the initialization process.

crates/topcoat-ui/src · high confidence

Introduce Topcoat UI registry crate with component manifest and icon staging

The new \topcoat-ui-registry\ crate provides a centralized registry for Topcoat UI components, defined in \registry.toml\ which lists 30 components (such as accordion, sidebar, and input) and their source files, along with a neutral theme. A \build.rs\ script stages the Lucide icon set for use in component tests when the \stage-icons\ feature is enabled, and a \CHANGELOG.md\ documents the crate's version history from v0.0.1 to v0.9.0.

crates/topcoat-ui/registry · high confidence

Introduce Topcoat runtime for interactive client-server communication

This change adds the \topcoat-runtime\ crate, establishing the foundation for interactive web applications. It introduces a reactive signal system for shared state, enabling client-side event handling and attribute binding through generated JavaScript expressions. The runtime supports seamless navigation with client-side routing and configurable prefetching, while maintaining interactivity via WebSocket connections and HTTP-based page reruns. Additionally, it provides a shard-based architecture for streaming live updates and efficient partial re-renders.

crates/topcoat-runtime/src · high confidence

Introduce asset bundling and serving infrastructure

The \topcoat-asset\ crate now provides a complete system for managing static assets. The \Bundler\ scans compiled binaries for embedded asset declarations and copies or downloads them into a bundle directory, using parallel processing and a content-addressable cache for remote assets. At runtime, \AssetBundle::load\ discovers this bundle next to the executable, and \AssetConfig\ resolves asset IDs to their bundled filenames. When the \serve\ feature is enabled, the router automatically registers HTTP routes for each bundled file, allowing the application to serve assets directly; alternatively, assets can be configured for external hosting via a base URL.

crates/topcoat-asset/src · high confidence

Introduce email sending capability with configurable transports

The \topcoat-mail\ crate is added, providing a builder API to compose email messages (including HTML bodies, plain-text fallbacks, inline and downloadable attachments, and custom headers) and send them via a pluggable transport system. Applications can register a transport (SMTP, file-based for development, or in-memory for testing) via \MailConfig\ and deliver mail from handlers using the \send\ function.

crates/topcoat-mail/src · high confidence

Introduce grammar crate for router macro parsing

The \crates/topcoat-router/grammar\ crate has been added to centralize the parsing logic for the router's procedural macros. This new module defines the structures and parsers for route attributes, page handlers, layout components, layers, path parameters, query parameters, and HTTP method matching. It enables the router to parse and validate macro inputs such as \\#\[route\]\, \\#\[page\]\, \\#\[layout\]\, and \\#\[not\_found\]\ before code generation, ensuring that user-defined handlers conform to the expected signatures and attribute formats.

crates/topcoat-router/grammar/src · high confidence

Introduce grammar crate with memoization, path resolution, and pretty-printing utilities

The new \topcoat-core-grammar\ crate provides core procedural-macro building blocks for the Topcoat framework. It introduces a \\#\[memoize\]\ attribute that caches function results based on arguments, supporting an \as\_ref\ modifier to return borrowed references and handling both synchronous and asynchronous functions. The crate also includes a \paths\ module that dynamically resolves framework crate paths (such as \topcoat-context\ or \topcoat-view\) at compile time, ensuring generated code works whether the user depends on the \topcoat\ facade or individual standalone crates. Additionally, it provides a \pretty\ module for formatting Topcoat macro invocations in source code and utility types like \QuoteOption\ to preserve \Option\ wrappers in generated token streams.

crates/topcoat-core/grammar/src · high confidence

Introduce module-based router with automatic path derivation

The router now supports a module-based routing system where URL paths are automatically derived from the Rust module tree structure. This change introduces traits (ModuleLayer, ModulePage, ModuleLayout, ModuleRoute) and a ModuleRouterBuilder that scans modules to register routes, layouts, and layers without requiring explicit path declarations. Static module names are converted to kebab-case for URLs, while modules prefixed with an underscore act as grouping segments that do not appear in the URL. Users can override these defaults using the segment! macro to specify custom segment kinds (Static, Group, Param, CatchAll) and rename URL segments. Relative paths can be specified using ./ syntax to append to the derived module path.

crates/topcoat-router/src/module · high confidence

Introduce proc-macro grammar for font declarations

The \topcoat-font/grammar\ crate now provides the parsing and token-generation logic for the \font!\ and \@font-face\ syntax. This allows users to define font families and their variants using a declarative, CSS-like structure within Rust code, which is then compiled into static font data registrations.

crates/topcoat-font/grammar/src · high confidence

Introduce request body size limits and response compression

The router now enforces a default 2 MiB limit on request bodies, returning a 413 Content Too Large error when exceeded; this limit can be customized or disabled per route using the new \BodyLimit\ layer. Additionally, response compression is enabled by default (supporting gzip and brotli), allowing the application to reduce bandwidth usage while skipping compression for small bodies or specific content types.

crates/topcoat-router/src · high confidence

The \topcoat-cookie\ crate now provides a request-scoped \CookieJar\ that collects pending cookie changes and writes them as \Set-Cookie\ headers when the handler returns. The jar is sealed once headers are written, preventing writes from outliving the response (such as in streaming or WebSocket tasks) by panicking on subsequent add/remove calls. This ensures cookies are correctly applied even when handlers return errors or redirects. The crate also exposes a \Cookies\ trait with adapters for signed and encrypted cookies, name prefixes (\\_\Host-\, \\\_Secure-\), and attribute defaults, along with a \CookieStore\ for typed, transactional cookie-backed values.

crates/topcoat-cookie/src · high confidence

Introduce session management with configurable token storage

Adds a new session management capability to the Topcoat framework, allowing applications to handle user authentication sessions. The crate provides a \SessionLayer\ for the router to inject session state into requests, and a \SessionConfig\ builder to customize token lifetimes and storage mechanisms. It includes a default \CookieTokenStore\ (enabled via the \cookie\ feature) that manages session tokens via hardened cookies, while exposing a \TokenStore\ trait for custom transports. Key API functions include \start\, \stop\, \refresh\, and \rotate\ to manage session lifecycles securely, ensuring tokens are hashed for storage and rotated on privilege changes.

crates/topcoat-session/src · high confidence

Introduces browser-side reactive runtime with signal-based reactivity and hydration

The browser runtime now uses a custom reactive system based on signals and effects to manage UI updates. This change introduces a \SignalRegistry\ for persistent signal identity, allowing state to be preserved across page navigations and shard updates. The runtime handles hydration of server-rendered content, manages client-side navigation via WebSocket connections for live updates, and supports hot-reload during development. A new \Scope\ system organizes reactive resources, ensuring that effects and dependencies are correctly tracked, batched, and cleaned up when content is replaced.

crates/topcoat-runtime/browser/src · high confidence

Introduction of Topcoat Router macro crate

This change introduces the \topcoat-router/macro\ crate, which exposes procedural macros for defining router structures. Users can now use the \\#\[page\]\, \\#\[layout\]\, \\#\[route\]\, and \\#\[layer\]\ attributes to annotate components, and the \not\_found\, \segment\, \path\_param\, \module\_param\, and \\#\[query\_params\]\ macros to handle routing logic and parameters. These macros delegate parsing to the \topcoat\_router\_grammar\ crate, providing the foundational syntax for building the router.

crates/topcoat-router/macro/src, crates/topcoat-runtime/macro/src · high confidence

Introduction of Topcoat View procedural macros

The \topcoat-view/macro\ crate now exposes a suite of procedural macros for building views and components, including \view\, \live\, \emit\, \attributes\, \class\, \component\, and the \Props\ derive macro. These macros serve as the compile-time foundation for the framework's declarative syntax, delegating parsing to the \topcoat\_view\_grammar\ crate to generate the corresponding Rust code.

crates/topcoat-view/macro/src · high confidence

Introduction of font processing macros

The \topcoat-font/macro\ crate now exposes procedural macros (\font\_face\, \font\, and conditionally \fontsource\_font\_face\, \fontsource\_font\ when the \fontsource\ feature is enabled) that parse font definitions using the \topcoat\_font\_grammar\ crate and generate corresponding Rust code. This provides a declarative syntax for users to define font faces and fonts directly in their source code, with optional support for Fontsource integration.

crates/topcoat-font/macro/src · high confidence

Introduction of the memoize procedural macro

A new \memoize\ procedural macro attribute has been added to the \topcoat-core/macro\ crate. This attribute delegates parsing and code generation to the \topcoat\_core\_grammar\ crate, allowing users to apply memoization logic to functions via the \\#\[memoize\]\ syntax.

crates/topcoat-core/macro/src · high confidence

New Server-Sent Events (SSE) example application

An example application demonstrating Server-Sent Events has been added to the examples directory. It showcases two distinct SSE patterns: a persistent, reconnecting stream for periodic ticks that resumes from the last received event ID, and a finite stream for a background job that reports progress and signals completion. The example includes the necessary Rust server-side routing and streaming logic alongside the client-side JavaScript required to manage the EventSource connections.

examples/sse · high confidence

New Suspense example demonstrating streaming fallbacks and error boundaries

Added a new \suspense\ example application that showcases the framework's streaming SSR capabilities, specifically the \suspense\ and \error\_boundary\ view components. The example includes pages that render fallback UI while async content loads, handles errors gracefully within boundaries without affecting sibling sections, and demonstrates client-side navigation for redirects that occur after streaming has begun.

examples/suspense · high confidence

New Topcoat UI component library for the example application

The \examples/ui/src/components\ directory now includes a comprehensive set of new UI components built with the Topcoat framework. This addition introduces layout and navigation primitives such as \accordion\, \alert\, \alert\_dialog\, \avatar\, \badge\, \breadcrumb\, \button\, \card\, \checkbox\, \dialog\, \dropdown\_menu\, \field\ (with \field\_set\, \field\_legend\, \field\_group\, \field\_label\), \hover\_card\, \input\, \kbd\, \label\, and \pagination\. These components provide styled, accessible HTML structures and interactive behaviors for the example UI.

examples/ui/src/components · high confidence

New Topcoat UI component registry

The \crates/topcoat-ui/registry/src/components\ directory now contains a comprehensive set of new UI components, including accordion, alert, alert dialog, avatar, badge, breadcrumb, button, card, checkbox, dialog, dropdown menu, form fields (field, field group, field legend, field set, field label, field title, field content), hover card, input, keyboard shortcuts (kbd, kbd group), label, and pagination. These components provide a consistent, styled foundation for building user interfaces, utilizing Tailwind CSS classes and Lucide icons.

crates/topcoat-ui/registry/src/components · high confidence

New Topcoat UI example application

The \examples/ui\ directory now contains a complete, runnable showcase application for the Topcoat UI component library. This example demonstrates the integration of 30+ UI components (including sidebar, accordion, dialog, and form fields) within a single-page application using Topcoat's module router and reactive signals. It serves as a practical reference for setting up assets, routing, and theme toggling (light/dark mode) in a Topcoat project.

examples/ui/src · high confidence

New UI component library for the coffee-shop demo

The coffee-shop demo now includes a dedicated set of reusable UI components (badge, button, card, input, label, and skeleton) built on the Topcoat framework. These components provide consistent styling, variant support (e.g., primary, destructive, outline), and accessibility features, allowing the demo to present a polished, modern interface.

demos/coffee-shop/src/components · high confidence

New \`mail!\` proc-macro for declarative email composition

The \topcoat-mail\ grammar crate now provides the parsing and code-generation logic for a new \mail!\ macro. This feature allows users to define emails using a declarative \name: value\ syntax (e.g., \subject\, \from\, \to\, \html\). The macro parses these fields, enforces uniqueness, and generates an awaited async block that constructs a \Mail\ object via \MailBuilder\. It supports standard fields like recipients and headers, as well as an \html\ field that accepts \view!\ bodies for rich content.

crates/topcoat-mail/grammar/src · high confidence

New \`mail\` procedural macro for email templates

A new \mail\ procedural macro has been added to the \topcoat-mail\ crate, allowing users to define email templates using a declarative syntax. The macro parses input via \topcoat\_mail\_grammar\ and generates the corresponding Rust code, with documentation sourced from the project's mail guide.

crates/topcoat-mail/macro/src · high confidence

New \`topcoat dev\` command with hot reload and WebSocket updates

The \topcoat dev\ command is now available, providing a development server that watches source files and automatically rebuilds the application. It uses a WebSocket connection to notify the browser of build status (rebuilding, failed, ready) and triggers page reloads. The implementation includes a shadow-copy mechanism on Windows to prevent file-locking issues during hot reloads, a stable port selection strategy for the dev server, and manual reload support via the 'r' key.

crates/topcoat-cli/src/dev · high confidence

Added two new examples demonstrating framework capabilities: the asset example shows how to bundle and serve static files (like images) using the new asset API, and the cookie example demonstrates secure, signed cookie handling with automatic persistence and tamper protection.

examples/asset, examples/cookie · high confidence

New asset management commands for bundling, listing, and cleaning

The CLI now includes three new subcommands to manage application assets. The \bundle\ command packages assets declared in the executable into a directory, defaulting to an \assets\ folder next to the built binary to prevent conflicts between builds. The \list\ command displays the source paths or URLs of all assets embedded in the binary. The \clean\ command removes generated asset bundle directories and associated cache files, allowing users to clear stale asset data.

crates/topcoat-cli/src/asset · high confidence

New browser-side DOM hydration and reactivity runtime

The browser runtime now hydrates server-rendered HTML by parsing special comment markers (for signals, dependencies, regions, and shards) and attaching reactive bindings. Users get live UI updates via \data-topcoat-bind\ for attributes and \data-topcoat-on\ for events, with form state preserved during DOM morphing. The runtime also supports nested regions and shards, allowing partial page updates and streaming live updates without full page reloads.

crates/topcoat-runtime/browser/src/dom · high confidence

New coffee shop demo application

Added a new 'Little Crema' coffee shop demo in the \demos/coffee-shop\ directory, showcasing the framework's routing, layout, and component systems. The demo includes a full-stack application with a SQLite-backed drink menu, customer sign-in via cookies, and a responsive UI built with Tailwind CSS and custom components.

demos/coffee-shop/src · high confidence

New coffee shop demo showcasing server-rendered storefront with Tailwind theming

A new coffee shop demo has been added to the \demos/coffee-shop\ directory, demonstrating how to combine server-rendered pages with browser interactions. The demo includes a searchable menu and drink ordering flow, utilizing the Topcoat UI framework with a neutral Tailwind theme that supports dark mode via CSS variables. It serves as a reference implementation for routing, layout, and component usage within the Topcoat ecosystem.

demos/coffee-shop · high confidence

New content-type extractors and response wrappers for CSS, HTML, JS, WASM, and Sitemaps

The router now provides dedicated request extractors and response wrappers for common web content types, allowing routes to easily handle and serve specific media types. New wrappers include Css, Html, Js, and Wasm for setting the correct Content-Type headers (text/css, text/html, text/javascript, application/wasm) on responses. Request extractors are added for Form (application/x-www-form-urlencoded), Json (application/json), and Multipart (multipart/form-data) bodies, enabling structured deserialization and validation. Additionally, a Sitemap builder is introduced to generate XML sitemaps for search engines, and a View module supports both standard HTML delivery and a new 'Frames' mode (application/x-ndjson) for streaming live region updates to the browser.

crates/topcoat-router/src/content · high confidence

New core infrastructure for request context, memoization tracking, and abortable futures

The \topcoat-core\ crate now provides the foundational runtime primitives for the framework. It introduces a structured \Cx\ (context) that manages scoped request values via \with\ and \with\_many\, alongside a \BaseUrl\ utility for resolving absolute application URLs. To support reactive memoization, the crate implements a \ContextTracker\ that records request context reads and validates them against binding IDs to detect changes. Additionally, it adds an \AbortStore\ mechanism allowing futures to be short-circuited with a typed value, and includes low-level utilities like a \ConstWriter\/\ConstReader\ for allocation-free byte parsing and a \Fnv1a\ hasher for stable compile-time identifiers.

crates/topcoat-core/src · high confidence

New dedicated error types for HTTP responses in the router

The router now provides a set of dedicated error types in the \topcoat\_router::error\ module, allowing handlers to return specific HTTP status codes directly. These include \bad\_request\ (400) with optional field-path reporting, \unauthorized\ (401), \forbidden\ (403), \not\_found\ (404), \method\_not\_allowed\ (405) with an \Allow\ header, \content\_too\_large\ (413), \service\_unavailable\ (503) and \too\_many\_requests\ (429) both supporting a \Retry-After\ hint, \internal\_server\_error\ (500), and redirect types (\redirect\, \redirect\_permanent\, \see\_other\). Additionally, \rewrite\ enables internal request rewriting without changing the browser URL, complete with a chain limit and context propagation.

crates/topcoat-router/src/error · high confidence

New error-handling example demonstrating routing, rewrites, and error boundaries

The examples/error/src directory now contains a complete example application that demonstrates the framework's error handling and routing capabilities. It showcases the use of the \module\_router!\ macro for modular routing, the \href!\ macro for generating links, and the \not\_found!\ macro to ensure unmatched URLs are handled within the layout. The example illustrates how to trigger specific errors like 403 (Forbidden) and 404 (Not Found) from page handlers, and how to use an \error\_boundary\ within a layout to catch these errors and render branded error pages. It also demonstrates server-side URL rewriting via the \rewrite\ function, which dispatches to a new handler without changing the browser URL.

examples/error/src · high confidence

New example projects and documentation for Topcoat features

The examples directory now includes a comprehensive set of runnable projects and documentation covering core Topcoat capabilities. New examples demonstrate specific features such as Alpine AJAX, htmx, Datastar, and WebSocket integration for real-time updates, as well as server-sent events and live streaming with \live!\ and \emit!\. The collection also includes examples for routing strategies (module router, manual router, routerless), context management, session handling, cookie storage, and error handling. A dedicated UI showcase example (\examples/ui\) provides a runnable interface for Topcoat UI components, including a build script that stages the Lucide icon set and generates a Tailwind stylesheet from the neutral theme. Additional examples cover asset management, font loading, icon integration, and database-backed forms using the Toasty ORM.

examples · high confidence

New grammar crate for parsing Topcoat runtime constructs

The \crates/topcoat-runtime/grammar\ crate has been introduced to centralize the parsing and code generation for Topcoat's runtime features. It provides parsers and token expansion for \\#\[procedure\]\ and \\#\[shard\]\ attributes, including validation of function signatures (e.g., requiring \async\, return types, and specific argument patterns) and endpoint path resolution. The crate also handles \\#\[record\]\ attribute parsing for custom data types, enforcing restrictions on generics and reserved field names, and implements expression lowering for the \expr!\ macro, supporting a wide range of Rust expression forms while preserving input on parse failures for better IDE integration.

crates/topcoat-runtime/grammar/src · high confidence

New grammar module for parsing and lowering view attributes

The \crates/topcoat-view/grammar/src/attributes\ directory now contains the core grammar definitions for the view system, introducing structured parsing and lowering for element attributes. This includes support for standard \name=value\ attributes, dynamic expression-based keys and values, attribute spreading via \(expr)\, one-way bindings using \:name=(expr)\ or \:name=$(expr)\, and event handlers with \@name=(expr)\, \@name=$(expr)\, or raw JavaScript strings. The module also defines \AttributeNode\ to handle control flow constructs (like \if\, \for\, \match\) within attribute lists, ensuring these template structures are correctly parsed and lowered into the High-Level Intermediate Representation (HIR).

crates/topcoat-view/grammar/src/attributes · high confidence

New icon example demonstrating SVG rendering and accessibility

The examples/icon directory now includes a Rust source file that demonstrates how to render icons as inline SVGs using the topcoat framework. This example shows how icons inherit text color via currentColor, how to specify explicit dimensions and accessibility labels, and how to include icons from the Iconify collection staged by the build script.

examples/icon · high confidence

New internal view rendering primitives for streaming, suspense, and error handling

The view rendering engine now includes dedicated internal components to support advanced streaming and resilience patterns. A new \Builder\ handles synchronous template bursts with context-aware escaping, while \JoinView\ and \LoopView\ enable concurrent rendering of dynamic nodes with round-robin update polling. Streaming capabilities are provided by \LiveView\ and \EmitView\ to manage \live!\ regions, and \SuspenseView\ allows showing fallbacks while child content loads. Additionally, \ErrorBoundaryView\ replaces failed child content with a fallback, and \ThenView\ supports deferred view resolution from futures.

crates/topcoat-view/src/internal · high confidence

New live streaming examples with WebSocket support and error handling

The \examples/live\ application now includes a chat feature that uses WebSocket connections to stream real-time updates across multiple browser tabs, alongside dedicated examples for progress tracking, suspense (loading placeholders), and error handling within live regions. These examples demonstrate the framework's \live!\ and \emit!\ macros for streaming Server-Side Rendering (SSR) and scoped WebSocket shards, allowing users to see how to build interactive, stateful UIs that update dynamically without full page reloads.

examples/live · high confidence

New path and query parameter example

The \examples/path-query-params\ directory now contains a complete example demonstrating how to use the router's path and query parameter features. It shows how to define typed query parameters with error handling (redirecting on invalid input), extract single path parameters with validation (returning a bad request on failure), and capture catch-all path segments. The example also illustrates using the \href!\ macro to build URLs with parameters and query strings, and the \module\_param!\ macro for modular path parameter definitions.

examples/path-query-params · high confidence

A new product detail view has been added to the storefront benchmark, accessible via a dynamic route parameter for the product ID. This page displays the product's name, category, price, description, and rating, along with dedicated sections for specifications, customer reviews, and a grid of related products.

benchmarks/topcoat/src/app/products · high confidence

New runtime example application with interactive pages

The \examples/runtime\ directory now contains a complete, runnable example application (\main.rs\) that demonstrates the framework's client-side reactivity and routing capabilities. It includes several distinct pages: a counter (\counter.rs\) showing basic signal updates, a show/hide toggle (\show.rs\), a sort list (\sort.rs\), a procedure example (\procedure.rs\) for calling server-side functions from the browser, a record example (\record.rs\) for handling complex nested data structures and validation, and a shard example (\shard.rs\) demonstrating server-side rendering of isolated components with their own state. The application uses the new \module\_router!\ macro and \link\ components for client-side navigation without full page reloads.

examples/runtime · high confidence

New suspense and error boundary view components

The view module now includes dedicated \suspense\ and \error\_boundary\ components to improve rendering control. The \suspense\ component displays a fallback view while child content loads, with a configurable \SuspenseMode\ (Stream or Wait) to control whether the fallback is shown or if the server waits for initial content. The \error\_boundary\ component catches rendering errors in child content and renders a specified fallback view, allowing for graceful error handling without crashing the entire page.

crates/topcoat/src/view · high confidence

New view grammar crate for parsing Topcoat templates

The \crates/topcoat-view/grammar\ crate introduces the core parsing logic for the Topcoat view macro, defining the grammar for HTML elements, components, and control-flow constructs. It supports dynamic element names via Rust expressions, allows keyword identifiers (such as \use\) as tag names, and enforces strict validation for \\<!DOCTYPE html\>\ declarations. The grammar also introduces \\#\[key(expr)\]\ attributes for \for\ loops to enable stable component identity during re-renders, and explicitly rejects unsupported \break\ and \continue\ statements within view bodies.

crates/topcoat-view/grammar/src/view · high confidence

Runtime support for primitive types, collections, and signals

The runtime now supports a comprehensive set of data types in server-side expressions, including booleans, integers (i8–i128, u8–u128, isize, usize), floats (f64), strings, and sequences (Vec, slices, and fixed-size arrays). It also adds support for Option, Result, tuples (up to 12 elements), and signals, enabling reactive state management and error handling directly within the runtime. These types are serialized with explicit type tags and bit-width checks to ensure safe round-tripping between the server and client.

crates/topcoat-runtime/src/surrogate · high confidence

Topcoat library restructured with feature-gated modules and new serve/dev APIs

The \crates/topcoat/src\ crate has been completely restructured from a placeholder into the main public API surface for the Topcoat framework. It now exposes a modular architecture where capabilities like routing, views, runtime, and integrations (Alpine AJAX, HTMX, Datastar, Font, Icon, Mail, Tailwind, Assets, Cookies, Sessions) are available via specific feature flags. New high-level APIs have been introduced: \serve\, \serve\_until\, and \start\ in the \serve\ module for launching the application with graceful shutdown support; \dev::script\ for automatic hot-reload updates in development; and \runtime::script\ for loading the browser-side runtime. The router module now includes a \discover\ extension trait for automatic route/page/layout discovery when the \discover\ feature is enabled.

crates/topcoat/src · high confidence

WebSocket echo example added

The examples/websocket directory now includes a complete WebSocket echo demonstration. It features a Rust server handler that upgrades connections and echoes received text or binary messages back to the client, and a corresponding JavaScript client that manages the WebSocket lifecycle, sends user input from a form, and logs received messages to the page.

examples/websocket · high confidence

Architecture

New grammar crate for view macro parsing and lowering

The \crates/topcoat-view/grammar\ crate has been introduced to handle the parsing and High-Level Intermediate Representation (HIR) lowering for the view macro system. This change adds dedicated modules for parsing attributes (\attributes.rs\), class lists (\class.rs\), component definitions (\component.rs\), and template structures (\template.rs\), along with a \live.rs\ module for streaming SSR support. It replaces the previous monolithic grammar implementation with a structured, modular approach that separates parsing logic from code generation, enabling better maintainability and clearer error reporting for view macro inputs.

crates/topcoat-view/grammar/src · high confidence

Behavioural changes

Examples updated to use the new module\_param! macro for route parameters

The error-handling and toasty-todo examples now demonstrate the recommended module router pattern by using the new module\_param! macro to define and access route parameters (such as post\_id and todo\_id). This change replaces previous parameter extraction methods with a structured, module-scoped approach that integrates with the router's error handling, providing a clearer reference for building robust, parameterized routes.

examples/error/src/posts, examples/toasty-todo/src/todos · high confidence

Hello-world example updated to use module router and async components

The hello-world example has been rewritten to demonstrate the framework's modern routing and component model. It now uses an asynchronous main function with \tokio\, implements a \home\ page via the \\#\[page\]\ macro, and defines a reusable \hello\ component using the \\#\[component\]\ macro. The example also showcases the \module\_router!\ macro for automatic route discovery and includes the development server hot-reload script.

examples/hello-world · high confidence

Improved build output detection and version mismatch warnings

The CLI now provides more accurate build output detection by filtering out intermediate build-script artifacts and dependency libraries, ensuring only final executables and dynamic libraries are reported. Additionally, it warns users when the installed CLI version is incompatible with the project's Topcoat dependency, helping to prevent subtle issues from version mismatches.

crates/topcoat-cli/src/common · high confidence

Improved error reporting for formatting failures

The formatting command now provides more detailed and structured error messages. When syntax errors occur within view macros, the tool reports the specific line and column for each issue. Additionally, errors related to file globbing, pattern matching, and external rustfmt execution are now clearly distinguished and displayed to the user.

crates/topcoat-cli/src/fmt · high confidence

Introduces Rust-style type surrogates and expression hydration for the browser runtime

The browser runtime now uses explicit surrogate classes (Bool, F64, Integer, Option, Result, Record, Vec, Slice, Array, Tuple, Procedure, Future, and Event) to bridge Rust types to JavaScript, ensuring that value formatting, arithmetic, and serialization match Rust semantics. F64 formatting now avoids JavaScript's exponential notation and aligns with Rust's Display output, while Integer surrogates provide exact, checked arithmetic with BigInt to preserve precision beyond Number.MAX\_SAFE\_INTEGER. A new expression compilation and hydration layer (compile, Context, hydrate, dehydrate) allows the browser to reconstruct these typed values from server-generated payloads, and Event properties are wrapped in surrogates to maintain type consistency. Tests verify that serialization, hydration, and boundary checks work correctly for these types.

crates/topcoat-runtime/browser/src/surrogate · high confidence

Memoization now supports scoped context and detects recursive calls

The memoization system in \topcoat-core\ has been updated to respect request-scoped context changes and prevent infinite loops. It now tracks which request context bindings a memoized function reads, ensuring that cached results are only reused when the caller's scope matches the original context; if the scope changes (e.g., via \cx.with\), a new variant is computed. Additionally, the system now detects and panics on recursive memoized calls to avoid deadlocks, and it uses 128-bit hashing for cache keys instead of requiring \Clone\ and \Eq\ on arguments. A new \as\_ref\ option allows memoized functions to return borrowed references to cached contents.

crates/topcoat-core/src/memoize · high confidence

Native pretty-printing for Rust code in macro bodies

The \crates/topcoat-core/grammar/src/pretty\ module now implements a custom pretty-printing engine for \syn\ syntax trees, replacing the previous \prettyplease\ dependency. This change introduces a Wadler/Oppen-style two-pass printer that handles layout, indentation, and line-breaking for Rust code embedded within macro bodies, ensuring that comments and original source structure are preserved. The new implementation includes specific logic to handle different delimiter types (parentheses, braces, brackets) and integrates with a registry system to format custom macros, while also providing error reporting with accurate source positions.

crates/topcoat-core/grammar/src/pretty · high confidence

New HIR lowering and two-phase emission for view templates

The \view!\ macro now lowers templates into a High-Level Intermediate Representation (HIR) before emitting code. This introduces a two-phase emission process: a 'hoist' phase that evaluates expressions in source order, and a 'burst' phase that synchronously writes the resulting instruction block. Control-flow constructs (\if\/\else\, \match\, \for\) and component invocations are now lowered into nested scopes within this HIR, allowing the system to correctly manage ownership of pattern bindings and context across branches and iterations. This change replaces the previous lowering logic with a structured builder and emitter pipeline that supports both synchronous and asynchronous rendering paths.

crates/topcoat-view/grammar/src/view/hir · high confidence

New browser runtime implementation with client-side navigation and streaming

The browser runtime has been replaced with a new implementation that supports client-side navigation, page pre-fetching, and streaming HTML updates via NDJSON. This change introduces a new coherence module for executing Rust-compiled closures in the browser, providing Rust-style types like Signals, Integers, and Strings with proper serialization and hydration. The runtime now handles shard-based rendering with morphing HTML updates instead of full replacements, and includes WebSocket support for live updates. User-facing changes include faster page transitions through pre-fetching, smoother UI updates via HTML morphing, and improved reactive state management with persistent signal identities.

crates/topcoat-runtime/browser/dist · high confidence

New expression lowering implementation in the grammar crate

The \crates/topcoat-runtime/grammar/src/expr\ module has been refactored to introduce a comprehensive expression lowering system. This change adds dedicated handlers for a wide range of Rust expressions—including blocks, if/else, loops, closures, method calls, and literals—and implements a \NameResolver\ to manage local and external bindings. For users, this enables the runtime to correctly translate complex Rust syntax into JavaScript, supporting features such as async blocks, integer literals, and the \raw!\ macro.

crates/topcoat-runtime/grammar/src/expr · high confidence

New instruction-based view rendering system with optimized string handling

The view rendering engine in \crates/topcoat-view/src/buffer\ has been replaced with a new system that compiles views into a fixed-size instruction stream. This change introduces a \ConstBuffer\ to store out-of-line operands (strings, regions, headers) and a \Renderer\ to execute the instruction sequence, enabling stable region IDs across rerenders and optimizing string output by promoting static literals to avoid allocations. The new architecture supports streaming SSR and live updates via WebSocket connections, while also removing the \itoa\ dependency in favor of \format\_into\ for integer rendering.

crates/topcoat-view/src/buffer · high confidence

New path parameter attribute macro and relative module routing support

The router's path parameter attribute macro has been replaced with a new implementation that supports relative module routing. This change introduces \HandlerPath\ to distinguish between absolute paths (starting with \/\) and relative paths (starting with \./\), allowing handlers to be served at paths relative to their module structure. It also adds \ErrorAttr\ to define error responses (such as \bad\_request\, \not\_found\, \redirect\) for failed parameter parsing, and \HandlerArgs\ to parse handler function signatures, ensuring only one request body and one context parameter are accepted.

crates/topcoat-router/grammar/src/common · high confidence

New view rendering system with instruction buffers and hoisted parts

The view rendering engine has been replaced with a new architecture that uses instruction buffers (\ViewBuffer\) to collect view parts during polling, enabling concurrent rendering and stable region IDs. This change introduces a \hoist\ mechanism that allows parts to be collected and prepended to content, and adds comprehensive support for CSS length units and HTML attribute handling with proper escaping and validation.

crates/topcoat-view/src · high confidence

Stateful hot reload with DOM morphing

The browser client now supports stateful hot reloading that updates the page via DOM morphing instead of a full reload. This preserves form inputs, scroll position, and focus during development, while automatically falling back to a full reload when structural changes (such as new scripts or a changed base URL) make morphing unsafe. A floating status indicator provides real-time build feedback, and the WebSocket connection intelligently pauses during navigation to prevent interruptions.

crates/topcoat-cli/browser, crates/topcoat-core/browser · high confidence

Test coverage

Added Rust vs. JavaScript cross-compiler coherence tests; Added integration tests for coffee-shop demo registry synchronization; Added integration tests for the CLI formatter; Added integration tests for the Topcoat router macro; Added macro test suite for view rendering, components, and control flow; Added micro-benchmarks for View rendering performance; Added test fixtures for the view grammar pretty printer; Added tests for font grammar pretty-printing; Added tests for font-face macro and Fontsource integration; Added tests for runtime macro features; Added tests for the mail! macro and email construction; Added tests for the memoize macro; Added tests for the pretty-printing implementation; Added tests for the view grammar pretty printer; New Rust-JavaScript coherence testing harness.

Dependencies

Initial dependency lockfiles and benchmark project manifests

This change introduces the initial dependency resolution files (Cargo.lock, pnpm-lock.yaml, yarn.lock) and manifest files (Cargo.toml, package.json) for the project's benchmark suite and internal crates. It establishes the dependency trees for the Topcoat framework itself, as well as comparison benchmarks using Axum+Maud, Leptos, and Next.js, ensuring reproducible builds for these specific locations.

(dependencies) · high confidence

Housekeeping

Repository initialization with development tooling and documentation

The repository has been initialized with foundational project files, including a Nix development shell (flake.nix) for consistent tooling, a Cargo formatter configuration (rustfmt.toml), and a Clippy configuration (clippy.toml). It introduces an AI agent instruction file (AGENTS.md) and a symlinked CLAUDE.md to guide code generation and review, alongside a comprehensive CONTRIBUTING.md guide for local setup and pull request standards. The project also includes an llms.txt file summarizing the framework's APIs and conventions, a Topcoat.toml marker for editor integration, and an expanded .gitignore to filter build artifacts and environment files.

(repo-wide) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.

Score

  • CAI 69 → 60 (-9.2)
  • Rubric changed (rubric-2026.09.11 → rubric-2026.09.18) — scores are not directly comparable.

Lenses

  • Code Health 93 → 93 (-0.6)
  • Architecture 100 → 98 (-1.9)
  • Maturity 68 → 55 (-12.6)
  • Readiness 75 → 48 (-26.8)
  • Security 58 → 72 (+13.2)
  • Event Sourcing 100 → 100 (+0.0)
  • Performance 89 (new)

Resolved (22)

  • Duplicated block (11 lines × 2) (crates/topcoat-ui/registry/src/components/dialog.rs)
  • Duplicated block (14 lines × 2) (crates/topcoat-ui/registry/src/components/tabs.rs)
  • Duplicated block (5 lines × 2) (crates/topcoat-view/grammar/src/attributes/attribute_node.rs)
  • Duplicated block (6 lines × 2) (crates/topcoat-view/src/internal/move_view.rs)
  • Duplicated block (8 lines × 2) (crates/topcoat-ui/registry/src/components/button.rs)
  • Edited copy of a member (50 corresponding lines) (crates/topcoat-font/grammar/src/fontsource/font.rs)
  • High CVE: [GHSA redacted] (crates/topcoat-runtime/browser/yarn.lock)
  • High: security finding (details withheld)
  • Hotspot: crates/topcoat-core/grammar/src/pretty/printer.rs (crates/topcoat-core/grammar/src/pretty/printer.rs)
  • Hotspot: crates/topcoat-core/grammar/src/pretty/trivia.rs (crates/topcoat-core/grammar/src/pretty/trivia.rs)
  • Hotspot: crates/topcoat-font/grammar/src/font_face.rs (crates/topcoat-font/grammar/src/font_face.rs)
  • Hotspot: crates/topcoat-ui/src/manage/add.rs (crates/topcoat-ui/src/manage/add.rs)
  • Hotspot: crates/topcoat-view/grammar/src/view/hir/bindings.rs (crates/topcoat-view/grammar/src/view/hir/bindings.rs)
  • Hotspot: crates/topcoat-view/src/css/length.rs (crates/topcoat-view/src/css/length.rs)
  • Low vulnerability: [GHSA redacted] (crates/topcoat-runtime/browser/yarn.lock)
  • Medium CVE: [GHSA redacted] (crates/topcoat-runtime/browser/yarn.lock)
  • Medium CVE: [GHSA redacted] (crates/topcoat-runtime/browser/yarn.lock)
  • Medium CVE: [GHSA redacted] (crates/topcoat-runtime/browser/yarn.lock)
  • Outdated (npm): next
  • Outdated (npm): react
  • …and 2 more

New (52)

  • Duplicated block (11 lines × 2) (crates/topcoat-ui/registry/src/components/dialog.rs)
  • Duplicated block (13 lines × 2) (crates/topcoat-runtime/grammar/src/procedure.rs)
  • Duplicated block (13 lines × 2) (crates/topcoat-ui/registry/src/components/tabs.rs)
  • Duplicated block (15 lines × 2) (crates/topcoat-runtime/grammar/src/shard/item.rs)
  • Duplicated block (18 lines × 2) (crates/topcoat-router/grammar/src/page.rs)
  • Duplicated block (19–20 lines × 2) (crates/topcoat-runtime/grammar/src/procedure.rs)
  • Duplicated block (20 lines × 2) (crates/topcoat-router/grammar/src/route.rs)
  • Duplicated block (5 lines × 2) (crates/topcoat-view/src/internal/live_view.rs)
  • Duplicated block (5 lines × 2) (crates/topcoat-view/src/internal/move_view.rs)
  • Duplicated block (5 lines × 3) (crates/topcoat-view/src/internal/live_view.rs)
  • Duplicated block (6 lines × 2) (crates/topcoat-runtime/src/link.rs)
  • Duplicated block (6 lines × 2) (crates/topcoat-view/grammar/src/template/runtime_expr.rs)
  • Duplicated block (8 lines × 2) (crates/topcoat-ui/registry/src/components/button.rs)
  • Duplicated block (8 lines × 3) (crates/topcoat-router/grammar/src/layer.rs)
  • Edited copy of a member (50 corresponding lines) (crates/topcoat-font/grammar/src/fontsource/font.rs)
  • High CVE: [GHSA redacted] (crates/topcoat-cli/browser/yarn.lock)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • Inconsistent naming convention for fallible vs infallible retrieval. try_app_context implies a Result/Option return type, but the signature returns T directly. This contradicts the standard Rust convention where try_ prefixes indicate fallibility (Result/Option). If it panics on missing, it should be named app_context (infallible) and the other try_app_context should return Result/Option.
  • …and 32 more

Changes since last survey

  • 46 commits — 42 feature/other, 4 fixes

By area

  • crates/topcoat-runtime — 15 commits
  • crates/topcoat-router — 8 commits
  • crates/topcoat-view — 5 commits
  • (root) — 4 commits
  • crates/topcoat — 4 commits
  • examples/ui — 3 commits
  • .agents/skills — 2 commits
  • crates/topcoat-cli — 2 commits
  • crates/topcoat-core — 2 commits
  • examples/routerless — 1 commit

Notable commits

  • fix: ci: fix release-plz
  • fix: fix(core): restore thiserror compatibility for Error (#461)
  • fix: fix(router): strip prefix layer (#397)
  • fix: fix(view): rust analyzer auto completions breaking when the current rust code macro input is invalid (#457)
  • change: chore: improve documentation skill
  • change: chore: release v0.9.0 (#409)
  • change: chore: upgrade syn to 3.0.6 (#428)
  • change: docs(router): use module router as the recommended example router (#453)
  • change: docs(skills): add test style
  • change: docs: add llms.txt (#455)
  • change: docs: add llms.txt comment in README
  • change: docs: link to absolute URL for llms.txt
  • change: docs: restructure repository documentation (#454)
  • change: docs: rewrite all docs (#435)
  • change: docs: rewrite all docs 3 (#439)
  • change: feat(cli): --rustfmt cli flag to run rustfmt automatically (#456)
  • change: feat(cli): stateful hot reload (#421)
  • change: feat(core)!: make Error cheap to clone (#396)
  • change: feat(example): add routerless example project (#422)
  • change: feat(router): client_ip(cx) accessor and trusted proxies (#425)
  • …and 26 more

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

tokio-rs/topcoat was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 30 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit fb2e3b9687e423847509a939b82d9461ac552c8b — the exact code this score is about.
  • Scored under rubric-2026.09.18 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-cb25ca4feafa.