Commit bac3519
authored
* docs: embedded platform support design (#276)
Design/proposal doc for entering the embedded Linux ecosystem, restructured
as decisions-first (with rationale) then supporting detail.
Positioning: mcpp brings its own matched-libc cross compiler (latest GCC) and
consumes an external device sysroot — it is NOT a distro builder and never
adapts per-vendor SDK. The single core change is opening the sysroot seam (L2);
the CLibMode::Sysroot mechanism and the hermetic allow-list already accept
tc.sysroot, so it's a minimal insertion. pkg-config and qemu cross test-run are
xlings provisioning + thin wiring.
Locks the maintainer decision register (16 decisions + rationale), incl.:
- C++ source-only; binary interop C-ABI only + wrapper; vendor C++-only libs via
a user-built C-bridge .so (built in vendor ABI, pure-C boundary)
- glibc baseline pinned low when building payloads (GCC version x glibc decoupled);
payloads use the latest GCC (16), GCC 15 is only the import-std capability floor
- dropped: L4 backend mode, sysroot pinning/mgmt, .pc synthesis, and the
"compiler doesn't support C++23" diagnostic (config II makes that case
architecturally impossible)
Beachhead: Raspberry Pi aarch64. Net work: P0 sysroot seam + matched-libc
low-glibc GCC 16 payloads (+ one glibc-floor validation); P1 pkg-config + qemu
test-run.
Supersedes the earlier issue-276 analysis note (renamed to a proper design doc).
* fix: #278 package identity convergence — index side + dependency side (0.0.105)
mcpp-index changed `chriskohlhoff.asio`'s `name` from "chriskohlhoff.asio" to
"asio" (namespace untouched). Lint went green; all three platform workspace
jobs died after 20-58 minutes with E_NOT_FOUND. The descriptor parsed, passed
mcpp's own identity gate, and no consumer spelling could install it.
Root cause is a split in how package identity is spoken on the two sides:
index side — identity normalization treats (ns="a", name="b") and
(ns="a", name="a.b") as equivalent, while install-target
construction hard-assumes the latter. The index is a FLAT key
space keyed by the LITERAL package.name (libxpkg: build_index
is called with no namespace, lookup is exact entries.find),
so the two never meet.
dependency side — the bare-name candidate ladder's discovery rung was
specified as "match by name across the precedence path" but
implemented as "try two more filenames", and a total miss fell
through to candidates.front() SILENTLY, so mcpp continued with
a namespace it had invented.
Both contracts existed only as prose comments. They are now predicates.
INV-NAME (index side): package.name must BE the fully-qualified name whenever
package.namespace is declared. One predicate, two call sites — `mcpp xpkg
parse` (index CI, seconds) and the install path (catches descriptors that
never passed through lint, zero extra I/O since the descriptor is already in
memory). The predicate is deliberately narrow: written as the general
"literal != derived fqname" comparison it would flag the working compat-alias
path and break every bare dependency. CompatAliasIsClean locks that.
INV-RESOLVE (dependency side): a bare name resolves in exactly three places —
mcpplibs, compat, and no-namespace upstream packages. Everything else must be
written out. Global short-name search is rejected: it makes resolution depend
on which indices happen to be present, so adding an index could silently
retarget an existing dependency.
BREAKING: bare names no longer reach third-party namespaces. The index-wide
scan survives only as a did-you-mean on the already-failed path — result goes
into error text, never back into resolution.
Also fixes the generator that produced these descriptors: `mcpp emit xpkg`
wrote a bare name and no namespace at all, so filing a package into a
namespaced index meant hand-adding `namespace = "<org>"` — and that edit is
what created the split form. aimol.tensorvia-cpu was born exactly this way.
Prescribed in 2026-06-26 design §4.5; never landed until now.
Design: .agents/docs/2026-07-25-issue278-descriptor-name-form-canonicalization-design.md
Fixes #278
* docs: check off #278 implementation plan; record T6/T8 actual outcomes
* test(e2e): assert compat search path at resolution layer, not on a successful fetch
* fix: keep the lazy-git-index fall-through out of the new hard failure
A custom git index is cloned by xlings during install, so at candidate-
selection time its descriptors may legitimately not be on disk yet.
"Not found" is not conclusive there, and turning it into a hard error
would reject a package that materializes a moment later. Builtin and
local path indices are both readable at selection time, so they keep
the strict rule.
* chore: bump MCPP_VERSION constant to 0.0.105
mcpp.toml and src/toolchain/fingerprint.cppm are two independent version
sources; bumping only the manifest left `mcpp --version` reporting the
old number, which 01_help_and_version.sh cross-checks against mcpp.toml.
* docs: record #278 measured verification results and the two implementation-time corrections
1 parent a4ac04b commit bac3519
19 files changed
Lines changed: 1300 additions & 20 deletions
File tree
- .agents/docs
- docs
- zh
- src
- build
- cli
- manifest
- pm
- publish
- toolchain
- tests
- e2e
- unit
Lines changed: 32 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
6 | 13 | | |
7 | 14 | | |
8 | 15 | | |
| |||
389 | 396 | | |
390 | 397 | | |
391 | 398 | | |
392 | | - | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
393 | 423 | | |
394 | 424 | | |
395 | 425 | | |
| |||
Lines changed: 418 additions & 0 deletions
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
6 | 30 | | |
7 | 31 | | |
8 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
321 | 321 | | |
322 | 322 | | |
323 | 323 | | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
324 | 379 | | |
325 | 380 | | |
326 | 381 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
293 | 293 | | |
294 | 294 | | |
295 | 295 | | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
296 | 340 | | |
297 | 341 | | |
298 | 342 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
0 commit comments