Skip to content

docs(toolchain): toolchain internals doc (en+zh) + remove .xpkg-exports.json reader#197

Merged
Sunrisepeak merged 1 commit into
mainfrom
docs/toolchain-mechanism-and-exports-removal
Jul 7, 2026
Merged

docs(toolchain): toolchain internals doc (en+zh) + remove .xpkg-exports.json reader#197
Sunrisepeak merged 1 commit into
mainfrom
docs/toolchain-mechanism-and-exports-removal

Conversation

@Sunrisepeak

Copy link
Copy Markdown
Member

Two follow-ups from the #196 review discussion:

  1. New doc: docs/08-toolchain-internals.md (+ zh mirror) — contributor-facing description of the toolchain machinery: resolution pipeline, the link model, the unified post-install fixup pipeline (ask-every-build/act-once trigger semantics, content-fingerprinted marker, never-patch-in-place + ownership invariants), the human-facing cfg, the hermetic link check, and extension guides for new toolchains, new CPU architectures, and embedded/bare-metal toolchains (which map onto existing CLibMode semantics: no loader + self-contained sysroot).

  2. Remove the .xpkg-exports.json reader from linkmodel's loader resolution (companion to Revert "feat(xim): persist declared xpkg exports (#351)" openxlings/xlings#352 which reverts the writer): its only consumer was this resolver, while the per-arch triple map + glob fallbacks already cover every real payload — the entire 0.0.83 verification matrix (PR CI, hermetic container, fresh installs on 3 platforms + 6 distro containers) ran green on xlings 0.4.62, which never had this file. A general-purpose package manager shouldn't carry a mechanism whose sole reader is one downstream tool; the decision is recorded in the new doc §3. Behavior is unchanged for every existing payload.

No version bump — docs + dead-code removal only.

…rts.json reader

New contributor-facing document describing the toolchain machinery end to
end — resolution, the link model, the unified post-install fixup pipeline
(trigger semantics, marker fingerprinting, the never-patch-in-place and
ownership invariants), the human-facing cfg, the hermetic link check — and
how to extend it: new toolchains, new CPU architectures, and the
embedded/bare-metal outlook (no-loader / self-contained-sysroot toolchains
map onto existing CLibMode semantics).

Also removes mcpp's reader for the persisted .xpkg-exports.json (the
xlings-side writer is reverted in openxlings/xlings#352): its only consumer
was this resolver, while the triple map + glob fallbacks already cover every
real payload — the entire 0.0.83 verification matrix ran green on xlings
0.4.62, which never had the file. The decision is recorded in the new doc
(§3). Loader resolution behavior is unchanged for every existing payload.

No release needed: doc + dead-code removal only.
@Sunrisepeak Sunrisepeak merged commit 19e2070 into main Jul 7, 2026
6 checks passed
@Sunrisepeak Sunrisepeak deleted the docs/toolchain-mechanism-and-exports-removal branch July 7, 2026 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant