Move simple C shim outputs to MoonBit allocation - #410
Closed
peter-jerry-ye wants to merge 1 commit into
Closed
Conversation
Coverage Report for CI Build 458Warning No base build found for commit Coverage: 78.894%Details
Uncovered Changes
Coverage RegressionsRequires a base build to compare against. How to fix this → Coverage Stats
💛 - Coveralls |
peter-jerry-ye
force-pushed
the
codex/wasm1-socket-buffers
branch
from
June 5, 2026 09:38
e18aa04 to
4e89551
Compare
peter-jerry-ye
force-pushed
the
codex/wasm1-fill-return-shims
branch
from
June 5, 2026 09:38
f305d34 to
2a0abd7
Compare
peter-jerry-ye
changed the base branch from
codex/wasm1-socket-buffers
to
codex/wasm1-socket-ifname-buffer
June 5, 2026 09:39
Collaborator
|
close via #415. Note that:
|
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.
Part of #408. Stacked on #413.
Why
Several small C shims allocate returned
String,Bytes, or arrays directly.For Wasm1 reuse, MoonBit should own those visible allocations and C should only
fill caller-provided memory.
What
Why this is correct
Each shim now returns the actual required length. C copies into the
MoonBit-provided buffer only when it fits; otherwise MoonBit allocates the
reported size and retries. The Windows environment block keeps its full
double-null-terminated representation.
Review scope
This PR is limited to simple synchronous fill-return shims and test helper
bindings. TLS and thread-pool jobs are split into later PRs.