run .wat files from the command line
# basic
# view source
example/basic.ts
import { Options, run } from 'wat-cli'
console.log(
run(
new Options({
file: __dirname + '/math.wat',
args: [1, '2'],
name: 'add',
})
)
)
# benchWat
(fnName, params, iterations)
src/index.ts#L70 # run
(options) – Runs a function in a .wat file with the given arguments.
src/index.ts#L34
run(options) =>
- unknown
- decarg by stagas – decorator based cli arguments parser
- wat-compiler by stagas – webassembly wat text format to binary compiler
All contributions are welcome!