@@ -51,26 +51,35 @@ Meanwhile xlings *already* models a full per-project environment (`xvm/README.md
5151per-version ` envs ` , and named/anonymous ` subos ` (a project sandbox at
5252` <proj>/.xlings/subos/... ` with its own ` bin/lib/usr ` ). ** mcpp surfaces none of it.**
5353
54- ### Design — ` [environment] ` materializes 1:1 onto xlings keys
55- Do ** not** invent new vocabulary. A ` mcpp.toml ` ` [environment] ` block maps directly
56- to the xlings ` .xlings.json ` schema and is written into mcpp's existing project file
57- ` <proj>/.mcpp/.xlings.json ` (extend the ` index_repos ` -only writer at
58- ` config.cppm:699-705 ` to also emit ` deps ` /` workspace ` /` envs ` /` subos ` ):
54+ ### Design — ` [xlings] ` IS the xlings project-config schema (1:1, no translation)
55+ Do ** not** invent vocabulary. The manifest section is named ** ` [xlings] ` ** and its
56+ subsections ** mirror ` .xlings.json ` 's keys exactly** (` workspace ` / ` deps ` / ` subos `
57+ / ` envs ` ), so materialization is a literal ** passthrough** into mcpp's existing
58+ project file ` <proj>/.mcpp/.xlings.json ` — extend the ` index_repos ` -only writer at
59+ ` config.cppm:699-705 ` to also emit these keys. (Decision: align to xlings, since
60+ xlings already owns this exact model.)
5961
6062``` toml
61- [environment ]
63+ [xlings ]
6264subos = " dev" # → .xlings.json "subos" (named project sandbox)
63- tools = [" make@4" , " python@3.13.1" ] # → "deps" (host build-tools; bare `xlings install` provisions)
64- [environment .workspace ] # → "workspace" (pin tool versions; per-OS values allowed)
65+ deps = [" make@4" , " python@3.13.1" ] # → "deps" (host build-tools; bare `xlings install` provisions)
66+
67+ [xlings .workspace ] # → "workspace" (pin tool versions; per-OS values allowed)
6568gcc = " 16.1.0"
66- [environment .env ] # → per-tool "envs" applied by xvm shims
69+ clang = { linux = " 20.1.7" , windows = " 20.1.7" } # per-OS keyed, like xlings
70+
71+ [xlings .envs ] # → per-tool "envs", applied by xvm shims
6772OPENBLAS_NUM_THREADS = " 1"
6873```
6974
70- - ** ` [toolchain] ` folds in** : today it installs globally; route it into the project
71- ` workspace ` so two checkouts on one machine pin different compilers via xvm shims
72- (xlings supports this; mcpp just never seeds it). ` [toolchain] ` stays as the
73- ergonomic shorthand; ` [environment.workspace] ` is the general form.
75+ - ** ` [toolchain] ` folds in** : today it installs globally; route it into
76+ ` [xlings.workspace] ` so two checkouts on one machine pin different compilers via
77+ xvm shims (xlings supports this; mcpp just never seeds it). ` [toolchain] ` stays as
78+ the ergonomic shorthand; ` [xlings.workspace] ` is the general form (same key xlings
79+ reads).
80+ - ** Naming rationale** : ` [xlings] ` signals "this configures the xlings-backed build
81+ environment" and makes the writer a 1:1 key copy — no ` [environment] ` →xlings
82+ translation layer to drift. Subsection names track ` .xlings.json ` verbatim.
7483- ** Provisioning** = the already-wired project-mode ` build_command_prefix `
7584 (` xlings.cppm:716-724 ` ) + bare ` xlings install ` over the emitted ` deps ` .
7685- ** This is purely "surface + writer"** — no new resolution machinery; the
@@ -99,8 +108,8 @@ consumer in `prepare`/`plan`). They answer two orthogonal questions:
991081 . ** Recipe source-build tools** — ` xpm.<os>.deps ` in an xpkg recipe (` xim:python ` ,
100109 ` xim:make ` ); host, install-time, resolved by xim/` pkginfo.build_dep ` . * This is
101110 where ` compat.xcb ` 's Python lives.*
102- 2 . ** Project environment tools** — L-1 ` [environment].tools ` (host tools the project
103- needs available: cmake, protoc).
111+ 2 . ** Project environment tools** — L-1 ` [xlings].deps ` (host tools the project needs
112+ available: cmake, protoc; materialized into ` .xlings.json ` ` deps ` ).
1041133 . ** ` build.mcpp ` libraries** — ` [build-dependencies] ` (host libraries the native
105114 build program links). ** Wire this here** — it gains a real consumer at L3.
106115
@@ -239,7 +248,8 @@ missing declared outputs as failure.
239248 ` insert() ` keeps an existing unconditional entry (no silent override). Test:
240249 ` tests/e2e/86_target_cfg_dependencies.sh ` . ** Still TODO:** ` lazy = true ` (fetch only
241250 when a gated path requests it) + content-hash identity.
242- - ** Phase 2 — L-1 environment.** Surface ` [environment] ` → extend the project
251+ - ** Phase 2 — L-1 environment.** Surface ` [xlings] ` (+ ` [xlings.workspace] ` /` .deps ` /
252+ ` .subos ` /` .envs ` , 1:1 with ` .xlings.json ` ) → extend the project
243253 ` .xlings.json ` writer (` config.cppm:699-705 ` ) to emit ` deps ` /` workspace ` /` envs ` /` subos ` ;
244254 fold ` [toolchain] ` into ` workspace ` ; wire ` [build-dependencies] ` .
245255- ** Phase 3 — mcpp-index workspace** (companion doc) — first real consumer of Phase 1/1b.
0 commit comments