diff --git a/CHANGELOG.md b/CHANGELOG.md index bdb6a1baad5..0de8b196af5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,9 @@ * Add bindings for `WorkerGlobalScope.performance`. [#3506](https://github.com/rustwasm/wasm-bindgen/pull/3506) +* Add support for installing pre-built artifacts of `wasm-bindgen-cli` + via `cargo binstall wasm-bindgen-cli`. + ### Changed * Updated the WebGPU WebIDL. diff --git a/README.md b/README.md index cf5dafcfd7e..be034243c61 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,24 @@ Built with 🦀🕸 by The Rust and WebAssembly Working Group +## Install `wasm-bindgen-cli` + +You can install it using `cargo install`: + +``` +cargo install wasm-bindgen-cli +``` + +Or, you can download it from the +[release page](https://github.com/rustwasm/wasm-bindgen/releases). + +If you have [`cargo-binstall`](https://crates.io/crates/cargo-binstall) installed, +then you can install the pre-built artifacts by running: + +``` +cargo binstall wasm-bindgen-cli +``` + ## Example Import JavaScript things into Rust and export Rust things to JavaScript. @@ -110,4 +128,4 @@ Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions. -[contributing]: https://rustwasm.github.io/docs/wasm-bindgen/contributing/index.html \ No newline at end of file +[contributing]: https://rustwasm.github.io/docs/wasm-bindgen/contributing/index.html diff --git a/crates/cli/Cargo.toml b/crates/cli/Cargo.toml index 1152af1a014..e010e1d9cd8 100644 --- a/crates/cli/Cargo.toml +++ b/crates/cli/Cargo.toml @@ -15,6 +15,10 @@ edition = '2018' default-run = 'wasm-bindgen' rust-version = "1.56" +[package.metadata.binstall] +pkg-url = "https://github.com/rustwasm/wasm-bindgen/releases/download/{ version }/wasm-bindgen-{ version }-{ target }{ archive-suffix }" +bin-dir = "wasm-bindgen-{ version }-{ target }/{ bin }{ binary-ext }" + [dependencies] docopt = "1.0" env_logger = "0.8"