fix(rust): ensure chat-server and stream-server compile in release mode
Add scripts/verify-rust-build.sh to verify all Rust crates (veza-common, veza-chat-server, veza-stream-server) compile in release mode. Phase 1 audit - P1.2
This commit is contained in:
parent
fef7e7fc7c
commit
cc2c5123bc
1 changed files with 40 additions and 0 deletions
40
scripts/verify-rust-build.sh
Executable file
40
scripts/verify-rust-build.sh
Executable file
|
|
@ -0,0 +1,40 @@
|
|||
#!/usr/bin/env bash
|
||||
# Verify that all Rust services (veza-common, veza-chat-server, veza-stream-server) compile in release mode.
|
||||
# Usage: ./scripts/verify-rust-build.sh
|
||||
# Exit: 0 on success, 1 on failure
|
||||
|
||||
set -e
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
||||
cd "$REPO_ROOT"
|
||||
|
||||
echo "=== Verifying Rust build (release mode) ==="
|
||||
|
||||
build_crate() {
|
||||
local crate="$1"
|
||||
echo ""
|
||||
echo "Building $crate..."
|
||||
if (cd "$crate" && cargo build --release); then
|
||||
echo " OK: $crate"
|
||||
return 0
|
||||
else
|
||||
echo " FAILED: $crate"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
failed=0
|
||||
|
||||
build_crate "veza-common" || failed=1
|
||||
build_crate "veza-chat-server" || failed=1
|
||||
build_crate "veza-stream-server" || failed=1
|
||||
|
||||
echo ""
|
||||
if [ $failed -eq 0 ]; then
|
||||
echo "=== All Rust crates built successfully ==="
|
||||
exit 0
|
||||
else
|
||||
echo "=== Some Rust crates failed to build ==="
|
||||
exit 1
|
||||
fi
|
||||
Loading…
Reference in a new issue