Skip to content

[Enhancement] Auto-apply profile.releaseprofile.web when using bun run build #25

Description

@tomoyan596

Hello from Japan! Simple Enhancement for Bun Users😊
Thank you very much.

Proposal: Make bun run build smarter

Discovery

  • bun run build (and npm run build) requires profile.web in Cargo.toml
  • profile.release settings are ignored
  • This is correct — but unexpected for Bun users

Simple Fix
In the build script (Webpack or wasm-pack), copy:

[package.metadata.wasm-pack.profile.release]
# See https://github.com/rustwasm/wasm-pack/issues/886#issuecomment-667669802
wasm-opt = ["-Oz", "--enable-mutable-globals"]
 
[package.metadata.wasm-pack.profile.web]
wasm-opt = ["-Oz", "--enable-mutable-globals"]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions