mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
## Summary Adds a new CLI flag `--compile-executable-path` that allows specifying a custom Bun executable path for cross-compilation instead of downloading from the npm registry. ## Usage ```bash bun build --compile --target=bun-linux-x64 \ --compile-executable-path=/path/to/bun-linux-x64 app.ts ``` ## Motivation The `executablePath` option was already available in the JavaScript `Bun.build()` API. This exposes the same functionality from the CLI. ## Changes - Added `--compile-executable-path <STR>` CLI parameter in `src/cli/Arguments.zig` - Added `compile_executable_path` field to `BundlerOptions` in `src/cli.zig` - Wired the option through to `StandaloneModuleGraph.toExecutable()` in `src/cli/build_command.zig` --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Bun Documentation
Official documentation for Bun: the fast, all-in-one JavaScript runtime.
Development
Install the Mintlify CLI to preview the documentation locally:
bun install -g mint
Run the development server:
mint dev
The site will be available at http://localhost:3000.
Contributing
Contributions are welcome! Please open an issue or submit a pull request.