wabt icon indicating copy to clipboard operation
wabt copied to clipboard

Add a flag that constrains features to the W3C recommendation

Open codefromthecrypt opened this issue 2 years ago • 7 comments

Since this is a repo in the org for the W3C core recommendation, I think it is a fair ask to have a flag that constrains features to what's included in that, and no more. It will help with tracking https://github.com/WebAssembly/wabt#supported-proposals and make upgrades seamless.

I'm not asking for this to be by default turned on, rather to make it possible to achieve undoing all the flags that turn on things not in the recommended spec. Ex. --enable-1.0 (please don't call whatever flag MVP as that's jargon and not a W3C version number).

Ex. just like enable-all

      --enable-1.0                             Enable only features in version 1.0 of the core WebAssembly standard

codefromthecrypt avatar Apr 14 '22 00:04 codefromthecrypt

one nuance might be how this interacts with other flags.

ex. if you specify --enable-1.0 and also --enable-multi-value you get the combination of those, not only 1.0.

The use case I have is around spec additions for features themselves. the spectests include modules that may compile differently depending on what's enabled or not. When adding support for one feature, it is helpful to not accidentally turn on others.

codefromthecrypt avatar Apr 14 '22 00:04 codefromthecrypt

Sure, sounds like a useful flag to have. I wonder if it would make sense to call it --disable-all since I think that is what it would do?

sbc100 avatar Apr 14 '22 00:04 sbc100

Either way seems reasonable to include.

sbc100 avatar Apr 14 '22 00:04 sbc100

almost, just that mutable-globals snuck into 1.0 :p

codefromthecrypt avatar Apr 14 '22 00:04 codefromthecrypt

I see. In that case we can probably simply remove the option to disable mutable globals.

sbc100 avatar Apr 14 '22 00:04 sbc100

Perhaps --enable-X.X and --disable-all are both useful.

sbc100 avatar Apr 14 '22 00:04 sbc100

well yeah interesting.. as a runtime I think mutable globals are problematic and so it is helpful to disable them. --disable-all is 1.0 minus mutable globals and that's probably a better setting than --enable-1.0 for certain users.

PS --enable-X.X indeed.. there's probably a time to temporarily add --enable-1.1-snapshot for interop when things get that progressed.

codefromthecrypt avatar Apr 14 '22 00:04 codefromthecrypt