How Exact works

A visual guide to Contract, TypeScript, Rust and rightui, with a simple comparison to Expo.

From your code to the screen

Exact is the complete system. Contract describes the interface. TypeScript or Rust supplies your data.
01 / YOU WRITE

Contract

Screens, styles, state and actions.
rightui
Ready-made Contract components.
02 / EXACT BUILDS

Compiler

Checks your interface and turns it into a compact plan.
The plan tells the runtime what to show and how to respond.
03 / EXACT RUNS

Your screen

Web
Browser DOM + CSS
iOS
UIKit
macOS
AppKit
DATA / AT RUNTIME
TypeScript
or
Rust
Your data module handles API calls, storage and business logic. Exact asks it for data, checks the reply and updates the interface.
You can build with Contract + TypeScript without writing Rust. Rust also powers parts of Exact internally; that does not make it a language you must write.
Web, iOS and macOS are rightui's targets. See the checks completed for each platform.

Inside the runtime

Runner
Handles events, state changes and requests to your data module.
Kernel
Calculates sizes and positions on native platforms. On the web, the browser lays out the interface with CSS.
Host
Displays the result using the browser's DOM, UIKit on iOS or AppKit on macOS.

Coming from Expo?

Expo is a framework built around React Native. Exact provides its own UI language, compiler and runtime. These are useful points of comparison, not interchangeable packages.
Who does what in each stack
Role
Expo / React Native
Exact
Interface
React components in JSX / TSX
Components in Contract
UI state
React and JavaScript
Contract state and actions
Data logic
Usually JavaScript / TypeScript
TypeScript or Rust
UI library
React / React Native components
rightui Contract components
React components cannot be imported as Contract components. rightui is written for Exact.
About the Expo framework

One example: load products

Imagine a Load products button in your app. Each layer has one job.
1

You press the button

Contract + rightui
The button triggers a Contract action. The UI can show a loading state.
2

Your app requests the products

TypeScript or Rust
The data module calls your API and returns product records.
3

The list appears

Exact runtime + Contract
Exact checks the reply against the declared shape. Contract renders the products and the host displays the result.
A local interaction, like opening a menu, can stay entirely in Contract. A data request is needed only when the action needs your data module.

Start with Contract + TypeScript

Use rightui for the components and app.ts for your data. Choose Rust when your project needs a Rust data source; the UI still stays in Contract.