Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 11 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# function-runner

[About this repo](#about-this-repo) | [Commands](#commands-optional) | [How to use this repo](#how-to-use-this-repo)
[About this repo](#about-this-repo) | [Usage](#usage) | [Development](#development)

## About this repo

**Introduction:**

This is a simple CLI (`function-runner`) which allows you to run Wasm
Expand All @@ -15,32 +16,19 @@ current directory. This may be overriden using the `-f` option.

Example: `function-runner -f '../my-function-name.wasm' '../my-input.json'`

## Commands (optional)
## Usage

If you wish to use `function-runner` without compiling it, the [Releases](https://github.com/Shopify/function-runner/releases) page
contains binaries that can be run on your computer.

* `cargo install --path .` : Build and install the `function-runner` command.
* `function-runner` : Execute Functions.
To see the list of possible commands and arguments, run `function-runner --help`.

## How to use this repo
## Development

Building requires a rust toolchain of at least `1.56.0` (older may work). `cargo install --path .` will build
and add the `function-runner` command to your path.

### Usage

```
$ function-runner --help
function-runner 3.0.0
Simple function runner which takes JSON as a convenience

USAGE:
function-runner [OPTIONS] <INPUT>

ARGS:
<INPUT> Path to json file containing function input
### Commands

OPTIONS:
-h, --help Print help information
-j, --json Log the run result as a JSON object
-f, --function <FUNCTION> Path to wasm/wat function [default: function.wasm]
-V, --version Print version information
```
- `cargo install --path .` : Build and install the `function-runner` command.
- `function-runner` : Execute a Function.