You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/bun/NOTES.md
+29-7Lines changed: 29 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,19 +34,41 @@ Pin a specific version:
34
34
## Support
35
35
36
36
- Distros: `Debian` / `Ubuntu` and `Alpine`
37
-
- Architectures: `x86_64` and `arm64`
37
+
- Architectures: `x86_64` and `arm64` (based on available Bun releases)
38
38
39
39
## Tests
40
40
41
-
This feature is tested against various Distro:
41
+
This feature is tested against various Distros:
42
42
43
-
-`Ubuntu` (latest)
44
-
-`Debian` (latest)
45
-
-`Alpine` (latest)
46
-
-`Debian` with a pinned version of Bun (e.g., Bun `v1.1.38`)
43
+
-`Ubuntu` (glibc)
44
+
-`Debian` (glibc)
45
+
-`Alpine` (musl)
46
+
-`Debian` with a pinned version of Bun
47
+
48
+
*Note: Only architectures with actual Bun release assets are supported (x86_64 and arm64).* *
49
+
50
+
## Architecture and Asset Selection
51
+
52
+
This feature automatically selects the correct Bun release asset based on the detected architecture and libc:
53
+
54
+
-**x86_64**: Uses "baseline" builds for optimal CPU compatibility (e.g., `bun-linux-x64-baseline.zip`)
55
+
-**arm64**: Uses standard builds since "baseline" variants are not published for ARM64 (e.g., `bun-linux-aarch64.zip`)
56
+
57
+
The installation includes robust fallback logic:
58
+
59
+
- Primary: Preferred asset pattern for the detected architecture/libc combination
60
+
- Fallback: Alternative patterns if the primary asset is not found
61
+
- Error handling: Clear error messages if no suitable asset is available
62
+
63
+
This approach ensures compatibility across different platforms while gracefully handling potential future changes to Bun's release asset naming.
47
64
48
65
## Considerations / Future Enhancements
49
66
50
-
- If Bun’s release assets ever require explicit filtering, we can wire an `assetRegex` or pass `additionalFlags` to the `gh-release` helper. The helper already auto-filters by platform/arch, so no extra flags are set currently.
51
67
- Coexistence with Node.js: this feature only installs `bun` and a `bunx` shim and does not modify Node.js.
52
68
- PATH/profile: installation to `/usr/local/bin` avoids profile changes.
69
+
- Asset regex patterns: the fallback chain ensures compatibility even if Bun changes their release asset naming conventions.
70
+
71
+
## Debugging
72
+
73
+
- To enable additional debug logs during installation, set the environment variable `BUN_FEATURE_DEBUG=1`.
74
+
- Diagnostic logs from detection functions are emitted to stderr to keep return values clean.
0 commit comments