Thank you for your interest in contributing to Roboflow! This document provides guidelines and instructions for contributors.
Please be respectful and constructive in all interactions. See CODE_OF_CONDUCT.md for details.
- Rust 1.92 or later
-
Fork the repository and clone your fork:
git clone https://github.com/YOUR_USERNAME/roboflow.git cd roboflow git remote add upstream https://github.com/archebase/roboflow.git -
Build the Rust library:
cargo build --release
-
Run tests to verify your setup:
cargo test
Roboflow is organized as a Cargo workspace with multiple crates:
roboflow/ # Workspace root
├── crates/
│ ├── roboflow-core/ # Core types and error handling
│ ├── roboflow-storage/ # Storage abstraction (S3, OSS, local)
│ ├── roboflow-dataset/ # Dataset writers (KPS, LeRobot)
│ ├── roboflow-distributed/ # TiKV distributed coordination
│ ├── roboflow-hdf5/ # Optional HDF5 support
│ └── roboflow/ # Main crate with CLI tools
│ ├── src/
│ │ ├── pipeline/ # Pipeline implementations
│ │ │ ├── stages/ # Standard pipeline stages
│ │ │ ├── hyper/ # 7-stage HyperPipeline
│ │ │ ├── fluent/ # Builder API
│ │ │ ├── gpu/ # GPU compression support
│ │ │ └── auto_config.rs # Hardware-aware configuration
│ │ └── bin/ # CLI tools
│ └── Cargo.toml
Key: The project uses the external robocodec library for I/O operations and format handling.
| Feature | Description |
|---|---|
dataset-hdf5 |
KPS HDF5 dataset support |
dataset-parquet |
KPS Parquet dataset support |
dataset-depth |
KPS depth video support |
dataset-all |
All KPS features |
cloud-storage |
S3/OSS cloud storage support |
jemalloc |
Use jemalloc allocator (Linux only) |
cli |
CLI tools |
profiling |
Profiling support |
Enable features when building:
cargo build --features "dataset-all"
cargo test --features dataset-allgit checkout -b feature/your-feature-name
# or
git checkout -b fix/your-bug-fix- Follow the existing code style: The project uses standard Rust formatting
- Write tests: Add tests for new functionality or bug fixes
- Update documentation: Update relevant documentation and comments
- Commit messages: Use clear, descriptive commit messages:
feat: add support for XYZ format fix: handle edge case in CDR decoder docs: update installation instructions
# Run all tests
cargo test
# Run tests with KPS features (requires HDF5 installed)
cargo test --features dataset-all
# Run specific test
cargo test test_name
# Run clippy to check for issues
cargo clippy --all-targets --all-features -- -D warnings# Format all code
cargo fmt
# Lint checks
cargo clippy --all-targets -- -D warnings- Implement codec in the
robocodeclibrary - Register in the core registry
- Add schema parser if needed
- Add tests for encode/decode consistency
- Implement reader for the format
- Implement writer for the format
- Add format detection
- Add integration tests
- Add binary to
crates/roboflow/src/bin/ - Update root
Cargo.tomlwith the binary name - Add help documentation and examples
- Unit tests: Test individual functions and modules
- Integration tests: Test end-to-end functionality
- Round-trip tests: Verify encode/decode consistency
For detailed architecture information, see:
- ARCHITECTURE.md - High-level system design
- PIPELINE.md - Pipeline architecture details
- MEMORY.md - Memory management and arena allocation
Before creating bug reports, please check existing issues. When creating a bug report, include:
- Clear title and description: Summarize the issue
- Steps to reproduce: Detailed steps to reproduce the bug
- Expected behavior: What you expected to happen
- Actual behavior: What actually happened
- Environment: OS, Rust version
- Logs/error messages: Any relevant error messages or stack traces
- Test files: Sample data files that reproduce the issue (if applicable)
- Ensure all tests pass and code is formatted
- Push your branch to your fork
- Create a pull request to the
mainbranch - Fill out the pull request template
- Wait for review and address feedback
Maintainers follow this process for releases:
- Update version in
Cargo.toml - Update
CHANGELOG.md - Create git tag
- Publish to crates.io
Feel free to open an issue for questions or discussion about contributions.