nirc-rs/build.sh

40 lines
856 B
Bash
Executable File

#!/usr/bin/env bash
# Build script for nirc-rs 0.8.1
# Requires: Rust toolchain (rustc 1.75+, cargo)
set -euo pipefail
echo "=== nirc-rs 0.8.1 build ==="
case "${1:-release}" in
release)
echo "Building release..."
cargo build --release 2>&1
;;
debug)
echo "Building debug..."
cargo build 2>&1
;;
check)
echo "Running cargo check..."
cargo check 2>&1
;;
clippy)
echo "Running clippy..."
cargo clippy -- -D warnings 2>&1
;;
test)
echo "Running tests..."
cargo test 2>&1
;;
clean)
echo "Cleaning..."
cargo clean 2>&1
;;
*)
echo "Usage: $0 [release|debug|check|clippy|test|clean]"
echo " (default: release)"
exit 1
;;
esac
echo "=== Build complete ==="