-
Notifications
You must be signed in to change notification settings - Fork 197
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
feat: add support for stream
with no <T>
#1130
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Roman Volosatovs <[email protected]>
Signed-off-by: Roman Volosatovs <[email protected]>
Signed-off-by: Roman Volosatovs <[email protected]>
8a8e5ac
to
7a8f757
Compare
I'm not sure what the policy on pulling in bleeding-edge changes from https://github.com/bytecodealliance/wasm-tools is, I feel like I'll probably have to wait for a new release, but I'm also not sure how soon that would happen, so marking the PR ready for review with the git deps |
Ah yes to merge this it'll need to be a crates.io-based dependency. There's some documentation on releases for wasm-tools but the tl;dr; is that it's on-demand. I personally prefer to spread out releases where possible, so if it's ok I'd prefer that this were integrated into other in-development systems first to make sure it works and then once it's reasonably confident no major changes are needed here the cranks can be turned. |
@rvolosatovs I'm about to update my Wasmtime async branch to use both |
Actually, I'll use the |
Actually, actually, I used the |
I've split this out of bytecodealliance#9582 to make review easier. This patch adds async/stream/future/error-context support to the host binding generator, along with placeholder type and function definitions in the `wasmtime` crate which the generated bindings can refer to. See https://github.com/dicej/rfcs/blob/component-async/accepted/component-model-async.md#componentbindgen-updates for the design and rationale. Note that I've added temporary `[patch.crates-io]` overrides in Cargo.toml until bytecodealliance/wit-bindgen#1130 and bytecodealliance/wasm-tools#1978 have been released. Also note that we emit a `T: 'static` bound for `AsContextMut<Data = T>` when generating bindings with `concurrent_imports: true`. This is only because `rustc` insists that the closure we're passing to `LinkerInstance::func_wrap_concurrent` captures the lifetime of `T` despite my best efforts to convince it otherwise. Alex and I suspect this is a limitation in the compiler, and I asked about it on the rust-lang Zulip, but we haven't been able to determine a workaround so far. Signed-off-by: Joel Dice <[email protected]>
Refs bytecodealliance/wasm-tools#1978
Refs WebAssembly/component-model#440