MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / wasm_engine_new_with_config

Function wasm_engine_new_with_config

crates/c-api/src/engine.rs:31–39  ·  view source on GitHub ↗
(c: Box<wasm_config_t>)

Source from the content-addressed store, hash-verified

29
30#[unsafe(no_mangle)]
31pub extern "C" fn wasm_engine_new_with_config(c: Box<wasm_config_t>) -> Box<wasm_engine_t> {
32 #[cfg(feature = "logging")]
33 drop(env_logger::try_init());
34
35 let config = c.config;
36 Box::new(wasm_engine_t {
37 engine: Engine::new(&config).unwrap(),
38 })
39}
40
41#[unsafe(no_mangle)]
42pub extern "C" fn wasmtime_engine_clone(engine: &wasm_engine_t) -> Box<wasm_engine_t> {

Callers 8

mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
create_engineFunction · 0.85
mainFunction · 0.85
EngineMethod · 0.85

Calls 3

dropFunction · 0.50
newFunction · 0.50
unwrapMethod · 0.45

Tested by

no test coverage detected