Function initialize

Source
pub fn initialize(registrables: &[&dyn Registrable]) -> &'static Manager
Expand description

Initialize the Virtual Machine Manager with a set of registrable host functions.

This function must be called once before any WASM operations can be performed. It creates a global singleton Manager instance that will persist for the lifetime of the application.

§Arguments

  • Registrables - Array of traits implementing host functions that can be called from WASM

§Returns

A static reference to the initialized Manager instance

§Example

let manager = Initialize(&[&MyHostFunctions]);