Documentation
Undra documentation
Undra owns the part of your app that is not pixels: domain logic, reactive state, the data layer, persistence and the dev loop. These pages take you from an empty directory to a running app, then explain how the pieces work.
Where to start#
- New here? Getting started installs the toolchain and CLI, scaffolds a project, runs the live dev loop and puts an app on each platform.
- Want a working example of a login, a paged list or an offline queue? The cookbook has each as a tested recipe, and Fieldbook puts them together in one app.
- Writing a core? Core concepts covers stores, signals, computeds and keyed lists. Queries & mutations covers the data layer, and Ports & adapters covers everything that touches the outside world. Objects, host callbacks, types and generic functions, objects and stores cover what else crosses the boundary.
- Data that arrives or grows? Paging and lazy lists, polling, WebSocket and server-sent events and the local database.
- Testing, shipping, running? Testing your app, Shipping an update, Reviewing generated code, workers and crash recovery on the web, Operating in production (crash reports, background runs, the size of the shipped core), and one core or several.
- Fitting it into what you have? Bazel builds the core and its bindings in your graph, and your network stack (OkHttp, URLSession, fetch) carries the core's requests.
- Moving an existing app? The guides from Kotlin Multiplatform and from UniFFI, and supporting iOS 15 and 16.
- Looking something up? The CLI lists every command and flag. Architecture explains the schema, the generators, the wire and the twelve rules. The API overviews show what a record, error, store or port looks like in Swift, Kotlin and TypeScript.
The idea in four sentences#
You write your domain in Rust and mark it with a handful of attributes. Undra generates idiomatic Swift, Kotlin and TypeScript from the schema those attributes produce, so the UI stays SwiftUI on iOS, Jetpack Compose on Android, React on the web, and React Native. Each platform keeps a local mirror of your state, so reads never cross the language boundary. A write crosses once per transaction, and the core answers with one compact binary change-set that patches every mirror.
Where these pages come from. Everything here is digested from the repository: the README, the specification in docs/SPEC.md, the onboarding guide, the benchmark results and the playground app. When a page and the spec disagree, the spec wins; the repository is the record.
A note on numbers#
Performance figures on this site are measured on an Apple M5 Pro host, in release builds, and guarded by budgets in CI. The device rows come from the iPhone simulator, the Android emulator and headless Chromium on that machine; none is from a physical phone, and nothing on this site claims a per-device target as met. The results are in bench/RESULTS.md.