extapprun

package
v1.0.260758 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 30, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package extapprun lets any pkg/uiapp.App run as a standalone out-of-process TTYPE Desk app — speaking the NDJSON protocol documented in docs/extapp.md over its own stdin/stdout — instead of being linked into the main ttypedesk binary. Call Run from main() and nothing else; it owns stdin/stdout for the life of the process.

This generalizes cmd/extapp-hello's hand-written protocol state machine into something any existing uiapp.App can reuse verbatim: an app written against the in-process App SDK needs zero changes to also run this way (see cmd/matrixchat, which is exactly apps/matrixchat.New() passed to Run — the app package itself never mentions this protocol).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(app uiapp.App) error

Run drives app as a standalone extapp binary over the real os.Stdin/ os.Stdout. Blocks until stdin closes (the host tore the window down — see docs/extapp.md's lifecycle) or the app's own Init/Handle/Draw causes a crash (in which case a ready{err} is sent and Run returns that error, mirroring how an in-process app panicking in Init marks the window crashed instead of taking the whole desktop down).

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL