Open wafuwafu13 opened 3 years ago
Thanks for making a nice tutorial :)
Wasm-pack uses the same approach for generating projects as rails new or create-react-app: docker run --rm -v $(pwd):$(pwd) -w $(pwd) -e "USER=$(whoami)" zloymult/wasm-build-kit wasm-pack new rust-example Now you can cd into the rust-example folder and open it in your editor.
Wasm-pack uses the same approach for generating projects as rails new or create-react-app:
docker run --rm -v $(pwd):$(pwd) -w $(pwd) -e "USER=$(whoami)" zloymult/wasm-build-kit wasm-pack new rust-example
Now you can cd into the rust-example folder and open it in your editor.
$ docker run --rm -v $(pwd):$(pwd) -w $(pwd) -e "USER=$(whoami)" zloymult/wasm-build-kit wasm-pack new rust-example [INFO]: Installing cargo-generate... error: the `--vers` provided, `latest`, is not a valid semver version: cannot parse 'latest' as a semver Error: Installing cargo-generate with cargo Caused by: failed to execute `cargo install`: exited with exit code: 101 full command: "cargo" "install" "--force" "cargo-generate" "--version" "latest" "--root" "/root/.cache/.wasm-pack/.cargo-generate-cargo-install-latest"
$ sw_vers ProductName: macOS ProductVersion: 11.4 BuildVersion: 20F71 $ docker --version Docker version 20.10.2, build 2291f61
https://github.com/rustwasm/wasm-pack/issues/907
I struggled with this and just ended up downloading wasm-pack locally, then wasm-pack build --release --target web from rust-example folder. It should successfully generate pkg folder like in the tutorial.
wasm-pack build --release --target web
Thanks for making a nice tutorial :)
Explanation
Actuality
Development Environment
Related (may be)
https://github.com/rustwasm/wasm-pack/issues/907