Skip to content

Commit 861bfaa

Browse files
authored
Fix base case for wit-parser's variant alignment (#951)
* Fix base case for wit-parser's variant alignment This fixes a bug in #948 discovered by wit-bindgen's test suite which I forgot to run prior to landing it here. Historically much of the ABI code in `wit-parser` was tested by `wit-bindgen` but after the extraction there is no testing of it in this repository, so this is something we'll want to improve in the future. This commit additionally includes a minor version bump for the wit-parser crate. * Bump wit-parser's version
1 parent 1d75a98 commit 861bfaa

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "wasm-tools"
3-
version = "1.0.26"
3+
version = "1.0.27"
44
authors = ["The Wasmtime Project Developers"]
55
edition.workspace = true
66
description = "CLI tools for interoperating with WebAssembly files"
@@ -52,8 +52,8 @@ wasmparser = { version = "0.102.0", path = "crates/wasmparser" }
5252
wasmprinter = { version = "0.2.53", path = "crates/wasmprinter" }
5353
wast = { version = "55.0.0", path = "crates/wast" }
5454
wat = { version = "1.0.61", path = "crates/wat" }
55-
wit-component = { version = "0.7.2", path = "crates/wit-component" }
56-
wit-parser = { version = "0.6.3", path = "crates/wit-parser" }
55+
wit-component = { version = "0.7.3", path = "crates/wit-component" }
56+
wit-parser = { version = "0.6.4", path = "crates/wit-parser" }
5757

5858
[dependencies]
5959
anyhow = { workspace = true }

crates/wit-component/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "wit-component"
33
authors = ["Peter Huene <[email protected]>"]
4-
version = "0.7.2"
4+
version = "0.7.3"
55
edition.workspace = true
66
license = "Apache-2.0 WITH LLVM-exception"
77
readme = "README.md"

crates/wit-parser/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "wit-parser"
33
authors = ["Alex Crichton <[email protected]>"]
4-
version = "0.6.3"
4+
version = "0.6.4"
55
edition.workspace = true
66
license = "Apache-2.0 WITH LLVM-exception"
77
readme = "README.md"

crates/wit-parser/src/sizealign.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ impl SizeAlign {
111111
) -> (usize, usize) {
112112
let (discrim_size, discrim_align) = int_size_align(tag);
113113
let mut case_size = 0;
114-
let mut case_align = 0;
114+
let mut case_align = 1;
115115
for ty in types {
116116
if let Some(ty) = ty {
117117
case_size = case_size.max(self.size(ty));

0 commit comments

Comments
 (0)