danos/library/device
Daniel Samson 23bcd77c58
C2: migrate consumers off the runtime shim to direct concern-module imports
Every user binary and the two device-logic library modules (pci, usb) now
`@import` the concern modules directly instead of aliasing through `runtime`:

  runtime.ipc/process/time/service/input/block/display  -> @import("<module>")
  runtime.device / runtime.device_manager               -> @import("driver")
  runtime.fs                                             -> @import("file-system")
  runtime.Thread                                         -> @import("thread").Thread
  runtime.system.{write,writeRecord,klog*}              -> logging.*
  runtime.system.{sleep,timerOnce,wallClock,clock}     -> time.*
  runtime.system.{spawn*,kill,exit,yield,processes,...}-> process.*
  runtime.system.{mmap,munmap,PROT_*}                  -> memory.*
  runtime.dma.* / runtime.shared_memory.* / runtime.allocator -> memory.*

Each consumer keeps its own alias name (e.g. `const device = @import("driver")`),
so call sites are unchanged and there are no collisions with local `driver`
variables. build.zig now injects the concern modules into every user binary via
`default_imports`; pci/usb module import lists were updated to match.

The `runtime` and `system` shims remain for one more step (root.zig still uses
runtime); they are deleted in C5. Nothing but root.zig imports `runtime` now.

Verified: zig build, zig build test, and 17 QEMU cases (smoke, device-manager,
logger, fat-mount, fat-mutations, usb-storage, usb-hid, display-native,
virtio-gpu, input, thread-spawn, thread-mutex, process-kill, shared-memory,
driver-restart, acpi-ps2, pci-scan).
2026-07-22 23:28:34 +01:00
..
acpi reorg: move device data modules into library/device/<domain>/ 2026-07-22 20:36:24 +01:00
block reorg: relocate device/service clients (C3/C4) 2026-07-22 23:02:04 +01:00
driver reorg: relocate device/service clients (C3/C4) 2026-07-22 23:02:04 +01:00
mmio reorg: move mmio into library/device and spell out its API 2026-07-22 21:28:32 +01:00
model kernel: flatten the device/discovery code, merge power into acpi, rename fdt 2026-07-22 21:49:20 +01:00
pci C2: migrate consumers off the runtime shim to direct concern-module imports 2026-07-22 23:28:34 +01:00
usb C2: migrate consumers off the runtime shim to direct concern-module imports 2026-07-22 23:28:34 +01:00