From 8716e4e4a27892939c7d438a449b9a98946b140d Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sat, 10 Jul 2021 20:40:15 +0300 Subject: [PATCH] cbindgen: Fix wasi crate 404 The crates.io link for the wasi crate 404s. Upstream have no git tags for versions whatsoever. Using the v1 crates.io API we can download the crate but it ends up being called 'download' rather than 'wasi-bla-bla.crate'. This is temporary until the issue is fixed upstream. --- extra/cbindgen/build | 4 ++++ extra/cbindgen/sources | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/extra/cbindgen/build b/extra/cbindgen/build index 7e3850d0..6555b338 100755 --- a/extra/cbindgen/build +++ b/extra/cbindgen/build @@ -20,6 +20,10 @@ export CARGO_HOME=$PWD ( cd vendor + # Download link for this crate 404s. Mirror link saves + # the file as 'download' so it must be renamed. + mv -f download wasi-0.9.0+wasi-snapshot-preview1.crate + for crate in *.crate; do tar xf "$crate" diff --git a/extra/cbindgen/sources b/extra/cbindgen/sources index 49335045..53e0396c 100644 --- a/extra/cbindgen/sources +++ b/extra/cbindgen/sources @@ -48,7 +48,7 @@ https://static.crates.io/crates/unicode-segmentation/unicode-segmentation-1.6.0. https://static.crates.io/crates/unicode-width/unicode-width-0.1.8.crate vendor https://static.crates.io/crates/unicode-xid/unicode-xid-0.2.1.crate vendor https://static.crates.io/crates/vec_map/vec_map-0.8.2.crate vendor -https://static.crates.io/crates/wasi-0.9.0+wasi-snapshot/wasi-0.9.0+wasi-snapshot-preview1.crate vendor +https://crates.io/api/v1/crates/wasi/0.9.0+wasi-snapshot-preview1/download vendor https://static.crates.io/crates/winapi/winapi-0.3.9.crate vendor https://static.crates.io/crates/winapi-i686-pc-windows-gnu/winapi-i686-pc-windows-gnu-0.4.0.crate vendor https://static.crates.io/crates/winapi-x86_64-pc-windows-gnu/winapi-x86_64-pc-windows-gnu-0.4.0.crate vendor