mirror of
https://github.com/anomalyco/opentui.git
synced 2026-04-24 20:45:56 +03:00
[GH-ISSUE #355] Feature request: Remove top-level await to enable bytecode compilation #92
Labels
No labels
bug
core
documentation
feature
good first issue
help wanted
pull-request
question
react
solid
tmux
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/opentui#92
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @remorses on GitHub (Nov 27, 2025).
Original GitHub issue: https://github.com/anomalyco/opentui/issues/355
Bun's bytecode compilation reduces startup from ~520ms to ~44ms but requires no top-level await. This is blocking https://github.com/sst/opencode/issues/4843
There are 3 top-level await locations:
yoga-layout WASM
github.com/sst/opentui@5dbe0b4be9/packages/core/src/index.ts (L18)yoga-layout uses async
WebAssembly.instantiate()internally. Consider using FFI to native Yoga instead.Platform import
github.com/sst/opentui@5dbe0b4be9/packages/core/src/zig.ts (L22)Can use sync
require()instead.Native lib path resolution
github.com/sst/opentui@5dbe0b4be9/packages/core/scripts/build.ts (L139-L142)Can use sync
require.resolve()instead.The platform import and native lib path are straightforward. Yoga is the main blocker.