About this repo | Usage | Development
Introduction:
This is a simple CLI (function-runner) which allows you to run Wasm
Functions intended for the Shopify Functions infrastructure. Functions will run using
the provided JSON input file and their output will be printed as JSON
upon completion.
By default, the Function is expected to be named function.wasm in the
current directory. This may be overriden using the -f option.
Example: function-runner -f '../my-function-name.wasm' '../my-input.json'
If you wish to use function-runner without compiling it, the Releases page
contains binaries that can be run on your computer.
To see the list of possible commands and arguments, run function-runner --help.
Wasm files with DWARF symbols can be debugged using lldb on x86 architectures (not Apple Silicon). To do this, install lldb and run:
lldb -- function-runner -f '../my-function-name.wasm' '../my-input.json'
Building requires a rust toolchain of at least 1.56.0 (older may work). cargo install --path . --locked will build
and add the function-runner command to your path.
cargo install --path . --locked: Build and install thefunction-runnercommand.function-runner: Execute a Function.