Skip to main content

Crate kernel

Crate kernel 

Source
Expand description

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)

Modules§

accessibility
Host-neutral accessibility descriptors keyed by SurfaceId.
actions
Portable action catalogue.
address
Address types and URL classification helpers.
async_host
Portable async-host boundary traits.
async_request
Portable state machine for frame-bounded async requests.
color
Portable RGBA color primitive.
content
Portable content-engine state types.
geometry
Portable 2-D geometry types used at the host ↔ runtime boundary.
graph
Graph data structures for the spatial browser.
host_event
Host-neutral input events flowing from platform adapters into the runtime.
host_toolkit
intents
Portable intent vocabulary primitives — the pure-data subset of the intent enum/struct family that’s free of crate::app::*, crate::shell::desktop::workbench::*, and crate::services::* coupling.
overlay
Portable overlay stroke descriptors.
paint
Portable paint primitives — Color and Stroke.
pane
Portable workbench-pane identity + render-mode classification.
permissions
Settings/permissions scope hierarchy + the narrowing rule (R0 invariant). Settings/permissions scope hierarchy and the narrowing rule.
persistence
Serializable types for graph persistence.
persistence_edge
Edge persistence types (PersistedEdge et al.), re-exported through persistence. Separate file to keep persistence.rs under the ceiling. Edge persistence types — family/sub-kind enums, per-family data structs, and the edge container. Re-exported through crate::persistence to keep persistence.rs under the per-file ceiling.
persistence_fields
Field-layer persistence DTOs (PersistedField/PersistedCoupling), re-exported through persistence. Separate file to keep persistence.rs under the per-file ceiling. Persistence DTOs for the field layer (Field + Coupling), field-system Phase 2.
signal_router
Portable signal-subscription seam for frame-bound inbox consumers.
time
Portable monotonic time.
types
Portable leaf types used by the graph model and persistence schema.
verso_address
Verso URI scheme parsing — verso://, graphshell://, graph://, node://, notes://. Includes the address types that the rest of Graphshell uses to address durable subsystem surfaces (settings pages, frame-by-id, tile-group-by-id, view targets, tool panes, clip captures, plus generic graph/node/note addresses).