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

Function wasmtime_linker_define_wasi

crates/c-api/src/linker.rs:112–121  ·  view source on GitHub ↗
(
    linker: &mut wasmtime_linker_t,
)

Source from the content-addressed store, hash-verified

110#[cfg(feature = "wasi")]
111#[unsafe(no_mangle)]
112pub extern "C" fn wasmtime_linker_define_wasi(
113 linker: &mut wasmtime_linker_t,
114) -> Option<Box<wasmtime_error_t>> {
115 handle_result(
116 wasmtime_wasi::p1::add_to_linker_sync(&mut linker.linker, |ctx| {
117 ctx.wasi.as_mut().expect("wasi context must be populated")
118 }),
119 |_linker| (),
120 )
121}
122
123#[unsafe(no_mangle)]
124pub unsafe extern "C" fn wasmtime_linker_define_instance(

Callers 3

mainFunction · 0.85
mainFunction · 0.85
define_wasiMethod · 0.85

Calls 4

handle_resultFunction · 0.85
add_to_linker_syncFunction · 0.50
expectMethod · 0.45
as_mutMethod · 0.45

Tested by

no test coverage detected