Add Cargo workspace, crate skeletons and the gate

Implemented-By: Laguna S 2.1 (OpenCode)
This commit is contained in:
2026-09-17 06:45:02 -07:00
parent 3e26c2e3c0
commit 8dc04b1d48
31 changed files with 516 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
#!/bin/sh
# Fails if any *.rs file under ROOT/crates has more than 500 lines.
# Files under any target/ directory are ignored. Test files count.
ROOT="${1:-.}"
bad=$(find "$ROOT/crates" -type f -name '*.rs' ! -path '*/target/*' \
-exec awk 'END { exit !(NR > 500) }' {} \; -print 2>/dev/null)
if [ -n "$bad" ]; then
echo "$bad" | while read -r f; do
[ -n "$f" ] && echo "check-lines: $f" >&2
done
exit 1
fi
exit 0