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

Method define_wasi

crates/c-api/include/wasmtime/linker.hh:58–64  ·  view source on GitHub ↗

Defines WASI functions within this linker. Note that `Store::Context::set_wasi` must also be used for instantiated modules to have access to configured WASI state.

Source from the content-addressed store, hash-verified

56 /// Note that `Store::Context::set_wasi` must also be used for instantiated
57 /// modules to have access to configured WASI state.
58 Result<std::monostate> define_wasi() {
59 auto *error = wasmtime_linker_define_wasi(ptr.get());
60 if (error != nullptr) {
61 return Error(error);
62 }
63 return std::monostate();
64 }
65#endif // WASMTIME_FEATURE_WASI
66
67 /// Defines all exports of the `instance` provided in this linker with the

Callers 3

mainFunction · 0.80
mainFunction · 0.80
TESTFunction · 0.80

Calls 3

ErrorClass · 0.70
getMethod · 0.45

Tested by 1

TESTFunction · 0.64