1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// Copyright 2026 Mark AB (markik)
// SPDX-License-Identifier: MIT OR Apache-2.0
//! `kernel`: Portable identity, authority, and mutation kernel.
//!
//! This crate must compile to `wasm32-unknown-unknown` with zero errors.
//! It contains no egui, wgpu, Servo, or platform I/O dependencies.
//!
//! Forbidden in this crate:
//! - `Uuid::new_v4()` outside `#[cfg(not(target_arch = "wasm32"))]` (WASM hosts provide IDs)
//! - `std::time::{Instant, SystemTime}::now()` (panics on browser WASM — use
//! `PortableInstant` or the crate's `web_time`-backed wall-clock helpers)
//! - `#[wasm_bindgen]` / UniFFI annotations (belong in wrapper crates)
//! - any platform I/O (file, network, browser APIs)
/// Settings/permissions scope hierarchy + the narrowing rule (R0 invariant).
/// Edge persistence types (`PersistedEdge` et al.), re-exported through
/// [`persistence`]. Separate file to keep `persistence.rs` under the ceiling.
/// Field-layer persistence DTOs (`PersistedField`/`PersistedCoupling`),
/// re-exported through [`persistence`]. Separate file to keep `persistence.rs`
/// under the per-file ceiling.
/// Native on-disk graph persistence. Gated by the `store` feature so the kernel
/// stays portable-by-default; the native host enables it.