yewstack / yew-trunk-minimal-template

Template for starting a Yew project using Trunk
Apache License 2.0
88 stars 33 forks source link

cargo update (to fix M1 apple issue) #12

Closed scode closed 1 year ago

scode commented 1 year ago

When the template is used on an M1 Mac, it results in this error on trunk serve:

➜  yewplay trunk serve
2023-07-17T06:38:37.346811Z  INFO πŸ“¦ starting build
2023-07-17T06:38:37.347343Z  INFO spawning asset pipelines
2023-07-17T06:38:37.431639Z  INFO building trunk-template
2023-07-17T06:38:37.431882Z  INFO compiling sass/scss path="index.scss"
2023-07-17T06:38:37.457266Z  INFO finished compiling sass/scss path="index.scss"
    Finished dev [unoptimized + debuginfo] target(s) in 0.08s
2023-07-17T06:38:37.541856Z  INFO fetching cargo artifacts
2023-07-17T06:38:37.642986Z  INFO processing WASM for trunk-template
2023-07-17T06:38:37.654051Z  INFO downloading wasm-bindgen version="0.2.83"
2023-07-17T06:38:37.934134Z ERROR ❌ error
error from HTML pipeline

Caused by:
    0: error from asset pipeline
    1: failed downloading release archive
    2: error downloading archive file: 404
       https://github.com/rustwasm/wasm-bindgen/releases/download/0.2.83/wasm-bindgen-0.2.83-aarch64-apple-darwin.tar.gz
2023-07-17T06:38:37.934616Z  INFO πŸ“‘ serving static assets at -> /
2023-07-17T06:38:37.934724Z  INFO πŸ“‘ server listening at http://127.0.0.1:8080/

The reason is that the 0.2.83 release of wasm-bindgen does not have release artifacts for aarch64.

The latest release does.

After a cargo update the initial trunk server now works.

NOTE: I have not tested anything else. I'm new to wasm and yew and I don't know how likely this is to break something else.

futursolo commented 1 year ago

Thanks for noticing this.