first commit

This commit is contained in:
2026-10-02 13:57:32 +02:00
commit 9117f05db9
10 changed files with 2528 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
// Cross-compile the static guest helper (Go makes linux/arm64 static binaries trivially).
use std::process::Command;
fn main() {
println!("cargo:rerun-if-changed=guest/fwd.go");
let out = std::path::PathBuf::from(std::env::var("OUT_DIR").unwrap()).join("wsbx-fwd");
let ok = Command::new("go")
.args(["build", "-trimpath", "-ldflags=-s -w", "-o"])
.arg(&out)
.arg("guest/fwd.go")
.env("GOOS", "linux")
.env("GOARCH", "arm64")
.env("CGO_ENABLED", "0")
.status()
.expect("Go is required to build the guest helper (brew install go)")
.success();
assert!(ok, "go build guest/fwd.go failed");
}