Provide the platform input/signal stubs on wasip1/wasip2 (#1767)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com> Co-authored-by: Drew Smirnoff <drew@charm.land>
This commit is contained in:
parent
9806b0c763
commit
73b79b3737
2 changed files with 18 additions and 0 deletions
6
signals_other.go
Normal file
6
signals_other.go
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
//go:build wasip1 || wasip2
|
||||
|
||||
package tea
|
||||
|
||||
// listenForResize on WASI: no SIGWINCH; report immediately done.
|
||||
func (p *Program) listenForResize(done chan struct{}) { close(done) }
|
||||
12
tty_other.go
Normal file
12
tty_other.go
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
//go:build wasip1 || wasip2
|
||||
|
||||
package tea
|
||||
|
||||
// initInput on WASI: there is no raw mode and no /dev/tty; the program
|
||||
// runs with non-TTY (pipe) input, which Bubble Tea supports natively.
|
||||
func (p *Program) initInput() (err error) { return nil }
|
||||
|
||||
// suspendSupported: no SIGTSTP or process groups on WASI.
|
||||
const suspendSupported = false
|
||||
|
||||
func suspendProcess() {}
|
||||
Loading…
Reference in a new issue