This repository was archived by the owner on Sep 8, 2025. It is now read-only.
Update for new async ABI changes#171
Merged
Merged
Conversation
This commit updates to account for WebAssembly/component-model#520. This is a large-ish change to the semantics from a runtime perspective and needed a number of changes: * The `sync_prepare_call` and `async_prepare_call` libcalls were merged together. The previous async version statically took two arguments but now it's taking a variable number of arguments which looked quite a lot like `sync_prepare_call` so they're now merged into one. * Lots of little updates were made to `fact/signatures.rs` to account for ABI changes. * Tests with handwritten signatures were all updated to the new ABI. * The `CallerInfo::Async` structure which "buffers" a call was updated to have a `Vec<ValRaw>` for the incoming parameters. This is a particularly inefficient way to store parameters but it's in theory workable for now. * The `Storage` abstraction in host calls was refactored and updated to account for async and how lifting parameters could be either flat or indirect. Similar updates were made to the dynamic path as well
dicej
approved these changes
May 27, 2025
Collaborator
dicej
left a comment
There was a problem hiding this comment.
ABI changes like this are so tedious to implement; thanks for doing it and saving the rest of us from the pain!
Member
Author
|
Alas while I was hoping to land this before the wit-bindgen changes I don't think that's possible. Landing this will require updating wit-bindgen first, and landing that will require publishing wasm-tools first. Given that I'll look to release wasm-tools in the near future for this. |
Untested so far; will add tests in follow-up commit. 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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit updates to account for WebAssembly/component-model#520. This is a large-ish change to the semantics from a runtime perspective and needed a number of changes:
The
sync_prepare_callandasync_prepare_calllibcalls were merged together. The previous async version statically took two arguments but now it's taking a variable number of arguments which looked quite a lot likesync_prepare_callso they're now merged into one.Lots of little updates were made to
fact/signatures.rsto account for ABI changes.Tests with handwritten signatures were all updated to the new ABI.
The
CallerInfo::Asyncstructure which "buffers" a call was updated to have aVec<ValRaw>for the incoming parameters. This is a particularly inefficient way to store parameters but it's in theory workable for now.The
Storageabstraction in host calls was refactored and updated to account for async and how lifting parameters could be either flat or indirect. Similar updates were made to the dynamic path as well