---
title: "Exact developer reference"
description: "Toolchains, the Contract CLI, the native and web loops, data modules, delivery and the stress examples."
modificationDate: "2026-11-30"
---

> ## Documentation index
> Fetch the complete documentation index at: https://exact.expo.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Exact developer reference

<AgentInstructions>

## Submitting feedback

From the app's directory, read `bun exact.mjs feedback status`. Under `never`, keep no note.
Respect `EXACT_FEEDBACK=0` and do not change the policy.

Otherwise record specific, actionable feedback with:
`bun exact.mjs feedback note "Exact docs: https://exact.expo.dev/reference/developer: <what was wrong or missing>"`

The note goes to Expo only as that status allows. Include no secrets or personal data.

</AgentInstructions>

Operational detail for working in this repository: toolchains, the Contract
CLI, the native and web loops, TypeScript and Rust data modules, delivery,
and the stress examples. The overview and quick start are in the [README](https://github.com/expo/exact/blob/41ded8c5ede0b2959ef0daa83b1ff78545dd4428/README.md).

Tooling runs on **Bun 1.4.2**, the version `package.json` pins.
Run `bun install --frozen-lockfile` to install the dependencies in `bun.lock`.
The web artifacts build with a pinned nightly Rust and its std sources (LLP 1047);
everything else uses `rust-toolchain.toml`'s stable. `host/web/build.mjs` prints the
install commands when they're missing:
`rustup toolchain install nightly-2026-08-21 --profile minimal --component rust-src --component llvm-tools`
(its `rust-lld` loads `libLLVM.dylib` from `rustlib/<host>/lib/`, which only `llvm-tools` installs there),
then `cargo +nightly-2026-08-21 fetch` on that toolchain's `library/Cargo.toml`.
Node and npm are not required. Rolldown remains the app bundler; the existing
build, serve, watch, and reload scripts run under Bun. Run tooling unit tests with
`bun test ./scripts/`; the explicit path keeps Bun from searching generated
fixture checkouts. This is the source
tooling installation; a standalone CLI distribution is not packaged yet.

An app with TypeScript sources (`app.ts`) is baked with the `hermesc` paired
with Exact's linked lean Hermes. Install Ibex's pinned, attested bundle once:

```sh
cargo run --manifest-path vendor/ibex/crates/hermes-lean-sys-installer/Cargo.toml -- --target <triple>
```

The verified install lives under `~/.cargo/hermes-lean-sys/`. Exact sets
`HERMES_LEAN_SYS_OFFLINE=1` in `.cargo/config.toml`, so an ordinary build
neither downloads a bundle nor compiles Hermes; a missing install fails with
the one-time command, after `exact setup` where an iOS or tvOS build lacks a
bundle setup installs. `HERMES_LEAN_SYS_DIR` remains a development override.
The v6 set supports macOS, Linux, Windows, Android arm64, iOS devices and the
universal iOS Simulator, plus tvOS devices and the arm64 tvOS Simulator. Exact
selects Ibex's English `intl` data tier on Linux and Android, not
`intl-all-locales`; Windows uses OS ICU and Apple keeps Hermes's OS-backed Intl.
Android's receipt enables Intl and binds the English ICU tier. A Rust-only app
needs no engine at run time.
`exact setup` installs the host bundle and, on macOS, the iOS and tvOS Simulator
bundles, and the iOS device bundle where Xcode's iphoneos SDK is installed. The
bundles live under `$HOME/.cargo`, and setup also fetches the locked crates: a
copied or archived checkout, or a fresh `HOME`, needs `exact setup` again.
`exact setup --check` runs Ibex's own offline resolver validation over that
same set. On a CI worker, `bun <exact2>/scripts/exact.mjs setup --check
--platform ios --device` checks the archive's prerequisites; `--platform
android` checks the APK/AAB prerequisites, including JDK 17+ and the NDK's
actual compiler paths. A scoped check fails when a prerequisite is missing
and does not check unrelated web tools. Run from an app's directory, a check
requires a Hermes bundle only when the app links Hermes, as that platform's build
decides: iOS by `app.ts`, Android, macOS and Linux by the cargo graph of the app's
crate. Elsewhere it reports the bundles as needed for TypeScript apps.
Native `--platform` scopes are check-only; install commands are in the platform's CI recipe. `setup --platform web` installs
[web prerequisites](https://exact.expo.dev/reference/developer/run-an-app-from-a-terminal-on-macos.md#web-ci-preparation). The general check still reports
optional tools separately (LLP 1086 D6).

For Android, an `Android JDK JIT` row names an AArch64 JDK affected by
[JDK-8335662](https://bugs.openjdk.org/browse/JDK-8335662), which can crash Gradle.
This advisory appears in general and Android-scoped checks and does not block
setup or a first Android build.
Set `JAVA_HOME` to JDK 17.0.16 or later in 17, 21.0.8 or later in 21, or 24 or newer.
Setup does not install or replace a JDK. Android builds warn before Gradle
starts and name matching JVM crash logs after a failure. JVM options stay yours;
the warning reports the affected version even with a JIT workaround enabled.

## Windows painter

An app with no `host.windows.painter` uses ink on a DirectX 11 composition
swap chain, except an app declaring `game`, which keeps the CPU painter so
its module presents directly. Explicit `"ink"` or `"cpu"` selects that painter.
CPU keeps the `softbuffer` window. With development trust, `EXACT_PAINTER`
overrides the choice and `EXACT_INK_DEVICE=wgpu` selects Ink's wgpu device
(DirectX 12 with `WGPU_BACKEND=dx12`). A production bake uses the manifest
choice. With either trust, `EXACT_INK_DEVICE=warp` selects software DirectX 11
for Ink. An Ink build requires the Windows SDK's `fxc`. If it is missing,
the build names the SDK and the CPU option.
`agent windows`, `test windows` and `verify windows` explicitly select CPU
for their headless drives unless `EXACT_PAINTER` is set. Those screenshots
do not qualify the window's composition path.
A direct `EXACT_SMOKE=1` development launch uses the app's painter choice.
`bun exact.mjs windows --release` packages a production binary and omits the
headless driver. To measure an optimized build under the driver, set
`EXACT_UPDATE_TRUST=development` when running the same command. When the
target's dependency graph does not link Hermes (`exact-js`, `ibex2/bindings`,
or `hermes-lean-sys` with `link`/`link-lean`), a Windows release builds with
`-Ctarget-feature=+crt-static` so its binaries link the MSVC runtime statically
and run without Visual C++ Redistributable DLLs beside them (an app with no
runtime `assets/`, `deck/`, `shaders/`, or GPU surface `.dll` runs as one
standalone executable; any of those files the app declares still ship beside
it). Apps that link Hermes keep the dynamic runtime, refuse conflicting
`+crt-static` flags, and copy the target architecture's Visual C++
Redistributable DLLs beside the executable.
A generated Windows shell links the data module's network transports when its grant
ceiling includes `net.fetch` or `net.websocket`. Development builds keep both so
a plan can add source origins on reload. Image downloads are independent of data grants. A production
Windows shell with `deploy.store.windows` set to `"0"` omits the downloader when
all image, media, poster and frame sources in its plan are local literals or
the plan has none. Computed sources, development shells and signed updates
keep the downloader.
A hand-written shell gets the same selection by writing
`compat.windows_shell(&baked, &manifest)` from its build script and calling
`exact_windows::run_baked::<AppData, ADMIT_AGENT>(name, window(), PLAN, COMPAT, composed, SERVICES)`.
The TypeScript bake writes the same constants. The heavy-list app shows the
[build step](https://github.com/expo/exact/blob/41ded8c5ede0b2959ef0daa83b1ff78545dd4428/bench/heavy-list/exact-heavylist/windows/build.rs) and the
[entry point](https://github.com/expo/exact/blob/41ded8c5ede0b2959ef0daa83b1ff78545dd4428/bench/heavy-list/exact-heavylist/windows/src/main.rs).
A Windows login item started with `--login hidden` paints its offscreen launch
frame on the CPU and opens the selected painter when its window first draws.
Linux and Android still opt into ink per platform; Android refuses it until
its Vulkan presenter is implemented. Apple keeps the native host by default;
`host.macos.presenter: "painted"` builds the ink carrier for development,
with distribution refused until its accessibility gate passes (LLP 1149 D12).

## Windows TypeScript

The former private `260318099.0.0` build is superseded. Native Windows
TypeScript uses Ibex's v4 debugger-off lean bundle. `exact-js` selects the
`intl` feature and installs `GROUP_INTL`; Ibex binds the Windows 10 2004+ OS
`icu.dll` from System32 through function pointers, with no ICU linker flags or
bundled locale data. The ordinary app path still requires the Windows
qualification in LLP 1027.006
before release claims. Do not
resurrect Exact's deleted private source builder or use its old
`%LOCALAPPDATA%/Exact/hermes` cache for this snapshot. `EXACT_JS_ENGINE=stub` remains the Hermes-free,
refusing build for CI; it cannot bake a working TypeScript app.

Windows application storage uses the current user's LocalAppData known folder,
under `exact/<app-id>/{data,cache,temporary}` (`app:/tmp` uses `temporary`). It does
not require `HOME`. App and scratch
identities and `app:/` path components must be safe Windows leaves; drive, UNC,
backslash traversal, alternate-stream and reserved-device forms are refused.

Snapback4 consumers use release **0.4.33**: the CLI is pinned in `bun.lock`;
Cargo pins the device and its client to the matching release source commit
`3653cae823145170df3e720f5e321bd1b5b4d79d`. The root `package.json` overrides
the undici 0.4.33 pins with 8.12.2, the version 0.4.43 pins, for the eight
advisories on 8.11.2 (among them
[GHSA-qrxm-fqhp-jwvm](https://github.com/nodejs/undici/security/advisories/GHSA-qrxm-fqhp-jwvm));
a pin at 0.4.43 or later drops the override. The Snapback client is not included in
this repository. Where a checkout has it at `snapback4/`, its accompanying
`snapback4/README.md` covers wiring and device rebuilds. It is one client for an
app's Rust and TypeScript on every host: the protocol in Rust without I/O,
the native device, the web's wasm, and the
TypeScript driver an app mounts with `typescript.sources`. The client is its
own Cargo workspace, `snapback4/`, with its own lock. Direct Cargo commands use
`--manifest-path snapback4/Cargo.toml`; apps depend on `snapback4/` by path.
Harmony's crates (`apps/harmony/app/`) link it, so they are a workspace of their
own (`apps/harmony/app/Cargo.toml`), which the root `exclude`s: the root lock
carries no private source, and root Cargo commands need no Snapback access (LLP
1153 D2.4). Building Harmony or Snapback on a machine without it, a local clone
holding the commit seeds Cargo's cache once: `GIT_CONFIG_COUNT=1
GIT_CONFIG_KEY_0=url.file://<clone>.insteadOf
GIT_CONFIG_VALUE_0=https://github.com/expo/snapback.git
CARGO_NET_GIT_FETCH_WITH_CLI=true cargo fetch --locked --manifest-path
apps/harmony/app/Cargo.toml`.
The driver imports wasm-bindgen glue (`snapback4/ts/generated/`, never
committed). The bake of an app that mounts the driver writes it with
`snapback4/web/build.mjs`, which builds only when the inputs recorded in the
glue's header have changed, and needs the `wasm32-unknown-unknown` target and
`wasm-bindgen` 0.2.130 (`cargo install wasm-bindgen-cli --version 0.2.130`).

The canonical [Messages](https://github.com/expo/exact/blob/41ded8c5ede0b2959ef0daa83b1ff78545dd4428/apps/messages/README.md) app is the Exact port of Expo's
chat demo, with model conversations through a local OpenRouter service. It belongs
to the root workspace and does not use Snapback. Run `bun apps/messages/service.ts`
and `bun host/web/dev.mjs --app messages --port 8767`.

## Linux Wayland windows

From a Wayland session, run the binary printed by `bun exact.mjs linux` to open a
window. The compositor owns the display and sends the window its input.
The insertion caret follows the blink cycle and idle timeout the desktop publishes
through the settings portal. With the GTK defaults it blinks every 1.2 seconds and
stays visible after 10 idle seconds.
`EXACT_SIZE` supplies the initial logical window size. Setting `EXACT_DRM` or
requesting VNC selects the DRM/KMS console path. Agent runs are headless.

Wayland windows read the desktop’s light or dark preference from the XDG
Settings portal. A change updates the window decorations and the app’s
`prefers-color-scheme`.

## Linux KMS rotation and VNC

On Linux KMS, `EXACT_ROTATE=0|90|180|270` turns the completed image clockwise.
Without it, the connector's `panel orientation` property chooses the angle; an
absent property means 0. At 90 or 270 degrees layout uses the swapped mode size.
The GPU rotates the image before display. Absolute evdev and VNC coordinates use
the inverse transform; relative mouse movement and scrolling keep the user's axes.
Agent screenshots show the rotated framebuffer, at the panel mode's size. Their
replies give that image's point dimensions and clockwise `rotation` in degrees;
comparison maps layout boxes onto those axes. Agent layout and target coordinates
remain logical. In a headless Linux host, `EXACT_SIZE` supplies the unrotated panel
size in points. On a supported Vulkan display, Ink turns the image while copying
it to the swapchain. With a VNC viewer attached, Ink rotates the image before
readback so the viewer and the panel receive the same pixels. Other painters and
displays without direct Vulkan presentation use KMS dumb buffers.

A Linux development build can serve its screen over VNC: set `EXACT_VNC=1` and
`EXACT_VNC_PASSWORD` to 1–8 bytes. It listens on `127.0.0.1:5900`; `EXACT_VNC=host:port`
selects another address. Production bakes ignore both variables.
