Skip to Content
Viewing release/v0.5.0-alpha.3 docs — not the stable branch. Changes vs main · Go to main

Kernel Crate Boundaries

Relevant source files

kernel/crates/kernel_* and kernel/src have different ownership roles, and a pair must never independently implement the same policy or state transition.

Boundary rules

  • kernel/crates/kernel_* holds reusable, policy-free contracts and host-testable algorithms where practical.
  • kernel/src composes those contracts with architecture, process, scheduler, memory and device integration.
  • A crate is canonical when its public contract is consumed directly by both host tests and kernel integration; kernel/src then supplies adapters only.
  • A kernel/src module is canonical when it owns platform state or lifecycle; a similarly named crate must stay a narrow contract or be retired.
  • Error, ownership, rollback, protection and fault semantics belong in the canonical layer and must not be silently weakened by an adapter.
  • New extraction work must name the canonical side, list the adapter boundary, and add a static or host test that prevents duplicate policy from returning.

Integration pairs

Reusable contractKernel integration
kernel_syscallkernel/src/syscall/
kernel_virtual_memorykernel/src/mem/
kernel_devicekernel/src/driver/ and architecture platform code
kernel_elfloaderprocess exec / image loading
kernel_map_transactionaddress-space and heap mapping
kernel_run_queuescheduler task ownership and CPU selection
kernel_usermemkernel/src/syscall/validation.rs (user-copy adapter)

Crate inventory

Roles and gates come from the generated component inventory .

CrateRoleRequired gate
kernel_abiPublic userspace ABI (syscall numbers, errno, BPF command and attach numbers, fcntl, mman, time, uio)host lint and tests
kernel_bpfBPF runtime: loader, verifier, maps, interpreter, signing, profiles, attach, actuationcloud/embedded lint, tests, Miri
kernel_devfsDevice filesystem (/dev)host lint and tests
kernel_deviceDevice contracts (block, raw)host lint and tests
kernel_elfloaderELF loaderhost lint, tests, fuzz
kernel_map_transactionmap_range rollback bookkeepinghost lint and tests
kernel_memapiMapped-memory contracthost lint and tests (interface-only)
kernel_pciPCI configuration contractshost lint and tests
kernel_physical_memorySparse physical frame manager, fault injectionhost lint and tests
kernel_run_queuePer-CPU runnable queue core (Cordyceps MPSC queues, bounded steal)host lint, tests, Loom model
kernel_syscallSyscall contracts (access, fcntl, malloc, mman, stat, unistd, user pointers)host lint and tests
kernel_timeClock conversion and deadline queueshost lint and tests
kernel_usermemFault-safe user-memory access contract (audit finding C-01)host lint and tests
kernel_vfsVirtual filesystem and path typeshost lint and tests
kernel_virtual_memoryVirtual-memory segment allocatorhost lint and tests
shrike_linkPi 5 to Shrike-lite UART control-link codec, session, watchdog (no_std, zero-dep)host lint and tests

kernel/crates/kernel_wait_channel_tests contains host tests for the wait-channel protocol; it has no library crate of its own.

Naming contract

Prefix / suffixMeaning
kernel_*Internal reusable kernel crate
axiom_* / axiomos-*Host-side repository or shipped axiomos tooling
rk_*Runtime-kit tools and services
shrike_*Hardware or firmware components
*_demoDemonstration program or crate
*_benchBenchmark program or crate
Last updated on