extism / cli

The extism CLI is used to generate plugin scaffolding and manage Extism installations
BSD 3-Clause "New" or "Revised" License
21 stars 7 forks source link

idea: add an extism plug-in system #1

Closed nilslice closed 2 years ago

nilslice commented 2 years ago

@bhelx brought up a great feature in the Discord and I'm logging it here for posterity.

Is there a way to load a plugin into the runtime and invoke a function from the command line? I could how it might be a bit too early for that. But it would be useful when testing plugins.

Though maybe a bit limited, it's possible to add functionality here so that someone could run:

extism --load plugin.wasm --input '{"a": true}' call "is_it_true"

# or from stdin

echo '{"a": true}' | extism --load plugin.wasm call "is_it_true"

to test out their plugin in development.