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
$ wasm-run --help
wasm-run [options] <file> [--] [args..]
Options:
-i, --invoke Function to execute [string]
-t, --timeout Execution timeout (ms)
--trace Trace imported functioncalls [boolean]
--gas-limit Gas limit [default: 100000]
--version Show version number [boolean]
--help Show help [boolean]
wasm-meter can be installed via npm install wasm-metering -g
$ wasm-meter fib64.wasm fib64.metered.wasm
$ wasm-run fib64.metered.wasm 8
[runtime] Running fib(8)...
[runtime] Result: 21
[runtime] Gas used: 5.1874
$ wasm-run fib64.metered.wasm 30
[runtime] Running fib(30)...
[runtime] Error: Run out of gas (gas used: 100000.0177)
Features
☑ Load wasm and wat files (using Binaryen)
☑ Run specific exported function
☑ Run wasi-snapshot-preview1 apps via --experimental-wasi-unstable-preview1 flag
☑ Run wasi-unstable apps (compatibility layer)
☑ i64 args, multi-value, bulk-memory, tail-calls support via experimental flags
☑ Generic imports tracing
☑ Gas metering/limiting
☐ Compiled wasm caching (blocked by #1)
☐ WASI API and structures decoding (generate from witx?)
☐ REPL mode