Bun itself is MIT-licensed.
Bun statically links JavaScriptCore (and WebKit) which is LGPL-2 licensed. WebCore files from WebKit are also licensed under LGPL2. Per LGPL2:
(1) If you statically link against an LGPL’d library, you must also provide your application in an object (not necessarily source) format, so that a user has the opportunity to modify the library and relink the application.
You can find the patched version of WebKit used by Bun here: https://github.com/oven-sh/webkit. If you would like to relink Bun with changes:
git clone https://github.com/oven-sh/WebKit vendor/WebKitbun sync-webkit-source(checks out the version pinned inWEBKIT_VERSIONinscripts/build/deps/webkit.ts)bun run build:local
This compiles JavaScriptCore, compiles Bun’s .cpp bindings for JavaScriptCore (which are the object files using JavaScriptCore) and outputs a new bun binary with your changes.
Bun statically links these libraries:
| Library | License |
|---|---|
boringssl |
several licenses |
brotli |
MIT |
libarchive |
several licenses |
lol-html |
BSD 3-Clause |
ls-hpack |
MIT |
ls-qpack |
MIT |
lsquic |
MIT (portions derived from Chromium proto-quic, BSD 3-Clause) |
mimalloc |
MIT |
picohttp |
dual-licensed under the Perl License or the MIT License |
zstd |
dual-licensed under the BSD License or GPLv2 license |
simdutf |
Apache 2.0 |
tinycc |
LGPL v2.1 |
uSockets |
Apache 2.0 |
zlib-ng |
zlib |
c-ares |
MIT licensed |
libicu 78 |
license here |
libbase64 |
BSD 2-Clause |
libuv (on Windows) |
MIT |
libdeflate |
MIT |
libjpeg-turbo |
BSD 3-Clause / IJG / zlib |
libspng |
BSD 2-Clause |
libwebp |
BSD 3-Clause |
highway |
Apache 2.0 |
uucode |
MIT |
A fork of uWebsockets |
Apache 2.0 licensed |
| Parts of Tigerbeetle's IO code | Apache 2.0 licensed |
__cxa_thread_atexit fallback from LLVM libc++abi |
Apache 2.0 with LLVM exception |
The type checker behind bun check and the parser it shares with bun lint and bun fmt are ports of typescript-go. They use TypeScript's diagnostic messages and lib.*.d.ts files |
Apache 2.0 |
bun lint ports large parts of ESLint: code path analysis, rule helpers such as ast-utils.js, config and comment handling, and many rules. The ESLint rules in bun lint use ESLint's rule names, options, option schemas, messages and descriptions. The eslint:recommended and eslint:all presets are ESLint's. Parts of main.js in src/lint/js_plugin/worker are copied from ESLint, and parts of LintReport.cpp, LintSourceCode.cpp and LintTokens.cpp in src/jsc/bindings are ported from it |
MIT |
bun lint does the same with the rules of typescript-eslint. It also ports type-utils and the plugin's util helpers, and uses its presets, the error messages of typescript-estree and the lib globals of scope-manager |
MIT |
Selectors in bun lint are a port of esquery |
BSD 3-Clause |
bun lint has ports of @eslint-community/regexpp, @eslint-community/eslint-utils, levn and natural-compare, and of parts of ts-api-utils and @eslint/eslintrc |
MIT |
bun lint uses the error messages of ajv, acorn and optionator, and the lists in globals and is-core-module |
MIT |
bun lint uses the error messages of espree |
BSD 2-Clause |
bun lint uses the JSON.parse error messages of V8 |
BSD 3-Clause |
bun lint has ports of parts of @eslint/plugin-kit, @eslint/config-array, @eslint/config-helpers and @eslint/compat |
Apache 2.0 |
bun lint and bun fmt have a port of the pattern-to-regular-expression table of ignore |
MIT |
bun lint and bun fmt have ports of is-glob and is-extglob |
MIT |
bun lint and bun fmt have a port of glob-parent |
ISC |
The react-hooks, import, n, react and prettier rules in bun lint are ports of the rules in eslint-plugin-react-hooks, eslint-plugin-import, eslint-plugin-n, eslint-plugin-es-x, eslint-plugin-react and eslint-plugin-prettier, with the same rule names, options and messages. They include the Node.js version tables of eslint-plugin-n and a few functions from jsx-ast-utils and prettier-linter-helpers |
MIT |
The text diff used by bun test and the prettier/prettier rule has parts of diff-match-patch and of fast-diff, which is derived from it |
Apache 2.0 |
The unicorn, oxc, react-perf, jsx-a11y, nextjs, promise, node, jest and vitest rules in bun lint are ports of the rules in oxlint, with its messages and help text. With an oxlint config, the other rules use the messages of oxlint and tsgolint too. bun lint also ports parts of oxc_jsdoc and oxc_react_compiler |
MIT |
oxlint ported those rules from eslint-plugin-unicorn, eslint-plugin-react-perf, eslint-plugin-jsx-a11y, @next/eslint-plugin-next, eslint-plugin-n, eslint-plugin-jest and @vitest/eslint-plugin. Their rule names, options and some of their messages are in bun lint |
MIT |
oxlint ported its promise rules from eslint-plugin-promise |
ISC |
The ARIA tables of the jsx-a11y rules come from aria-query by way of oxlint |
Apache 2.0 |
bun fmt is a port of Prettier: its printers for CSS, SCSS, Less, HTML, Vue, Angular, Markdown, YAML, GraphQL and Handlebars, its document printer, its handling of options, pragmas, ranges, cursor offsets and embedded code, and the HTML tables it is built with |
MIT |
The JavaScript and TypeScript printer of bun fmt, its JSDoc formatting and its oxfmt-style import sorting are a port of oxc_formatter, which is a port of the Biome formatter. The intermediate representation and its printer come from Biome by way of oxc_formatter_core |
MIT |
bun fmt has ports of the parsers in postcss, postcss-scss, postcss-less, postcss-selector-parser, postcss-media-query-parser, postcss-values-parser, angular-html-parser, graphql-js, @glimmer/syntax, simple-html-tokenizer and @angular/compiler, and of parts of yaml-unist-parser and angular-estree-parser |
MIT |
bun fmt also has a port of @handlebars/parser and of one file of yaml |
ISC |
Import sorting in bun fmt has ports of @trivago/prettier-plugin-sort-imports and @ianvs/prettier-plugin-sort-imports, and of organizeImports.ts in TypeScript |
Apache 2.0 |
bun fmt has ports of jest-docblock and the crates sort-package-json and oxc-toml (a fork of taplo), and of parts of @babel/generator, micromark and editorconfig-without-wasm. Its character width tables are generated from emoji-regex, get-east-asian-width and narrow-emojis |
MIT |
Tailwind class sorting in bun fmt is a port of parts of prettier-plugin-tailwindcss |
MIT |
Svelte formatting in bun fmt is a port of prettier-plugin-svelte and of the template parser of Svelte |
MIT |
The tests in test/cli/lint/conformance and test/cli/format include test cases from ESLint, typescript-eslint, the ESLint plugins above, oxc, tsgolint, Prettier and the two import sorting plugins. They are not part of the bun binary. Their licenses are next to them.
For compatibility reasons, the following packages are embedded into Bun's binary and injected if imported.
| Package | License |
|---|---|
acorn |
MIT |
acorn-walk |
MIT |
assert |
MIT |
browserify-zlib |
MIT |
buffer |
MIT |
constants-browserify |
MIT |
crypto-browserify |
MIT |
domain-browser |
MIT |
events |
MIT |
https-browserify |
MIT |
os-browserify |
MIT |
path-browserify |
MIT |
process |
MIT |
punycode |
MIT |
querystring-es3 |
MIT |
stream-browserify |
MIT |
stream-http |
MIT |
string_decoder |
MIT |
timers-browserify |
MIT |
tty-browserify |
MIT |
url |
MIT |
util |
MIT |
vm-browserify |
MIT |