Exact
Exact is a cross-platform application runtime for writing an app once and running it natively on web, macOS, iOS, and Linux, with an AI agent able to build, run, see, and test it on each host.
Visit expo/exactOverview
Exact is a cross-platform application runtime. Developers describe the interface in Contract, a small declarative language, and write data logic in TypeScript or Rust. The Contract compiler produces a plan; the web runs it as an ES module over the browser's DOM and CSS, while macOS, iOS, and Linux use a Rust runner, a CSS-based layout kernel, and native drawing through AppKit, UIKit, or a GPU painter. An AI agent can build, run, see, and test the app on each host. Android and Windows are early and in progress.
Key Features
- Contract declarative UI language with typed shapes, state, derive, resources, mutations, actions, tasks, views, styles, and routes.
- Cross-platform hosts for web, macOS, iOS, and Linux, with Android and Windows early and in progress.
- Agent-native operations including tree, screenshot, tap, type, state, layout, logs, clock, prefer, and perf through one script.
- Native rendering uses platform controls on Apple and Linux without a webview or JavaScript bridge in the UI.
- Performance budgets target 100 ms p50 cold start and dev restart, with no app JavaScript before the first pixel.
- Optional artifacts include GPU rendering, Markdown editor, text flow, browser SQLite, native modules, and a game engine add-on.
Use Cases
- Building one app that runs on web, macOS, iOS, and Linux from a shared Contract view and TypeScript or Rust data logic.
- Using an AI agent to create, drive, inspect, and test an app across multiple hosts without a person in the loop.
- Shipping platform-native desktop and mobile interfaces where unsaid presentation follows AppKit, UIKit, Linux, or the browser.
- Creating example or template apps such as a todo app, Caltrain, or the Softwear demonstration store.
Getting Started
- Install Rust via rustup, Bun 1.4.2, Google Chrome, and Xcode 27.1 or later for Apple builds.
- Run bun scripts/exact.mjs setup once.
- Run bun host/web/dev.mjs to start the Caltrain web example and edit apps/caltrain/app.contract to see the dev loop.
- Run bun host/apple/build.mjs --run for macOS, bun host/apple/build.mjs --ios --run for an iOS Simulator, or cargo build --profile host-dev -p caltrain-linux for Linux.
- Create a new app with bun scripts/exact.mjs new ../hello, then run bun exact.mjs web, bun exact.mjs test web, bun exact.mjs mac --run, or bun exact.mjs ios --run.
Deployment & Requirements
- Rust via rustup, Bun 1.4.2, and Google Chrome are required for the documented workflow.
- Apple builds on macOS require Xcode 27.1 or later; exact setup --check checks it.
- TypeScript apps on native hosts require Hermes installed once for each target before building.
- iOS builds on Linux or WSL require Swift 6.4.2, xtool 1.24.0, LLVM 23, apple-codesign 0.29.0, and an extracted Xcode 27.1 SDK.
- On Windows, use WSL 2 with Ubuntu 24.04 for iOS builds.
Before You Adopt
- License: MIT. Review its terms before using, modifying, or distributing the project.
- Exact is pre-1.0 and changes daily, so APIs are not stable.
- Android and Windows support is early and still in progress.
- TypeScript apps on native hosts require Hermes to be installed for each target.
- Apple builds require Xcode 27.1 or later.
- Feedback nudges and sends can be disabled for a machine.