从这篇文章中,我发现我们可以在不运行wasm-pack build的情况下运行wasm-bindgen target/wasm32-unknown-unknown/release/qr_wasm.wasm --out-dir ./dist --no-modules --no-typescript来创建wasm和js文件(它会安装wasm-bindgen,不管我以前是否已经安装过,这使得它对我来说有点慢),这对我来说似乎更灵活,但是当我运行wasm-bindgen xxx时,它显示:zsh: command not found: wasm-bindgen
我用谷歌搜索了一下,但似乎没有人遇到过这个问题。我的项目中还有wasm-bindgen和cargo install -bindgen-cli。
发布于 2020-05-26 10:53:01
我从谷歌来的时候也遇到了同样的问题。
我的解决方案是cargo install wasm-bindgen-cli,请看这里:https://docs.rs/crate/wasm-bindgen/0.2.8
发布于 2020-09-08 07:34:00
我使用cargo install wasm-bindgen-cli命令安装了wasm-bindgen,但是我无法执行它。
在Arch上,我用yay -S wasm-bindgen-bin修复了它
https://stackoverflow.com/questions/61767863
复制相似问题