无法执行"trunk serve"



我开始接触Rust,并查看了这些简单的关于Yew框架(Rust的前端框架)的说明。

(找到于:https://yew.rs/docs/tutorial)

我按照指示一直到命令

trunk serve --open

然而,有些地方失败了。

这是我得到的:

2022-05-06T19:07:54.087214Z  INFO 📦 starting build
2022-05-06T19:07:54.087870Z  INFO spawning asset pipelines
2022-05-06T19:07:54.168329Z  INFO building yew-app
Finished dev [unoptimized + debuginfo] target(s) in 0.01s
2022-05-06T19:07:54.232154Z  INFO fetching cargo artifacts
2022-05-06T19:07:54.295124Z  INFO processing WASM for yew-app
2022-05-06T19:07:54.301974Z  INFO downloading wasm-bindgen version="0.2.80"
2022-05-06T19:07:54.302269Z ERROR ❌ error
error from HTML pipeline
Caused by:
0: error from asset pipeline
1: failed downloading release archive
2: unsupported architecture
2022-05-06T19:07:54.302531Z  INFO 📡 serving static assets at -> /
2022-05-06T19:07:54.302591Z  INFO 📡 server listening at http://127.0.0.1:8080

这是我的货物。toml文件:

[package]
name = "yew-app"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
yew = "0.19"

执行rustup target list --installed命令后的输出:

aarch64-apple-darwin
wasm32-unknown-unknown

机:M1 Mac(含苹果硅芯片)

锈版本:1.60.0

树干版本:0.15.0

任何帮助将不胜感激,因为我刚刚进入Rust和Web Assembly。

感谢

安装wasm-bindgen-cli修复:

cargo install --locked wasm-bindgen-cli

这在trunk的GitHub上的PR中提到:https://github.com/thedodd/trunk/pull/375

相关内容

  • 没有找到相关文章

最新更新