Skip to content

Fix generating bindings for async methods#1279

Merged
alexcrichton merged 1 commit into
bytecodealliance:mainfrom
alexcrichton:fix-async-bindings-generation
Apr 22, 2025
Merged

Fix generating bindings for async methods#1279
alexcrichton merged 1 commit into
bytecodealliance:mainfrom
alexcrichton:fix-async-bindings-generation

Conversation

@alexcrichton
Copy link
Copy Markdown
Member

Use &self for the first argument, not self_: ..., by hooking into blocks that previously were checking just for method, not also async methods.

Use `&self` for the first argument, not `self_: ...`, by hooking into
blocks that previously were checking just for method, not also async
methods.
@alexcrichton alexcrichton requested a review from dicej April 22, 2025 21:50
alexcrichton added a commit to alexcrichton/wasip3-prototyping that referenced this pull request Apr 22, 2025
This commit updates the WIT used in test to use the `async` keyword and
generally try to avoid manually configuring what's async and what's not
in the guest. This does not update the host's handling of the `async`
keyword in WIT for `wasmtime::component::bindgen!`. Some assorted
bindgen issues were fixed here and there and WASI WITs were updated as
well with `async` where it seemed appropriate. I'll note that there are
some usages of concurrent imports when there's no actual concurrency,
it's just there for getting an `Accessor` and, for example, spawning
tasks. In these situations we may want to explore possible modes of
bindings generation on the host side of things which avoids the need for
manual configuration.

Coupled with bytecodealliance/wit-bindgen#1278 and
bytecodealliance/wit-bindgen#1279.
@alexcrichton alexcrichton enabled auto-merge April 22, 2025 21:57
@alexcrichton alexcrichton added this pull request to the merge queue Apr 22, 2025
Merged via the queue into bytecodealliance:main with commit 906e096 Apr 22, 2025
18 checks passed
@alexcrichton alexcrichton deleted the fix-async-bindings-generation branch April 22, 2025 22:26
alexcrichton added a commit to alexcrichton/wasip3-prototyping that referenced this pull request Apr 23, 2025
This commit updates the WIT used in test to use the `async` keyword and
generally try to avoid manually configuring what's async and what's not
in the guest. This does not update the host's handling of the `async`
keyword in WIT for `wasmtime::component::bindgen!`. Some assorted
bindgen issues were fixed here and there and WASI WITs were updated as
well with `async` where it seemed appropriate. I'll note that there are
some usages of concurrent imports when there's no actual concurrency,
it's just there for getting an `Accessor` and, for example, spawning
tasks. In these situations we may want to explore possible modes of
bindings generation on the host side of things which avoids the need for
manual configuration.

Coupled with bytecodealliance/wit-bindgen#1278 and
bytecodealliance/wit-bindgen#1279.
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.

2 participants