This is a Spin plugin that helps with the inner loop of Spin plugin development by creating the tar file and manifest for you.
Latest release:
spin plugins install pluginify
From source:
git checkout https://github.com/itowlson/spin-pluginify
cd spin-pluginify
cargo build --release
./target/release/pluginify --install
For your plugin, create a spin-pluginify.toml
file with the following content:
name = "<PLUGIN-NAME>"
version = "0.1"
spin_compatibility = ">=0.7"
license = "Apache-2.0"
package = "<./PATH/TO/EXECUTABLE>"
# optional - if present these files will be added to the plugin tar file
assets = [ "path/to/asset/1", "path/to/asset/2" ]
You can find examples in this repo and in https://github.com/fermyon/spin-trigger-sqs.
When you have a new build of your plugin ready, run:
spin pluginify --install
Your plugin should then be installed in Spin and ready to test.
Alternatively, you can just package by running spin pluginify
. This creates (or updates) a <PLUGIN-NAME>.tar.gz
file and a <PLUGIN-NAME>.json
manifest. You can then run spin plugins install --file <PLUGIN-NAME>.json --yes
to install that package into Spin.
To install an executable as a Spin plugin without creating a spin-pluginify.toml
, run spin pluginify --immediate <PATH/TO/EXECUTABLE> --install
.
(This is great for one-off experiments, but if you're iterating on the plugin then create a spin-pluginify.toml
and save yourself typing the path all the time eh.)
Error handling is a bit patchy at the moment. Please raise an issue if you find an error which is cryptic, or panicky, or shouldn't be an error at all!