Repository navigation
GOL-987: Port async export parameter cleanup to 0.63 - #5
Merged
vigoo merged 1 commit intoNov 9, 2026
Merged
Conversation
Port #4 from the 1.6 fork, preserving 0.63 resource accessors and Go package-mode verification. Include the upstream MoonBit completed-task queue cleanup required by the newer scheduler, and adapt the D instruction match. Amp-Thread-ID: https://ampcode.com/threads/T-01a1bfcc-f9f2-7110-b49b-b66644fa37d2 Co-authored-by: Aditya Salunkhe <aditya.salunkh919@gmail.com> Amp-Thread-ID: https://ampcode.com/threads/T-01a1bfcc-f9f2-7110-b49b-b66644fa37d2 Co-authored-by: Amp <amp@ampcode.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Port #4 from
wit-bindgen-golem-1.6to the 0.63 fork used by Golem 2.0. Related: GOL-987, bytecodealliance#1757 and bytecodealliance#1758.An async export receives indirect parameters in a block allocated through the guest allocator. The generated wrapper must release that block after it reads the arguments and before it can wait. Releasing it after the await leaks the block when the call is cancelled.
Core now passes the block pointer, size and alignment to
CallInterface. Rust, C, C# and MoonBit release the block at their own argument-consumption boundary. Go removes the extra operand and keeps its existing runtime-managed unpin path. Sync export cleanup does not change.Keep the 0.63 resource getter and setter cases in the Rust generator. Extend the stock Go expected-link-failure list without changing package-mode verification. Update the D instruction match; D does not support async exports.
The newer MoonBit scheduler also needs the completed-task queue cleanup from the upstream PR. An empty deque retains coroutine references in its backing buffer, and those coroutines refer back to the task lane. Shrink the empty queue when the task finishes to break that cycle. The older scheduler on the 1.6 fork did not need this change.
Bring over the async-many-arguments codegen and runtime fixtures, including cancellation, option/result payloads, records and direct parameters. Retain the C# lifted-parameter naming and namespace fixes from #4.
This PR changes only the wit-bindgen fork. It does not change consumer pins in golemcloud/golem#4350 or golemcloud/wasm-rquickjs#204. Those consumers must select the repaired revision after this PR lands.