mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-31 07:23:06 +08:00
- Add owned helper and runtime-pack contracts for macOS x64, Linux glibc/musl, Windows x64, and WASI. - Generalize LLVM target selection, package validation, linker plans, and release/CI matrices. - Document linker boundaries and add focused native-output and runtime-pack coverage.
13 lines
504 B
JavaScript
13 lines
504 B
JavaScript
import { release } from "node:os";
|
|
|
|
export function hostSupportsRuntimePack(
|
|
platform = process.platform,
|
|
architecture = process.arch,
|
|
hostRelease = release(),
|
|
) {
|
|
const darwinMajor = Number.parseInt(hostRelease.split(".", 1)[0] ?? "", 10);
|
|
return (platform === "darwin" && (architecture === "arm64" || architecture === "x64") && darwinMajor >= 24) ||
|
|
(platform === "linux" && (architecture === "arm64" || architecture === "x64")) ||
|
|
(platform === "win32" && architecture === "x64");
|
|
}
|