Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aien-sovereign-core-mv/blob/main/crates/aien-abi-conformance/src/lib.rs # aien-sovereign-core-mv AienOS host runtime: inference scheduling, paged KV state, the aien CLI and Spark verification tooling. Its inference engine is in alpha testing (DGX Spark GB10); Omega is the implementation destination. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `aien-sovereign-core-mv / crates / aien-abi-conformance / src / lib.rs` 49 lines ยท 2538 bytes Raw Blame History 1 // SPDX-License-Identifier: Apache-2.0 2 // Copyright 2026 Drake Stapleton (AIEN / aien-dev) 3 // 4 // Licensed under the Apache License, Version 2.0 (the "License"); 5 // you may not use this file except in compliance with the License. 6 // You may obtain a copy of the License at 7 // 8 // http://www.apache.org/licenses/LICENSE-2.0 9 // 10 // Unless required by applicable law or agreed to in writing, software 11 // distributed under the License is distributed on an "AS IS" BASIS, 12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 // See the License for the specific language governing permissions and 14 // limitations under the License. 15 16 //! ABI conformance for the omega C boundaries that sovereign-core mirrors by hand 17 //! (`aien-omega-compose` over `rxc_host_abi.h`, `aien-omega-gpu` over the `omega_gpu_*` headers). 18 //! 19 //! One checked-in **manifest** per boundary is the contract. It is checked from both sides: 20 //! 21 //! * **Rust side** (every `cargo test`, stub builds included): the Rust declarations are written 22 //! through [`abi_struct!`], [`abi_externs!`], [`abi_fnptr!`] and [`abi_consts!`], which record 23 //! every field (name, offset, size, kind, count, in declaration order), every extern signature, 24 //! every callback type and every mirrored constant. [`rust_manifest`] renders them in manifest 25 //! form and the crate's test compares that text with the checked-in file. 26 //! * **C side** (`build.rs`, whenever the real library is built from an omega checkout): 27 //! [`check_c`] parses the pinned headers (field names and order, prototypes, callback typedefs), 28 //! compiles and runs a probe that prints `sizeof`, `_Alignof`, `offsetof`, field widths and 29 //! integer kinds (C11 `_Generic`) and the constant values, and lists the archive's defined 30 //! symbols with `nm`. Any difference fails the build before anything links. 31 //! 32 //! So a field reorder that keeps the total size, a width or signedness change, a changed 33 //! parameter, a changed constant or a missing symbol cannot reach a qualified build. 34 //! [`identity`] adds the native archive digest checks (`native-artifacts.lock`). 35 //! 36 //! No dependencies; the C side needs `cc` and `nm` (both already required by the native build). 37 38 pub mod build; 39 pub mod header; 40 pub mod identity; 41 pub mod manifest; 42 mod native; 43 pub mod probe; 44 mod rust; 45 46 pub use manifest::{canon_sig, canon_type, Manifest}; 47 pub use native::NativeIdentity; 48 pub use probe::{check_c, CCheck}; 49 pub use rust::{assert_manifest, rust_manifest, AbiStruct, CKind, Field, FnSig, RustAbi};