Skip to content

Commit

Permalink
Update wasm-tools dependencies
Browse files Browse the repository at this point in the history
This notably updates to handle bytecodealliance/wasm-tools#1711 but this
is done in a way that is not intended to replace bytecodealliance#1035 but instead makes
the update "as easy as possible" by just adding calls to
`.{size,align}_wasm32()` where needed. Full support is expected to land
in bytecodealliance#1035.
  • Loading branch information
alexcrichton committed Aug 22, 2024
1 parent 7b4d9e5 commit 6f2405b
Show file tree
Hide file tree
Showing 6 changed files with 94 additions and 70 deletions.
68 changes: 34 additions & 34 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ indexmap = "2.0.0"
prettyplease = "0.2.20"
syn = { version = "2.0", features = ["printing"] }

wasmparser = "0.215.0"
wasm-encoder = "0.215.0"
wasm-metadata = "0.215.0"
wit-parser = "0.215.0"
wit-component = "0.215.0"
wasmparser = "0.216.0"
wasm-encoder = "0.216.0"
wasm-metadata = "0.216.0"
wit-parser = "0.216.0"
wit-component = "0.216.0"

wit-bindgen-core = { path = 'crates/core', version = '0.30.0' }
wit-bindgen-c = { path = 'crates/c', version = '0.30.0' }
Expand Down
2 changes: 1 addition & 1 deletion crates/c/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3027,7 +3027,7 @@ impl Bindgen for FunctionBindgen<'_, '_> {
uwriteln!(self.src, "uint8_t *{ptr} = {};", operands[0]);
let i = self.locals.tmp("i");
uwriteln!(self.src, "for (size_t {i} = 0; {i} < {len}; {i}++) {{");
let size = self.gen.gen.sizes.size(element);
let size = self.gen.gen.sizes.size(element).size_wasm32();
uwriteln!(self.src, "uint8_t *base = {ptr} + {i} * {size};");
uwriteln!(self.src, "(void) base;");
uwrite!(self.src, "{body}");
Expand Down
Loading

0 comments on commit 6f2405b

Please sign in to comment.