Generate nominal IDs for all bindings generation #1526
Merged
alexcrichton merged 3 commits intobytecodealliance:mainfrom Feb 10, 2026
Merged
Generate nominal IDs for all bindings generation #1526alexcrichton merged 3 commits intobytecodealliance:mainfrom
alexcrichton merged 3 commits intobytecodealliance:mainfrom
Conversation
This commit leverages bytecodealliance/wasm-tools#2447 to make many existing and future problems much easier in `wit-bindgen`. Namely a `TypeId` now uniquely identifies a type to be generated rather than simultaneously representing both an import and an export in some situations. This isn't immediately leveraged in bindings generators just yet but it's intended to open up the doors to benefitting from this in the future.
No major changes just yet, but this shows some examples of removing non-obvious logic in bindings generation enabled by nominal type ids.
This was referenced Feb 10, 2026
pchickey
approved these changes
Feb 10, 2026
ricochet
reviewed
Feb 10, 2026
| interfaces.insert(name, key.clone()); | ||
| interfaces | ||
| .entry(name) | ||
| .or_insert(Vec::new()) |
Contributor
There was a problem hiding this comment.
Suggested change
| .or_insert(Vec::new()) | |
| .or_insert_with(Vec::new) |
Merged
via the queue into
bytecodealliance:main
with commit Feb 10, 2026
7bebfd6
26 of 27 checks passed
alexcrichton
added a commit
to alexcrichton/wit-bindgen
that referenced
this pull request
Feb 11, 2026
Follow-up from bytecodealliance#1468 to account for work in bytecodealliance#1526.
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.
This commit leverages bytecodealliance/wasm-tools#2447 to make many
existing and future problems much easier in
wit-bindgen. Namely aTypeIdnow uniquely identifies a type to be generated rather thansimultaneously representing both an import and an export in some
situations. This isn't immediately leveraged in bindings generators just
yet but it's intended to open up the doors to benefitting from this in
the future.