Skip to content

Add a 🛸 gc canonical ABI mode - #773

Open
fitzgen wants to merge 2 commits into
WebAssembly:mainfrom
fitzgen:gc
Open

fitzgen wants to merge 2 commits into
WebAssembly:mainfrom
fitzgen:gc

Conversation

@fitzgen

@fitzgen fitzgen commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator

Fixes #525

Depends on #772

`tagged_code_units` used the source memory's tag, but `store_string_into_range`
decoded it with the target memory's tag, so passing strings between 32- and
64-bit memories checked the wrong tag and this was guest-observable due to the
wrong `realloc` calls getting made.

This is fixed by having `load_string_from_range` eagerly decode and remember the
`String`'s encoding hint and `store_string_into_range` to just use that hint,
rather than try to read the hint itself.

Additionally, I made a `class StringHint(Enum)` so that it is more clear what
the hint cases are, and to differentiate dynamic hints from actual encodings and
the `string-encoding` canon option values.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pre-Proposal: Wasm GC Support in the Canonical ABI

1 participant