kernel/lib.rs
1// Copyright 2026 Mark Alan Boykin
2// This Source Code Form is subject to the terms of the Mozilla Public
3// License, v. 2.0. If a copy of the MPL was not distributed with this
4// file, You can obtain one at https://mozilla.org/MPL/2.0/.
5// SPDX-License-Identifier: MPL-2.0
6
7//! `kernel`: Portable identity, authority, and mutation kernel.
8//!
9//! This crate must compile to `wasm32-unknown-unknown` with zero errors.
10//! It contains no egui, wgpu, Servo, or platform I/O dependencies.
11//!
12//! Forbidden in this crate:
13//! - `Uuid::new_v4()` outside `#[cfg(not(target_arch = "wasm32"))]` (WASM hosts provide IDs)
14//! - `std::time::{Instant, SystemTime}::now()` (panics on browser WASM — use
15//! `PortableInstant` or the crate's `web_time`-backed wall-clock helpers)
16//! - `#[wasm_bindgen]` / UniFFI annotations (belong in wrapper crates)
17//! - any platform I/O (file, network, browser APIs)
18
19pub mod accessibility;
20pub mod actions;
21pub mod address;
22pub mod async_host;
23pub mod async_request;
24pub mod content;
25pub mod geometry;
26pub mod graph;
27pub mod host_event;
28pub mod host_toolkit;
29pub mod intents;
30pub mod overlay;
31pub mod paint;
32pub mod pane;
33/// Settings/permissions scope hierarchy + the narrowing rule (R0 invariant).
34pub mod permissions;
35pub mod persistence;
36/// Edge persistence types (`PersistedEdge` et al.), re-exported through
37/// [`persistence`]. Separate file to keep `persistence.rs` under the ceiling.
38pub mod persistence_edge;
39/// Field-layer persistence DTOs (`PersistedField`/`PersistedCoupling`),
40/// re-exported through [`persistence`]. Separate file to keep `persistence.rs`
41/// under the per-file ceiling.
42pub mod persistence_fields;
43pub mod signal_router;
44pub mod time;
45pub mod types;
46pub mod verso_address;
47
48#[cfg(test)]
49mod tests;