Skip to content

Remove --enable-gc from help text #2604

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

Closed
wants to merge 1 commit into from
Closed

Conversation

soegaard
Copy link

According to issue #2530 the GC proposal is not supported by wat2asm. Having --enable-gc in the help text gives a false impression.

According to issue WebAssembly#2530 the GC proposal is not supported by wat2asm. Having --enable-gc in the help text gives a false impression.
Copy link
Member

@sbc100 sbc100 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looks like you are just updating the test expectation.

I think you would also need to update the wat2wasm source code itself.

@soegaard
Copy link
Author

Oh! I didn't look closely enough. I thought, that was the help text printed by the tool wat2wasm.
Looking at the code, the option --enable-gc is added here:

https://github.com/WebAssembly/wabt/blob/main/include/wabt/feature.def#L38

But - and it is a big but - the options are shared between the tools,
so if other tools support GC then we can't remove it from the feature.def.

What would be the least intrusive way of handling this?
A simple idea: make wat2wasm print a note after the examples in:

https://github.com/WebAssembly/wabt/blob/main/src/tools/wat2wasm.cc#L51

The note could simply say that the --enable-gc option has no effect.

Not ideal, but at least low effort.

@sbc100
Copy link
Member

sbc100 commented May 17, 2025

How about just renaming it to --enable-gc-experimental?

@soegaard
Copy link
Author

How about just renaming it to --enable-gc-experimental?

I would interpret a flag --enable-gc-experimental as "GC is implemented, but it is still a WIP".
Or perhaps that the specification might change.
My understanding is that --enable-gc is a noop for wat2wasm.

From the perspective of a user new to Wasm that just wants to try out Wasm:
he sees i31 in the GC spec. Checks the help of wat2wasm and sees he must
use --enable-gc to use the GC proposal. To his surprise none of the example programs works.

Adding a line in the README would help.
Removing the flag from the help text of wat2wasm even better.

I'll close this PR (since the fix was wrong) and create an issue instead.

@soegaard soegaard closed this May 21, 2025
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