Skip to content

app_bg.wasm changed between 0.2.70 and 0.2.73 #2523

Closed
@cecton

Description

@cecton

Describe the Bug

I'm the author of wasm-run but it broke recently because the JS file (app.js) can't find the WASM file (app_bg.wasm).

As you can see in my code here I was relying on the fact that the name of the files were always "app.js" and "app_bg.wasm". But between 0.70 and 0.73 you made a change somewhere so the name used is now the crate's name that is compiled: myfrontend_bg.wasm.

Because of that, the JS code can't load the WASM file anymore on projects using wasm-run.

Steps to Reproduce

  1. Create a new project with wasm-run: cargo generate --git https://github.com/cecton/wasm-run-template.git -b main
  2. Run serve: cargo run -- serve
  3. Go on http://127.0.0.1:3000
  4. See error

image

Expected Behavior

The name won't change between patch versions. This is a breaking change.

Actual Behavior

Every project using wasm-run right now that does cargo update will silently fail as this is a runtime error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions