asteurer opened PR #15000 from asteurer:bindgen-update to bytecodealliance:main:
Completes https://github.com/bytecodealliance/wasmtime/issues/13768.
Summary
- Adds more helpful error message to the
component::bindgenmacro when a WIT has sync exports and async imports.- Adds documentation demonstrating the syntax that's used to flag the resource method types.
asteurer requested pchickey for a review on PR #15000.
asteurer requested wasmtime-core-reviewers for a review on PR #15000.
asteurer removed the review request for wasmtime-core-reviewers from PR #15000.
asteurer updated PR #15000.
asteurer updated PR #15000.
:memo: alexcrichton submitted PR review:
Thanks for this!
:speech_balloon: alexcrichton created PR review comment:
For this it'll actually want to define the
runfunction asasync. While Wasmtime will allow this as-is and run it, the component model will dynamically trap shouldruncall the importedlogfunction or otherwise attempt to block. Basically sync component-model functions can't block, so a syncrunfunction here isn't too useful
:speech_balloon: alexcrichton created PR review comment:
One option to avoid this if you'd like is to use
HasSelf
pchickey removed the review request for pchickey from PR #15000.
:memo: asteurer submitted PR review.
:speech_balloon: asteurer created PR review comment:
Oh, interesting. I added a
tokio::time::sleepto the host's impl oflogjust now and it does indeed trap. I think I'm misunderstanding the assertion that the Concurrency Explainer makes:Thus, overall, async in WIT and the Component Model does not behave like a "color"...How can WIT be considered "colorless" when an export is required to be
asyncin order to call anasyncimport?
asteurer updated PR #15000.
asteurer requested alexcrichton for a review on PR #15000.
:speech_balloon: alexcrichton created PR review comment:
Ah that might be a bit outdated in that explainer at this point and/or need some more clarification. That was an original aspiration of concurrency but we ended up walking it back to the current system which is semi-colorless sort of but not 100% as you're expecting with that test.
:memo: alexcrichton submitted PR review.
:thumbs_up: alexcrichton submitted PR review:
r=me but looks like there's a CI failure
asteurer updated PR #15000.
asteurer updated PR #15000.
asteurer commented on PR #15000:
@alexcrichton Fixed!
alexcrichton added PR #15000 feat(bindgen): added error for mixed sync exports and async imports to the merge queue.
github-actions[bot] added the label wasmtime:api on PR #15000.
:check: alexcrichton merged PR #15000.
alexcrichton removed PR #15000 feat(bindgen): added error for mixed sync exports and async imports from the merge queue.
Last updated: Oct 31 2026 at 23:03 UTC