Skip to content
Beskid Platform specification

Beskid

Jump to a Beskid service

Beskid

Jump to a Beskid service

Flow and algorithm

Platform spec article

Flow and algorithm

Spec standingStandard

Owner
Piotr Mikstacki
Submitter
Piotr Mikstacki

How optional features propagate from Cargo to runtime behavior. Build alignment diagram: design model.

  1. CI or local cargo build -p beskid_runtime --features … enables cfg gates in builtins/arrays.rs, metrics module, etc.
  2. beskid_engine / CLI link the same feature-enabled runtime artifact (workspace dependency features must match).
  3. BESKID_RUNTIME_ABI_VERSION stays constant unless symbol/signatures change (ABI-005).
  1. Lowering always emits array_new(elem_size, len).
  2. Without feature: runtime writes BeskidArray { ptr: null, len, cap: len }.
  3. With feature: runtime allocates elem_size * len bytes via alloc for ptr.
  4. array_len returns logical len in both modes.
  1. When enabled, builtins/metrics.rs registers additional rt_metrics_* symbols.
  2. JIT must only declare imports if codegen emits calls—baseline programs ignore them.
  3. Hosts read counters for profiling dashboards; not part of user Beskid language.
  1. Separate from runtime crate: enable on beskid_engine for dynamic extern tests.
  2. Does not alter beskid_runtime_abi_version.
  3. Failure modes documented under Extern dispatch.
  1. Read release manifest / CI matrix for enabled features.
  2. Run conformance tests compiled with the same feature set.
  3. Compare array_new behavior in integration tests (backing vs header-only).