Skip to content

Commit 4b6de69

Browse files
authored
Fix CI and update dependencies (#127)
* Fix CI and update dependencies * Use crates.io-published wit-bindgen * Try to fix Windows * Try again for Windows
1 parent da6d316 commit 4b6de69

File tree

9 files changed

+104
-94
lines changed

9 files changed

+104
-94
lines changed

.github/actions/setup/action.yml

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,24 @@ runs:
3333

3434
# Install the `wasm-tools` binary with the `component` subcommand that is all
3535
# that's needed here.
36-
- uses: actions/cache@v3
37-
with:
38-
path: ${{ runner.tool_cache }}/wasm-tools
39-
key: wasm-tools-bin-1.0.19-${{ runner.os }}
40-
- run: echo '${{ runner.tool_cache }}/wasm-tools/bin' >> $GITHUB_PATH
36+
- run: |
37+
echo WASM_TOOLS=wasm-tools-1.0.23 >> $GITHUB_ENV
38+
mkdir -p '${{ runner.tool_cache }}/wasm-tools'
39+
echo '${{ runner.tool_cache }}/wasm-tools' >> $GITHUB_PATH
40+
shell: bash
41+
- run: |
42+
curl -L https://github.com/bytecodealliance/wasm-tools/releases/download/$WASM_TOOLS/$WASM_TOOLS-x86_64-linux.tar.gz | tar xzv -C ${{ runner.tool_cache }}/wasm-tools --strip-components 1
43+
if: runner.os == 'Linux'
44+
shell: bash
45+
- run: |
46+
curl -L https://github.com/bytecodealliance/wasm-tools/releases/download/$WASM_TOOLS/$WASM_TOOLS-x86_64-macos.tar.gz | tar xzv -C ${{ runner.tool_cache }}/wasm-tools --strip-components 1
47+
if: runner.os == 'macOS'
4148
shell: bash
4249
- run: |
43-
cargo install \
44-
wasm-tools@1.0.19 \
45-
--root '${{ runner.tool_cache }}/wasm-tools' \
46-
--locked \
47-
--no-default-features \
48-
--features component
50+
path='${{ runner.tool_cache }}/wasm-tools'
51+
curl -o "$path/bins.zip" -L https://github.com/bytecodealliance/wasm-tools/releases/download/$WASM_TOOLS/$WASM_TOOLS-x86_64-windows.zip
52+
7z e "$path/bins.zip" -o"$path"
53+
if: runner.os == 'Windows'
4954
shell: bash
5055
5156
# Build the bindgen wasm blob with some extra Rust targets.

rust/Cargo.lock

Lines changed: 62 additions & 68 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/Cargo.toml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
[workspace]
22
members = ['bindgen', 'wasi_snapshot_preview1']
33

4-
[workspace.dependencies.wit-bindgen-guest-rust]
5-
git = 'https://github.com/bytecodealliance/wit-bindgen'
6-
default-features = false
7-
features = ['macros']
4+
[workspace.dependencies]
5+
wit-bindgen = { version = "0.3.0", default-features = false, features = ['macros'] }
86

97
[profile.release]
108
strip = 'debuginfo'
119

1210
[patch.crates-io]
13-
wasmtime-environ = { git = 'https://github.com/bytecodealliance/wasmtime' }
14-
wit-component = { git = 'https://github.com/bytecodealliance/wasm-tools' }
15-
wit-parser = { git = 'https://github.com/bytecodealliance/wasm-tools' }
11+
wasmtime-environ = { git = 'https://github.com/bytecodealliance/wasmtime', branch = 'release-6.0.0' }

rust/bindgen/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ crate-type = ['cdylib', 'rlib']
1111
[dependencies]
1212
anyhow = "1.0"
1313
heck = { version = "0.4", features = ["unicode"] }
14-
wit-component = "0.4"
15-
wit-parser = "0.4"
14+
wit-component = "0.6"
15+
wit-parser = "0.6"
1616
indexmap = "1.0"
1717
wasmtime-environ = { version = "6.0.0", features = ['component-model'] }
18-
wit-bindgen-guest-rust = { workspace = true, features = ['default'] }
18+
wit-bindgen = { workspace = true, features = ['default'] }
1919

2020
[features]
2121
cli = []

0 commit comments

Comments
 (0)