chore(m0): initialize cargo workspace, crate skeletons and ci gate
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
[package]
|
||||
name = "balance"
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
rust-version.workspace = true
|
||||
authors.workspace = true
|
||||
description = "Headless mass simulation for balance tuning"
|
||||
|
||||
[[bin]]
|
||||
name = "balance"
|
||||
path = "src/main.rs"
|
||||
|
||||
[dependencies]
|
||||
sim.workspace = true
|
||||
content.workspace = true
|
||||
serde_json.workspace = true
|
||||
@@ -0,0 +1,8 @@
|
||||
//! Headless balance CLI. Real implementation at M2.
|
||||
|
||||
fn main() {
|
||||
println!(
|
||||
"balance: sim_version={} (not implemented yet, M2)",
|
||||
sim::SIM_VERSION
|
||||
);
|
||||
}
|
||||
Executable
+21
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
# Full local CI gate. Fails fast on the first broken rule.
|
||||
set -euo pipefail
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
echo '==> cargo fmt --check'
|
||||
cargo fmt --all -- --check
|
||||
|
||||
echo '==> clippy (deny warnings)'
|
||||
cargo clippy --workspace --all-targets -- -D warnings
|
||||
|
||||
echo '==> float guard in crates/sim/src'
|
||||
if grep -rnE '(^|[^A-Za-z0-9_])f(32|64)([^A-Za-z0-9_]|$)' crates/sim/src --include='*.rs' | grep -v '^.*://' ; then
|
||||
echo 'ERROR: floating point types in crates/sim (see ADR 0002)' >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo '==> cargo test'
|
||||
cargo test --workspace
|
||||
|
||||
echo '==> OK'
|
||||
Reference in New Issue
Block a user