mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-13 23:43:40 +00:00
internal/{cm,wasi}: regenerate WASI 0.2 bindings with wasm-tools-go v0.3.0
This commit is contained in:
+2099
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,21 @@
|
||||
// Code generated by wit-bindgen-go. DO NOT EDIT.
|
||||
|
||||
package environment
|
||||
|
||||
import (
|
||||
"internal/cm"
|
||||
)
|
||||
|
||||
// This file contains wasmimport and wasmexport declarations for "wasi:cli@0.2.0".
|
||||
|
||||
//go:wasmimport wasi:cli/environment@0.2.0 get-environment
|
||||
//go:noescape
|
||||
func wasmimport_GetEnvironment(result *cm.List[[2]string])
|
||||
|
||||
//go:wasmimport wasi:cli/environment@0.2.0 get-arguments
|
||||
//go:noescape
|
||||
func wasmimport_GetArguments(result *cm.List[string])
|
||||
|
||||
//go:wasmimport wasi:cli/environment@0.2.0 initial-cwd
|
||||
//go:noescape
|
||||
func wasmimport_InitialCWD(result *cm.Option[string])
|
||||
@@ -26,10 +26,6 @@ func GetEnvironment() (result cm.List[[2]string]) {
|
||||
return
|
||||
}
|
||||
|
||||
//go:wasmimport wasi:cli/environment@0.2.0 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.
|
||||
@@ -42,10 +38,6 @@ func GetArguments() (result cm.List[string]) {
|
||||
return
|
||||
}
|
||||
|
||||
//go:wasmimport wasi:cli/environment@0.2.0 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
|
||||
@@ -58,7 +50,3 @@ func InitialCWD() (result cm.Option[string]) {
|
||||
wasmimport_InitialCWD(&result)
|
||||
return
|
||||
}
|
||||
|
||||
//go:wasmimport wasi:cli/environment@0.2.0 initial-cwd
|
||||
//go:noescape
|
||||
func wasmimport_InitialCWD(result *cm.Option[string])
|
||||
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// Code generated by wit-bindgen-go. DO NOT EDIT.
|
||||
|
||||
package exit
|
||||
|
||||
// This file contains wasmimport and wasmexport declarations for "wasi:cli@0.2.0".
|
||||
|
||||
//go:wasmimport wasi:cli/exit@0.2.0 exit
|
||||
//go:noescape
|
||||
func wasmimport_Exit(status0 uint32)
|
||||
@@ -19,7 +19,3 @@ func Exit(status cm.BoolResult) {
|
||||
wasmimport_Exit((uint32)(status0))
|
||||
return
|
||||
}
|
||||
|
||||
//go:wasmimport wasi:cli/exit@0.2.0 exit
|
||||
//go:noescape
|
||||
func wasmimport_Exit(status0 uint32)
|
||||
|
||||
Executable
+17
@@ -0,0 +1,17 @@
|
||||
// Code generated by wit-bindgen-go. DO NOT EDIT.
|
||||
|
||||
package run
|
||||
|
||||
import (
|
||||
"internal/cm"
|
||||
)
|
||||
|
||||
// This file contains wasmimport and wasmexport declarations for "wasi:cli@0.2.0".
|
||||
|
||||
//go:wasmexport wasi:cli/run@0.2.0#run
|
||||
//export wasi:cli/run@0.2.0#run
|
||||
func wasmexport_Run() (result0 uint32) {
|
||||
result := Exports.Run()
|
||||
result0 = cm.BoolToU32(result)
|
||||
return
|
||||
}
|
||||
@@ -2,15 +2,3 @@
|
||||
|
||||
// Package run represents the exported interface "wasi:cli/run@0.2.0".
|
||||
package run
|
||||
|
||||
import (
|
||||
"internal/cm"
|
||||
)
|
||||
|
||||
//go:wasmexport wasi:cli/run@0.2.0#run
|
||||
//export wasi:cli/run@0.2.0#run
|
||||
func wasmexport_Run() (result0 uint32) {
|
||||
result := Exports.Run()
|
||||
result0 = cm.BoolToU32(result)
|
||||
return
|
||||
}
|
||||
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// Code generated by wit-bindgen-go. DO NOT EDIT.
|
||||
|
||||
package stderr
|
||||
|
||||
// This file contains wasmimport and wasmexport declarations for "wasi:cli@0.2.0".
|
||||
|
||||
//go:wasmimport wasi:cli/stderr@0.2.0 get-stderr
|
||||
//go:noescape
|
||||
func wasmimport_GetStderr() (result0 uint32)
|
||||
@@ -8,17 +8,18 @@ import (
|
||||
"internal/wasi/io/v0.2.0/streams"
|
||||
)
|
||||
|
||||
// OutputStream represents the imported type alias "wasi:cli/stderr@0.2.0#output-stream".
|
||||
//
|
||||
// See [streams.OutputStream] for more information.
|
||||
type OutputStream = streams.OutputStream
|
||||
|
||||
// GetStderr represents the imported function "get-stderr".
|
||||
//
|
||||
// get-stderr: func() -> output-stream
|
||||
//
|
||||
//go:nosplit
|
||||
func GetStderr() (result streams.OutputStream) {
|
||||
func GetStderr() (result OutputStream) {
|
||||
result0 := wasmimport_GetStderr()
|
||||
result = cm.Reinterpret[streams.OutputStream]((uint32)(result0))
|
||||
result = cm.Reinterpret[OutputStream]((uint32)(result0))
|
||||
return
|
||||
}
|
||||
|
||||
//go:wasmimport wasi:cli/stderr@0.2.0 get-stderr
|
||||
//go:noescape
|
||||
func wasmimport_GetStderr() (result0 uint32)
|
||||
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// Code generated by wit-bindgen-go. DO NOT EDIT.
|
||||
|
||||
package stdin
|
||||
|
||||
// This file contains wasmimport and wasmexport declarations for "wasi:cli@0.2.0".
|
||||
|
||||
//go:wasmimport wasi:cli/stdin@0.2.0 get-stdin
|
||||
//go:noescape
|
||||
func wasmimport_GetStdin() (result0 uint32)
|
||||
@@ -8,17 +8,18 @@ import (
|
||||
"internal/wasi/io/v0.2.0/streams"
|
||||
)
|
||||
|
||||
// InputStream represents the imported type alias "wasi:cli/stdin@0.2.0#input-stream".
|
||||
//
|
||||
// See [streams.InputStream] for more information.
|
||||
type InputStream = streams.InputStream
|
||||
|
||||
// GetStdin represents the imported function "get-stdin".
|
||||
//
|
||||
// get-stdin: func() -> input-stream
|
||||
//
|
||||
//go:nosplit
|
||||
func GetStdin() (result streams.InputStream) {
|
||||
func GetStdin() (result InputStream) {
|
||||
result0 := wasmimport_GetStdin()
|
||||
result = cm.Reinterpret[streams.InputStream]((uint32)(result0))
|
||||
result = cm.Reinterpret[InputStream]((uint32)(result0))
|
||||
return
|
||||
}
|
||||
|
||||
//go:wasmimport wasi:cli/stdin@0.2.0 get-stdin
|
||||
//go:noescape
|
||||
func wasmimport_GetStdin() (result0 uint32)
|
||||
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// Code generated by wit-bindgen-go. DO NOT EDIT.
|
||||
|
||||
package stdout
|
||||
|
||||
// This file contains wasmimport and wasmexport declarations for "wasi:cli@0.2.0".
|
||||
|
||||
//go:wasmimport wasi:cli/stdout@0.2.0 get-stdout
|
||||
//go:noescape
|
||||
func wasmimport_GetStdout() (result0 uint32)
|
||||
@@ -8,17 +8,18 @@ import (
|
||||
"internal/wasi/io/v0.2.0/streams"
|
||||
)
|
||||
|
||||
// OutputStream represents the imported type alias "wasi:cli/stdout@0.2.0#output-stream".
|
||||
//
|
||||
// See [streams.OutputStream] for more information.
|
||||
type OutputStream = streams.OutputStream
|
||||
|
||||
// GetStdout represents the imported function "get-stdout".
|
||||
//
|
||||
// get-stdout: func() -> output-stream
|
||||
//
|
||||
//go:nosplit
|
||||
func GetStdout() (result streams.OutputStream) {
|
||||
func GetStdout() (result OutputStream) {
|
||||
result0 := wasmimport_GetStdout()
|
||||
result = cm.Reinterpret[streams.OutputStream]((uint32)(result0))
|
||||
result = cm.Reinterpret[OutputStream]((uint32)(result0))
|
||||
return
|
||||
}
|
||||
|
||||
//go:wasmimport wasi:cli/stdout@0.2.0 get-stdout
|
||||
//go:noescape
|
||||
func wasmimport_GetStdout() (result0 uint32)
|
||||
|
||||
@@ -30,7 +30,3 @@ func (self TerminalInput) ResourceDrop() {
|
||||
wasmimport_TerminalInputResourceDrop((uint32)(self0))
|
||||
return
|
||||
}
|
||||
|
||||
//go:wasmimport wasi:cli/terminal-input@0.2.0 [resource-drop]terminal-input
|
||||
//go:noescape
|
||||
func wasmimport_TerminalInputResourceDrop(self0 uint32)
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
// Code generated by wit-bindgen-go. DO NOT EDIT.
|
||||
|
||||
package terminalinput
|
||||
|
||||
// This file contains wasmimport and wasmexport declarations for "wasi:cli@0.2.0".
|
||||
|
||||
//go:wasmimport wasi:cli/terminal-input@0.2.0 [resource-drop]terminal-input
|
||||
//go:noescape
|
||||
func wasmimport_TerminalInputResourceDrop(self0 uint32)
|
||||
@@ -30,7 +30,3 @@ func (self TerminalOutput) ResourceDrop() {
|
||||
wasmimport_TerminalOutputResourceDrop((uint32)(self0))
|
||||
return
|
||||
}
|
||||
|
||||
//go:wasmimport wasi:cli/terminal-output@0.2.0 [resource-drop]terminal-output
|
||||
//go:noescape
|
||||
func wasmimport_TerminalOutputResourceDrop(self0 uint32)
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
// Code generated by wit-bindgen-go. DO NOT EDIT.
|
||||
|
||||
package terminaloutput
|
||||
|
||||
// This file contains wasmimport and wasmexport declarations for "wasi:cli@0.2.0".
|
||||
|
||||
//go:wasmimport wasi:cli/terminal-output@0.2.0 [resource-drop]terminal-output
|
||||
//go:noescape
|
||||
func wasmimport_TerminalOutputResourceDrop(self0 uint32)
|
||||
@@ -11,6 +11,11 @@ import (
|
||||
terminaloutput "internal/wasi/cli/v0.2.0/terminal-output"
|
||||
)
|
||||
|
||||
// TerminalOutput represents the imported type alias "wasi:cli/terminal-stderr@0.2.0#terminal-output".
|
||||
//
|
||||
// See [terminaloutput.TerminalOutput] for more information.
|
||||
type TerminalOutput = terminaloutput.TerminalOutput
|
||||
|
||||
// GetTerminalStderr represents the imported function "get-terminal-stderr".
|
||||
//
|
||||
// If stderr is connected to a terminal, return a `terminal-output` handle
|
||||
@@ -19,11 +24,7 @@ import (
|
||||
// get-terminal-stderr: func() -> option<terminal-output>
|
||||
//
|
||||
//go:nosplit
|
||||
func GetTerminalStderr() (result cm.Option[terminaloutput.TerminalOutput]) {
|
||||
func GetTerminalStderr() (result cm.Option[TerminalOutput]) {
|
||||
wasmimport_GetTerminalStderr(&result)
|
||||
return
|
||||
}
|
||||
|
||||
//go:wasmimport wasi:cli/terminal-stderr@0.2.0 get-terminal-stderr
|
||||
//go:noescape
|
||||
func wasmimport_GetTerminalStderr(result *cm.Option[terminaloutput.TerminalOutput])
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
// Code generated by wit-bindgen-go. DO NOT EDIT.
|
||||
|
||||
package terminalstderr
|
||||
|
||||
import (
|
||||
"internal/cm"
|
||||
)
|
||||
|
||||
// This file contains wasmimport and wasmexport declarations for "wasi:cli@0.2.0".
|
||||
|
||||
//go:wasmimport wasi:cli/terminal-stderr@0.2.0 get-terminal-stderr
|
||||
//go:noescape
|
||||
func wasmimport_GetTerminalStderr(result *cm.Option[TerminalOutput])
|
||||
@@ -11,6 +11,11 @@ import (
|
||||
terminalinput "internal/wasi/cli/v0.2.0/terminal-input"
|
||||
)
|
||||
|
||||
// TerminalInput represents the imported type alias "wasi:cli/terminal-stdin@0.2.0#terminal-input".
|
||||
//
|
||||
// See [terminalinput.TerminalInput] for more information.
|
||||
type TerminalInput = terminalinput.TerminalInput
|
||||
|
||||
// GetTerminalStdin represents the imported function "get-terminal-stdin".
|
||||
//
|
||||
// If stdin is connected to a terminal, return a `terminal-input` handle
|
||||
@@ -19,11 +24,7 @@ import (
|
||||
// get-terminal-stdin: func() -> option<terminal-input>
|
||||
//
|
||||
//go:nosplit
|
||||
func GetTerminalStdin() (result cm.Option[terminalinput.TerminalInput]) {
|
||||
func GetTerminalStdin() (result cm.Option[TerminalInput]) {
|
||||
wasmimport_GetTerminalStdin(&result)
|
||||
return
|
||||
}
|
||||
|
||||
//go:wasmimport wasi:cli/terminal-stdin@0.2.0 get-terminal-stdin
|
||||
//go:noescape
|
||||
func wasmimport_GetTerminalStdin(result *cm.Option[terminalinput.TerminalInput])
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
// Code generated by wit-bindgen-go. DO NOT EDIT.
|
||||
|
||||
package terminalstdin
|
||||
|
||||
import (
|
||||
"internal/cm"
|
||||
)
|
||||
|
||||
// This file contains wasmimport and wasmexport declarations for "wasi:cli@0.2.0".
|
||||
|
||||
//go:wasmimport wasi:cli/terminal-stdin@0.2.0 get-terminal-stdin
|
||||
//go:noescape
|
||||
func wasmimport_GetTerminalStdin(result *cm.Option[TerminalInput])
|
||||
@@ -11,6 +11,11 @@ import (
|
||||
terminaloutput "internal/wasi/cli/v0.2.0/terminal-output"
|
||||
)
|
||||
|
||||
// TerminalOutput represents the imported type alias "wasi:cli/terminal-stdout@0.2.0#terminal-output".
|
||||
//
|
||||
// See [terminaloutput.TerminalOutput] for more information.
|
||||
type TerminalOutput = terminaloutput.TerminalOutput
|
||||
|
||||
// GetTerminalStdout represents the imported function "get-terminal-stdout".
|
||||
//
|
||||
// If stdout is connected to a terminal, return a `terminal-output` handle
|
||||
@@ -19,11 +24,7 @@ import (
|
||||
// get-terminal-stdout: func() -> option<terminal-output>
|
||||
//
|
||||
//go:nosplit
|
||||
func GetTerminalStdout() (result cm.Option[terminaloutput.TerminalOutput]) {
|
||||
func GetTerminalStdout() (result cm.Option[TerminalOutput]) {
|
||||
wasmimport_GetTerminalStdout(&result)
|
||||
return
|
||||
}
|
||||
|
||||
//go:wasmimport wasi:cli/terminal-stdout@0.2.0 get-terminal-stdout
|
||||
//go:noescape
|
||||
func wasmimport_GetTerminalStdout(result *cm.Option[terminaloutput.TerminalOutput])
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
// Code generated by wit-bindgen-go. DO NOT EDIT.
|
||||
|
||||
package terminalstdout
|
||||
|
||||
import (
|
||||
"internal/cm"
|
||||
)
|
||||
|
||||
// This file contains wasmimport and wasmexport declarations for "wasi:cli@0.2.0".
|
||||
|
||||
//go:wasmimport wasi:cli/terminal-stdout@0.2.0 get-terminal-stdout
|
||||
//go:noescape
|
||||
func wasmimport_GetTerminalStdout(result *cm.Option[TerminalOutput])
|
||||
Reference in New Issue
Block a user