Skip to main content

Module runtime_storage

Module runtime_storage 

Source
Expand description

Caller-supplied storage for the component pool — phase-391 W5, step 2.

Mirrors nros_node::ExecutorSizing one layer up, and for the same stated reason: public + non-generic, the “C/C++ is a thin wrapper” principle. The entry, the macro and the FFI seam supply these as plain usizes rather than as const generics C cannot name — node_runtime carries nine extern "C" sites and backs __nros_component_<pkg>_install.

This module is INERT on its own: it computes how large a backing must be. The pool that carves one is W5 step 3; until then nothing calls RuntimeSizing::u64_len except its tests.

Ungated deliberately — the arithmetic is useful for sizing a static whether or not the runtime module that consumes it is compiled in.

Structs§

RuntimeSizing
Per-image component-pool sizing — how many components the runtime can hold and how much erased storage each one’s TypedSlot<C> gets.
Slot
A carved component-pool slot: slot_bytes of 8-aligned storage for one type-erased TypedSlot<C>.

Functions§

carve
Carve backing into sizing.components slots of sizing.slot_bytes.