By default wasm2wat only checks whether input module is malformed (i.e. incorrect size of a section, unexpected magic number or reserved byte isn't equal to 0), but doesn't validate a module (i.e. if module does an addition of i32 and f32 it is well formed module but not valid).
I think it is good to validate an input by default.
Users can opt-out with Wasm2Wat struct if they don't want to validate module.
By default wasm2wat only checks whether input module is malformed (i.e. incorrect size of a section, unexpected magic number or reserved byte isn't equal to 0), but doesn't validate a module (i.e. if module does an addition of
i32andf32it is well formed module but not valid).I think it is good to validate an input by default.
Users can opt-out with
Wasm2Watstruct if they don't want to validate module.