tha*_*Var 11 rust webassembly wasm-bindgen yew trunk-rs
我正在研究 Rust 并查看 Yew 框架(Rust 的前端框架)的这些简单说明: https: //yew.rs/docs/tutorial。
\n我按照说明进行操作,直到收到命令
\ntrunk serve --open\nRun Code Online (Sandbox Code Playgroud)\n然而,某处出现故障。
\n这就是我得到的:
\ntrunk serve --open\nRun Code Online (Sandbox Code Playgroud)\n这是我的 Cargo.toml 文件:
\n2022-05-06T19:07:54.087214Z INFO starting build\n2022-05-06T19:07:54.087870Z INFO spawning asset pipelines\n2022-05-06T19:07:54.168329Z INFO building yew-app\n Finished dev [unoptimized + debuginfo] target(s) in 0.01s\n2022-05-06T19:07:54.232154Z INFO fetching cargo artifacts\n2022-05-06T19:07:54.295124Z INFO processing WASM for yew-app\n2022-05-06T19:07:54.301974Z INFO downloading wasm-bindgen version="0.2.80"\n2022-05-06T19:07:54.302269Z ERROR \xe2\x9d\x8c error\nerror from HTML pipeline\n\nCaused by:\n 0: error from asset pipeline\n 1: failed downloading release archive\n 2: unsupported architecture\n2022-05-06T19:07:54.302531Z INFO serving static assets at -> /\n2022-05-06T19:07:54.302591Z INFO server listening at http://127.0.0.1:8080\nRun Code Online (Sandbox Code Playgroud)\n运行rustup target list --installed命令后的输出:
aarch64-apple-darwin\nwasm32-unknown-unknown\nRun Code Online (Sandbox Code Playgroud)\n机器: M1 Mac(带有 Apple Silicon 芯片)
\n铁锈版本: 1.60.0
\n主干版本: 0.15.0
\n任何帮助将不胜感激,因为我刚刚进入 Rust 和 Web Assembly。
\nUna*_*dra 10
通过安装修复它wasm-bindgen-cli:
cargo install --locked wasm-bindgen-cli
trunk 的GitHub上的 PR 中提到了这一点: https: //github.com/thedodd/trunk/pull/375