Skip to content
Beskid Platform specification

Beskid

Jump to a Beskid service

Beskid

Jump to a Beskid service

Examples

Spec standingStandard

Owner
Piotr Mikstacki
Submitter
Piotr Mikstacki

Given CLIF calling fiber_yield:

  1. Find SYM_FIBER_YIELD"fiber_yield" in symbols.rs.
  2. Locate BuiltinFnSpec with symbol: SYM_FIBER_YIELD in builtins.rs.
  3. Open compiler/crates/beskid_runtime/src/builtins/fiber.rs for behavior (park current fiber, requeue).

User code calls Fiber.Yield() in corelib_concurrency; lowering must not embed scheduler details. The package emits a call to fiber_yield only—see Concurrency package.

A global string cached from native code:

  1. Lowering calls alloc with type descriptor pointer.
  2. Host registers root via gc_register_root when exposing to foreign API.
  3. On teardown, gc_unregister_root pairs with registration.

Missing unroot leaks until next collection; handles from gc_root_handle document temporary pinning.

Lowering may emit:

call panic(message_ptr, message_len) -> never

Runtime formats output and terminates the process—no stack unwind through Beskid frames (error model legacy).

In jit_module.rs, the declare_builtin_imports block maps each beskid_runtime function pointer to the symbol name Cranelift imports. A drift between Rust function export name and SYM_* constant breaks finalize with MissingFunction.