feat: functionality to open a sandbox workspace in vs code
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user