From 9ea635fc4cd1edd7982b0fd2a7d54a0539c157e1 Mon Sep 17 00:00:00 2001 From: Gavin Hayes Date: Tue, 14 Jan 2025 22:45:32 -0500 Subject: [PATCH] feat: enable wasi output to ease debugging (esp. python-pdk) --- call.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/call.go b/call.go index dab2a21..6c04551 100644 --- a/call.go +++ b/call.go @@ -246,6 +246,14 @@ func runCall(cmd *cobra.Command, call *callArgs) error { } if globalPlugin == nil { + if pluginConfig.EnableWasi { + _, wasiOutput := os.LookupEnv("EXTISM_ENABLE_WASI_OUTPUT") + if ! wasiOutput { + Log("Setting EXTISM_ENABLE_WASI_OUTPUT") + os.Setenv("EXTISM_ENABLE_WASI_OUTPUT", "1") + } + } + Log("Creating plugin") globalPlugin, err = extism.NewPlugin(ctx, manifest, pluginConfig, []extism.HostFunction{}) if err != nil {