diff --git a/Cargo.toml b/Cargo.toml index 6f815062..b008b6f7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,9 +28,13 @@ license = "Apache-2.0" rust-version = "1.82" build = "build.rs" +[lib] +name = "distributed_datafusion" +path = "src/lib.rs" + [[bin]] name = "distributed-datafusion" -path = "src/main.rs" +path = "src/bin/distributed-datafusion.rs" [dependencies] anyhow = "1" diff --git a/build.sh b/build.sh deleted file mode 100755 index cbf0c06c..00000000 --- a/build.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash -set -e - -echo "Building DataFusion Distributed..." - -# Check if release flag is passed -if [ "$1" = "--release" ] || [ "$1" = "-r" ]; then - echo "Building in release mode..." - cargo build --release - echo "✅ Build completed successfully!" - echo "Binary available at: ./target/release/distributed-datafusion" -else - echo "Building in debug mode..." - cargo build - echo "✅ Build completed successfully!" - echo "Binary available at: ./target/debug/distributed-datafusion" -fi - -echo "" -echo "Usage:" -echo " ./target/debug/distributed-datafusion --help # View help" -echo " ./target/debug/distributed-datafusion --mode proxy --port 20200 # Start proxy" -echo " ./target/debug/distributed-datafusion --mode worker --port 20201 # Start worker" \ No newline at end of file diff --git a/scripts/launch_tpch_cluster.sh b/scripts/launch_tpch_cluster.sh index d3ae264a..0ec6e73a 100755 --- a/scripts/launch_tpch_cluster.sh +++ b/scripts/launch_tpch_cluster.sh @@ -68,14 +68,10 @@ if [ "$NUM_WORKERS" -lt 1 ]; then fi # Check if the binary exists, build if not -if [ ! -f "./target/release/distributed-datafusion" ]; then +if [ ! -f "./target/debug/distributed-datafusion" ]; then echo "Binary not found, building release version..." echo "This may take a few minutes on first run..." - if [ -f "./build.sh" ]; then - ./build.sh #--release - else - cargo build #--release - fi + cargo build #--release # Verify the build was successful #if [ ! -f "./target/release/distributed-datafusion" ]; then diff --git a/src/main.rs b/src/bin/distributed-datafusion.rs similarity index 100% rename from src/main.rs rename to src/bin/distributed-datafusion.rs