Rust runtime exports were documented beside user C extern rules.
Rust ABI profile
Platform spec feature
Rust ABI profile
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).
What this feature specifies
The Rust ABI profile describes how the Beskid runtime (implemented in Rust) exposes stable C-compatible entrypoints to JIT and AOT loaders while allowing Rust-specific implementation choices inside the runtime crate boundary.
This profile is not a promise that arbitrary Rust crates can be linked as user Extern targets without shims. User-authored foreign code on the supported path remains the C ABI profile until a future specification promotes additional Rust-native interop.
Implementation anchors
- Exported symbol names:
compiler/crates/beskid_abi/src/symbols.rs - Builtin ABI shapes for lowering:
compiler/crates/beskid_abi/src/builtins.rs - Runtime exports and modules:
compiler/crates/beskid_runtime/src/lib.rs,compiler/crates/beskid_runtime/src/builtins/mod.rs - Syscall and panic bridges (example of
extern "C-unwind"usage):compiler/crates/beskid_runtime/src/builtins/panic_io.rs - JIT registration of runtime symbols:
compiler/crates/beskid_engine/src/jit_module.rs - Symbol inventory and runtime ABI references:
/platform-spec/execution/runtime/
Decisions
Section titled “Decisions”No open decisions. Closed choices are normative ADRs under adr/ (D-LMETA-RUSTABI-0001 … D-LMETA-RUSTABI-0003); use the reader ADRs tab for detail.
Articles
- Feature hub owns normative contractRuntime embedding exports defer to this hub.
- Rust ABI profile — Boundary and stabilityWhat is stable at the Rust runtime ↔ generated code boundary versus implementation-private Rust types.
- Rust ABI profile — Shims and compatibility strategyHow future Rust-native interop would layer on top of C ABI exports without breaking the stable runtime contract.