oficina / docs Public

Clone
git clone https://amadan.net/oficina/docs

Plain git — no account needed to clone.

Download

Download this file

1# Building and checking native Docs
2
3The native editor uses SwiftUI with AppKit/UIKit text controls and a bounded
4WASM interpreter for the shared Yjs-compatible CRDT. It does not load a web editor.
5
6Requirements: Xcode 26, XcodeGen, Swift 6.2+, Node/npm, and Rust with the
7`wasm32-unknown-unknown`, `aarch64-apple-darwin`, `x86_64-apple-darwin`,
8`aarch64-apple-ios`, `aarch64-apple-ios-sim`, and `x86_64-apple-ios` targets.
9The server gate additionally requires the Go version in `go.mod`.
10
11Run the native gate from the repository root:
12
13```sh
14native/scripts/check-native.sh
15```
16
17It builds the CRDT WASM, runs Rust editor and bounded-host tests, checks native
18and browser updates in both directions (including every list-rule reversal delta
19and its authoritative snapshot), prepares the Apple XCFramework, and
20runs Swift adapter/actor tests. `--core-only` runs the Rust and wire checks on
21Linux. CI invokes this through `.amadan/ci.d/20-native`, alongside the existing
22server/web gate. `--mutations` additionally proves representative faulty changes
23are caught, restoring every changed source and saving logs under
24`native/build/mutation-logs`. Do not run mutations concurrently with builds.
25
26`CARGO` can select a non-default Cargo executable; put its matching Rust toolchain
27on `PATH`. If that toolchain needs an explicit LLVM runtime lookup path, set
28`DOCS_LLVM_LIBRARY_PATH`. No generated native framework is committed.
29
30Build individual applications:
31
32```sh
33native/scripts/build-mac.sh
34native/scripts/build-iphone.sh simulator
35OFICINA_DEVELOPMENT_TEAM=YOUR_TEAM native/scripts/build-iphone.sh device
36```
37
38The suite's `build-native-apps.py` prepares the native framework and Xcode projects
39once, then runs Docs and Sheets builds concurrently with separate platform logs
40and a combined `results.json`. Its default targets are Mac and iOS Simulator;
41`--platforms mac simulator device` also builds signed device applications when
42`OFICINA_DEVELOPMENT_TEAM` is set. It does not install or publish applications.
43
44Native UI tests use fresh local credentials and isolated databases. See
45[REVIEW.md](REVIEW.md) for their runner, exact evidence, and untested behavior.
46Performance measurements and their limits are in
47[benchmarks/README.md](benchmarks/README.md).
48