aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/internal/wasi/cli/v0.2.0/environment/environment.wit.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/internal/wasi/cli/v0.2.0/environment/environment.wit.go')
-rw-r--r--src/internal/wasi/cli/v0.2.0/environment/environment.wit.go66
1 files changed, 66 insertions, 0 deletions
diff --git a/src/internal/wasi/cli/v0.2.0/environment/environment.wit.go b/src/internal/wasi/cli/v0.2.0/environment/environment.wit.go
new file mode 100644
index 000000000..b75e74b18
--- /dev/null
+++ b/src/internal/wasi/cli/v0.2.0/environment/environment.wit.go
@@ -0,0 +1,66 @@
+// Code generated by wit-bindgen-go. DO NOT EDIT.
+
+//go:build !wasip1
+
+// Package environment represents the imported interface "wasi:cli/[email protected]".
+package environment
+
+import (
+ "github.com/ydnar/wasm-tools-go/cm"
+)
+
+// GetEnvironment represents the imported function "get-environment".
+//
+// Get the POSIX-style environment variables.
+//
+// Each environment variable is provided as a pair of string variable names
+// and string value.
+//
+// Morally, these are a value import, but until value imports are available
+// in the component model, this import function should return the same
+// values each time it is called.
+//
+// get-environment: func() -> list<tuple<string, string>>
+//
+//go:nosplit
+func GetEnvironment() (result cm.List[[2]string]) {
+ wasmimport_GetEnvironment(&result)
+ return
+}
+
+//go:wasmimport wasi:cli/[email protected] get-environment
+//go:noescape
+func wasmimport_GetEnvironment(result *cm.List[[2]string])
+
+// GetArguments represents the imported function "get-arguments".
+//
+// Get the POSIX-style arguments to the program.
+//
+// get-arguments: func() -> list<string>
+//
+//go:nosplit
+func GetArguments() (result cm.List[string]) {
+ wasmimport_GetArguments(&result)
+ return
+}
+
+//go:wasmimport wasi:cli/[email protected] get-arguments
+//go:noescape
+func wasmimport_GetArguments(result *cm.List[string])
+
+// InitialCWD represents the imported function "initial-cwd".
+//
+// Return a path that programs should use as their initial current working
+// directory, interpreting `.` as shorthand for this.
+//
+// initial-cwd: func() -> option<string>
+//
+//go:nosplit
+func InitialCWD() (result cm.Option[string]) {
+ wasmimport_InitialCWD(&result)
+ return
+}
+
+//go:wasmimport wasi:cli/[email protected] initial-cwd
+//go:noescape
+func wasmimport_InitialCWD(result *cm.Option[string])