Fix multi-platform packaging (#14)

* Fix multi-platform packaging

* Add arm64 windows and linux targets

* Speedup windows msvc linking

* Improve cargo cache

* fix arm64 linux build
This commit is contained in:
Solomon
2025-06-30 12:25:57 +01:00
committed by GitHub
parent 5c452e78e2
commit 0988f0b146
5 changed files with 59 additions and 15 deletions

View File

@@ -12,8 +12,12 @@ const arch = process.arch;
function getPlatformDir() {
if (platform === "linux" && arch === "x64") {
return "linux-x64";
} else if (platform === "linux" && arch === "arm64") {
return "linux-arm64";
} else if (platform === "win32" && arch === "x64") {
return "windows-x64";
} else if (platform === "win32" && arch === "arm64") {
return "windows-arm64";
} else if (platform === "darwin" && arch === "x64") {
return "macos-x64";
} else if (platform === "darwin" && arch === "arm64") {
@@ -22,7 +26,9 @@ function getPlatformDir() {
console.error(`❌ Unsupported platform: ${platform}-${arch}`);
console.error("Supported platforms:");
console.error(" - Linux x64");
console.error(" - Linux ARM64");
console.error(" - Windows x64");
console.error(" - Windows ARM64");
console.error(" - macOS x64 (Intel)");
console.error(" - macOS ARM64 (Apple Silicon)");
process.exit(1);