Using Other Languages
Follow the instructions below if you're using any of the other Extism supported plug-in languages:
-
Invoke the
xtp plugin init
command using the XTP CLI and then select the Host App and Extension Point where you want to install the plug-in. -
The CLI will then generate an
xtp.toml
file that provides all the metadata required to make sure your plug-in gets to the right place as well as a markdown file (XTP-PLUGIN-INIT.md
) containing further instructions to prepare your plug-in for installation. -
Follow the instructions in
XTP-PLUGIN-INIT.md
, and make sure you install any programming language compilers/tooling needed. The PDK docs are comprehensive and offer a quickstart to help kick things off.
An example xtp.toml
should look like:
xtp.toml
app_id = "app_01htbeeftzfqgbeefmxcn7pzbg"
# This is where 'xtp plugin push' expects to find the wasm file after the build script has run.
bin = "plugin.wasm"
extension_point_ids = ["ext_01beef06nkfbeefw06dycfbeef"]
[scripts]
# xtp plugin build runs this script to generate the wasm file, e.g.
# build="tinygo build -o plugin.wasm -target wasi main.go"
build = ""