update future.{write,read} ABIs#2222
Conversation
|
CI failures appear to be due to me using the latest Rust release; will downgrade to the MSRV locally and fix the issues. |
alexcrichton
left a comment
There was a problem hiding this comment.
Looks good 👍
In the *.wast tests I think I only saw renamings, so could you add tests for futures for both reads/writes to ensure properties such as future.read has no pointer with no payload and future.write uses flat lowerings or a pointer if the flat lowering is too big? Additionally I think it'd be good to have a test that future.write doesn't require memory if the lowering fits
FWIW, I've tested those cases end-to-end in wasip3-prototyping, plus the fuzz tester is hitting those cases also. I agree we should have some handwritten WAST tests as well; I'll add those. |
|
Yeah all the code here looks correct so I don't expect any failures, mostly just handwritten tests for the well-known edge cases are good to have to catch any possible issues in future refactorings earlier |
29888ca to
1194f52
Compare
This implements WebAssembly/component-model#524 insofar as it affects validation, componentization, etc. - `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}` Signed-off-by: Joel Dice <joel.dice@fermyon.com>
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
This reverts commit 95f36d2. Alex, Luke, and I decided to scale back these changes. I'll open a new PR next week which reflects that discussion.
This implements WebAssembly/component-model#524 insofar as it affects validation, componentization, etc.
future.writenow accepts its payload value as up to 4 flat parameters before spilling to linear memory.future.readtakes no payload pointer when it has no payload type{stream,future}.close-{readable,writable}have been renamed to{stream,future}.drop-{readable,writable}