Skip to content

feat: DX runSimple, RunOptions, key helpers, 00_minimal - #21

Merged
debuggerdragon311 merged 4 commits into
mainfrom
dev
Jun 13, 2026
Merged

feat: DX runSimple, RunOptions, key helpers, 00_minimal#21
debuggerdragon311 merged 4 commits into
mainfrom
dev

Conversation

@debuggerdragon311

Copy link
Copy Markdown
Member
  • widget.key expported from widget root with isQuit, isUp, isDown, isLeft, isRight helpers — removes per-app boilerplate navigation functions
  • RunOptions struct (alt_screen, fps, mouse, hide_cursor) — terminal behaviour configurable without manual escape sequences in main()
  • runImpl extracted, runOpts added, run() kept as compat shim — no existing callers break
  • runSimple — handles arena, process exit, and terminal cleanup. main() becomes 2 lines
  • examples/00_minimal — demonstrates the new floor

Type of change

  • New featuri
  • Docs or examples only

Checklist

  • zig build test passes on my machine
  • zig fmt src/ examples/ build.zig has been run
  • New public functions have doc comments
  • No new cycle in the module dependency graph
  • I can explain every line in this diff, including anything a model wrote

Notes for reviewers
run() is now a shim forwarding to runImpl with RunOptions{}, all defaults match previous hardcoded behaviour so existing apps compile unchanged. runOpts exists for callers who manage their own allocator. runSimple is the recommended entry point for new apps going forward. The sys.write newline in runSimple before exit(0) prevents the shell % partial-line indicator..

@debuggerdragon311 debuggerdragon311 self-assigned this Jun 13, 2026
@debuggerdragon311 debuggerdragon311 added the bug Something isn't working label Jun 13, 2026
@debuggerdragon311
debuggerdragon311 requested a review from a team as a code owner June 13, 2026 06:47
@debuggerdragon311 debuggerdragon311 added the enhancement New feature or request label Jun 13, 2026
@debuggerdragon311
debuggerdragon311 merged commit 885c6c7 into main Jun 13, 2026
2 checks passed
@debuggerdragon311
debuggerdragon311 deleted the dev branch June 13, 2026 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant