Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
f3215a1
ci: single arm64 debian-13 build host, ThinLTO everywhere, WebKit a36…
robobun Jul 20, 2026
dbe2c93
build: -fno-split-lto-unit on all LTO, llvm-objcopy path resolve, dro…
robobun Jul 21, 2026
43103ff
[autofix.ci] apply automated fixes
autofix-ci[bot] Jul 21, 2026
d700927
build: drop -Zsplit-lto-unit from rustflags (linux now ThinLTO, rustc…
robobun Jul 21, 2026
ee93369
build: windows x64 baseline fetches -baseline WebKit (not -lto, which…
robobun Jul 21, 2026
8b9dc98
build: WPD darwin-only (linux ThinLTO mis-devirts typed arrays); wind…
robobun Jul 21, 2026
92189f2
Revert windows-lto-off and linux-WPD-off workarounds
robobun Jul 21, 2026
25669ec
build: WebKit c9296e35 (ClassInfo address-unique under LTO, nehalem-f…
robobun Jul 21, 2026
e8039ab
ci: keep hasWebKitChanges dead until verify-baseline --jit-stress is …
robobun Jul 21, 2026
455b162
tls(win-x64): declare Bun__{get,set}TLSDefaultCiphers with SYSV_ABI
robobun Jul 21, 2026
1d85eef
test(napi): bump --compile timeout to 30s for ThinLTO bun-profile
robobun Jul 21, 2026
c99abc7
build: compress ELF debug sections post-link when linking with rust-lld
Jarred-Sumner Jul 21, 2026
baefd1a
build: link-side WPD visibility on ELF; share Rust generics
Jarred-Sumner Jul 21, 2026
04b2be0
Merge branch 'main' into claude/farm/6ea6ece4/ci-pr-lto-off-main-tests
Jarred-Sumner Jul 21, 2026
d2973b4
test: suppress at-exit LSAN reports surfaced by -Zshare-generics; npm…
robobun Jul 21, 2026
ad6fc29
build: gate -Zshare-generics=y on !asan; drop clone_metadata leaksan …
robobun Jul 21, 2026
0b3359f
build: drop init guards on function-local statics
Jarred-Sumner Jul 21, 2026
90526b8
Revert "build: drop init guards on function-local statics" [skip size…
robobun Jul 21, 2026
2c1bffe
test(require-cache): todo the 20k-call subtest on musl-aarch64 too [s…
robobun Jul 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
359 changes: 151 additions & 208 deletions .buildkite/ci.mjs

Large diffs are not rendered by default.

56 changes: 48 additions & 8 deletions .buildkite/scripts/upload-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -296,14 +296,10 @@ function create_release() {
bun-linux-aarch64-profile.zip
bun-linux-x64.zip
bun-linux-x64-profile.zip
bun-linux-x64-baseline.zip
bun-linux-x64-baseline-profile.zip
bun-linux-aarch64-musl.zip
bun-linux-aarch64-musl-profile.zip
bun-linux-x64-musl.zip
bun-linux-x64-musl-profile.zip
bun-linux-x64-musl-baseline.zip
bun-linux-x64-musl-baseline-profile.zip
bun-linux-aarch64-android.zip
bun-linux-aarch64-android-profile.zip
bun-linux-x64-android.zip
Expand All @@ -314,15 +310,48 @@ function create_release() {
bun-freebsd-x64-profile.zip
bun-windows-x64.zip
bun-windows-x64-profile.zip
bun-windows-x64-baseline.zip
bun-windows-x64-baseline-profile.zip
bun-windows-aarch64.zip
bun-windows-aarch64-profile.zip
)

function upload_artifact() {
# x64 ships one nehalem binary under the plain name. Re-zip it under the
# historical `-baseline` name (inner dir renamed) so older `bun upgrade`
# clients that still request `-baseline` extract correctly.
function alias_baseline_artifact() {
local artifact="$1"
case "$artifact" in
bun-darwin-x64.zip) echo "bun-darwin-x64-baseline.zip" ;;
bun-darwin-x64-profile.zip) echo "bun-darwin-x64-baseline-profile.zip" ;;
bun-linux-x64.zip) echo "bun-linux-x64-baseline.zip" ;;
bun-linux-x64-profile.zip) echo "bun-linux-x64-baseline-profile.zip" ;;
bun-linux-x64-musl.zip) echo "bun-linux-x64-musl-baseline.zip" ;;
bun-linux-x64-musl-profile.zip) echo "bun-linux-x64-musl-baseline-profile.zip" ;;
bun-windows-x64.zip) echo "bun-windows-x64-baseline.zip" ;;
bun-windows-x64-profile.zip) echo "bun-windows-x64-baseline-profile.zip" ;;
*) echo "" ;;
esac
}

command -v unzip &> /dev/null || package_manager_install unzip
command -v zip &> /dev/null || package_manager_install zip

# Repack `$src_zip` (inner dir = basename of $src_zip) as `$dst_zip` with the
# inner dir renamed to match `$dst_zip`'s basename. Works in a fresh mktemp
# dir so a caller-CWD change can't collide with the extracted names.
function rezip_as() {
local src_zip="$1" dst_zip="$2"
local src_dir="${src_zip%.zip}" dst_dir="${dst_zip%.zip}"
local abs_src="$PWD/$src_zip" abs_dst="$PWD/$dst_zip"
local work; work="$(mktemp -d)"
run_command unzip -q -d "$work" "$abs_src"
run_command mv "$work/$src_dir" "$work/$dst_dir"
run_command rm -f "$abs_dst"
(cd "$work" && run_command zip -rq "$abs_dst" "$dst_dir")
run_command rm -rf "$work"
}

function upload_one() {
local artifact="$1"
download_buildkite_artifact "$artifact"
if [ "$tag" == "canary" ]; then
upload_s3_file "releases/$BUILDKITE_COMMIT-canary" "$artifact" &
else
Expand All @@ -333,6 +362,17 @@ function create_release() {
wait
}

function upload_artifact() {
local artifact="$1"
download_buildkite_artifact "$artifact"
upload_one "$artifact"
local alias="$(alias_baseline_artifact "$artifact")"
if [ -n "$alias" ]; then
rezip_as "$artifact" "$alias"
upload_one "$alias"
fi
Comment thread
robobun marked this conversation as resolved.
}

Comment thread
coderabbitai[bot] marked this conversation as resolved.
for artifact in "${artifacts[@]}"; do
upload_artifact "$artifact"
done
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ env:
# Pin the toolchain explicitly so rustup ignores rust-toolchain.toml's
# `targets` list (11 cross triples ≈ 450 MB of prebuilt std we don't need
# to lint the host). Keep in sync with `channel` in rust-toolchain.toml.
RUSTUP_TOOLCHAIN: nightly-2026-05-06
RUSTUP_TOOLCHAIN: nightly-2026-07-20

jobs:
clippy:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
# Pin the toolchain explicitly so rustup ignores rust-toolchain.toml's
# `targets` list (11 cross triples ≈ 450 MB of prebuilt std we don't
# need just to run rustfmt). Keep this in sync with `channel` there.
RUSTUP_TOOLCHAIN: nightly-2026-05-06
RUSTUP_TOOLCHAIN: nightly-2026-07-20
run: |
# Without pipefail, `cmd | sed` always reports sed's exit status, so a
# failing formatter is invisible to the `wait $PID` checks below.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/miri.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ env:
LLVM_VERSION_MAJOR: "21"
# Pin so rustup ignores rust-toolchain.toml's `targets` list (11 cross
# triples ≈ 450 MB we don't need). Keep in sync with `channel` there.
RUSTUP_TOOLCHAIN: nightly-2026-05-06
RUSTUP_TOOLCHAIN: nightly-2026-07-20

jobs:
miri:
Expand Down
63 changes: 11 additions & 52 deletions packages/bun-release/src/platform.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
import { debug } from "./console";
import { exists, read } from "./fs";
import { exists } from "./fs";
import { spawn } from "./spawn";

export const os = process.platform;

export const arch = os === "darwin" && process.arch === "x64" && isRosetta2() ? "arm64" : process.arch;

export const avx2 =
arch === "x64" &&
((os === "linux" && isLinuxAVX2()) || (os === "darwin" && isDarwinAVX2()) || (os === "win32" && isWindowsAVX2()));

export const abi = os === "android" ? "android" : os === "linux" && isLinuxMusl() ? "musl" : undefined;

export type Platform = {
os: string;
arch: string;
abi?: "musl" | "android";
avx2?: boolean;
/** Back-compat alias package; same binary as the plain entry. Skipped by the postinstall picker. */
alias?: boolean;
bin: string;
exe: string;
};
Expand All @@ -31,13 +28,13 @@ export const platforms: Platform[] = [
{
os: "darwin",
arch: "x64",
avx2: true,
bin: "bun-darwin-x64",
exe: "bin/bun",
},
{
os: "darwin",
arch: "x64",
alias: true,
bin: "bun-darwin-x64-baseline",
exe: "bin/bun",
},
Expand All @@ -50,13 +47,13 @@ export const platforms: Platform[] = [
{
os: "linux",
arch: "x64",
avx2: true,
bin: "bun-linux-x64",
exe: "bin/bun",
},
{
os: "linux",
arch: "x64",
alias: true,
bin: "bun-linux-x64-baseline",
exe: "bin/bun",
},
Expand All @@ -71,14 +68,14 @@ export const platforms: Platform[] = [
os: "linux",
arch: "x64",
abi: "musl",
avx2: true,
bin: "bun-linux-x64-musl",
exe: "bin/bun",
},
{
os: "linux",
arch: "x64",
abi: "musl",
alias: true,
bin: "bun-linux-x64-musl-baseline",
exe: "bin/bun",
},
Expand Down Expand Up @@ -115,13 +112,13 @@ export const platforms: Platform[] = [
{
os: "win32",
arch: "x64",
avx2: true,
bin: "bun-windows-x64",
exe: "bin/bun.exe",
},
{
os: "win32",
arch: "x64",
alias: true,
bin: "bun-windows-x64-baseline",
exe: "bin/bun.exe",
},
Expand All @@ -133,15 +130,10 @@ export const platforms: Platform[] = [
},
];

export const supportedPlatforms: Platform[] = platforms
.filter(
platform =>
platform.os === os &&
platform.arch === arch &&
(!platform.avx2 || avx2) &&
(!platform.abi || abi === platform.abi),
)
.sort((a, b) => (a.avx2 === b.avx2 ? 0 : a.avx2 ? -1 : 1));
export const supportedPlatforms: Platform[] = platforms.filter(
platform =>
platform.os === os && platform.arch === arch && !platform.alias && (!platform.abi || abi === platform.abi),
);
Comment thread
robobun marked this conversation as resolved.
Comment thread
robobun marked this conversation as resolved.

function isLinuxMusl(): boolean {
try {
Expand All @@ -152,25 +144,6 @@ function isLinuxMusl(): boolean {
}
}

function isLinuxAVX2(): boolean {
try {
return read("/proc/cpuinfo").includes("avx2");
} catch (error) {
debug("isLinuxAVX2 failed", error);
return false;
}
}

function isDarwinAVX2(): boolean {
try {
const { exitCode, stdout } = spawn("sysctl", ["-n", "machdep.cpu"]);
return exitCode === 0 && stdout.includes("AVX2");
} catch (error) {
debug("isDarwinAVX2 failed", error);
return false;
}
}

function isRosetta2(): boolean {
try {
const { exitCode, stdout } = spawn("sysctl", ["-n", "sysctl.proc_translated"]);
Expand All @@ -180,17 +153,3 @@ function isRosetta2(): boolean {
return false;
}
}

function isWindowsAVX2(): boolean {
try {
return (
spawn("powershell", [
"-c",
`(Add-Type -MemberDefinition '[DllImport("kernel32.dll")] public static extern bool IsProcessorFeaturePresent(int ProcessorFeature);' -Name 'Kernel32' -Namespace 'Win32' -PassThru)::IsProcessorFeaturePresent(40);`,
]).stdout.trim() === "True"
);
} catch (error) {
debug("isWindowsAVX2 failed", error);
return false;
}
}
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[toolchain]
channel = "nightly-2026-05-06"
channel = "nightly-2026-07-20"
# rust-src is needed for -Zbuild-std (Tier 3 targets like
# aarch64-unknown-freebsd have no prebuilt std). miri is for
# `bun run rust:miri`. targets ensures the
Expand Down
Loading
Loading