Setup
To create a custom plugin template, create a fork of thetemplates git repository.
Once the repo has been forked into your company or personal account, you can begin editing the templates directory to fit your needs.
For now, you are limited to one template per language, but in the future you’ll be able to create a set of templates for your users to choose from.
AssemblyScript
Edittemplates/assemblyscript/src/lib.ts to change what your users will see when they create a new AssemblyScript plugin. If you’d like to transform the data that the user’s run plugin will receive before it is called, edit both templates/assemblyscript/src/custom.ts and templates/assemblyscript/src/lib.ts and ensure that the type signatures match.
Rust
Edittemplates/rust/src/lib.rs.tmpl to change what your users will see when they create a new Rust plugin. In the future, you’ll be able to transform the data passed to the user’s run plugin.
Configuring SE2
To use the custom templates in your SE2 installation, theSE2_TEMPLATES_REPO environment variable must be set on the builder service.
- For a local deployment, edit
docker-compose.ymlto addSE2_TEMPLATES_REPO:to the builder with the value set to your fork (e.g.example-co/plugin-templates) - For a cloud deployment, edit
suborbital/se2-controlplane.yaml, and add the following to thebuildercontainer’senvironment:
kubectl apply -f .suborbital/ to apply the change.
