-
Notifications
You must be signed in to change notification settings - Fork 2
Architecture
Jayden Smith edited this page Apr 12, 2026
·
2 revisions
The editor is split across four layers:
- React Native public API in
src - Native iOS and Android editor views
- Native render and position bridges
- Rust document core
The design goal is to keep document semantics in Rust and keep platform rendering and input behavior in native code.
This layer is responsible for:
- props and ref API
- controlled and uncontrolled content flow
- toolbar configuration
- theme serialization
- bridging editor updates back into React callbacks
The native iOS and Android views are responsible for:
- text input integration with the platform IME
- focus and blur behavior
- mapping native selection to Rust scalar positions
- rendering styled content
- dispatching commands to the Rust core
The native layer should not own document truth. It should reflect and manipulate the Rust editor state.
The Rust core owns:
- schema validation
- document model
- transforms and step application
- selection normalization
- history
- active formatting state
- HTML and JSON serialization
- render tree generation
This is the source of truth for editor semantics.
When deciding where a fix belongs:
| Problem Type | Likely Home |
|---|---|
| document meaning, transforms, schema validity, history | Rust |
| cursor geometry, platform layout, IME behavior, native rendering | iOS or Android native code |
| public configuration, composition, app integration | React Native layer |
For the rationale behind the less obvious API choices, see Design Decisions.
Copyright © 2026 Apollo Health Group Pty. Ltd.