Files
anvil/Cargo.toml
Eric Ratliff e7995de547
Some checks failed
CI / Test (Linux) (push) Has been cancelled
CI / Test (Windows MSVC) (push) Has been cancelled
CI / Clippy (push) Has been cancelled
CI / Format (push) Has been cancelled
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.
2026-03-16 22:48:38 -05:00

60 lines
972 B
TOML

[workspace]
members = [".", "xtask"]
default-members = ["."]
[package]
name = "anvil"
version = "1.0.0"
edition = "2021"
authors = ["Eric Ratliff <eric@nxlearn.net>"]
description = "Arduino project generator and build tool - forges clean embedded projects"
license = "MIT"
[lib]
name = "anvil"
path = "src/lib.rs"
[[bin]]
name = "anvil"
path = "src/main.rs"
[dependencies]
# CLI framework
clap = { version = "4.4", features = ["derive", "cargo"] }
clap_complete = "4.4"
# Filesystem
dirs = "5.0"
# Configuration
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
toml = "0.8"
# Embedded templates
include_dir = "0.7"
# Error handling
anyhow = "1.0"
thiserror = "1.0"
# Colors
colored = "2.1"
# Process / which
which = "5.0"
home = "=0.5.9"
# Temp dirs (for refresh command)
tempfile = "3.13"
[dev-dependencies]
assert_cmd = "2.0"
predicates = "3.1"
serial_test = "3"
[profile.release]
opt-level = 3
lto = true
codegen-units = 1
strip = true