Bun single-file executable
Decompile the JavaScript inside a `bun build --compile` binary.
bun build --compile packs a whole app, JavaScript and assets included,
into one executable. Wakaru reads that container directly and never runs
the binary. Binaries built with Bun 1.3.3 and later are supported.
Decompile the JavaScript
npx wakaru ./compiled-app --unpack -o out/Wakaru validates Bun's embedded module graph, picks out the JavaScript entries, and unpacks them like any other bundle. Windows, macOS, and Linux executables (PE, Mach-O, ELF) all work, on any host platform.
Add --raw to preserve the exact embedded JavaScript without readability
rewrites.
Extract every embedded file
npx wakaru bun extract ./compiled-app -o extracted/bun extract copies everything in the container: JavaScript, CSS, assets,
WebAssembly, native add-ons, embedded SQLite databases. Each file holds the
bytes Bun stored, except that non-ASCII JavaScript or text that Bun 1.4.1 and
later stored as UTF-16 is written back as UTF-8. Nothing is parsed or
executed. extracted/manifest.json records each file's original path,
loader, and role.
If the app was compiled with --sourcemap, Bun embedded the original source
files too, and bun extract writes them below extracted/sources/ under
their original paths, such as sources/src/index.ts. These are the files
before bundling, TypeScript types and comments included, so check this
directory first. A .. in a path is written as %2E%2E so every file stays
inside the output directory.
Two options:
--jsonalso prints the manifest to stdout--include-internalsalso writes Bun's runtime regions (the whole opaque source map, bytecode, module info). These are runtime data, not project assets.