Documentation
¶
Overview ¶
Package entry dispatches fast-path entry points before any heavy initialization runs, and records time to first paint.
A warm Rex overlay, a Go process and a bubbletea first frame cost about 85ms before any application work. Everything a fast path does before its first paint adds to that floor, so main calls Dispatch before touching discovery, git, watchers or config, and defers that work until MarkPainted.
if code, ok := router.Dispatch(os.Args[1:]); ok {
os.Exit(code)
}
Index ¶
Constants ¶
const EnvTTFP = "REXUIKIT_TTFP"
EnvTTFP names a file that receives one line per run: entry=<name> ttfp_ms=<n>.
Variables ¶
This section is empty.
Functions ¶
func Deferred ¶
func Deferred(fn func())
Deferred runs fn once after the first MarkPainted. A process that exits before paint drops it without waiting.
func MarkPainted ¶
func MarkPainted()
MarkPainted reports the first non-empty frame. Call it once after the first render; later calls are no-ops.
Types ¶
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
Router maps entry names to boot functions. The zero value is ready to use.