JIT and CLI hosts may load a beskid_runtime artifact built separately from the active compiler. Without an explicit version gate, stale toolchains call builtins with wrong layouts or missing symbols.
Examples
Platform spec article
Examples
Spec standingStandard
-
Hosts reject mismatched compiler and runtime ABI integers before executing generated code.
Context
Decision
Rule Detail Version surface beskid_runtime_abi_version()returnsBESKID_RUNTIME_ABI_VERSION(u32inbeskid_abi)Host check Hosts should fail before user mainwhen runtime version ≠ compiler-embedded constant (ABI-003)Diagnostics Failure messages must name both integers and recommend aligning CLI/VSIX/runtime release sets Consequences
Release matrices document paired compiler/runtime builds. Conformance should assert version parity in JIT smoke tests (
beskid_testsruntime/jit).Verification anchors
compiler/crates/beskid_abi/src/version.rs;beskid_engineJIT module setup; ABI-001–ABI-003 in contracts and edge cases. -
Layout, signature, or semantic breaks must increment BESKID_RUNTIME_ABI_VERSION.
Context
Additive runtime symbols and Cargo feature gates are easy to confuse with ABI-stable changes. Silent signature drift breaks AOT/JIT link steps or causes undefined behavior at call sites.
Decision
Trigger Action BeskidStr/BeskidArray/ interop payload layout changeMust increment BESKID_RUNTIME_ABI_VERSION(ABI-004)Builtin rename, arity change, or AbiParamKind/AbiReturnKindchangeMust bump version Semantics relied on by lowering change (e.g. barrier no-op) Must bump version New symbol appended, older artifacts never import it May ship without bump (ABI-005) Optional Cargo featuresonlyMust not bump ABI version Reference tree pins version 2 until the next breaking change.
Consequences
Release notes should list bumped versions and removed symbols. Renaming without bump is a release-process violation.
Verification anchors
beskid_abisymbol tables;RUNTIME_EXPORT_SYMBOLSparity checks in CI.
- Contracts and edge cases MUST/SHOULD rules for ABI version bumps, symbol stability, and mixed toolchain failures.
- Design model ABI version negotiation, symbol stability, and compiler–runtime compatibility boundaries.
- Examples ABI version checks, symbol parity, and migration scenarios for toolchain maintainers.
- FAQ and troubleshooting Common ABI mismatch failures and maintainer guidance for version bumps.
- Flow and algorithm JIT symbol registration, ABI version export, and compatibility check ordering.
- Verification and traceability Tests and crate paths that pin ABI version and runtime export symbol parity.
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).
Host version gate (Rust pseudocode)
Section titled “Host version gate (Rust pseudocode)”A JIT host can refuse to run when versions diverge:
let expected = beskid_abi::BESKID_RUNTIME_ABI_VERSION;let actual = unsafe { beskid_runtime::beskid_runtime_abi_version() };if actual != expected { panic!("runtime ABI {actual} != compiler ABI {expected}");}Production CLIs should surface this as a structured error rather than a raw panic.
Additive symbol (no bump)
Section titled “Additive symbol (no bump)”Suppose maintainers add fiber_debug_trace to RUNTIME_EXPORT_SYMBOLS and beskid_runtime, but no released compiler lowering emits calls to it yet. Older artifacts keep working; newer compilers may call the symbol once lowering lands. No BESKID_RUNTIME_ABI_VERSION change is required (ABI-005).
Breaking rename (bump required)
Section titled “Breaking rename (bump required)”Renaming fiber_join export to fiber_join_status without updating every BUILTIN_SPECS consumer breaks link compatibility. The fix set is:
BESKID_RUNTIME_ABI_VERSION+= 1- Synchronized
symbols.rs,builtins.rs, runtime#[unsafe(no_mangle)]names, and docs - Rebuild and republish CLI, VSIX, and prebuilt runtime bundles together
Inspecting the export list
Section titled “Inspecting the export list”Maintainers compare:
compiler/crates/beskid_abi/src/symbols.rs→RUNTIME_EXPORT_SYMBOLScompiler/crates/beskid_runtime/src/lib.rs→pub use builtins::{ … }
Every JIT-resolved builtin must appear in both lists with identical spelling.
Related topics
Section titled “Related topics”- Verification and traceability — automated parity checks
- Legacy: Runtime ABI (v0.1)