Skip to content

Commit 7ba8ab1

Browse files
authored
Update wit-bindgen and bump to 0.13.0 (#81)
* Update wit-bindgen and bump to 0.13.0 This commit updates wit-bindgen to 0.21.0 which brings in some minor updates to generated code in addition to a new `wit-bindgen-rt` crate dependency to use as well. This avoids the need to depend on the `wit-bindgen` crate at all through some updated options to the CLI bindings generator. Additionally this bumps the crate to 0.13.0 to release these updated change in addition to the refactoring for the export-related macros previously. * Update wit-bindgen on CI
1 parent e62af39 commit 7ba8ab1

File tree

6 files changed

+356
-336
lines changed

6 files changed

+356
-336
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,6 @@ jobs:
5353
- uses: actions/checkout@v4
5454
- name: Install Rust
5555
run: rustup update stable && rustup default stable
56-
- run: cargo install wit-bindgen-cli@0.20.0 --locked
56+
- run: cargo install wit-bindgen-cli@0.21.0 --locked
5757
- run: ./ci/regenerate.sh
5858
- run: git diff --exit-code

Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "wasi"
3-
version = "0.12.1+wasi-0.2.0"
3+
version = "0.13.0+wasi-0.2.0"
44
authors = ["The Cranelift Project Developers"]
55
license = "Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT"
66
description = "WASI API bindings for Rust"
@@ -12,7 +12,8 @@ readme = "README.md"
1212
documentation = "https://docs.rs/wasi"
1313

1414
[dependencies]
15-
wit-bindgen = { version = "0.20.0", default-features = false, features = ['realloc'] }
15+
wit-bindgen-rt = "0.21.0"
16+
bitflags = "2.4.2"
1617

1718
# When built as part of libstd
1819
compiler_builtins = { version = "0.1", optional = true }

ci/regenerate.sh

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,9 @@ set -ex
55
generate() {
66
file="$1"
77
shift
8-
wit-bindgen rust wit --out-dir src --std-feature "$@"
9-
10-
# rustfmt chokes on the raw output of wit-bindgen right now due to trailling
11-
# whitespace (unsure as to why), so format it with some options first to get it
12-
# into a better state before applying the final format with default options
13-
# which gets this to succeed.
14-
#
15-
# NB: this should be considered a bug in wit-bindgen that this is required to do
16-
# twice. Passing `--rustfmt` to `wit-bindgen` should work.
17-
rustfmt $file --edition 2021 --config-path ./ci/rustfmt-bindings.toml
18-
rustfmt $file --edition 2021
8+
wit-bindgen rust wit --out-dir src --std-feature "$@" --rustfmt \
9+
--bitflags-path bitflags \
10+
--runtime-path wit_bindgen_rt
1911
}
2012

2113
# Generate the main body of the bindings which includes all imports from the two

0 commit comments

Comments
 (0)