Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions crates/lumio-contract-types/src/generated.rs
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
14 changes: 11 additions & 3 deletions crates/lumio-contract-types/src/layout.rs
Original file line number Diff line number Diff line change
@@ -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;

Expand All @@ -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)] {
&[]
}
Expand Down
6 changes: 4 additions & 2 deletions crates/lumio-contract-types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
);
}
7 changes: 6 additions & 1 deletion crates/lumio-native-ffi/src/exports.rs
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
Loading