For each wasm file there may exist an .inputs
file matching the .wasm
file
name.
The inputs file is needed to benchmark execution and multiple execution cases may be specified in the file.
Execution case is specified by 6 lines:
- The case name. Must not be empty.
- The exported wasm function name to be executed.
- The function type where the parameter type(s) and the result type is separated with a colon (
:
). The only allowed types currently arei
for i32 andI
for i64. e.g.i:
for i32 input and no result. - The function arguments as space-separated list of integers. May be empty.
- The hex-encoded bytes of the initial memory. May be empty.
- The expected result as an integer. Empty line means no result is expected.
- The hex-encoded bytes of the expected memory after execution. If empty, result memory will not be checked.
Additional empty lines are allowed before each case.
case_1
testFunction
iii:i
2 3 4
000000ff
1
ff000000ff000000
case_2
memset
iii:
0 0xfe 3
fefefe