import type { RuntimeTarget, TargetKey } from "./types"; const TARGET_MAP: Record> = { linux: { x64: "linux-x64", arm64: "linux-arm64" }, darwin: { x64: "darwin-x64", arm64: "darwin-arm64" }, win32: { x64: "win32-x64", arm64: "win32-arm64" }, }; export function getRuntimeTarget(): RuntimeTarget { const platform = process.platform; const arch = process.arch; const key = TARGET_MAP[platform]?.[arch]; if (!key) { throw new Error(`Unsupported platform/arch: ${platform}/${arch}`); } return { key, platform, arch }; }