notes

Package boundaries: every crate and program in a packageevery path with a home

Milestone 611 (every program and crate belongs to a package, and every package has a home). The file name, the key names of both TOML files, every package name and every home below are provisional; the four kinds were ratified on 2026-09-27 (UTC). The tree ratified process-tools, core-tools and disk-tools as package names on 2026-10-06 (UTC) and as repository names on 2026-10-28 (UTC), each recorded in its manifest; the blanket still holds for the rest. calef ratifies the table; the questions are at the end. What a package is as a file on a target is notes/packages.md. This note is about the tree: which crate, program and path belongs to which package, and where each is going.

What calef ruled

On 2026-09-27, on pull request #1389 (the OS is built and updated from packages; its decision is not yet on main):

The two declarations

packages/<name>.package.toml declares a package. packages/homes.toml gives a home to every tracked path that is in no package. Both are TOML, as the recipes are: calef ruled on 2026-09-27 that declarations and recipes move to TOML, refusing JSON for having no comments, and YAML. The extensions and key names are provisional. An unknown key is refused, so a misspelt one cannot read as absent. The field list, in full, is the header of helpers/packages.py. The required fields have no default:

field required what it says
name yes equals the file's stem
kind yes base, optional, sdk or test
home yes { repo, status = "provisional" }, { repo, status = "ratified", date }, or { status = "undecided", reason }
crates, interfaces one member at least Cargo packages; an interface is one other packages may link
programs binary targets of a crate whose programs are split across packages
paths anything else: the std overlay, a recipe, a #[path] module
depends declared dependencies; those packages' crates may be linked
[[exception]] date, member, crate, reason: one dated link the rules refuse

A package's kind says where it ends up. calef ratified that rule and the four kinds at 2026-09-27T07:23Z (UTC). base ends up in every image and optional on a running nife that installs it. sdk ends up on a developer's machine: the contracts, the runtime and the host tools. test ends up only in a test image, never in a release. A kind is not what a package does or who runs it, so a question about a new package's kind is a question about its destination.

This is the in-tree form the base image list (P1 in #1389's decision) and the recipes are to be generated from. A recipe needs a name, a version, an architecture and members; this file has the name and members, and the version and architecture belong to a build. Nothing generates either one yet.

The gate

script/lint runs python3 helpers/packages.py --check, after a selftest that plants one violation per rule and fails unless each is caught. The rules:

  1. Every tracked path has exactly one home. The longest claimed prefix wins, across every package member and every packages/homes.toml entry. A path nobody claims fails, and so does a prefix claimed twice or a claim that holds nothing.
  2. Every Cargo package in the tree is in exactly one package. A crate's binaries go with it, unless any of them is placed elsewhere: then every binary needs a program line. That is components today, so a new program there has to be placed on purpose.
  3. A link across a boundary goes to an interface crate, to a package the linker depends on, or through a dated exception. An exception whose link has gone fails, so the list only shrinks.
  4. Nothing but a test package depends on a test package. A base package does not depend on an optional one.

For components, whose manifest links the union of fifty programs, rule 3 is checked per program. It reads which crates each program's source names, comments stripped, among the crates the manifest declares. The check was proved on the tree as well as in the selftest: a planted use timetable in components/src/rm.rs failed with "coreutils: rm links timetable, an internal crate of timetable" (the package was named coreutils then), and a planted untracked-then-added file failed as a path with no home.

The table

* marks an interface. This table is generated, and script/lint fails when it is stale.

package kind members allowed dependencies home
boot base crates: bitmap_font*, device_tree_patch*, screen_console*, sealed_pair*, serial_console, uefi_loader; programs: uefi_loader interfaces only; 1 dated exception(s) boot (provisional)
core-tools base programs: date, printenv, rm, uuid, wc interfaces only core-tools (provisional)
disk-tools base programs: disk_partitioner, disk_surveyor interfaces only disk-tools (provisional)
drivers base crates: designware_inter_integrated_circuit*, jh7110_clock_and_reset_devices; programs: block_driver, designware_ethernet_control, designware_mobile_storage, jh7110_clock_and_reset, jh7110_entropy, non_volatile_memory_express, power_management_chip_route interfaces only drivers (provisional)
entropy base programs: entropy interfaces only entropy (provisional)
filesystem base crates: disk_tree, subtree_scope*; programs: disk_tree, fs_file_caretaker, fs_nameset_caretaker, fs_subtree_caretaker interfaces only filesystem (provisional)
init base crates: components, system_initializer, system_log; programs: boot_self_test, broker, job_undertaker, progenitor, reboot, root_supervisor, spawner, sub_server_supervisor, swapper, system_log timetable init (provisional)
jig base crates: jig; programs: jig contracts, runtime, network jig (provisional)
kernel base crates: address_space_identifier, cpu_set, direct_memory_access_validator, firmware_configuration, inter_process_communication, jh7110_clock_and_reset*, jh7110_pci_express*, jh7110_watchdog, kernel, memory_corruption_canary_gate, memory_regions, page_frames, page_tables, pci_configuration_space*, test_and_set_lock*, thread_wake_handshake, work_steal_slot; programs: kernel interfaces only; 3 dated exception(s) kernel (provisional)
login base crates: credentialer; programs: credentialer, identity_provisioner, login, login_audit_receiver, user_timetable_keeper timetable login (provisional)
mdr base crates: mdr; programs: mdr interfaces only mdr (provisional)
network base crates: domain_name_resolution_contract*, http_response, network_stack; programs: domain_name_resolver, net_stack; paths: components/src/virtual_io_net_transport.rs, components/src/socket_test_client.rs interfaces only network (provisional)
process-tools base crates: free, number_writer, pgrep, pmap, ps, slabtop, top, uptime, vmstat; programs: free, pgrep, pmap, ps, slabtop, top, uptime, vmstat; paths: packages/uptime.recipe.toml, packages/uptime-riscv64.recipe.toml, packages/uptime-x86_64.recipe.toml interfaces only process-tools (provisional)
swish base crates: swish; programs: swish interfaces only swish (provisional)
terminal base crates: line_editor_component*; programs: console, input, line_editor, terminal_sink_caretaker, terminal_supervisor interfaces only terminal (provisional)
time base crates: network_time_protocol; programs: clock, network_time_client interfaces only time (provisional)
timetable base crates: periodic_deadline*, timetable, timetable_store; programs: timetable; paths: components/timetable.conf interfaces only timetable (provisional)
demos optional programs: least_authority_demo interfaces only demos (provisional)
display optional crates: compositor*, glyph_atlas*, glyph_atlas_generator, video_terminal*; programs: compositor, display_terminal, framebuffer_driver, glyph_atlas_generator, gpu_driver, graphical_terminal, keyboard_driver, usb_keyboard_driver; paths: vendor/dejavu/ interfaces only display (provisional)
redoxfs optional crates: redoxfs, redoxfs_host, redoxfs_server; programs: mkfs, redoxfs, redoxfs-ar, redoxfs-clone, redoxfs-mkfs, redoxfs-resize, redoxfs_host, redoxfs_server, second_mount; paths: vendor/redoxfs.divergence.patch, vendor/redoxfs.pin interfaces only redoxfs (provisional)
system_installer optional programs: system_installer interfaces only system_installer (provisional)
contracts sdk crates: approval_file*, base_digest_contract*, boot_slot*, c_program_fixture*, capability_manifest_note*, capability_plan*, capability_witness_contract*, confined_system_call_fuzzer_contract*, credential_contract*, current_cpu_contract*, documentation*, driver_process_contract*, globally_unique_identifier_partition_table*, graphics_contract*, hot_swap_contract*, initial_ramdisk_writer*, installed_programs*, jh7110_clock_and_reset_contract*, login_contract*, machine_discovery*, machine_statistics_contract*, master_boot_record*, measured_boot*, nife_partition_types*, nifefs*, package_archive*, package_index*, primitive_benchmark_contract*, program_asks*, program_table*, self_test_contract*, socket_contract*, startup_page_contract*, static_elf*, std_runtime_contract*, supervision_contract*, system_log_contract*, system_manifest*, test_times* interfaces only contracts (provisional)
cryptography sdk crates: cryptography_provider*, pinned_tls_client* network cryptography (provisional)
host-tools sdk crates: host_reordering_litmus, jh7110_entropy_board_check, stick_maker, walk_pricing, xtask; programs: host_reordering_litmus, jh7110_entropy_board_check, stick_maker, xtask boot, display host-tools (provisional)
nife-libc sdk crates: c_library, c_library_errno; paths: vendor/relibc/ interfaces only nife-libc (provisional)
runtime sdk crates: allocation_cache*, entropy_backend*, hot_swap_server*, memory_region_heap*, process_builder*, talc*, user_mode_runtime*; paths: patches/, targets/, vendor/talc.divergence.patch, vendor/talc.pin interfaces only runtime (provisional)
ext4-oracle test crates: ext4_oracle; programs: ext4_oracle interfaces only undecided: it leaves with the ext4 server it judges, whose package is not yet named
fixtures test crates: byte_sink_fixture*, c_seam, coremark, cryptography_exerciser, domain_name_resolution_fixture*, fixtures, fuzz, job_mix, loaded_image_check, pinned_tls_exerciser, soak_page, socket_fixture*, std_exerciser; programs: 89, too many to list here; paths: packages/greeting.recipe.toml, packages/greeting-riscv64.recipe.toml, packages/greeting-x86_64.recipe.toml, packages/greeting-0.2.0.recipe.toml, packages/greeting-0.2.0-riscv64.recipe.toml, packages/greeting-0.2.0-x86_64.recipe.toml, packages/seeker.recipe.toml, packages/seeker-riscv64.recipe.toml, packages/seeker-x86_64.recipe.toml, packages/seeker-0.2.0.recipe.toml, packages/seeker-0.2.0-riscv64.recipe.toml, packages/seeker-0.2.0-x86_64.recipe.toml, packages/noteless.recipe.toml, packages/noteless-riscv64.recipe.toml, packages/noteless-x86_64.recipe.toml, packages/duet.recipe.toml, packages/duet-riscv64.recipe.toml, packages/duet-x86_64.recipe.toml, packages/solo.recipe.toml, packages/solo-riscv64.recipe.toml, packages/solo-x86_64.recipe.toml, packages/dialer.recipe.toml, packages/servant.recipe.toml, packages/servant-riscv64.recipe.toml, packages/servant-x86_64.recipe.toml, packages/dialer-riscv64.recipe.toml, packages/dialer-x86_64.recipe.toml, packages/reach.recipe.toml, packages/reach-riscv64.recipe.toml, packages/reach-x86_64.recipe.toml init, time, timetable, network, host-tools, redoxfs fixtures (provisional)
system-tests test crates: system_tests; programs: system_tests kernel system-tests (provisional)

29 packages: 17 base, 4 optional, 5 sdk and 3 test by the table's count, system-tests having joined from milestone 609 (the system tests leave the kernel crate). One has an undecided home, ext4-oracle, which leaves with the ext4 server of milestone 190 (ext4, read and write); the other 28 carry a provisional one. On 2026-09-27, 1,718 of 2,678 tracked paths had an undecided home and 960 a provisional one; the weekly metrics page has the current count.

How the packages were drawn

The start was #1389's seven divisions, cargo metadata over the eight workspaces, and one read of which crates each component program names.

Where Linux has the tool, the distros' grouping was taken. process-tools holds ps, pgrep, pmap, top and uptime, Debian's procps set, after milestone 126 (the procps package). core-tools holds date, printenv, rm, wc and uuid (uuidgen). disk-tools holds disk_surveyor (lsblk) and disk_partitioner (fdisk). Each shell and each editor is its own package in Debian, so swish is too. timetable is the cron slot, and mdr the man-db one.

Grouping is borrowed and names are not. On 2026-10-06 (UTC) calef ruled three package names, each recorded in its manifest. The lane's util-linux became disk-tools ("util-linux is a horrible package name for a nife package"). coreutils became core-tools and procps became process-tools, so package names follow one rule, spelled out, and give up the GNU and Linux terms of art on purpose. He also moved uuid out of the disk tools, against Debian's grouping (util-linux, or uuid-runtime): "uuid can be used for lots of applications. Putting it in disk-utils doesn't seem right."

Where Linux has only a role, nife groups by role and the table's header comment names the Debian package it stands in for. These are kernel, boot, init, drivers, terminal, display, filesystem, network, time, entropy, login and system_installer.

The contracts are one -dev split, Debian's linux-libc-dev shape: the ABI, every *_protocol and the formats two programs agree on. A split per service, the libfoo-dev shape, is the alternative. It waits until a contract changes on its own schedule, which #1389 measured as not yet (76% of contracts commits touch another division).

The judgment calls, each a place the table could reasonably differ:

What the gate found

Nothing was moved and no rule was weakened. The first run failed on 21 links across a boundary.

Eight were real dependencies, now declared in seven depends lines. init's session_reviver re-derived timetable entries, so it linked the timetable crates (retired 2026-09-27; init's components crate still links timetable). fixtures links internals of init, time, timetable and network, which a test package is for. host-tools builds images from boot and display.

Thirteen were recorded as exceptions dated 2026-09-27, in the package file of the linker. Pull request #1392 (the system tests leave the kernel) then made four of the kernel's links dev-dependencies, and the gate failed their exceptions as stale. Eight remain:

linker links why it is refused, and what fixes it
kernel non_volatile_memory_express a handoff record living in a driver crate; retired 2026-10-26: the handoff is driver_process_contract's, in contracts, and the queue crate is a drivers interface
kernel video_terminal display service wiring in kernel/src/user/
kernel coremark, job_mix, soak_page benchmarks and probes built into the kernel; a release kernel should not link a fixture
boot job_mix serial_console runs the job mix to prove a board boots
init http_response, video_terminal system_initializer builds the whole interactive image; it is integration, not init

The driver row wants a lane of its own, and so do ps::Row and pmap::Row, which the kernel now reaches only from its tests: each layout moves into contracts. That is contracts leave implementation crates. The fixture rows and the integration row are limitations, recorded below.

How the moves will be done

Not in this milestone. One package per pull request, at a quiet moment in the queue, as unchanged file moves (git mv and nothing else in the commit), so git log --follow and review both see a rename. The package's crates, programs and paths are the list of what moves. The workspace root and the gates follow in a second commit. The order is leaves first, contracts before the programs that link them. The proposal holds the plan.

Questions for calef

  1. The format is TOML (ruled 2026-09-27). Are the fields above the shape, and are packages/<name>.package.toml, packages/homes.toml and .recipe.toml the names?
  2. The kinds: answered, ratified at 07:23Z with the rule that a kind says where a package ends up.
  3. The homes. Answered (§316 (a program package leaves as one repository, with the crates only it uses)): a program package leaves as one repository named after the package, holding its programs and every crate only that package uses (ruled 2026-11-04 UTC). A crate gets a repository of its own only when it would publish on its own merits or more than one repository consumes it. The rule refuses grouping by #1389's seven divisions (ruled 2026-10-28 UTC). The same day's naming review ratified process-tools, core-tools and disk-tools as the package names and the repository names; milestone 978 (the first cut's names) records that in design/roadmap/0978-first-cut-names.md and pull request #2870. Each home line stays provisional until its repository exists.
  4. The project records: design/, briefs/, script/, helpers/ and .github/. Does this repository become their home, or do they leave too?
  5. The names: all 27 packages, helpers/packages.py, this note and the homes metric.

BUGS