Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

async/stream/future plumbing for wasmtime-environ #10047

Merged
merged 2 commits into from
Jan 22, 2025

Conversation

dicej
Copy link
Contributor

@dicej dicej commented Jan 18, 2025

I've split this out of #9582 to make review easier.

This patch includes the plumbing needed to route
async/stream/future/error-context data from wit-parser, through the various layers of wasmtime-environ, and on to wasmtime-cranelift and wasmtime. The wasmtime::runtime, wasmtime_environ::fact, and wasmtime_cranelift::compiler::component modules only contain todo!() stubs to begin with; I'll flesh those out in later PRs.

@dicej dicej requested a review from alexcrichton January 18, 2025 00:51
@dicej
Copy link
Contributor Author

dicej commented Jan 18, 2025

@alexcrichton note all the new fields I've added to VMComponentContext/VMComponentOffsets. I dimly recall that you wanted me to switch most or all of them over to libcalls, and that that would involve adding a bunch of new methods to the VMStore trait, but I can't remember the details. Perhaps you could walk me through that next week.

@github-actions github-actions bot added the wasmtime:api Related to the API of the `wasmtime` crate itself label Jan 18, 2025
crates/environ/src/component/translate/adapt.rs Outdated Show resolved Hide resolved
crates/environ/src/component/translate/inline.rs Outdated Show resolved Hide resolved
crates/environ/src/component/types.rs Show resolved Hide resolved
crates/environ/src/component/types_builder.rs Outdated Show resolved Hide resolved
crates/environ/src/trap_encoding.rs Outdated Show resolved Hide resolved
crates/environ/src/component/vmcomponent_offsets.rs Outdated Show resolved Hide resolved
I've split this out of bytecodealliance#9582 to make review easier.

This patch includes the plumbing needed to route
async/stream/future/error-context data from `wit-parser`, through the various
layers of `wasmtime-environ`, and on to `wasmtime-cranelift` and `wasmtime`.
The `wasmtime::runtime`, `wasmtime_environ::fact`, and
`wasmtime_cranelift::compiler::component` modules only contain `todo!()` stubs
to begin with; I'll flesh those out in later PRs.

Signed-off-by: Joel Dice <[email protected]>

remove debugging code

Signed-off-by: Joel Dice <[email protected]>

revert comment formatting change in trap_encoding.rs

Signed-off-by: Joel Dice <[email protected]>

deduplicate code in inline.rs

Signed-off-by: Joel Dice <[email protected]>

remove `ComponentTypesBuilder::error_context_type`

This was just an alias for `error_context_table_type`, which I've made public.

Signed-off-by: Joel Dice <[email protected]>

defer `VMComponentOffsets` changes to a future PR

Signed-off-by: Joel Dice <[email protected]>
@dicej dicej force-pushed the wasmtime-environ-async-plumbing branch from e1c4ff0 to 8f4d991 Compare January 22, 2025 17:48
@dicej dicej marked this pull request as ready for review January 22, 2025 17:48
@dicej dicej requested a review from a team as a code owner January 22, 2025 17:48
@dicej dicej requested review from fitzgen and removed request for a team January 22, 2025 17:48
@dicej dicej enabled auto-merge January 22, 2025 17:48
@dicej dicej added this pull request to the merge queue Jan 22, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 22, 2025
Signed-off-by: Joel Dice <[email protected]>
@dicej dicej enabled auto-merge January 22, 2025 18:19
@dicej dicej added this pull request to the merge queue Jan 22, 2025
Merged via the queue into bytecodealliance:main with commit 442003a Jan 22, 2025
39 checks passed
@dicej dicej deleted the wasmtime-environ-async-plumbing branch January 22, 2025 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wasmtime:api Related to the API of the `wasmtime` crate itself
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants