mirror of
https://github.com/jmcorgan/fips.git
synced 2026-07-30 19:46:15 +00:00
Replace examples/two-node-udp/ (netns-based) with examples/docker-network/ (Docker compose, 5 nodes, mesh + chain topologies). The new harness uses auto-detecting build script and includes SVG topology diagrams. Remove unused get_session_mut, remote_addr(), remote_pubkey() methods. Gate test-only accessors with #[cfg(test)]. Zero warnings in release build.
25 lines
802 B
Bash
Executable File
25 lines
802 B
Bash
Executable File
#!/bin/bash
|
|
# Build the FIPS binary and copy it to the docker build context.
|
|
set -e
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
DOCKER_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|
|
|
# Find project root (directory containing Cargo.toml)
|
|
PROJECT_ROOT="$(cd "$DOCKER_DIR/../.." && pwd)"
|
|
if [ ! -f "$PROJECT_ROOT/Cargo.toml" ]; then
|
|
echo "Error: Cannot find Cargo.toml at $PROJECT_ROOT" >&2
|
|
echo "Expected layout: <project-root>/examples/docker-network/scripts/build.sh" >&2
|
|
exit 1
|
|
fi
|
|
|
|
echo "Building FIPS (release)..."
|
|
cargo build --release --manifest-path="$PROJECT_ROOT/Cargo.toml"
|
|
|
|
echo "Copying binary to docker context..."
|
|
cp "$PROJECT_ROOT/target/release/fips" "$DOCKER_DIR/fips"
|
|
|
|
echo "Done. Binary at $DOCKER_DIR/fips"
|
|
echo ""
|
|
echo "Next: cd $DOCKER_DIR && docker compose --profile mesh build"
|