bext-lite: single binary

One PRISM app, packed into a single self-contained executable (~7 MB) that runs natively on QuickJS — no Node, no Electron, no external dist dir. The same source targets native, desktop, edge, WASM, mobile and embedded.

Tip
Verified end to end: sites/lite exported → packed to /tmp/myapp (7.1 MB) → run with no dist argument → / and /targets return 200, QuickJS render in 12 ms. Host 6.27 MB → packed 7.1 MB. The payload format matches Bun's EOF-trailer fallback; an ELF/Mach-O section variant (zero-I/O boot + code signing) is planned.

Pack & run

shellCode
# 1) export a PRISM app to a portable bundle (HTML + JS + assets)
bext-lite-build sites/my-app -o dist-lite

# 2) pack it INTO a copy of the bext-lite host binary (EOF trailer)
bext-lite pack dist-lite --out myapp
#  packed dist-lite -> myapp (7.1 MB, self-contained)

# 3) run the single binary — NO dist dir, NO Node, NO Electron
./myapp --port 8799
#  bext-lite: serving embedded app
#   12ms  GET / -> 200   (QuickJS render)

How it works

layoutCode
// Bun `--compile`'s EOF-trailer scheme: a content archive of dist-lite is
// appended to the running host exe, followed by [u64 len][16-byte magic].
// On boot the host detects the trailer, extracts to a content-addressed
// temp dir (path-traversal-guarded), and serves it on QuickJS in-process.
[ host bytes … ][ dist-lite archive ][ u64 LE len ][ \n--BEXTLITE1--\n ]