Rust runtime exports were documented beside user C extern rules.
Rust ABI profile — Boundary and stability
Platform spec article
Rust ABI profile — Boundary and stability
Spec standingStandard
-
Runtime embedding exports defer to this hub.
Context
Decision
This feature hub must own normative MUST/SHOULD for Rust-hosted runtime interop distinct from user C ABI profile libraries.
Consequences
Builtin table and ABI version policy stay here; user
Externstays on C profile.Verification anchors
/platform-spec/language-meta/interop/rust-abi-profile/
-
Rust-specific choices stay inside the runtime crate boundary.
Context
JIT/AOT loaders need stable C symbol names while implementation remains Rust.
Decision
The Beskid runtime must expose stable C-compatible entrypoints to loaders. Rust-specific implementation choices must remain inside the runtime crate boundary.
Consequences
beskid_abisymbols and unwind bridges document the outward face only.Verification anchors
compiler/crates/beskid_abi;compiler/crates/beskid_runtime. -
User foreign code uses C ABI profile until a future spec promotes Rust-native interop.
Context
Linking arbitrary
rlibtargets as user Extern would imply unstable Rust ABI across toolchains.Decision
This profile is not a promise that arbitrary Rust crates can be user
Externtargets without shims. User-authored foreign code on the supported path must remain C ABI profile until a future specification promotes additional Rust-native interop.Consequences
Embedding docs steer authors to C contracts + shims for Rust libraries.
Verification anchors
/platform-spec/language-meta/interop/rust-abi-profile/ and FFI and extern.
- Rust ABI profile — Boundary and stability What is stable at the Rust runtime ↔ generated code boundary versus implementation-private Rust types.
- Rust ABI profile — Shims and compatibility strategy How future Rust-native interop would layer on top of C ABI exports without breaking the stable runtime contract.
0 revisions (git unavailable at build; counts may be empty)
No commits recorded for this path.
| Section id | Required | Found |
|---|---|---|
what-this-feature-specifies | yes | yes |
implementation-anchors | yes | yes |
Full tree: run pnpm verify:platform-spec-layout (writes src/generated/platform-spec-layout-report.json).
Stable surface
Section titled “Stable surface”The normative stable surface for loaders and generated code is the set of exported symbols and their documented C-compatible signatures published through beskid_abi and realized in beskid_runtime. Conformance tests lock this set for a given runtime ABI version (see compiler/crates/beskid_tests/src/abi/contracts.rs).
Implementation-private Rust
Section titled “Implementation-private Rust”Rust types, modules, and internal helpers inside beskid_runtime that are not part of the exported symbol contract may change across compiler releases without a major ABI version bump, provided tests and documented runtime behavior remain compatible.
Unwind and panics
Section titled “Unwind and panics”Runtime entrypoints may use extern "C-unwind" (or equivalent) where platform policy requires interoperable unwinding with generated code. The exact mapping is profile-defined and must stay consistent with panic and IO documentation under /execution/runtime/.