feat: functionality to open a sandbox workspace in vs code

This commit is contained in:
2026-10-22 18:59:15 +02:00
parent 230927d8db
commit 1ac5193b0e
12 changed files with 426 additions and 18 deletions
+3 -5
View File
@@ -2,15 +2,13 @@
use std::process::Command;
fn main() {
const SRC: [&str; 2] = ["guest/fwd.go", "guest/exec.go"];
for f in SRC {
println!("cargo:rerun-if-changed={f}");
}
println!("cargo:rerun-if-changed=guest"); // a directory: cargo watches everything in it
let out = std::path::PathBuf::from(std::env::var("OUT_DIR").unwrap()).join("wsbx-guest");
let ok = Command::new("go")
.args(["build", "-trimpath", "-ldflags=-s -w", "-o"])
.arg(&out)
.args(SRC)
.arg(".")
.current_dir("guest")
.env("GOOS", "linux")
.env("GOARCH", "arm64")
.env("CGO_ENABLED", "0")