repowiseexpo/exact

Architecture of expo/exact

expo/exact is 14,552 source files holding 178,963 symbols across 35 modules, written mainly in Rust, Swift, JavaScript. The largest module is host, with 3,834 files, and 546 files are entry points into the dependency graph.

How exact fits together

Input starts as .contract files, which the compiler in contract/ turns into a plan of tables and bytecode through syntax, type, analysis and lowering passes. For the web, host/web-js/ compiles that plan ahead of time into one ES module that runs on a small runtime, and the browser handles layout and painting. On native hosts, runner/ provides a Rust VM that executes the plan, while kernel/ computes layout and manages keyed component instances and timers. The host/ directory holds the native screens: Apple hosts link a Rust static library under AppKit and UIKit presenters, and host/android/ replays paint output onto Android views. js/ bakes an app's TypeScript into a module that runs on precompiled Hermes bytecode natively and in the browser engine on the web. packages/ holds first-party packages that expose native platform capabilities such as camera and notifications to apps.

Largest modules

  • host: 3,834 files and 1,010,973 lines of code
  • contract: 727 files and 253,138 lines of code
  • apps: 641 files and 62,297 lines of code
  • packages: 565 files and 84,930 lines of code
  • game: 531 files and 173,153 lines of code
  • runner: 418 files and 142,364 lines of code
  • scripts: 369 files and 103,299 lines of code
  • kernel: 357 files and 130,157 lines of code

Languages

By file count: Rust 4,554 files, Swift 1,675 files, JavaScript 1,602 files, Kotlin 301 files, TypeScript 175 files, Shell 95 files.

Documentation

Repowise documents exact in 5,955 pages generated from the source, 143 of them written explanations of the repository and its modules. Module guides include:

  • apps/activity-fixture: Activity Fixture Packages: Apple, Data
  • host/apple/Sources/ExactSurfaces: Activity Surface Resolution and Canvas
  • apps/agents: Agents Packages: Android, Apple and 1 More

More on exact: summary and FAQ, codebase overview, code health.

Related guide: Best dependency graph tools for monorepos