Expose synchronous WASIp2 linker registration - #292
Draft
JDLondon7 wants to merge 1 commit into
Draft
Conversation
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.
Failing test
upstream/mainhas no Go binding forwasmtime_component_linker_add_wasip2, so a Go embedder cannot register Wasmtime's synchronous WASIp2 interfaces on a component linker.General correction
Add
ComponentLinker.AddWASIP2, propagate the C API error through the existing Go error wrapper, and keep the linker alive across the cgo call.This independent M2 slice tracks #280.
Validation
With the v47.0.0 release artifacts restored as ignored build inputs:
Both commands pass on Windows amd64; lint reports
0 issues.Compatibility and security impact
The API is additive and exposes only the synchronous WASIp2 registration already provided by the Wasmtime C API. Capability configuration remains the embedder's responsibility.
Documentation
The public method includes Go documentation and a focused registration test.
Downstream removal condition
Downstream users can remove equivalent local bindings after an upstream release exposes synchronous WASIp2 linker registration and their WASIp2 fixtures pass unchanged.
This change contains no TradePit product concepts or private data.