feat(xtask): cross-platform release build via cargo-zigbuild
Replace build-all.sh shell script with a Rust xtask workspace member. Uses cargo-zigbuild + zig as a universal cross-linker -- no VMs, no containers, no root required. Produces all three release binaries from a single FreeBSD machine: anvil-X.Y.Z-freebsd-x86_64.tar.gz (native cargo build) anvil-X.Y.Z-linux-x86_64.tar.gz (cargo zigbuild) anvil-X.Y.Z-windows-x86_64.zip (cargo zigbuild) Commands: cargo xtask --fix install zig, zip, cargo-zigbuild, rustup targets cargo xtask --check verify all dependencies cargo xtask build all three binaries + SHA256SUMS cargo xtask --clean remove cross-compile artifacts cargo xtask --suffix rc1 build with version suffix Also converts Cargo.toml to a workspace (members: anvil, xtask). build-all.sh retained as a thin wrapper around cargo xtask.
This commit is contained in:
19
xtask/Cargo.toml
Normal file
19
xtask/Cargo.toml
Normal file
@@ -0,0 +1,19 @@
|
||||
[package]
|
||||
name = "xtask"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
publish = false
|
||||
|
||||
[[bin]]
|
||||
name = "xtask"
|
||||
path = "src/main.rs"
|
||||
|
||||
[dependencies]
|
||||
# CLI argument parsing
|
||||
clap = { version = "4.4", features = ["derive"] }
|
||||
# Error handling
|
||||
anyhow = "1.0"
|
||||
# Colors
|
||||
colored = "2.1"
|
||||
# Command existence check
|
||||
which = "5.0"
|
||||
Reference in New Issue
Block a user