Bun's bundler implements a
bun build ./cli.ts --compile --outfile mycli
cli.ts into an executable that can be executed directly:
$ ./mycli Hello world!
All imported files and packages are bundled into the executable, along with a copy of the Bun runtime. All built-in Bun and Node.js APIs are supported.
Note — Currently, the
--compile flag can only accept a single entrypoint at a time and does not support the following flags: