Skip to content

🚀 Getting Started

Use the Capsule CLI

First, download the last version of the Capsule CLI for the appropriate OS & ARCH (and release version):

1
2
3
VERSION="v0.4.2" OS="linux" ARCH="arm64"
wget -O capsule https://github.com/bots-garden/capsule/releases/download/${VERSION}/capsule-${VERSION}-${OS}-${ARCH}
chmod +x capsule

Run a WASM Capsule module

To run a WASM Capsule module you need to set 2 flags:

  • --wasm: the path to the WASM module
  • --params: the parameter to pass to the WASM module
1
2
3
./capsule \
--wasm=./functions/hello/hello.wasm \
--params="Hello World"

You can remotely download the WASM module with the --url flag:

1
2
3
./capsule \
--url=http://localhost:5000/hello-world.wasm \
--wasm=./tmp/hello-world.wasm 

Develop a WASM Capsule module

Have a look to these samples: