Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update wit-bindgen and bump to 0.13.0 #81

Merged
merged 2 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,6 @@ jobs:
- uses: actions/checkout@v4
- name: Install Rust
run: rustup update stable && rustup default stable
- run: cargo install wit-bindgen-cli@0.20.0 --locked
- run: cargo install wit-bindgen-cli@0.21.0 --locked
- run: ./ci/regenerate.sh
- run: git diff --exit-code
5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "wasi"
version = "0.12.1+wasi-0.2.0"
version = "0.13.0+wasi-0.2.0"
authors = ["The Cranelift Project Developers"]
license = "Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT"
description = "WASI API bindings for Rust"
Expand All @@ -12,7 +12,8 @@ readme = "README.md"
documentation = "https://docs.rs/wasi"

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

# When built as part of libstd
compiler_builtins = { version = "0.1", optional = true }
Expand Down
14 changes: 3 additions & 11 deletions ci/regenerate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,9 @@ set -ex
generate() {
file="$1"
shift
wit-bindgen rust wit --out-dir src --std-feature "$@"

# rustfmt chokes on the raw output of wit-bindgen right now due to trailling
# whitespace (unsure as to why), so format it with some options first to get it
# into a better state before applying the final format with default options
# which gets this to succeed.
#
# NB: this should be considered a bug in wit-bindgen that this is required to do
# twice. Passing `--rustfmt` to `wit-bindgen` should work.
rustfmt $file --edition 2021 --config-path ./ci/rustfmt-bindings.toml
rustfmt $file --edition 2021
wit-bindgen rust wit --out-dir src --std-feature "$@" --rustfmt \
--bitflags-path bitflags \
--runtime-path wit_bindgen_rt
}

# Generate the main body of the bindings which includes all imports from the two
Expand Down
Loading