From 7b225fddfb08b108336635dbc406c1aace70745c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donatas=20Rasiukevi=C4=8Dius?= Date: Thu, 28 Nov 2024 07:31:15 +0100 Subject: [PATCH 1/2] fix configs example --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 765ac21..ff74161 100644 --- a/README.md +++ b/README.md @@ -186,7 +186,7 @@ import extism @extism.plugin_fn def greet(): - user = extism.Config.get("user") + user = extism.Config.get_str("user") extism.output_str(f"Hello, {user}!") ``` From 624d3d49fe84fa0b6a43f1e3ccbf88f86700afe0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donatas=20Rasiukevi=C4=8Dius?= Date: Thu, 28 Nov 2024 07:34:37 +0100 Subject: [PATCH 2/2] add docs + setup for improving debugging --- .envrc.example | 1 + .gitignore | 1 + README.md | 5 +++++ 3 files changed, 7 insertions(+) create mode 100644 .envrc.example diff --git a/.envrc.example b/.envrc.example new file mode 100644 index 0000000..58ce7aa --- /dev/null +++ b/.envrc.example @@ -0,0 +1 @@ +export EXTISM_ENABLE_WASI_OUTPUT=1 # Enable WASI output for debugging \ No newline at end of file diff --git a/.gitignore b/.gitignore index 87e7d02..c2d6cda 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ target Cargo.lock extism-py examples/*.wasm +.envrc \ No newline at end of file diff --git a/README.md b/README.md index ff74161..a4d0cc1 100644 --- a/README.md +++ b/README.md @@ -349,6 +349,11 @@ extism call out.wasm count_vowels --wasi --input='Hello World Test!' # => "{\"count\":4}" ``` +### Debugging + +To improve your debugging experience and get more information for panics +and crashes, you should set the `EXTISM_ENABLE_WASI_OUTPUT` env var. + ## How it works This works a little differently than other PDKs. You cannot compile Python to