CI and VSIX builds enable different beskid_runtime features. Confusing feature gates with ABI bumps breaks compatibility checks.
Flow and algorithm
Platform spec article
Flow and algorithm
Spec standingStandard
-
Optional runtime capabilities toggle code paths without bumping BESKID_RUNTIME_ABI_VERSION.
Context
Decision
Concept Rule BESKID_RUNTIME_ABI_VERSIONChanges only on breaking layout/signature per D-EXEC-ABI-0002 Cargo featuresmetrics,arrays_backing,sched— build-time togglesAdditive exports New feature-gated symbols may ship without ABI bump if old artifacts never import them Shipped binaries Must document enabled features in release notes Tests Compiler tests enable features explicitly when validating optional paths Consequences
Mismatch (test expects
arrays_backing, default runtime does not) fails logically without ABI version inequality.Verification anchors
beskid_runtime/Cargo.toml; design model feature table. -
Without the feature, array_new may emit header-only arrays with null backing.
Context
Array lowering depends on whether the linked runtime allocates element storage behind
BeskidArrayheaders.Decision
arrays_backingBehavior Enabled array_newallocates element storage;ptrnon-null when length > 0Disabled Header-only arrays; ptrmay be nullABI Symbol list unchanged; semantics differ by build — document in release matrices Alignment Shipped CLI/VSIX should enable arrays_backingfor reference user workflowsConsequences
Conformance and doc tests must pin feature set when asserting array behavior.
Verification anchors
beskid_runtimearray_new; runtime JIT tests with feature flags.
- Contracts and edge cases MUST/SHOULD rules for optional runtime features and toolchain alignment.
- Design model Cargo feature gates, runtime build capabilities, and compiler alignment expectations.
- Examples Building runtime with features, array backing expectations, and engine extern_dlopen.
- FAQ and troubleshooting Optional runtime features vs ABI version, array backing surprises, and CI alignment.
- Flow and algorithm Selecting runtime features at build time and validating behavior at run time.
- Verification and traceability Cargo feature definitions, conditional compilation gates, and CI matrix expectations.
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).
Purpose
Section titled “Purpose”How optional features propagate from Cargo to runtime behavior. Build alignment diagram: design model.
Build-time selection
Section titled “Build-time selection”- CI or local
cargo build -p beskid_runtime --features …enables cfg gates inbuiltins/arrays.rs,metricsmodule, etc. beskid_engine/ CLI link the same feature-enabled runtime artifact (workspace dependency features must match).BESKID_RUNTIME_ABI_VERSIONstays constant unless symbol/signatures change (ABI-005).
arrays_backing runtime path
Section titled “arrays_backing runtime path”- Lowering always emits
array_new(elem_size, len). - Without feature: runtime writes
BeskidArray { ptr: null, len, cap: len }. - With feature: runtime allocates
elem_size * lenbytes viaallocforptr. array_lenreturns logicallenin both modes.
metrics export path
Section titled “metrics export path”- When enabled,
builtins/metrics.rsregisters additionalrt_metrics_*symbols. - JIT must only declare imports if codegen emits calls—baseline programs ignore them.
- Hosts read counters for profiling dashboards; not part of user Beskid language.
Engine extern_dlopen (related)
Section titled “Engine extern_dlopen (related)”- Separate from runtime crate: enable on
beskid_enginefor dynamic extern tests. - Does not alter
beskid_runtime_abi_version. - Failure modes documented under Extern dispatch.
Release verification flow
Section titled “Release verification flow”- Read release manifest / CI matrix for enabled features.
- Run conformance tests compiled with the same feature set.
- Compare
array_newbehavior in integration tests (backing vs header-only).
Related topics
Section titled “Related topics”- Contracts and edge cases
compiler/crates/beskid_runtime/Cargo.toml