wasm-chisel
wasm-chisel copied to clipboard
Verify numeric instructions
As per issue #18
parity-wasm checks types for const operators but not for binary as specified in the spec.
We simulated the stack to check for types and hence we added a new validator interface that takes in a mutable self reference. We also use a self defined enum instead of String for error handling and propagation as advised by the documentation.
@zixuanzh CI is failing because you need to run cargo fmt
. just FYI
@zixuanzh CI seems to be a version behind on rustfmt
. will fix that.
edit: actually that doesn't seem to be the problem. trying to find out why fmt is still freaking out.
edit 2: Are you sure you are using the correct version?
I am running on 1.32.0-nightly, fmt fails at deployer.rs etc in CI, it passes CI when I only commit verify-instructions related files.
@zixuanzh is this ready or WIP? Please add the respective label.
Also please rebase.
@jakelang it should be ready as it is unless @Steampunkery has something to add, we don't have access to add labels.
I think this looks good in general, great work @Steampunkery and @zixuanzh!
@Steampunkery @zixuanzh can we take over this PR or do you think you'll have some resources to work on this in the next while?
@axic please proceed, we are unlikely to work on this in the immediate future. thanks