Closed bhelx closed 1 month ago
This adds a shell command and persists the plugin across calls. This is helpful for testing a plugin with state. Example:
shell
$ extism shell > extism call /Users/ben/dylibso/js-pdk/examples/react.wasm render --wasi <div style="background-color:lightblue"><p>Hello</p></div> > extism call /Users/ben/dylibso/js-pdk/examples/react.wasm setState --input='{"type": "SET_SETTING", "payload": { "backgroundColor": "tomato" }}' --wasi <div style="background-color:tomato"><p>Hello</p></div> > extism call /Users/ben/dylibso/js-pdk/examples/react.wasm render --wasi <div style="background-color:tomato"><p>Hello</p></div>
Note: I am aware of the loop flag but this allows more complicated scenarios
loop
This adds a
shell
command and persists the plugin across calls. This is helpful for testing a plugin with state. Example: