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.
| 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 |