Skip to content

Commit 895b93a

Browse files
authored
Add cargo binstall metadata for wit-bindgen-cli (#1525)
An attempt to get `cargo binstall wit-bindgen-cli` working, copied mostly from the `wasm-tools` repository.
1 parent ca98caf commit 895b93a

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Cargo.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,16 @@ description = """
1111
CLI tool to generate bindings for WIT documents and the component model.
1212
"""
1313

14+
[package.metadata.binstall]
15+
pkg-url = "{repo}/releases/download/v{version}/wit-bindgen-{version}-{target-arch}-{target-family}{archive-suffix}"
16+
bin-dir = "wit-bindgen-{version}-{target-arch}-{target-family}/{bin}{binary-ext}"
17+
pkg-fmt = "tgz"
18+
[package.metadata.binstall.overrides.'cfg(target_os = "macos")']
19+
pkg-url = "{repo}/releases/download/v{version}/wit-bindgen-{version}-{target-arch}-macos{archive-suffix}"
20+
bin-dir = "wit-bindgen-{version}-{target-arch}-macos/{bin}{binary-ext}"
21+
[package.metadata.binstall.overrides.'cfg(target_os = "windows")']
22+
pkg-fmt = "zip"
23+
1424
[lints]
1525
workspace = true
1626

0 commit comments

Comments
 (0)