From 1529945a5a6f1335d6ac41f5cf69362e512f1600 Mon Sep 17 00:00:00 2001 From: Daniel McNab <36049421+DJMcNab@users.noreply.github.com> Date: Wed, 5 Apr 2023 14:40:51 +0100 Subject: [PATCH] Update cargo-run-wasm --- README.md | 6 +++--- examples/run_wasm/Cargo.toml | 3 +-- examples/run_wasm/src/main.rs | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index bcab485..6524e00 100644 --- a/README.md +++ b/README.md @@ -86,10 +86,10 @@ Until browser support becomes widespread, it will probably be necessary to use d The following command builds and runs a web version of the [winit demo](#winit). This uses [`cargo-run-wasm`](https://github.com/rukai/cargo-run-wasm) to build the example for web, and host a local server for it -Other examples use the `-p` shorthand, but `cargo-run-wasm` requires the full `--package` and binary name to be specified - ```shell -cargo run_wasm --package with_winit --bin with_winit_bin +# Make sure the Rust toolchain supports the wasm32 target +rustup target add wasm32-unknown-unknown +cargo run_wasm -p with_winit ``` > **Warning** diff --git a/examples/run_wasm/Cargo.toml b/examples/run_wasm/Cargo.toml index 91801ad..de51958 100644 --- a/examples/run_wasm/Cargo.toml +++ b/examples/run_wasm/Cargo.toml @@ -10,5 +10,4 @@ repository.workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -# We use cargo-run-wasm main because of our workspace layout -cargo-run-wasm = { git = "https://github.com/rukai/cargo-run-wasm", rev = "d14f73de77eaae44714b4817d660026a31f5f5a9" } +cargo-run-wasm = "0.3.2" diff --git a/examples/run_wasm/src/main.rs b/examples/run_wasm/src/main.rs index 9666918..84868c6 100644 --- a/examples/run_wasm/src/main.rs +++ b/examples/run_wasm/src/main.rs @@ -6,7 +6,7 @@ /// ``` /// Generally: /// ``` -/// cargo run_wasm --package with_winit +/// cargo run_wasm -p with_winit /// ``` fn main() {