GitShow/oven-sh/bun
oven-sh

bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one

by oven-sh
bunbundlerjavascriptjavascriptcorejsxnodejsnpmreact
Star on GitHubForkWebsite

Rust

95.9k stars5.0k forks929 contributorsActive · 3m agoSince 2021bun-v1.4.2

Meet the team

See all 929 on GitHub →
Jarred-Sumner
Jarred-Sumner8.6k contributions
robobun
robobun2.7k contributions
dylan-conway
dylan-conway1.1k contributions
nektro
nektro704 contributions
cirospaciari
cirospaciari525 contributions
paperclover
paperclover459 contributions
Electroid
Electroid419 contributions
alii
alii305 contributions

Languages

View on GitHub →
Rust67.2%
C++19%
TypeScript9.1%
C2.3%
JavaScript1.7%
Shell0.3%
Other0.3%

Commit activity

Last 12 weeks · 2161 commits

Full graph →

Community health

5 of 6 standards met

Community profile →
100
✓README✓License✓Contributing✓Code of Conduct○Issue Template✓PR Template

Recent PRs & issues

Active · Last activity 3m ago
See all on GitHub →
robobun
Bun.write: poll instead of spin when a nonblocking stdout pipe returns EAGAINOpenPR

Problem Once has run, fd 1 is . A that overflows the pipe wedges every pool thread at 100% CPU and the promise never resolves. shows the pool threads spinning with zero syscalls and main parked in . Three causes. () derived from , which the stdio stores do not set, so on looped on at 100% CPU instead of parking. re-matched one cached result in its loop and never re-issued the syscall. Two concurrent s on one fd both registered fd 1 with the IO thread's epoll, and the second got . The sync fast path in () set after a partial write. The async path then re-sent the whole payload and the prefix went out twice. Fix and : is impossible on a regular file, so on set and park on the IO loop. The cached-result loop is gone. : derive from . Dup every caller-supplied fd so each polls a private fd number. closes the dup on finish. Fast path: report the byte count already written. passes it to , which seeds , so the async write resumes at that offset. The JS thread never blocks in . Verified: , three new tests. On stock bun the stdout test receives 4413569 bytes instead of 4194305 (the re-sent prefix), and the 200 KiB FIFO test hangs. Also ran all of . Background for data under 256 KiB first tries a synchronous loop on the JS thread. On it falls back to , a thread-pool task that writes and, when the fd is a pipe or socket, waits for writability on the IO thread's epoll/kqueue. tells whether the fd can be polled. Regular files cannot be added to epoll, so the flag gates every call. lives on the open file description, which dups share. 's FileSink sets it on a dup of fd 1, so fd 1 itself becomes nonblocking. Notes Repro for the wedge: Earlier revisions of this PR finished a partial fast-path write synchronously with . Review pointed out that this blocks the JS thread, and when the pipe's only reader depends on that event loop it never returns. The FIFO test () covers that case: the reader is in the same process. The payload is a byte counter modulo 251, so a re-sent prefix breaks the sequence where it restarts. The fixture stops at bytes and does not wait for EOF: on macOS the stream reader did not see EOF after every writer closed, with the dup already closed (checked by inode), which is outside this change. The stdout test counts fds that share stdout's inode rather than all fds. A plain count also sees the IO thread's kqueue or epoll fd, created the first time a write has to wait. On macOS reports a kqueue as , which looked like a leaked pipe dup until the inode check. The dup is unconditional for caller-supplied fds because stores can have . is then only learned from the first , and the fd must already be private at that point. The stdout test asserts across a round of writes to check the dup is released. Windows is unaffected. Its async write path is libuv's , and it has no sync fast path. Related: #35949 keeps stdio writes on the sync fast path for regular files. #32890 stops from truncating an fd destination for an empty source. no test proof** · iteration 6 · platform-specific test(s) that do not run on this machine, deferring to CI, which covers all platforms: test/js/bun/io/bun-write.test.js

robobun · 1m ago
dylan-conway
Build JavaScriptCore and ICU from source in bun's own build graph on every targetOpenPR

JavaScriptCore, WTF, bmalloc — and, on every target except macOS, ICU — are compiled from source inside bun's own ninja graph, like every other vendored dependency, instead of being downloaded as a prebuilt tarball. This is the default for every build, local and CI; remains as an explicit opt-in. What changes CI All 13 lanes (Linux x64/arm64 glibc + baseline + musl + ASAN, Android, FreeBSD, macOS x64/arm64, Windows x64/arm64) compile JSC in the same graph as bun's own C++; no // step — the objects go straight into the same archive/link as bun's. A WebKit change no longer needs a prebuilt to be published before bun can build against it: bump to any commit pushed to oven-sh/WebKit. steps take ~1–2.5 min longer per target. Binaries are unchanged in size except FreeBSD/Android (−13 MB, see ICU below) and Windows (−1 MB). Build images: v42 adds / (host for the macOS lanes). Linux images are baked as a Buildkite job on a fresh machine of the target distro plus a step, instead of an instance driven over SSH from the hosted agent. Local development / compile JSC too (fetched by ninja like every dep, ~35 MB sparse; the first build of a build dir pays ~2 min for JSC, then it is incremental and ccache-friendly). Host tools needed: , , (JSC's generators), (ICU data, non-macOS targets), and / only when cross-compiling a macOS target from Linux (a Mac uses Xcode's ). Release builds are LTO by default everywhere (what CI ships); for fast relinks. The profile is gone (it was "release + LTO"). On a native macOS or Windows host whose rustc LLVM is newer than clang's (today: nightly LLVM 22 vs Homebrew llvm@21), the Rust↔C++ cross-language step is skipped and each half LTOs on its own — Apple's ld runs LTO through clang's libLTO, which can't read newer bitcode and has no lld to swap in; CI cross-compiles both from Linux with rustc's lld and keeps full cross-language LTO. Working on JSC itself: on any profile, like every other dep; is that with . The / profiles and the nested-cmake WebKit build are removed. is the build's own fetch, so clones live elsewhere. Upgrading WebKit: lists which cmake files to diff on a bump and where each kind of change maps in , plus to regenerate the checked-in file lists. How it works One dep kind. Every C/C++ dep is a spec in : source groups (each with its own flags/includes/PCH), (generators, host tools, target executables), (files written at configure). WebKit is the same shape as zlib, just larger; the kind is gone. WebKit ( + ): bmalloc, WTF and JavaScriptCore as three source groups; JSC's TUs are the unified bundles listed explicitly in (as WebKit's bundler forms them, regenerated on a bump) plus the files; every generator WebKit's cmake runs (create_hash_table LUTs, bytecode/Air/yarr/wasm generators, JS builtins, inspector protocol, GeneratePreferences, offlineasm via the two LLInt extractor executables, MIG on macOS) is a step invoking the same script with the same arguments; , the `headers-marchdeps/icu.tsdeps/icu-sources.tsicu-data.tscommoni18nicupkgsrc/jsc/bindings/bun_icu_decompress.cpplibicucorescripts/build/verify-binary.tsbinary-expectations.tssrc/__cxa_throw__emutls_--revisionbun.tsbunmigmigcomdeps/bootstrap-cmds.tsninja.tscodegen/ninja_required_versiondep_codegenstream.ts --cwd/--env/--stdouthost_cchost_cxxhost_linkhostCchostCxx-fsanitize=addresssha256[name] … (elapsed)scripts/jsc-exception-lintcompile_commands.jsonbun-inspector-protocolCombinedDomains.json.vscode/c_cpp_properties.json-ffp-contract=off -fno-slp-vectorizeDatesetNewValueFromTimeArgsmillisecondsFromComponentsdateProtoFuncSetYearfmadd/clang:-ffp-contract=off /clang:-fno-slp-vectorize-fstack-protector-strong-fno-stack-protector-fno-pic.data.rel.ro-mtune=ampere1-march=armv8-a+crcbun.exebun-profile.libobj/.import.libcodegen/ninja.tsCCACHE_FILECLONE=1CCACHE_NAMESPACE=bunbun run buildnode_modulesnode_modules//package.jsonnode_modules//bun installnode_modules/linkpool = consoleregenbuild.ninja[0/1] reconfigureninja -t restatg_configBEXPORT__declspec(dllexport)-DBEXPORT=ZigGeneratedClasses.cppextern "C" __ptrOffsetconstexproffsetOfWrapped()-O2-O0constexprasInvokerprocess.reportheader.osRelease10.06.1os.release()RtlGetVersionnapi_internal_napinapi_-Wall -Wextra … -Werror=undefined-inline/-internal-Wno--Wcharacter-conversionbun.text-march-fstack-protector-strong-fno-stack-protector.rodata-mtune=ampere1-ffp-contract=off -fno-slp-vectorizefmaddbun.exesupportedOSasInvokernapi_internal_*testFFI[.exe]bun-profile-z norelro -z lazylibstdc++.so.6JSCBuiltins.{h,cpp}cmakeconfig.hninjavendor/` trees fetches WebKit/ICU as ordinary ninja edges.

dylan-conway · 3m ago
springmin
feat: add initial HarmonyOS (OHOS) supportOpenPR

HarmonyOS (OHOS) Platform Support for Bun Adds support for building and running Bun on HarmonyOS (OHOS) aarch64. Current Status (2026-08-20) Trend (eight consecutive improvements): Case failures 468→388→341→300→289→277→257→254 (all-time low); file pass rate up to 89.8% (all-time high); case pass rate steady at 99.6%. Zero SIGSEGV and zero EPERM maintained. The 2026-08-20 run included 56 fixes in a single round (SQL family reversal: 29 fixes, docker failures 31→2, js/sql pass rate 47.4%→96.6%; verdaccio recovery: 7 install commands restored, cli +710 cases; node-http +145/-0). Changes Summary C++ Runtime Adaptations : OHOS kernel compat — open(O_EXEC) bug workaround, close_range SIGSYS fallback, SIGSYS handler (ohos_setup_sigsys_handler) : fork fallback (vfork blocked by seccomp), fd/signal OHOS handling : dlopen entry point : epoll_pwait2 SIGSYS-safe runtime probe : OHOS CA certificate store path Rust Runtime : IS_OHOS/IS_MUSL constants; : os_name/os_display for openharmony + : fchmodat2 cfg skip, memfd_create verified, OHOS syscall mapping, PIE base ASLR fix + : spawn pipe/fork OHOS handling : DirInfo fallback (uses $HOME instead of /), ohos_set_pwd for hmdfs : link/symlink EPERM → copy fallback, rename EXDEV, map_rm_errno narrow fix : ArrayBuffer stdin async write corruption fix : tick timeout clamp to prevent infinite wait (BUG-04) Build System , , , , , — OHOS cross-compilation support : OHOS codegen support : Build and sync script : CI workflow for OHOS Rust build Install System , , : OHOS post-install binary signing , , , : OHOS install pipeline adaptations : getcwd() fallback for hmdfs : EPERM → copy fallback ELF Signing (ohos_sign crate) New in-process Rust crate replacing external binary-sign-tool Self-signing ELF binaries with Merkle tree + SHA-256 + OHOS descriptor format Integrated into dlopen() path and post-install signing Verified System Limitations Actually blocked (4 — all have code bypasses): Verified available (12 — guards have been removed): pidfd_open, memfd_create, copy_file_range, process_vm_readv, statx, prctl(PR_SET_PDEATHSIG), prctl(PR_SET_CHILD_SUBREAPER), fstat on pipe/socket, PTY spawn (multi-thread fork), symlink(), eventfd, epoll Test Results by Module (August 20) Key Fixes Included (since June 18) Comparison with Previous Runs Test Environment Device: OHOS (HarmonyOS PC, ARM64 aarch64) Test runner: Upstream via Bun version: v1.4.0-canary.1 () Duration: ~1h05m (PARALLEL=3, BUN_TIMEOUT=300s) Full report: Known Remaining Issues 1. napi tests (2 files): dlopen signature still blocked for some .node plugins 2. bake dev server: 7/24 files fail — dev server platform restrictions 3. cli/install: 28 failures due to network/registry access + SELinux EPERM 4. v8 test: 54/55 test cases fail — V8 API shim limited coverage 5. patch.test.ts: EVENTPOLL hang on OHOS (needs skip) Notes The branch is continuously synced with oven/main Build CI on fork passes: https://github.com/springmin/bun/actions OHOS Rust Build workflow verified Local build produces ~104MB PIE dynamic binary working on-device What We Need from Maintainers 1. BuildKite CI trigger — This PR needs BuildKite CI to be triggered 2. Code review 3. Merge — Branch is mergeable with oven/main Branch:

springmin · 1h ago
Structured data for AI agents

Repository: oven-sh/bun. Description: Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one Stars: 95890, Forks: 5038. Primary language: Rust. Languages: Rust (67.2%), C++ (19%), TypeScript (9.1%), C (2.3%), JavaScript (1.7%). Homepage: https://bun.com Topics: bun, bundler, javascript, javascriptcore, jsx, nodejs, npm, react, rust, rust-lang, transpiler, typescript. Latest release: bun-v1.4.2 (20h ago). Open PRs: 100, open issues: 8619. Last activity: 3m ago. Community health: 100%. Top contributors: Jarred-Sumner, robobun, dylan-conway, nektro, cirospaciari, paperclover, Electroid, alii, colinhacks, pfgithub and others.

·@ofershap

Replace github.com with gitshow.dev