Linux's Kconfig allows enabling/disabling nearly every kernel subsystem. We need the same for Solaya using Rust's native cargo features.
Goals
- Gate kernel subsystems behind cargo features (e.g.,
net, tcp, ext2, smp, virtio-blk)
- Use cargo feature dependencies for subsystem relationships (e.g.,
tcp = ["net"])
- Add
cargo-hack to the Nix flake and CI pipeline to verify all feature combinations compile
- Add
just check-features recipe using cargo hack check --each-feature (and --feature-powerset --depth 2 for pair coverage)
Approach
Start incrementally — add features as subsystems are built rather than designing the full matrix upfront. Initial candidates:
net — networking stack
tcp (depends on net) — TCP support
udp (depends on net) — UDP support
virtio-net (depends on net) — VirtIO network driver
virtio-blk — VirtIO block driver
smp — multi-core support
ext2 (depends on virtio-blk) — ext2 filesystem
CI Integration
- Add
cargo hack check --each-feature --no-dev-deps to just ci
- Ensures no feature combination breaks compilation
- Use
--feature-powerset --depth 2 periodically (nightly) for pair coverage
See also: plans/04-build-system.md for build system context.
Linux's Kconfig allows enabling/disabling nearly every kernel subsystem. We need the same for Solaya using Rust's native cargo features.
Goals
net,tcp,ext2,smp,virtio-blk)tcp = ["net"])cargo-hackto the Nix flake and CI pipeline to verify all feature combinations compilejust check-featuresrecipe usingcargo hack check --each-feature(and--feature-powerset --depth 2for pair coverage)Approach
Start incrementally — add features as subsystems are built rather than designing the full matrix upfront. Initial candidates:
net— networking stacktcp(depends onnet) — TCP supportudp(depends onnet) — UDP supportvirtio-net(depends onnet) — VirtIO network drivervirtio-blk— VirtIO block driversmp— multi-core supportext2(depends onvirtio-blk) — ext2 filesystemCI Integration
cargo hack check --each-feature --no-dev-depstojust ci--feature-powerset --depth 2periodically (nightly) for pair coverageSee also: plans/04-build-system.md for build system context.