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.
FAQ and troubleshooting
Platform spec article
FAQ and troubleshooting
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).
When must we bump BESKID_RUNTIME_ABI_VERSION?
Section titled “When must we bump BESKID_RUNTIME_ABI_VERSION?”When an existing generated call pattern would observe different layout, symbol names, or Cranelift signatures at link time. Purely additive exports that no shipped compiler emits may stay on the same version (ABI-005).
Does the VSIX bundle its own runtime?
Section titled “Does the VSIX bundle its own runtime?”The extension ships a platform-matched beskid CLI/LSP stack; that stack must be built against the same beskid_abi revision as the embedded compiler. Mismatch manifests as JIT MissingFunction or version gate failures—reinstall matching artifacts rather than mixing arbitrary release channels.
Are interop_dispatch_* symbols part of the versioned surface?
Section titled “Are interop_dispatch_* symbols part of the versioned surface?”Yes. They appear in RUNTIME_EXPORT_SYMBOLS and BUILTIN_SPECS. Tag/payload layout changes require an ABI bump and coordinated engine/runtime updates (Builtins and symbols).
Can JIT use a newer runtime than the compiler?
Section titled “Can JIT use a newer runtime than the compiler?”Only when beskid_runtime_abi_version() is still equal to the compiler’s expected constant and no removed symbols are referenced. Otherwise rebuild the compiler; unsupported mixing is intentional (ABI-004).
Troubleshooting
Section titled “Troubleshooting”| Symptom | Likely cause | Fix |
|---|---|---|
missing function 'alloc' at JIT finalize | Runtime library not linked or stripped exports | Ensure beskid_runtime built with default features; verify RUNTIME_EXPORT_SYMBOLS |
| Segfault on first builtin call | Wrong function pointer type registered | Check BUILTIN_SPECS vs runtime extern "C-unwind" signature |
| Works in debug CLI, fails in VSIX | Stale extension runtime | Rebuild Open VSX matrix with matching beskid_abi |
| AOT binary crashes, JIT OK | Old runtime .so bundled in deploy | Re-link AOT with current beskid_runtime |
Related topics
Section titled “Related topics”- Flow and algorithm
- Runtime feature flags — optional
arrays_backingwithout ABI version bumps