node_sys/class/
wasi.rs

1use crate::interface::WasiOptions;
2use js_sys::{Object, WebAssembly};
3use wasm_bindgen::prelude::*;
4
5#[wasm_bindgen(module = "wasi")]
6extern {
7    #[wasm_bindgen(extends = Object, js_name = "WASI")]
8    #[derive(Clone, Debug)]
9    pub type Wasi;
10
11    #[wasm_bindgen(constructor)]
12    pub fn new(options: Option<WasiOptions>) -> Wasi;
13
14    #[wasm_bindgen(method)]
15    pub fn start(this: &Wasi, instance: &WebAssembly::Instance);
16
17    #[wasm_bindgen(method, getter, js_name = "wasiImport")]
18    pub fn wasi_import(this: &Wasi) -> Object;
19}