Repository navigation
feat: the kernel headers are the kernel-abi layer's; platform keys on every row; a row's interfaces; a generated unit's origin - #1006
Open
Sunrisepeak wants to merge 18 commits into
Open
Sunrisepeak wants to merge 18 commits into
Sunrisepeak wants to merge 18 commits into
Conversation
…ld on every row, a row states its interfaces, a generated unit names its origin
- [target.<selector>.layers] kernel-abi takes "xim:linux-headers@<version>" or { path } on a
system whose row states how its kernel headers are measured; the headers are decided once after
the target side, measured by preprocessing, wired ahead of the base with -isystem, and reported
(layers[].version). Without a statement the base's own headers answer, then the toolchain's
declaration; the shared view is no longer read or written (mcpp#988).
- The project's and the machine's [target.<selector>] layers, tools and link take effect on a row
without a platform; carrier there is a warning.
- System and target rows state interfaces; cfg(interface = ...) and layers[].interfaces read the
provider's list, else the row's, else the system's (mcpp#1005).
- mcpp::action::origin() and ide.generated[].origin; a generated unit that declares a module's
primary name is its interface (mcpp#1004).
…load and run under qemu-user; kernel-abi = false decides no headers The row's provider pins gcc@16.1.0 and states its runner (xim:qemu-user-riscv64@7.2.0, linux-x86_64). The snapshot records the new tier, the pin and the requests it answers; the linux-musl set now includes the row. A statement of kernel-abi = false, as a freestanding platform writes, decides and measures no kernel headers.
…d on request
The apple provider's device row and simulator rows are two entries: the simulator rows carry runner { simctl-run, same-arch, xim:apple-simulator-tools@0.3.0, enabled = false }. ci-macos-ios asserts the refusal before consent and the run once enabled.
… gc collects the store A build registers a root (registry/data/roots/mcpp/<store-name>@<version>, xlings' store-roots specification) for each payload of the home store its graph names, by replacing the link so that its own time is the last use; a build that reuses its graph renews them from roots.list. mcpp toolchain install holds the toolchain it installs, and a home without roots has one made for every payload, once. mcpp cache gc releases the roots unused for --older-than and then asks the provider to collect the store; --dry-run removes nothing. The link's own time is read with mcpplibs.os 0.4.8. The kernel-headers refusal names its row as [target.<triple>].
…form's provider is selected, every web program packs its module, $ORIGIN is the directory a library was opened in, and a macOS link names its target (mcpp#1007) - One function gives a row's view under its provider (view_of), for the built-in table, a non-default provider and a row a platform package defines; the latter's `linkage = "static"` now reaches the build, and the default pack mode packs a static program of a format without a dynamic linker (DJGPP) with no closure. - `path:<dir>`, the reference text a path platform's provider names its package by, parses; the selection no longer leaves that provider out. - `--all-programs` on wasm32-emscripten stages each program's module. - The ELF closure model expands `$ORIGIN` at the directory the loader opened a library in, not at the target of the link it was reached through (compat.curand under LLVM). - On a macOS host the link names the target whenever the compile does (x86_64-macos on Apple silicon); the row stays planned, its C++ link lacking an x86_64 libc++. - e2e 103 and 300 take i686 as the planned example now that riscv64-linux-musl is preview; new e2e 1155 and 1156, unit tests for both parsers and the closure.
… (store_roots, 2026.11.23.1); roots and the kernel probe narrow no path - kXlingsVersion is 2026.11.23.1 and the handshake requires `store_roots` (protocol 1.19): an earlier xlings collects without reading the roots builds register, so it is refused at the handshake rather than asked by `mcpp cache gc`. - mcpp.provider.roots keeps store names and versions as paths and writes them as UTF-8; the kernel-header probe renders its paths with the engine's one spelling (no_escape). - `kernel-abi.packed` is read by a function of its own (loops nest at most two levels); an action's origin is looked up among its inputs with ranges::any_of.
…s; the path-dependency CRC measurement (mcpp#1008)
… its clang-triple, with or without a machine description; runner = true is a known key - mcpp::freestanding::Spec carries `target`, the row's clang-triple else the row, which every `--target=` of a bare-metal compile, link and the c-abi verification probe uses. A defined bare-metal row with no `march` and no `link-emulation` resolves to a Spec with its target alone; before it resolved to none, and the probe refused riscv64-none-musl. - The unknown-key sweep of a [target.<selector>] table asks the key's name, not the value's type: `runner = true` was reported as unsupported. - The handshake unit test names `store_roots`.
Sunrisepeak
marked this pull request as ready for review
November 23, 2026 07:10
…ires; the pack launchers build on mcpplibs.os 0.4.8
…6 linux (riscv64-linux-musl is preview)
… arch layout links (xim-pkgindex#1251); the surface golden names cache gc --dry-run
…s); e2e 1154 D and 1158 assert every build registers its roots
…before the kernel headers are decided
…oved, and a cut removal's remainder is removed by the next build (e2e 936 H)
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the mcpp part of the design record
.agents/docs/2026-11-22-kernel-interface-and-derived-state-ecosystem-design.md(v6).The kernel headers (§3.1–§3.9, mcpp#988)
kernel-abidata states how a system's kernel headers are measured (header, version macros, packed widths, layout, package). Linux states it; macOS, Windows and FreeBSD do not, and refuse the prebuilt forms (target-base).[target.<selector>.layers] kernel-abiaccepts"xim:linux-headers@<version>"and{ path = "<dir>" }.kernel-abi = falsestates the layer absent.linux-headers. The shared view is neither read nor written. With no answer, the build is refused before it compiles.<linux/version.h>; a stated version that the measurement contradicts is refused. It is wired by the link model with-isystemahead of the base in every mode. The two former checks (C library name,linux/limits.hpresence) are removed.arch/<arch>/includeserves a cross build (xim-pkgindex#1251: linux-headers 6.18.64 revision 1, 7.3.5).Platform keys on every row (§3.2)
layers,toolsandlinkfrom the project andconfig.tomlapply on a row without a platform;carrierthere is a warning (platform/carrier).Interfaces (§3.17, mcpp#1005 item 1)
System rows and target rows state
interfaces.cfg(interface = …),layers[].interfacesandMCPP_KERNEL_ABI_INTERFACESread the provider's list, then the row's, then the system's.Generated units (§3.14, mcpp#1004)
mcpp::action::origin()andide.generated[].origin; a generated unit that declares a module's primary name ismodule-interface; the duplicate-provider error names the origin relation.Rows and runners (§3.10, §3.18)
xim:qemu-user-riscv64@7.2.0) runs it.kernel-abi = falsedecides and measures no kernel headers.simctl-runas their runner (xim:apple-simulator-tools@0.3.0), enabled on request.clang-triple(riscv64-none-musl).Store roots (§3.12)
A build registers a root for each payload of the home store that its graph names (xlings store-roots specification);
mcpp cache gcreleases the roots unused for--older-thanand asks the provider to collect the store. The handshake requires xlings 2026.11.23.1 (store_roots, protocol 1.19); mcpplibs.os 0.4.8 reads the link's own time.Infrastructure faults (§3.21, mcpp#1007, mcpp#1009)
view_of) for the built-in table, a non-default provider and a platform-defined row; a platform row'slinkage = "static"reaches the build, and a DJGPP program packs with no closure.path:<dir>parses as a platform reference, so a path platform's provider is selected.--all-programson wasm32-emscripten stages every program's module.$ORIGINat the directory the loader opened a library in (mcpp#1009).runner = truein[target.<selector>]is a known key.Tests
modules/toolchain-model/tests/test_kernel_headers.cpp,tests/unit/test_linkmodel.cpp,tests/unit/test_build_directives.cpp,tests/unit/test_elf_runtime.cpp,tests/unit/test_platform.cpp,tests/unit/test_manifest.cpp,tests/unit/test_network.cpp.tests/e2e/targets/kernel.cpp(1147–1151),tests/e2e/cdb/emit.cpp(1152),tests/e2e/targets/rows.cpp(1153),tests/e2e/web/emscripten.cpp(1155),tests/e2e/pack/modes.cpp(1156),tests/e2e/openkal/platforms.cpp(1157).Specs: SPEC-002 v1.12, SPEC-004 v1.29, SPEC-005 v1.10, SPEC-006 v0.14, SPEC-013 v1.17, SPEC-016 v1.9.
The release version is filled in by the release commit of this PR.