Skip to main content

Module module_exports

Module module_exports 

Source
Expand description

Runtime module export bindings for Shape extensions.

This module defines the in-process representation used by VM/LSP/CLI after a plugin has been loaded through the ABI capability interfaces.

§ABI policy (ADR-006 §2.7.5)

Per ADR-006 §2.7.5, this module enforces the cross-crate ABI split:

  • RawCallableInvoker::invokestable extension contract. Stays on raw &u64 / &[u64] so CFFI extensions don’t recompile when the runtime’s internal carrier shape changes. Conversion to/ from KindedSlot happens inside shape-runtime at the boundary (the VM-side invoke_callable adapter constructs KindedSlots from raw bits + the typed registry’s NativeKinds before runtime-tier dispatch and unpacks back to u64 for the extension call).
  • ModuleFn (internal Rust trait object) — migrates to KindedSlot. Lives entirely inside shape-runtime with no recompilation concern.
  • FrameInfo (internal carrier) — migrates to KindedSlot. The pre-existing manual Clone / Drop calling value_word_drop::vw_clone / vw_drop_slice collapses to default: KindedSlot::Drop / Clone carry the refcount discipline now, so Vec<KindedSlot> push / pop / clone preserve the WB2.4 retain semantics by construction.

Structs§

FrameInfo
Information about a single VM call frame, captured at a point in time.
ModuleArtifact
Bundled module artifact from an extension.
ModuleContext
Execution context available to module functions during a VM call.
ModuleExportRegistry
Registry of all extension modules.
ModuleExports
A Rust-implemented module exposed via <name>.
ModuleFunction
Schema for a module function — describes parameters and return type. Used by LSP for completions, hover, and signature help.
ModuleParam
Schema for a single parameter of a module function. Used by LSP for completions and by validation for type checking.
RawCallableInvoker
Raw callable invoker as a function pointer + opaque context.

Enums§

ModuleExportVisibility
Visibility policy for one extension export.
ModuleFnEntry
One entry in the VM’s per-process module-function table (module_fn_table), indexed by positional u32 id.

Traits§

VmStateAccessor
Trait providing read access to VM state for state module functions.

Functions§

check_fs_permission
Check permission and enforce filesystem path scope constraints.
check_net_permission
Check permission and enforce network host scope constraints.
check_permission
Check whether the current execution context has a required permission.

Type Aliases§

ModuleFn
A module function callable from Shape (synchronous).