Skip to main content

Module functions

Module functions 

Source
Expand description

Loading and invoking dynamically-compiled function libraries.

At boot the framework scans the app’s functions/ directory for artifacts apiplant build produced: shared libraries, loaded through the apiplant_abi contract, and .js modules, loaded into V8 isolates by apiplant_js. Both arrive as the same BoxedFunction, so the difference stops at the loader.

At request time the framework constructs a HostBridge (database + config + caller identity) and calls the function on a blocking worker so the function author never has to deal with async.

Structs§

FunctionRegistry
All loaded functions, keyed by manifest name.
HostBridge
Host-side services handed to a function for one invocation.
LoadedFunction
One loaded function plus its resolved config.

Type Aliases§

BuiltinHandler
A function implemented in the framework itself rather than loaded from a library: an ordinary Rust fn over the same HostBridge a dynamic function sees. See crate::builtins.