deniz.in

Markets

Weather

Loading weather

· via Hacker News – Front Page (native)

Expo launches Exact, a cross-platform UI framework built for AI agents

The Expo team's Exact framework runs one codebase natively on web, macOS, iOS and Linux, with an agent API that lets AI coding tools build, operate and test the app on every platform.

Expo launches Exact, a cross-platform UI framework built for AI agents

The team behind Expo has released Exact, an open-source framework for building applications that run natively on the web, macOS, iOS and Linux from a single codebase. The project surfaced on Hacker News's front page. Its distinguishing pitch is that an AI coding agent can build the app, run it, look at it and test it across all supported platforms without a human involved.

One language, four hosts

According to the project's README, developers describe their interface in Contract, a small declarative language, and write data logic in TypeScript or Rust. A compiler runs four passes — syntax, types, analysis and lowering — and produces a compact plan. On the web, that plan becomes a single ES module over a runtime of roughly 20 KB that drives the browser's real DOM and CSS. On macOS, iOS and Linux, a Rust runner executes the same plan, a Rust layout kernel called Taffy computes every box using CSS rules, and each platform draws with its own toolkits: AppKit on macOS, UIKit on iOS, and a GPU painter (vello, with tiny-skia as the CPU fallback) on Linux.

The README stresses that the UI contains no webview and no JavaScript bridge, and that no application JavaScript executes before the first pixel. TypeScript is compiled to Hermes bytecode at build time and loaded after the first frame, which is drawn from data baked into the plan.

An agent-first development loop

The agent interface exposes exactly ten operations — tree, screenshot, tap, type, state, layout, logs, clock, prefer and perf — that behave identically on every host through one driver script, covering the web, macOS, the iOS Simulator or a physical iPhone, and Linux. The count is deliberately small so the API stays easy to reason about.

Notably, the agent controls time itself. Nothing on screen moves between two operations, so instead of waiting for an animation to finish, the agent advances the clock by a fixed amount or asks it to settle, then reads the result — removing timing-dependent flakiness from tests. Tests are scripts composed of those operations, and a single app.test.contract file runs unchanged on any host without a second evaluator.

To demonstrate, the README suggests handing Claude Code a prompt to build a todo app and pass its tests on three platforms. On a clean machine, a fresh agent finished the task in about 57 minutes, with roughly 25 of those spent on the first macOS and iOS builds, about 13 minutes each; later builds took a minute or two. Current setup downloads and verifies pinned Hermes bundles once instead of building from source.

Strict performance budgets

Every performance budget is tracked on each commit, and a regression is treated as a priority-zero bug with an owner. Targets include 100 ms p50 from cold start to an interactive first frame, 100 ms p50 for a dev restart from edit to presentation, zero app JavaScript before the first pixel, a 30-second rebuild when touching one Rust crate, and a 65-second full blocking check suite.

On the web, the README reports that in the RealWorld (Conduit) benchmark Exact's runtime became interactive about 300 ms before a React server-rendered build finished hydrating, using 26 KB of code against React's 81 KB. An edit on a freshly generated app was rebuilt and visible in the page in 99 ms.

Web vocabulary, native defaults

Authors write in CSS's vocabulary and layout model; whatever they leave unspecified falls to the platform — system buttons, colors, type sizes (17-point labels on an iPhone, 13 on a Mac), gestures, keyboard handling and accessibility. Chrome serves as the reference oracle for layout parity, and known deviations are documented explicitly, such as Taffy lacking position: static.

Why it matters

Cross-platform UI frameworks have historically forced a choice between webviews, JavaScript bridges or per-platform rewrites. Exact's answer is to compile the interface into a plan that each host executes natively, and — more unusually — to design the entire development loop around AI agents as the primary authors of code, with a deterministic clock and uniform operations built for machines rather than humans. The project is explicitly pre-1.0, changes daily, and offers no API stability, backwards compatibility or migration guide by design, so it is an experiment rather than a production choice today. Even so, the combination of native rendering, enforced speed budgets and agent-native testing makes it a notable signal of where application tooling is heading.

  • #expo
  • #cross-platform
  • #ui-framework
  • #rust
  • #ai-agents
  • #open-source

Related posts