Skip to content

Commit

Permalink
feat: enable wasi output to ease debugging (esp. python-pdk)
Browse files Browse the repository at this point in the history
  • Loading branch information
G4Vi committed Jan 15, 2025
1 parent 3b84984 commit 508bff8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions call.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 508bff8

Please sign in to comment.