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.
Verification and traceability
Platform spec article
Verification and traceability
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).
Source-of-truth crates
Section titled “Source-of-truth crates”| Path | What it pins |
|---|---|
compiler/crates/beskid_abi/src/version.rs | BESKID_RUNTIME_ABI_VERSION |
compiler/crates/beskid_abi/src/symbols.rs | RUNTIME_EXPORT_SYMBOLS, SYM_* constants |
compiler/crates/beskid_abi/src/builtins.rs | BUILTIN_SPECS signatures |
compiler/crates/beskid_runtime/src/builtins/version.rs | beskid_runtime_abi_version() export |
compiler/crates/beskid_engine/src/jit_module.rs | Builtin pointer registration for JIT |
Integration tests
Section titled “Integration tests”| Harness | Coverage |
|---|---|
compiler/crates/beskid_tests/src/runtime/jit.rs | JIT compiles and runs lowered programs against in-process runtime |
compiler/crates/beskid_e2e_tests/src/tests/runtime_cases.rs | End-to-end runtime builtins including panic/IO paths |
compiler/crates/beskid_engine (feature extern_dlopen) | Dynamic extern resolution when enabled; see Extern dispatch |
Traceability matrix
Section titled “Traceability matrix”| Requirement | Verification |
|---|---|
| ABI-001 | Review RUNTIME_EXPORT_SYMBOLS vs beskid_runtime pub use list on every ABI-touching PR |
| ABI-002 | declare_builtin_imports uses BUILTIN_SPECS exclusively (beskid_codegen) |
| ABI-003 | Host/version gate tests in JIT and CLI startup (add when missing) |
| ABI-006 | Same beskid_abi path dependency in beskid_engine, beskid_codegen, and beskid_runtime workspace Cargo.toml |
CI expectations
Section titled “CI expectations”Compiler workspace CI must run runtime JIT tests on Linux x86_64 agents. ABI-breaking PRs must include spec updates under this feature and a version constant bump when ABI-004 applies.
Related topics
Section titled “Related topics”- Contracts and edge cases — requirement IDs
- Builtins and symbols verification