Skip to content

Commit d5cc530

Browse files
author
190n
authored
State CPU requirements in README (oven-sh#20146)
1 parent d754832 commit d5cc530

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ Bun supports Linux (x64 & arm64), macOS (x64 & Apple Silicon) and Windows (x64).
4747

4848
> **Linux users** — Kernel version 5.6 or higher is strongly recommended, but the minimum is 5.1.
4949
50+
> **x64 users** — if you see "illegal instruction" or similar errors, check our [CPU requirements](https://bun.sh/docs/installation#cpu-requirements-and-baseline-builds)
51+
5052
```sh
5153
# with install script (recommended)
5254
curl -fsSL https://bun.sh/install | bash

docs/installation.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,16 @@ For convenience, here are download links for the latest version:
223223

224224
The `musl` binaries are built for distributions that do not ship with the glibc libraries by default, instead relying on musl. The two most popular distros are Void Linux and Alpine Linux, with the latter is used heavily in Docker containers. If you encounter an error like the following: `bun: /lib/x86_64-linux-gnu/libm.so.6: version GLIBC_2.29' not found (required by bun)`, try using the musl binary. Bun's install script automatically chooses the correct binary for your system.
225225

226-
Bun's `x64` binaries target the Haswell CPU architecture, which means they require AVX and AVX2 instructions. For Linux and Windows, the `x64-baseline` binaries are also available which target the Nehalem architecture. If you run into an "Illegal Instruction" error when running Bun, try using the `baseline` binaries instead. Bun's install scripts automatically chooses the correct binary for your system which helps avoid this issue. Baseline builds are slower than regular builds, so use them only if necessary.
226+
### CPU requirements and `baseline` builds
227+
228+
Bun's `x64` binaries target the Haswell CPU architecture, which means they require AVX and AVX2 instructions. For Linux and Windows, the `x64-baseline` binaries are also available which target the Nehalem architecture. If you run into an "Illegal Instruction" error when running Bun, try using the `baseline` binaries instead. Bun's install script automatically chooses the correct binary for your system which helps avoid this issue. Baseline builds are slower than regular builds, so use them only if necessary.
229+
230+
| Build | Intel requirement | AMD requirement |
231+
| ------------ | ------------------------------------------------------------------ | ------------------ |
232+
| x64 | Haswell (4th generation Core) or newer, except some low-end models | Excavator or newer |
233+
| x64-baseline | Nehalem (1st generation Core) or newer | Bulldozer or newer |
234+
235+
Bun does not currently support any CPUs older than the `baseline` target, which mandates the SSE4.2 extension.
227236

228237
Bun also publishes `darwin-x64-baseline` binaries, but these are just a copy of the `darwin-x64` ones so they still have the same CPU requirement. We only maintain these since some tools expect them to exist. Bun requires macOS 13.0 or later, which does not support any CPUs that don't meet our requirement.
229238

0 commit comments

Comments
 (0)