From 856e2df277fc2f91370630cff36f20787c659ceb Mon Sep 17 00:00:00 2001 From: Jiahao XU Date: Wed, 7 Sep 2022 18:41:09 +1000 Subject: [PATCH 1/3] Add support for `cargo-binstall` Signed-off-by: Jiahao XU --- lib/cli/Cargo.toml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/lib/cli/Cargo.toml b/lib/cli/Cargo.toml index 75bea7cc841..ed73dcce0ef 100644 --- a/lib/cli/Cargo.toml +++ b/lib/cli/Cargo.toml @@ -142,3 +142,32 @@ http = [ "dirs", "serde_json", ] + +[package.metadata.binstall] +pkg-fmt = "tgz" + +[package.metadata.binstall.overrides.aarch64-apple-darwin] +pkg-url = "{ repo }/releases/download/{ version }/wasmer-darwin-arm64.{ archive-format }" +bin-dir = "wasmer-darwin-arm64/bin/{ bin }" + +#https://github.com/wasmerio/wasmer/releases/download/3.0.0-beta/wasmer-darwin-arm64.tar.gz + +[package.metadata.binstall.overrides.x86_64-apple-darwin] +pkg-url = "{ repo }/releases/download/{ version }/wasmer-darwin-amd64.{ archive-format }" +bin-dir = "wasmer-darwin-amd64/bin/{ bin }" + +[package.metadata.binstall.overrides.aarch64-unknown-linux-gnu] +pkg-url = "{ repo }/releases/download/{ version }/wasmer-linux-aarch64.{ archive-format }" +bin-dir = "wasmer-linux-aarch64/bin/{ bin }" + +[package.metadata.binstall.overrides.x86_64-unknown-linux-gnu] +pkg-url = "{ repo }/releases/download/{ version }/wasmer-linux-amd64.{ archive-format }" +bin-dir = "wasmer-linux-amd64/bin/{ bin }" + +[package.metadata.binstall.overrides.x86_64-unknown-linux-musl] +pkg-url = "{ repo }/releases/download/{ version }/wasmer-linux-musl-amd64.{ archive-format }" +bin-dir = "wasmer-linux-musl-amd64/bin/{ bin }" + +[package.metadata.binstall.overrides.x86_64-pc-windows-msvc] +pkg-url = "{ repo }/releases/download/{ version }/wasmer-windows-amd64.{ archive-format }" +bin-dir = "wasmer-windows-amd64/bin/{ bin }.exe" From 767e86f8dc90cb0baf0fa1a88ffa62968164d60d Mon Sep 17 00:00:00 2001 From: Jiahao XU Date: Wed, 7 Sep 2022 18:44:47 +1000 Subject: [PATCH 2/3] Update CHANGELOG.md Signed-off-by: Jiahao XU --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c2e7526f7da..ed2e502a853 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ Looking for changes that affect our C API? See the [C API Changelog](lib/c-api/C ### Added - #[3096](https://github.com/wasmerio/wasmer/pull/3096) create-exe: use cached wasmer tarballs for network fetches +- Support installing pre-built binaries via `cargo-binstall` ### Changed - #[3131](https://github.com/wasmerio/wasmer/pull/3131) Update migration docs for MemoryView changes From 693bff24b435d9510f7e211a8b0e606670c39daa Mon Sep 17 00:00:00 2001 From: Jiahao XU Date: Wed, 7 Sep 2022 18:45:57 +1000 Subject: [PATCH 3/3] Update README.md Signed-off-by: Jiahao XU --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 0248e091bbb..e254a2ee593 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,13 @@ curl https://get.wasmer.io -sSfL | sh ```sh choco install wasmer ``` + + * Cargo + ```sh + cargo binstall wasmer + ``` + * Cargo _Note: All the available