Skip to content

Commit c129875

Browse files
committed
update future.{write,read} ABIs
This updates the Rust generator to use the new ABI defined in WebAssembly/component-model#524. The C generator will need a similar update as well. - `future.write` now accepts its payload value as up to 4 flat parameters before spilling to linear memory. - `future.read` takes no payload pointer when it has no payload type - `{stream,future}.close-{readable,writable}` have been renamed to `{stream,future}.drop-{readable,writable}` I've tested this end-to-end with `wasip3-prototyping` and will soon post a corresponding PR there. Finally, `rustfmt` was complaining about using `gen` as a field name, so I took this opportunity to address that. Signed-off-by: Joel Dice <[email protected]>
1 parent 80cf018 commit c129875

File tree

34 files changed

+648
-460
lines changed

34 files changed

+648
-460
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ prettyplease = "0.2.20"
3131
syn = { version = "2.0.89", features = ["printing"] }
3232
futures = "0.3.31"
3333

34-
wat = "1.232.0"
35-
wasmparser = "0.232.0"
36-
wasm-encoder = "0.232.0"
37-
wasm-metadata = { version = "0.232.0", default-features = false }
38-
wit-parser = "0.232.0"
39-
wit-component = "0.232.0"
40-
wasm-compose = "0.232.0"
34+
wat = "1.233.0"
35+
wasmparser = "0.233.0"
36+
wasm-encoder = "0.233.0"
37+
wasm-metadata = { version = "0.233.0", default-features = false }
38+
wit-parser = "0.233.0"
39+
wit-component = "0.233.0"
40+
wasm-compose = "0.233.0"
4141

4242
wit-bindgen-core = { path = 'crates/core', version = '0.42.1' }
4343
wit-bindgen-c = { path = 'crates/c', version = '0.42.1' }
@@ -83,3 +83,16 @@ csharp = ['dep:wit-bindgen-csharp']
8383
csharp-mono = ['csharp']
8484
moonbit = ['dep:wit-bindgen-moonbit']
8585
async = []
86+
87+
# TODO: remove this once
88+
# https://github.com/bytecodealliance/wasm-tools/pull/2222 is included in a
89+
# `wasm-tools` release:
90+
[patch.crates-io]
91+
wasmparser = { git = "https://github.com/bytecodealliance/wasm-tools" }
92+
wat = { git = "https://github.com/bytecodealliance/wasm-tools" }
93+
wast = { git = "https://github.com/bytecodealliance/wasm-tools" }
94+
wasm-encoder = { git = "https://github.com/bytecodealliance/wasm-tools" }
95+
wit-parser = { git = "https://github.com/bytecodealliance/wasm-tools" }
96+
wit-component = { git = "https://github.com/bytecodealliance/wasm-tools" }
97+
wasm-compose = { git = "https://github.com/bytecodealliance/wasm-tools" }
98+
wasm-metadata = { git = "https://github.com/bytecodealliance/wasm-tools" }

0 commit comments

Comments
 (0)