Layered Package Overview

The Tairitsu workspace is organized into four layers. Each layer builds on the one below it.

Layer 1: Foundations (no browser dependency, pure Rust)

CratePathDescription
tairitsupackages/runtimeCore runtime: Container, Image, Registry, WIT binding, dynamic invocation (RON + binary canonical ABI). The server-side engine.
tairitsu-macrospackages/macrosProcedural macros: rsx!, scss!, include_scss!, svg!, component, define_props, wit_interface!, wit_world!
tairitsu-vdompackages/vdomPlatform-agnostic Virtual DOM: VNode, VElement, diffing, patching, 34+ typed events, reactive signals, scheduler, safe SVG
tairitsu-stylepackages/styleType-safe CSS property builders from W3C CSS data, serde-compatible, length/color/typed values
tairitsu-hookspackages/hooksHooks system: Signal, Effect, Memo, Suspense/Resource, Context, StateMachine, Animation, Interval, Store

Dependency graph (Layer 1):

mermaid

Layer 2: Protocol & Platform

CratePathDescription
tairitsu-webpackages/webUmbrella crate: browser platform, router, i18n, SSR integration, navigation, batch DOM operations
tairitsu-ssrpackages/ssrServer-Side Rendering: HTML renderer, streaming, HMR, fast refresh, error overlay, data fetcher, linker
tairitsu-browser-worldspackages/browser-worldsWIT world definitions: 0.1.x (hand-written) + 0.2.x (auto-generated from WebIDL). Covers DOM, Events, Fetch, Canvas, CSS, HTML, Storage, WebSocket, WebRTC, Workers, etc.
tairitsu-browser-wit-resolverpackages/browser-wit-resolverWIT package resolution: version resolution, cloud fetching, local caching

Dependency graph (Layer 2):

mermaid

Layer 3: Tooling & Delivery

CratePathDescription
tairitsu-packagerpackages/packagerCLI binary (tairitsu): dev server (axum + HMR), build pipeline (WASM optimization, CSS minification, sourcemaps), visual regression, desktop packaging, VTty terminal, debug API, test runner
shirabe (external)—Browser backbone: CDP engine, HTTP debug API, Chromium resolution/download, MCP browser tools (2026-10-17 consolidation)
scripts/browser_e2e.pyscripts/Browser-glue e2e orchestration driving shirabe's HTTP debug API
browser-gluepackages/browser-glueTypeScript runtime glue: bridges WIT canonical ABI ↔ DOM APIs. 39+ per-domain internal modules.

Layer 4: Examples & Demos

CratePathPurpose
wit-native-macroexamples/wit-native-macroRecommended approach: define WIT interfaces with wit_interface! macro, zero boilerplate
wit-native-simpleexamples/wit-native-simpleTrait-based WIT interface, maximum control
wit-dynamic-advancedexamples/wit-dynamic-advancedDynamic WASM invocation: RON + binary paths, runtime function discovery
wit-compile-timeexamples/wit-compile-timeStatic WIT binding with wasmtime bindgen
wit-runtimeexamples/wit-runtimeRuntime WIT loading, plugin-like system
vtty-graphics-demoexamples/vtty-graphics-demoTerminal graphics demo using VTty
websiteexamples/websiteFull documentation website demo

Choosing Your Approach

ApproachType SafetyPerformanceFlexibilityBest For
Macro (wit_interface!)FullBestMediumMost use cases
Trait (wit-native-simple)FullBestHighComplex interface hierarchies
Dynamic RON/BinaryRuntimeBest (binary)HighestPlugin systems, hot-reload
Compile-timeFullBestLowFixed, known interfaces
RuntimePartialGoodHighPlugin discovery