-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support EXTISM_ENABLE_WASI_OUTPUT (#51)
for any program that embeds the Go SDK, ```sh EXTISM_ENABLE_WASI_OUTPUT=1 extism call code.wasm foo --wasi will print things from e.g. fmt.Println (to stdout or stderr as needed) ``` brings the SDK into parity with the Rust runtime which has the same behavior. --------- Co-authored-by: zach <zach@dylibso.com>
- Loading branch information
Showing
5 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
module github.com/extism/extism-sdk-plugins-println | ||
|
||
go 1.21.0 | ||
|
||
toolchain go1.21.1 | ||
|
||
require ( | ||
github.com/extism/go-pdk v1.0.0-rc2 // indirect | ||
github.com/valyala/fastjson v1.6.3 // indirect | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
github.com/extism/go-pdk v0.0.0-20230119214914-65bffbeb3e64 h1:IfR1k741q+yQLvv5sLShCkvt3FgKU4wQVJfp7hhb/iY= | ||
github.com/extism/go-pdk v0.0.0-20230119214914-65bffbeb3e64/go.mod h1:1wdiAoG8306g4WK+6laBrS+75089/0V4XRVTllt8b5U= | ||
github.com/extism/go-pdk v1.0.0-rc1.0.20231019212020-62d54a6e0263 h1:uSo+K1JhsMlamDmaxyAGj0dGExZHLsL+Edyug0dC+uk= | ||
github.com/extism/go-pdk v1.0.0-rc1.0.20231019212020-62d54a6e0263/go.mod h1:Gz+LIU/YCKnKXhgge8yo5Yu1F/lbv7KtKFkiCSzW/P4= | ||
github.com/extism/go-pdk v1.0.0-rc2 h1:EZuo8idErnV8KB8TTSTiO2T1lkX047OQ7K8STjn2WBs= | ||
github.com/extism/go-pdk v1.0.0-rc2/go.mod h1:Gz+LIU/YCKnKXhgge8yo5Yu1F/lbv7KtKFkiCSzW/P4= | ||
github.com/valyala/fastjson v1.6.3 h1:tAKFnnwmeMGPbwJ7IwxcTPCNr3uIzoIj3/Fh90ra4xc= | ||
github.com/valyala/fastjson v1.6.3/go.mod h1:CLCAqky6SMuOcxStkYQvblddUtoRxhYMGLrsQns1aXY= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
|
||
pdk "github.com/extism/go-pdk" | ||
) | ||
|
||
//export run_test | ||
func run_test() int32 { | ||
input := pdk.InputString() | ||
fmt.Println("this was printed from the plugin", input) | ||
return 0 | ||
} | ||
|
||
func main() {} |
Binary file not shown.