Browse Source

Add metadata for `cargo binstall` (#8681)

This was pioneered in bytecodealliance/wasm-tools#1562 and looks to be
working well so I've copied over similar metadata for Wasmtime. I've
seen the `cargo binstall` method of installing binaries to be somewhat
common and we've already got all the necessary binaries so it seemed
nice to add support. Wasmtime doesn't name the artifacts after Rust
target names so some manual configuration is required here, but
otherwise this hopefully isn't too costly to maintain.
pull/8683/head
Alex Crichton 6 months ago
committed by GitHub
parent
commit
57d15f235a
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 18
      Cargo.toml

18
Cargo.toml

@ -13,6 +13,24 @@ edition.workspace = true
default-run = "wasmtime" default-run = "wasmtime"
rust-version.workspace = true rust-version.workspace = true
[package.metadata.binstall]
pkg-url = "{repo}/releases/download/v{version}/{name}-v{version}-{target-arch}-{target-family}{archive-suffix}"
bin-dir = "{name}-{version}-{target-arch}-{target-family}/{bin}{binary-ext}"
pkg-fmt = "txz"
[package.metadata.binstall.overrides.x86_64-apple-darwin]
pkg-url = "{repo}/releases/download/v{version}/{name}-v{version}-{target-arch}-macos{archive-suffix}"
bin-dir = "{name}-v{version}-{target-arch}-macos/{bin}{binary-ext}"
[package.metadata.binstall.overrides.aarch64-apple-darwin]
pkg-url = "{repo}/releases/download/v{version}/{name}-v{version}-{target-arch}-macos{archive-suffix}"
bin-dir = "{name}-v{version}-{target-arch}-macos/{bin}{binary-ext}"
[package.metadata.binstall.overrides.x86_64-pc-windows-msvc]
pkg-fmt = "zip"
[package.metadata.binstall.overrides.x86_64-pc-windows-gnu]
pkg-fmt = "zip"
[package.metadata.binstall.overrides.x86_64-unknown-linux-musl]
pkg-url = "{repo}/releases/download/v{version}/{name}-v{version}-{target-arch}-musl{archive-suffix}"
bin-dir = "{name}-v{version}-{target-arch}-musl/{bin}{binary-ext}"
[lints] [lints]
workspace = true workspace = true

Loading…
Cancel
Save