Skip to main content

Crate reflow_pack_loader

Crate reflow_pack_loader 

Source
Expand description

Runtime loader for Reflow actor packs.

A pack is a cdylib that exports two symbols:

  • reflow_pack_abi_version(): u32 — handshake against REFLOW_PACK_ABI_VERSION
  • reflow_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
.rflpack bundle format: zip archive containing manifest.json and per-triple cdylibs under lib/<triple>/.
host
Host-side vtable passed into a pack’s reflow_pack_register entrypoint.

Structs§

LoadedPackInfo
PackRegistry

Constants§

REFLOW_PACK_ABI_VERSION
ABI version the host was built with. Packs must emit the same value from their reflow_pack_abi_version symbol.
REFLOW_PACK_HOST_TRIPLE
Host triple the loader was compiled for. Used to pick the right dylib out of a .rflpack manifest.

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 .rflpack without loading any code. Fails on raw dylibs (there’s no manifest to read).
instantiate
Convenience wrapper around PackRegistry::instantiate on the global registry.
list_packs_json
Convenience: JSON array of pack info, matching the wire format rfl_pack_list_json surfaces.
load_pack
Load a pack from either a raw dylib path or a .rflpack bundle.