Something went wrong. Try again.
A terminal UI for Libby libbui.vinnymac.dev
Something went wrong. Try again.
12345678910111213141516171819202122232425// Builds the static aarch64 libbui and copies it to src/libbui-aarch64.bin,// which the page imports as a hashed asset. The same binary the release ships.//// npm run binary # cargo zigbuild, then copy// LIBBUI_BINARY=path npm run binary # copy a binary built elsewhere (CI)import { execFileSync } from "node:child_process";import { copyFileSync, statSync } from "node:fs";import { fileURLToPath } from "node:url";
const TARGET = "aarch64-unknown-linux-musl";const root = fileURLToPath(new URL("../../", import.meta.url));const out = fileURLToPath(new URL("../src/libbui-aarch64.bin", import.meta.url));
let source = process.env.LIBBUI_BINARY;if (!source) { execFileSync( "cargo", ["zigbuild", "--locked", "--release", "-p", "libbui", "--target", TARGET], { cwd: root, stdio: "inherit" }, ); source = `${root}target/${TARGET}/release/libbui`;}copyFileSync(source, out);console.log(`${out}: ${(statSync(out).size / 1e6).toFixed(1)} MB`);