diff --git a/crates/lumio-contract-types/src/generated.rs b/crates/lumio-contract-types/src/generated.rs index 8bd98c7..a10c183 100644 --- a/crates/lumio-contract-types/src/generated.rs +++ b/crates/lumio-contract-types/src/generated.rs @@ -1,9 +1,16 @@ //! Architecture-source generated-contract adapter. //! -//! The architecture source has published baseline id `LGE-V1.4-2026-08-27`, but -//! FOUNDATION-W1 has not published a Rust/C package or C Header. This module is -//! the internal seam only: opaque newtypes, no public numeric registries, and -//! no copied schemas. +//! The architecture source has published baseline id `LGE-V1.4-2026-08-27` and, +//! under ADR-040, the Root ABI bundle at `origin/main:packages/abi/` — this +//! repository is a registered consumer of that bundle (`rootAbi.consumers`) and +//! binds its C Header directly. It is deliberately NOT a consumer of the Rust / +//! C# generated packages. +//! +//! Binding is not done yet, so this module is still the internal seam only: +//! opaque newtypes, no public numeric registries, no copied schemas. What the +//! bundle publishes (handle / buffer / status layout, ABI version) is bindable; +//! ErrorCode, Capability bits and Operation ids are still unpublished for this +//! repository's needs. See `layout.rs` for the layout-profile caveat. /// Published architecture baseline this crate binds to. pub(crate) const ARCHITECTURE_BASELINE_ID: &str = "LGE-V1.4-2026-08-27"; diff --git a/crates/lumio-contract-types/src/layout.rs b/crates/lumio-contract-types/src/layout.rs index 24491f3..efd3800 100644 --- a/crates/lumio-contract-types/src/layout.rs +++ b/crates/lumio-contract-types/src/layout.rs @@ -1,7 +1,14 @@ //! ABI layout assertions against the architecture Header / manifest. //! -//! FOUNDATION-W1 has not published a C Header. This gate must not invent ABI -//! sizes; an empty table is a match. +//! The architecture source now publishes a C Header (ADR-040 Root ABI bundle, +//! `origin/main:packages/abi/lumio_core.h`), but its bundle certifies exactly +//! one `layoutProfileId` — `linux-x86_64-glibc`. Transcribing those sizes here +//! unconditionally would assert layouts on darwin / windows that the +//! architecture source has not certified, which is the same red line as +//! inventing them. Binding therefore stays deferred until the bundle carries +//! the remaining target profiles, or until this gate is target-gated. +//! +//! This gate must not invent ABI sizes; an empty table is a match. use crate::generated::StructSize; @@ -13,7 +20,8 @@ pub struct LayoutMismatch { pub found: StructSize, } -/// Generated Header layout rows. Empty while the Header is unpublished. +/// Generated Header layout rows. Empty until binding is target-gated (see +/// the module docs): the published bundle certifies `linux-x86_64-glibc` only. pub fn entries() -> &'static [(&'static str, StructSize)] { &[] } diff --git a/crates/lumio-contract-types/src/lib.rs b/crates/lumio-contract-types/src/lib.rs index b650d7e..46447a4 100644 --- a/crates/lumio-contract-types/src/lib.rs +++ b/crates/lumio-contract-types/src/lib.rs @@ -5,8 +5,10 @@ //! `docs/specs/native-core-module-map.md`。 //! //! Gate-0 只提供内部 seam 与负向 Gate。架构源已发布 baseline id -//! `LGE-V1.4-2026-08-27`,但尚未发布 Rust/C package 或 C Header;不得手写公共 -//! ErrorCode / Capability / Operation 数值,也不得声称公共 ABI 已完成。 +//! `LGE-V1.4-2026-08-27`,并按 ADR-040 发布了 Root ABI bundle;本仓已登记为该 +//! bundle 的 consumer,直接绑定其 C Header,**不**消费 Rust/C# 生成包。绑定本身 +//! 尚未落地:ErrorCode / Capability / Operation 数值对本仓的需求仍未发布, +//! 一律不得手写,也不得声称公共 ABI 已完成。 #![forbid(unsafe_code)] diff --git a/crates/lumio-contract-types/tests/generated_layout_matches_manifest.rs b/crates/lumio-contract-types/tests/generated_layout_matches_manifest.rs index 5434fea..79d3533 100644 --- a/crates/lumio-contract-types/tests/generated_layout_matches_manifest.rs +++ b/crates/lumio-contract-types/tests/generated_layout_matches_manifest.rs @@ -2,11 +2,11 @@ use lumio_contract_types::layout; #[test] fn generated_layout_matches_manifest() { - layout::verify_layout() - .expect("no generated Header means no structs to check, not invented ABI sizes"); + layout::verify_layout().expect("an empty layout table has no structs to check"); assert_eq!( layout::entries().len(), 0, - "must not invent ABI struct sizes while the generated Header is unpublished" + "must not assert ABI struct sizes beyond the one layout profile the \ + architecture bundle certifies (linux-x86_64-glibc)" ); } diff --git a/crates/lumio-native-ffi/src/exports.rs b/crates/lumio-native-ffi/src/exports.rs index b9822fc..e93fb96 100644 --- a/crates/lumio-native-ffi/src/exports.rs +++ b/crates/lumio-native-ffi/src/exports.rs @@ -1,6 +1,11 @@ //! Blocked-header FFI smoke helper. //! -//! Formal C Header and provider symbol list are unpublished (T-ffi-04). +//! The architecture source publishes the Root ABI C Header (ADR-040), but the +//! entry symbol it declares belongs to CoreEngine root-abi, not to this +//! repository (ADR 0001; enforced by `cargo xtask dump-symbols` and by the +//! source-text guard in this module's tests — do not spell that symbol here). +//! The provider symbol list this crate would export is still unpublished +//! (T-ffi-04). //! This module composes existing Rust seams; it is not a C ABI surface. //! Do not add `#[no_mangle]` or `extern "C"` names here.