Skip to content
Beskid Platform specification

Beskid

Jump to a Beskid service

Beskid

Jump to a Beskid service

Memory and GC runtime contract

Platform spec feature

Memory and GC runtime contract

Spec standingStandard

Owner
Piotr Mikstacki
Submitter
Piotr Mikstacki

What this feature specifies

Memory and GC runtime contract defines one operational contract that a newcomer can follow end-to-end: first the model, then execution flow, then strict guarantees, concrete examples, and verification guidance.

GC phases

stateDiagram-v2
  direction LR
  [*] --> PhaseA: default ship
  PhaseA --> PhaseB: parallel mutators
  state PhaseA {
    [*] --> SingleMutator
    SingleMutator --> ManyFibers: cooperative scheduler
  }
  state PhaseB {
    [*] --> ParallelMutators
    ParallelMutators --> WriteBarriers: gc_write_barrier on stores
  }

Phase A: many fibers, one GC mutator thread. Phase B: parallel mutators with insertion barriers; see design model for builtin tables.

Implementation anchors

  • Runtime memory exports in compiler/crates/beskid_runtime/src/lib.rs
  • ABI contracts in compiler/crates/beskid_abi/src/lib.rs
  • JIT linking and call setup in compiler/crates/beskid_engine/src/jit_module.rs
  • Runtime integration tests in compiler/crates/beskid_tests/src/runtime/jit.rs

No open decisions. Closed choices are normative ADRs under adr/ (D-EXEC-RT-0005D-EXEC-RT-0007); use the reader ADRs tab for expandable detail.

Articles