I tried to read a tree-sitter wasm file but wasmtime failed with Error: expected 4 imports, found 0
let wasm_path = format!(
"tree-sitter-swift.wasm" );
let mut store = Store::<()>::default();
let module = Module::from_file(store.engine(), &wasm_path)?;
let instance = Instance::new(&mut store, &module, &[])?; // error
tree-sitter-swift.wasm
how can I debug it? the wasm is compiled by emcc
Emscripten compiled wasm modules can only be loaded by the emscripten generated javascript shim.
You should probably compile for wasi instead.
thanks :heart:️
Last updated: Dec 23 2024 at 13:07 UTC