Expand description
Runtime loader for Reflow actor packs.
A pack is a cdylib that exports two symbols:
reflow_pack_abi_version(): u32— handshake againstREFLOW_PACK_ABI_VERSIONreflow_pack_register(host: *mut PackHostVtable): i32— calls back into the host to register template factories
Packs can be loaded either as raw dylibs (developer loop) or wrapped in
a .rflpack zip bundle (distribution format). See bundle.
Modules§
- bundle
.rflpackbundle format: zip archive containingmanifest.jsonand per-triple cdylibs underlib/<triple>/.- host
- Host-side vtable passed into a pack’s
reflow_pack_registerentrypoint.
Structs§
Constants§
- REFLOW_
PACK_ ABI_ VERSION - ABI version the host was built with. Packs must emit the same value
from their
reflow_pack_abi_versionsymbol. - REFLOW_
PACK_ HOST_ TRIPLE - Host triple the loader was compiled for. Used to pick the right dylib
out of a
.rflpackmanifest.
Statics§
- PACK_
REGISTRY - Process-global pack registry. Packs are shared across every runtime handle in the process — matching the behaviour of the bundled component catalog (also a global static).
Functions§
- has_
template - True if the given template id is owned by a loaded pack. Cheap — callers can use this to decide whether to consult the pack registry or fall straight through to the bundled catalog.
- inspect_
pack - Read the manifest from a
.rflpackwithout loading any code. Fails on raw dylibs (there’s no manifest to read). - instantiate
- Convenience wrapper around
PackRegistry::instantiateon the global registry. - list_
packs_ json - Convenience: JSON array of pack info, matching the wire format
rfl_pack_list_jsonsurfaces. - load_
pack - Load a pack from either a raw dylib path or a
.rflpackbundle.