pub fn engine() -> Engine {
    static mut ENGINE: Option<Engine> = None;
    static INIT: Once = Once::new();
    unsafe {
        INIT.call_once(|| {
            let mut config = Config::new();
            config.wasm_threads(true);
            config.wasm_simd(true);
            config.wasm_reference_types(true);
            config.static_memory_guard_size(8 * 1024 * 1024); // 8 Mb
            ENGINE = Some(Engine::new(&config));
        });
        ENGINE.clone().unwrap()
    }
}
/// Return a configured Wasmtime engine.
Return a configured Wasmtime engine.
Return a configured Wasmtime engine .
pub fn engine() -> Engine {
    static mut ENGINE: Option<Engine> = None;
    static INIT: Once = Once::new();
    unsafe {
        INIT.call_once(|| {
            let mut config = Config::new();
            config.wasm_threads(true);
            config.wasm_simd(true);
            config.wasm_reference_types(true);
            config.static_memory_guard_size(8 * 1024 * 1024); // 8 Mb
            ENGINE = Some(Engine::new(&config));
        });
        ENGINE.clone().unwrap()
    }
}
pub fn engine ( ) -> Engine { static mut ENGINE : Option < Engine > = None ; static INIT : Once = Once :: new ( ) ; unsafe { INIT . call_once ( | | { let mut config = Config :: new ( ) ; config . wasm_threads ( true ) ; config . wasm_simd ( true ) ; config . wasm_reference_types ( true ) ; config . static_memory_guard_size ( 8 * 1024 * 1024 ) ; // 8 Mb ENGINE = Some ( Engine :: new ( & config ) ) ; } ) ; ENGINE . clone ( ) . unwrap ( ) } }
Return a configured Wasmtime engine.
Return a configured Wasmtime engine .