Skip to content

Commit

Permalink
Merge pull request #3176 from NobodyXu/support-cargo-binstall
Browse files Browse the repository at this point in the history
Add support for `cargo-binstall`
  • Loading branch information
syrusakbary authored Sep 7, 2022
2 parents aedbdcc + 693bff2 commit 6b40f4c
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,13 @@ curl https://get.wasmer.io -sSfL | sh
```sh
choco install wasmer
```
* <a href="https://crates.io/crates/cargo-binstall/">Cargo</a>
```sh
cargo binstall wasmer
```
* <a href="https://crates.io/crates/wasmer-cli/">Cargo</a>
_Note: All the available
Expand Down
29 changes: 29 additions & 0 deletions lib/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit 6b40f4c

Please sign in to comment.