Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for cargo-binstall #3176

Merged
merged 3 commits into from
Sep 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"