Flatten project structure: move warpgate/ contents to repo root

Single-crate project doesn't need a subdirectory. Moves Cargo.toml,
src/, templates/ to root for standard Rust project layout. Updates
.gitignore and test harness binary paths accordingly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
grabbit 2026-02-18 11:25:15 +08:00
parent a2d49137f9
commit 46e592c3a4
30 changed files with 6 additions and 6 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
/warpgate/target/
/target/

View File

View File

@ -11,7 +11,7 @@ set -euo pipefail
# Environment & paths
# ---------------------------------------------------------------------------
WARPGATE_BIN="${WARPGATE_BIN:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)/warpgate/target/release/warpgate}"
WARPGATE_BIN="${WARPGATE_BIN:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)/target/release/warpgate}"
WARPGATE_TEST_DIR="${WARPGATE_TEST_DIR:-/tmp/warpgate-test}"
WARPGATE_TEST_LONG="${WARPGATE_TEST_LONG:-0}"
WARPGATE_TEST_BTRFS="${WARPGATE_TEST_BTRFS:-}"

View File

@ -21,10 +21,10 @@ PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
# Auto-detect warpgate binary
if [[ -z "${WARPGATE_BIN:-}" ]]; then
if [[ -x "$PROJECT_ROOT/warpgate/target/release/warpgate" ]]; then
export WARPGATE_BIN="$PROJECT_ROOT/warpgate/target/release/warpgate"
elif [[ -x "$PROJECT_ROOT/warpgate/target/debug/warpgate" ]]; then
export WARPGATE_BIN="$PROJECT_ROOT/warpgate/target/debug/warpgate"
if [[ -x "$PROJECT_ROOT/target/release/warpgate" ]]; then
export WARPGATE_BIN="$PROJECT_ROOT/target/release/warpgate"
elif [[ -x "$PROJECT_ROOT/target/debug/warpgate" ]]; then
export WARPGATE_BIN="$PROJECT_ROOT/target/debug/warpgate"
else
echo "ERROR: warpgate binary not found. Build with: cargo build --release" >&2
echo " Or set WARPGATE_BIN=/path/to/warpgate" >&2