dicej requested alexcrichton for a review on PR #12185.
dicej opened PR #12185 from dicej:wasmtime-run-await-task to bytecodealliance:main:
Previously,
wasmtime runonly ranwasi:cli/run@0.3.xtasks until they returned a result, then exited. That meant any post-return computation done by the task might not have a chance to run.This commit aligns
wasmtime-wasiwith whatwasmtime-wasi-httpwas already doing: specifying thetask_exitoption for export bindings towasmtime-wit-bindgenso the host can.awaitboth the return value _and_ the task completion. It also modifies thewasmtime runimplementation to await both.<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
dicej requested wasmtime-core-reviewers for a review on PR #12185.
dicej requested wasmtime-wasi-reviewers for a review on PR #12185.
dicej updated PR #12185.
alexcrichton submitted PR review.
alexcrichton created PR review comment:
Instead of sleeping could this yield 5 or so times and then print? That should force the main return to happen without introducing any sort of timing here
dicej updated PR #12185.
dicej has enabled auto merge for PR #12185.
dicej merged PR #12185.
Last updated: Jan 09 2026 at 13:15 UTC