无法执行“中继服务”。

发布于 2025-01-26 23:03:28 字数 374 浏览 4 评论 0原文

我正在生锈,并查看这些简单的紫杉框架(生锈的前端框架): https:// https:// https:// yew.rs/docs/tutorial

我遵循说明直到命令

trunk serve --open

,但是某处失败了。

这就是我得到的:

2022-05-06T19:07:54.087214Z  INFO 
              

I was getting into Rust and looking at these simple instructions for Yew framework (a frontend framework for Rust): https://yew.rs/docs/tutorial.

I followed the instructions up until the command

trunk serve --open

However, something somewhere fails.

This is what I'm getting:

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

This is my Cargo.toml file:

[package]
name = "yew-app"
version = "0.1.0"
edition = "2021"

[dependencies]
yew = "0.19"

Output after I run rustup target list --installed command:

aarch64-apple-darwin
wasm32-unknown-unknown

Machine: M1 Mac (with Apple Silicon chip)

Rust version: 1.60.0

trunk version: 0.15.0

Any help would be appreciated as I'm just getting into Rust and Web Assembly.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

┼── 2025-02-02 23:03:28

通过安装wasm-bindgen-cli

cargo install-locked wasm-bindgen-cli

trunk的 github上提到了这一点: https://github.com/thededodd/trunk/pull/pull/375

Fix it by installing wasm-bindgen-cli:

cargo install --locked wasm-bindgen-cli

This is mentioned in this PR on trunk's GitHub: https://github.com/thedodd/trunk/pull/375

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文