-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
Hi I'm getting error (looks like it can't find wasm-bindgen):
I have wasm-bindgen installed on my system (can compile .rs into .wasm with [wasm-pack build]).
I use Vue cli, not sure if that matters (it's just a wrapper for webpack). Would you have any ideas to solve this? I can use .wasm files built with wasm-pack, but can't .rs from webpack loader chaining.
Vue Webpack chain config:
config.module
.rule("Rust")
.test(/\.rs$/)
.use("wasm-loader")
.loader("rust-native-wasm-loader")
.options({
release: true
});
.rs import:
import loadAdd from "@/js/wasm/hello_world/hello_world.rs";
loadAdd().then(result => {
const add = result.instance.exports["add"];
console.log("return value was", add(2, 3));
});
I tried using the [wasm-bindgen experimental support] webpack config provided on your page a well, but getting same error.
Metadata
Metadata
Assignees
Labels
No labels
