Skip to content

cargo xtask web: use a project-local wasm-bindgen CLI, not the global one #47

Open

Description

@samitbasu

The global wasm-bindgen CLI is shared with other projects on the machine, and they need different versions: it was set to 0.2.130 for bullseye, then back to 0.2.127 by something else, so cargo xtask web refused to run. The CLI version must match the wasm-bindgen crate pinned in Cargo.lock.

Fix: xtask web looks for target/tools/bin/wasm-bindgen first and uses it if its version matches the lock. Otherwise it offers the exact command (cargo install --root target/tools wasm-bindgen-cli --version <locked> --locked), or, behind an explicit --install-tools flag, runs that command itself. The global CLI is never touched. Unit-test the selection logic. Document it in the README.

Activity

  1. added
    post-0.1
    on Nov 14, 2026
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

    post-0.1

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions