Skip to content
Beskid Platform specification

Beskid

Jump to a Beskid service

Beskid

Jump to a Beskid service

Design model

Spec standingStandard

Owner
Piotr Mikstacki
Submitter
Piotr Mikstacki

Document the dual registry that connects Beskid lowered code to the host runtime: symbolic names for the linker (RUNTIME_EXPORT_SYMBOLS) and machine signatures for Cranelift (BUILTIN_SPECS).

ActorArtifact
beskid_abi::builtinsBuiltinFnSpec { symbol, params, returns } entries
beskid_abi::symbolsSYM_* constants + RUNTIME_EXPORT_SYMBOLS list
beskid_codegendeclare_builtin_imports builds Cranelift FuncIds from specs
beskid_runtime::builtins#[unsafe(no_mangle)] pub extern "C-unwind" implementations
FamilyExamplesConsumer
Allocation / valuesalloc, str_new, str_concat, array_newAll backends
GCgc_write_barrier, gc_collect, gc_root_handleLowering + host snapshots
Fibersfiber_spawn, fiber_yield, fiber_join_valuecorelib_concurrency
Channels / hubschannel_send, hub_wait_receive_valueConcurrency package
Syncmutex_lock, wait_group_waitRuntime scheduler
Interopinterop_dispatch_unit, interop_dispatch_ptrTagged interop lowering
IO / faultssyscall_write, panic, panic_strCorelib + traps
Diagnosticstest_bytes_ptr (test-only)Compiler tests

Return kinds include AbiReturnKind::Never for diverging panic calls so Cranelift marks unreachable correctly.

  • BeskidStr: { ptr, len } UTF-8 bytes (immutable; length in bytes).
  • BeskidArray: { ptr, len, cap }; element storage optional behind runtime arrays_backing feature (Runtime feature flags).
flowchart LR
  specs[BUILTIN_SPECS signatures]
  names[RUNTIME_EXPORT_SYMBOLS]
  clif[Cranelift imports]
  nm[no_mangle exports]
  specs --> clif
  names --> nm
  clif -->|same symbol string| nm