Please read the top-level CONTRIBUTING.md first for general contribution guidelines, pull request process, and commit requirements.
This document covers Rust-specific development setup and workflow.
- Git
- Rust 1.70+ (stable toolchain)
- Protocol Buffers compiler (
protoc)
-
Clone the repository:
git clone https://github.com/databricks/zerobus-sdk.git cd zerobus-sdk/rust -
Build the project:
make build
This will download all dependencies and build the project in debug mode.
Code style is enforced by a formatter check in your pull request. We use rustfmt to format our code. Run make fmt to ensure your code is properly formatted prior to raising a pull request.
make fmtThis runs cargo fmt --all to format all crates in the workspace.
make lintThis runs cargo clippy to catch common mistakes and improve your code.
make testThis runs cargo test for all crates in the workspace.
All pull requests must pass CI checks:
- fmt: Runs formatting checks (
cargo fmt) - lint: Runs linting checks (
cargo clippy) - tests: Runs tests on Ubuntu and Windows for the stable Rust toolchain.
You can view CI results in the GitHub Actions tab of the pull request.
make build- Build the project for debuggingmake build-release- Build the project for releasemake build-jni- Build JNI library for Java SDKmake build-ffi- Build C FFI library for language bindingsmake fmt- Format code withrustfmtmake lint- Run linting withclippymake check- Run all checks (fmt and lint)make test- Run testsmake clean- Remove build artifactsmake help- Show available targets