Skip to content

Conversation

@alexcrichton
Copy link
Member

This commit is a step in preparation for #11430, notably core instance allocation, or StoreOpaque::allocate_instance is now an async fn. This function does not actually use the async-ness just yet so it's a noop from that point of view, but this propagates outwards to enough locations that I wanted to split this off to make future changes more digestable.

Notably some creation functions here such as making an Instance, Table, or Memory are refactored internally to use this new async function. Annotations of assert_ready or one_poll are used as appropriate as well.

For reference this commit was benchmarked with our instantiation.rs benchmark in the pooling allocator and shows no changes relative to the original baseline from before-async-PRs.

This commit is a step in preparation for bytecodealliance#11430, notably core instance
allocation, or `StoreOpaque::allocate_instance` is now an `async fn`.
This function does not actually use the `async`-ness just yet so it's a
noop from that point of view, but this propagates outwards to enough
locations that I wanted to split this off to make future changes more
digestable.

Notably some creation functions here such as making an `Instance`,
`Table`, or `Memory` are refactored internally to use this new `async`
function. Annotations of `assert_ready` or `one_poll` are used as
appropriate as well.

For reference this commit was benchmarked with our `instantiation.rs`
benchmark in the pooling allocator and shows no changes relative to the
original baseline from before-`async`-PRs.
@alexcrichton alexcrichton requested a review from a team as a code owner August 19, 2025 14:33
@alexcrichton alexcrichton requested review from dicej and removed request for a team August 19, 2025 14:33
@alexcrichton alexcrichton marked this pull request as draft August 19, 2025 14:55
@alexcrichton
Copy link
Member Author

Alas should have remembered to run tests. Unfortunately this won't be able to land separately, I'll try to keep this as a separate commit though.

@alexcrichton alexcrichton deleted the instance-allocation-async branch August 19, 2025 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant