How expo/exact works
Exact is a cross-platform application runtime: developers describe UI in Contract and provide application logic in TypeScript or Rust; the same compiled plan is presented by browser or native hosts. The graph follows compilation through execution and rendering, with storage, motion, and agent-driven operation as distinct capabilities. Several links reflect explicit README architecture statements; sampled source confirms selected internal relationships, but much of the runtime and platform wiring was not inspected.
Main entry points: query.rs Native runner · main.rs Web runtime · storage-fs.js Browser storage · app.ts Contract source
Components 21
App authoring
- Contract source
apps/design-tool/app.ts - App logic
apps/agents/app.ts
Contract compilation
- Contract syntax
contract/syntax/src/routes.rs - Contract types
contract/types/src/routes.rs - Plan lowering
contract/lower/src/routes.rs
Plan runtime
- Compact plan
- Web runtime
host/web-js/src/main.rs - Native runner
runner/src/runner/query.rs - Logic engine
js/src/engine.rs
Layout and presentation
- Layout kernel
kernel/src/style/engine.rs - Browser host
host/web/navigation/routes.js - Apple host
host/apple/Sources/ExactKit/RegionController.swift - Linux host
host/linux/src/app.rs - GPU renderer
game/render/src/pipeline.rs
Runtime capabilities
- Motion engine
motion/src/engine.rs - Browser storage
host/web/storage-fs.js - Storage environment
host/web/storage-environment.js - Image transforms
host/web/storage-image.js - Game world storage
game/engine/src/storage.rs
Other components
- App developer
- Coding agent
Connections 18
- App developer → Contract source: writes UI
- App developer → App logic: writes logic
- Contract source → Contract syntax: parses
- Contract syntax → Contract types: checks types
- Contract types → Plan lowering: lowers
- Plan lowering → Compact plan: produces plan
- Compact plan → Web runtime: executes in
- Compact plan → Native runner: executes in
- App logic → Logic engine: runs after first frame
- Native runner → Layout kernel: computes layout
- Web runtime → Browser host: drives DOM
- Native runner → Apple host: presents natively
- Native runner → Linux host: presents natively
- Native runner → GPU renderer: draws with GPU
- Native runner → Motion engine: samples motion
- Browser storage → Storage environment: reads settings
host/web/storage-fs.js - Browser storage → Image transforms: loads on demand
host/web/storage-fs.js - Coding agent → Web runtime: drives app