You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the WasmFeatures struct in the wasmparser crate has many options for controlling single Wasm proposal implementations.
However, some Wasm proposals such as nontrapping-float-to-int-instructions, sign-extension-ops and mutable-global are missing from there.
Is this intentional? If yes, what is the reason?
If not, would the authors of the wasmparser crate like to receive PRs to add those configuration options so that wasmparser can be used to validate against Wasm inputs making use of those features?
Motivation
For some use cases it might be very important to guard against usage of certain unsupported Wasm proposals. An example for this is in the context where Wasm instructions are metered and there is no defined metering for certain instructions of Wasm proposals.
ToDo
Add mutable_global: bool field to WasmFeatures to enable or disable the mutable-global Wasm proposal.
Add nontrapping_float_to_int_instructions: bool field to WasmFeatures to enable or disable the nontrapping-float-to-int-instructions Wasm proposal.
Add sign_extension_ops: bool field to WasmFeatures to enable or disable the sign-extension-ops Wasm proposal.
The text was updated successfully, but these errors were encountered:
Robbepop
changed the title
Missing options in WasmFeatures
wasmparser: Missing options in WasmFeatures
Feb 13, 2022
I think this is mostly because those proposals were largely stable before they were added here, but it should be fine to retroactively add them if necessary.
Currently the
WasmFeatures struct
in thewasmparser
crate has many options for controlling single Wasm proposal implementations.However, some Wasm proposals such as
nontrapping-float-to-int-instructions
,sign-extension-ops
andmutable-global
are missing from there.Is this intentional? If yes, what is the reason?
If not, would the authors of the
wasmparser
crate like to receive PRs to add those configuration options so thatwasmparser
can be used to validate against Wasm inputs making use of those features?Motivation
For some use cases it might be very important to guard against usage of certain unsupported Wasm proposals. An example for this is in the context where Wasm instructions are metered and there is no defined metering for certain instructions of Wasm proposals.
ToDo
mutable_global: bool
field toWasmFeatures
to enable or disable themutable-global
Wasm proposal.nontrapping_float_to_int_instructions: bool
field toWasmFeatures
to enable or disable thenontrapping-float-to-int-instructions
Wasm proposal.sign_extension_ops: bool
field toWasmFeatures
to enable or disable thesign-extension-ops
Wasm proposal.The text was updated successfully, but these errors were encountered: