Skip to content

Commit

Permalink
Add install instructions to base README and add cargo-component prere…
Browse files Browse the repository at this point in the history
…quisite to example app README

Signed-off-by: Kate Goldenring <[email protected]>
  • Loading branch information
kate-goldenring committed Jun 24, 2024
1 parent 78aa2b3 commit 45383f7
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
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.

18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
# Spin `command` Trigger

This is a very simple Spin trigger that executes the WASI main function.

## Installation

The trigger is installed as a Spin plugin. It can be installed from a release or build.

To install from a release, reference a plugin manifest from a [release](https://github.com/fermyon/spin-trigger-command/releases). For example, to install the canary release:

```sh
spin plugins install --from https://github.com/fermyon/spin-trigger-command/releases/download/canary/trigger-command.json
```

Alternatively, use the `spin pluginify` plugin to install from a fresh build. This will use the pluginify manifest (`spin-pluginify.toml`) to package the plugin and proceed to install it:

```sh
spin plugins install pluginify
cargo build --release
spin pluginify install
```
13 changes: 13 additions & 0 deletions example/hello-world/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Hello World Command Spin App

## Prerequisites

1. Install [`cargo-component`](https://github.com/bytecodealliance/cargo-component) with a version that is compatible with WASI 0.2.0
(at least `v0.7.0`).

## Running

```sh
$ spin build --up
Hello, world!
```

0 comments on commit 45383f7

Please sign in to comment.