Skip to main content

Module runtime

Module runtime 

Source
Expand description

Native extern "C" runtime the generated .s links against (design §8).

Every entry point is a thin shell: decode the raw FFI arguments, run the shared semantics from crate::runtime_core on a PointerStore, and turn any RuntimeFailure into rt_fatal (observer error record when initialized, stderr message, exit(1)). Panics never cross the FFI boundary: shells run under catch_unwind and report InternalError.

Heap objects are owned by one process-wide PointerStore. A mutex keeps its safe reference API exclusive across FFI entries and threads; generated function calls happen only after the guard has been released.

Functions§

rt_add
rt_array
Safety
rt_bang
rt_box_int
rt_call
Safety
rt_class
Safety
rt_class_add_method
Safety
rt_closure
Safety
rt_construct
Safety
rt_div
rt_eq
rt_fatal
Safety
rt_get_free
rt_get_property
Safety
rt_globals_init
Safety
rt_gt
rt_hash
Safety
rt_index
rt_minus
rt_mul
rt_neq
rt_observe_result
rt_observer_init
Safety
rt_set_property
Safety
rt_string_from_bytes
Safety
rt_sub
rt_truthy