Building Fluss from Source
This page covers how to build Fluss from sources.
In order to build Fluss you need to get the source code by cloning the git repository.
In addition, you need Maven 3.8.6 and a JDK (Java Development Kit). Fluss requires Java 11 to build.
To clone from git, enter:
git clone git@github.com:apache/fluss.git
If you want to build a specific release or release candidate, have a look at the existing tags using
git tag -n
and checkout the corresponding branch using
git checkout <tag>
The simplest way of building Fluss is by running:
mvn clean install -DskipTests
This instructs Maven (mvn) to first remove all existing builds (clean) and then create a new Fluss binary (install).
Using the included Maven Wrapper by replacing mvn with ./mvnw ensures that the correct Maven version is used.
To speed up the build you can:
- skip tests by using
-DskipTests - use Maven's parallel build feature, e.g.,
mvn package -T 1Cwill attempt to build 1 module for each CPU core in parallel.
The build script will be:
mvn clean install -DskipTests -T 1C
NOTE:
- For local testing, it's recommend to use directory
${project}/build-targetin project. - For deploying distributed cluster, it's recommend to use binary file named
fluss-xxx-bin.tgz, the file is in directory${project}/fluss-dist/target.
Building the Rust client (fluss-rust)
The Rust client, language bindings, and examples live under fluss-rust/ and build with Cargo. You need Rust (the toolchain pinned in fluss-rust/rust-toolchain.toml, currently 1.85+) and protoc, the Protobuf compiler — build.rs compiles the canonical fluss-rpc/src/main/proto/FlussApi.proto.
# protoc (pick one)
brew install protobuf # macOS
sudo apt-get install protobuf-compiler # Debian/Ubuntu
cd fluss-rust
cargo build --workspace --all-targets # build everything
cargo test --workspace # unit tests
Integration tests start a Fluss cluster via Docker:
RUST_TEST_THREADS=1 cargo test --features integration_tests --workspace
The Python and C++ bindings build on top of the Rust crate:
cd fluss-rust/bindings/python && uv sync --extra dev && uv run maturin develop # Python
cd fluss-rust/bindings/cpp && cmake -B build && cmake --build build # C++
Before pushing, run the same checks CI does:
cd fluss-rust
cargo fmt --all -- --check
cargo clippy --all-targets --workspace -- -D warnings
cargo deny check licenses