Skip to main content
Compile your executable using the --compile flag.

List your available signing identities. You’ll pass one of these to codesign in a later step. This command requires macOS.
terminal

Optional, but recommended: create an entitlements.plist file with the necessary permissions for the JavaScript engine to work correctly.
entitlements.plist

Sign your executable using the codesign command and verify it works.
terminal

For more information on macOS codesigning, refer to Apple’s Code Signing documentation. For details about creating single-file executables with Bun, see Standalone Executables. This guide requires Bun v1.2.4 or newer.