import { spawn } from "./spawn"; import { read } from "./fs"; import { debug } from "./console"; 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()); export type Platform = { os: string; arch: string; avx2?: boolean; bin: string; exe: string; }; export const platforms: Platform[] = [ { os: "darwin", arch: "arm64", bin: "bun-darwin-aarch64", exe: "bin/bun", }, { os: "darwin", arch: "x64", avx2: true, bin: "bun-darwin-x64", exe: "bin/bun", }, { os: "darwin", arch: "x64", bin: "bun-darwin-x64-baseline", exe: "bin/bun", }, { os: "linux", arch: "arm64", bin: "bun-linux-aarch64", exe: "bin/bun", }, { os: "linux", arch: "x64", avx2: true, bin: "bun-linux-x64", exe: "bin/bun", }, { os: "linux", arch: "x64", bin: "bun-linux-x64-baseline", exe: "bin/bun", }, ]; export const supportedPlatforms: Platform[] = platforms .filter(platform => platform.os === os && platform.arch === arch && (!platform.avx2 || avx2)) .sort((a, b) => (a.avx2 === b.avx2 ? 0 : a.avx2 ? -1 : 1)); 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"]); return exitCode === 0 && stdout.includes("1"); } catch (error) { debug("isRosetta2 failed", error); return false; } } n-needed'>create-constructors-when-needed Unnamed repository; edit this file 'description' to name the repository.
aboutsummaryrefslogtreecommitdiff
path: root/docs/guides/binary/arraybuffer-to-string.md (unfollow)
AgeCommit message (Expand)AuthorFilesLines
2023-10-12TweaksGravatar Colin McDonnell 1-2/+2
2023-10-12Fix structGravatar Colin McDonnell 1-1/+1
2023-10-12Clean up, implement warn_on_unrecognized_flagGravatar Colin McDonnell 4-26/+40
2023-10-12WIPGravatar Colin McDonnell 4-77/+14
2023-10-12WIPGravatar Colin McDonnell 5-347/+353
2023-10-12WIPGravatar Colin McDonnell 5-209/+446
2023-10-12WIPGravatar Colin McDonnell 2-24/+106
2023-10-12Improve helptextGravatar Colin McDonnell 1-55/+83
2023-10-12WIPGravatar Colin McDonnell 3-49/+147
2023-10-12WIPGravatar Colin McDonnell 2-0/+19
2023-10-12fix install testGravatar Dylan Conway 2-6/+8
2023-10-12fix editing package json when adding github dependency (#6432)Gravatar Dylan Conway 5-14/+146
2023-10-12Update installation.mdGravatar Colin McDonnell 1-8/+14
2023-10-12Update installation.mdGravatar Colin McDonnell 1-3/+3
2023-10-12fix(install): re-evaluate overrides when removedbun-v1.0.6Gravatar dave caruso 3-3/+45
2023-10-12chore: add missing ending quote (#6436)Gravatar Luna 1-1/+1
2023-10-12feat(install): support npm overrides/yarn resolutions, one level deep only (#...Gravatar dave caruso 7-31/+640
2023-10-11fix #6416 (#6430)Gravatar Dylan Conway 2-1/+132
2023-10-11Bump WebKitGravatar Jarred Sumner 9-29/+29
2023-10-11Bump!Gravatar Jarred Sumner 1-1/+1
2023-10-11Update JSCUSocketsLoopIntegration.cppGravatar Dylan Conway 1-2/+2
2023-10-11Update installation.mdGravatar Colin McDonnell 1-10/+7