Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wasmparser: add a hint to out-of-bounds type indices errors #2094

Merged
merged 1 commit into from
Mar 11, 2025

Conversation

fitzgen
Copy link
Member

@fitzgen fitzgen commented Mar 11, 2025

When an out-of-bounds type index would be in bounds if the GC proposal was enabled, but it is not, add some extra verbiage to the error message explaining that. This is useful for people who are playing around with Wasm GC in Wasmtime, but forget to enable it on the CLI or in their config.

I've taken care to only add to the error message, so that the substring matching we use for .wast tests will continue to work.

When an out-of-bounds type index would be in bounds if the GC proposal was
enabled, but it is not, add some extra verbiage to the error message explaining
that. This is useful for people who are playing around with Wasm GC in Wasmtime,
but forget to enable it on the CLI or in their config.

I've taken care to only *add* to the error message, so that the substring
matching we use for `.wast` tests will continue to work.
@alexcrichton alexcrichton added this pull request to the merge queue Mar 11, 2025
Merged via the queue into bytecodealliance:main with commit d39b57d Mar 11, 2025
31 checks passed
@fitzgen fitzgen deleted the gc-error-hint branch March 11, 2025 20:03
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.

2 participants