# bin

Bin subdomain facade: JS bin synthesis composed via [`runBinPhase`](https://www.hyperfrontend.dev/docs/libraries/builder/bin/#api-runBinPhase). Node SEA native binary primitives live under [`@hyperfrontend/builder/bin/native`](https://www.hyperfrontend.dev/docs/libraries/builder/bin/native.md).

`runBinPhase(ctx, bins)` iterates the supplied `BinConfig[]`, calls [`buildJsBin`](https://www.hyperfrontend.dev/docs/libraries/builder/bin/script/#api-buildJsBin) for each declaration, and, for any bin that declares a [`sea`](https://www.hyperfrontend.dev/docs/libraries/builder/models/#api-BinConfig-prop-sea) block, also emits a Node SEA native binary via [`buildNativeBin`](https://www.hyperfrontend.dev/docs/libraries/builder/bin/native/#api-buildNativeBin) (using the bin's CJS output as the SEA [`main`](https://nodejs.org/api/single-executable-applications.html) script; a [`sea`](https://www.hyperfrontend.dev/docs/libraries/builder/models/#api-BinConfig-prop-sea) bin without a CJS format throws). Every emitted [`BinOutput`](https://www.hyperfrontend.dev/docs/libraries/builder/models/#api-BinOutput) is aggregated into a single flat list. Pass an empty array (or omit [`config.bin`](https://www.hyperfrontend.dev/docs/libraries/builder/models/#api-BuildConfig-prop-bin) from the facade) to skip the phase entirely. Workspace dependencies are always inlined into bin bundles so each emitted JS artifact is a self-contained executable script with shebang + bootstrap footer + chmod 0o755 already applied.

---

Canonical page: https://www.hyperfrontend.dev/docs/libraries/builder/bin/
This file: https://www.hyperfrontend.dev/docs/libraries/builder/bin.md
Documentation index: https://www.hyperfrontend.dev/llms.txt
