Exact is the application runtime under Seed Exact. It is an open source project at github.com/expo/exact (it calls itself exact2 internally) with no releases and no package: an app uses a source checkout by path. This page explains the parts of it that the mobile app relies on.
What it is
From its README: "Exact is a cross-platform application runtime. You describe your interface in Contract, a small declarative language, and you write your data logic in TypeScript or Rust." The Contract compiler turns the interface into a compact plan. On iOS "a Rust runner executes the same plan, a Rust layout kernel computes every box with CSS rules", and UIKit draws it. "There is no webview and no JavaScript bridge in the UI, and no app JavaScript runs before the first pixel."
Principles that shape the app
The README names three principles:
Agent native. "Ten operations, the same on every host": tree, screenshot, tap, type, state, layout, logs, clock, prefer, perf. "The clock belongs to the agent. Between two operations nothing moves." "Tests are scripts of those operations." See Contract UI tests.
Speed is king. Budgets include a 100 ms cold start to an interactive first frame and no app JavaScript before the first pixel. "TypeScript is compiled to Hermes bytecode at build time and loads after the first pixel."
Write the web, ship the platform. "What you write is CSS: the vocabulary, the layout model, the development loop. What you leave unsaid is the platform's." The app's design rule "Leave it unsaid" in DESIGN.md follows from this, see Shared components and visual design.
Crates and hosts
Path in Exact | Role |
|---|---|
The Contract compiler: syntax, types, analysis, lowering. Bakes constant data into the plan | |
The plan format and the VM that runs it: keyed component instances, events, timers on a seekable clock, the data seam | |
Node arena and CSS layout through a patched, vendored Taffy | |
CSS transitions, springs and the clock for non-web hosts | |
The router behind | |
The design token grammar and evaluator, see Tamber design tokens | |
The TypeScript executor: Hermes on native hosts, the browser's engine on the web. See The data module runtime | |
The capability model, see Grants and capabilities | |
The iOS and macOS host: a Rust static library with a C ABI under Swift presenters in | |
The web target: the plan as one ES module over a roughly 20 KB runtime that drives the DOM. See The web host for development | |
|
From source to a running app
flowchart LR
C["*.contract files"] --> CC["Contract compiler"]
T["app.tamber"] --> CC
CC --> P["plan: tables and bytecode"]
CC --> D["app.contract.d.ts"]
D -. types .-> TS["app.ts and src"]
TS --> TC["type check"] --> RD["Rolldown bundle"] --> HC["hermesc"] --> HB["app.hbc"]
P --> IOS["Rust runner and kernel"]
HB --> IOS
IOS --> UI["Swift presenters: UIKit"]
P --> WEB["web-js: ES module and CSS"]
TS --> WEBThe producer "captures local imports, type-checks, bundles with Rolldown, compiles HBC, and bakes with an empty store" (reference). A first native build takes ten to fifteen minutes. After that, an edit to only .contract files or what app.ts imports "runs its new plan on the existing build instead, in about a second" (help text). A change to app.json, assets or grants rebuilds the native app.
How the app consumes it
exact.rev holds the one commit the app is known to work with. The README, scripts/mobile and the Clipper worker all check out that commit.
exact.mjs is a generated launcher. It resolves the checkout from EXACT2, default ../../../../exact (beside the Seed repository), enforces Bun 1.4.2 and hands the arguments to Exact's scripts/app-cli.mjs.
bun exact.mjs update rewrites exact.mjs, the generated block of AGENTS.md, patches and toolchain paths after the checkout moves. bun exact.mjs lock refreshes lock drift.
app.json is the manifest. Its $schema points into the checkout.
Pre-1.0 caveats
"Exact is pre-1.0 and changes daily. There is no API stability, no backwards compatibility, and no migration guide, by design." Moving exact.rev is therefore a deliberate change: run update, then the whole test pass in Testing. Exact's own docs can disagree with each other at a given commit. Example: the README says "TypeScript can't import npm packages' code yet" while start-here.md says the data module imports pure JavaScript packages, which is what Seed Exact does. The app's AGENTS.md requires recording such friction with bun exact.mjs feedback note, see Rules for agents.
Do you like what you are reading? Subscribe to receive updates.
Unsubscribe anytime