Tested with Extism Python PDK commit 967e40d9, Extism CLI v1.5.4.
-
Open this repo in devcontainer, e.g. using Github Codespaces. Type or copy/paste following commands to devcontainer's terminal.
-
Install extism-python-pdk and its dependencies like Binaryen's wasm-merge and wasm-opt by invoking the official installation script:
curl -sSL -O https://github.com/extism/python-pdk/raw/967e40d9355707b509a78090b150079ed08878bd/install.sh
sh install.sh
- Compile the example by using just-installed
extism-py
binary:
extism-py httpget.py -o HTTPRequestingPlugin.wasm
For testing purposes, you can invoke functions from Extism plugins with Extism CLI.
- Install
Extism CLI
from Github releases:
wget https://github.com/extism/cli/releases/download/v1.5.4/extism-v1.5.4-linux-amd64.tar.gz -O /tmp/extism.tar.gz
tar -xzf /tmp/extism.tar.gz -C /tmp ; mv /tmp/extism .
And now you have extism
binary in current folder.
- Run
httpget
function from extism plugin with CLI, allowing outbound connections to all hosts:
./extism call HTTPRequestingPlugin.wasm httpget --allow-host '*' --wasi
Perform your own experiments if desired.
Created for (wannabe-awesome) list