Welcome to the development guide for fluss-rust! This project builds the Fluss Rust client and language-specific bindings (Python, C++).
protoc)Install using your preferred package/version manager:
# Using mise mise install protobuf mise install rust # Using Homebrew (macOS) brew install protobuf # Using apt (Ubuntu/Debian) sudo apt-get install protobuf-compiler
We recommend RustRover IDE.
git clone https://github.com/apache/fluss-rust.git
Projects tab, click Open, and navigate to the root directory.Open.Fluss is an Apache project, every file needs an Apache licence header. To automate this in RustRover:
Settings > Editor > Copyright > Copyright Profiles.Apache with this text:Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Editor > Copyright and set Apache as the default profile.Editor > Copyright > Formatting > Rust, choose Use custom formatting, then Use line comment.Apply.crates/fluss (Fluss Rust client crate) crates/examples (Rust client examples) bindings/cpp (C++ bindings) bindings/python (Python bindings - PyO3)
# Build everything cargo build --workspace --all-targets # Run unit tests cargo test --workspace # Run integration tests (requires Docker) RUST_TEST_THREADS=1 cargo test --features integration_tests --workspace # Run a single test cargo test test_name
cd bindings/python # Install dev dependencies and build the extension uv sync --extra dev && uv run maturin develop # Run integration tests (requires Docker) uv run pytest test/ -v # To run against an existing cluster instead FLUSS_BOOTSTRAP_SERVERS=127.0.0.1:9123 uv run pytest test/ -v
cd bindings/cpp mkdir -p build && cd build cmake .. cmake --build .
We use cargo-deny to ensure all dependency licenses are Apache-compatible:
cargo install cargo-deny --locked cargo deny check licenses
CI runs formatting and clippy checks. Run these before submitting a PR:
cargo fmt --all cargo clippy --all-targets --fix --allow-dirty --allow-staged