mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-22 05:19:03 +00:00
wasi preview 2 support (#4027)
* all: wasip2 support Co-authored-by: Randy Reddig <randy.reddig@fastly.com>
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
// Code generated by wit-bindgen-go. DO NOT EDIT.
|
||||
|
||||
//go:build !wasip1
|
||||
|
||||
// Package terminalstdin represents the imported interface "wasi:cli/terminal-stdin@0.2.0".
|
||||
//
|
||||
// An interface providing an optional `terminal-input` for stdin as a
|
||||
// link-time authority.
|
||||
package terminalstdin
|
||||
|
||||
import (
|
||||
"github.com/ydnar/wasm-tools-go/cm"
|
||||
terminalinput "internal/wasi/cli/v0.2.0/terminal-input"
|
||||
)
|
||||
|
||||
// GetTerminalStdin represents the imported function "get-terminal-stdin".
|
||||
//
|
||||
// If stdin is connected to a terminal, return a `terminal-input` handle
|
||||
// allowing further interaction with it.
|
||||
//
|
||||
// get-terminal-stdin: func() -> option<terminal-input>
|
||||
//
|
||||
//go:nosplit
|
||||
func GetTerminalStdin() (result cm.Option[terminalinput.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])
|
||||
Reference in New Issue
Block a user