chdb-rust
Experimental chDB FFI bindings for Rust.
Documentation
Full API Documentation - Complete Rust API reference on docs.rs
Status
Experimental - This library is currently experimental, unstable, and subject to changes.
The library automatically downloads and manages libchdb dependencies during the build process.
Quick Start
Add chdb-rust to your Cargo.toml:
[]
= "1.1.0"
The library will automatically download the required libchdb binary during the build process.
Supported Platforms
- Linux: x86_64, aarch64
- macOS: x86_64, arm64 (Apple Silicon)
Building
Standard Build
Verbose Build (for debugging)
RUST_BACKTRACE=full
Manual Installation (Optional)
If you prefer to install libchdb manually instead of automatic download:
System-wide installation:
Local directory installation:
Testing
Run the test suite:
Examples
- Runnable examples: See the examples/ directory
- Detailed documentation: See docs/examples.md for comprehensive examples and explanations
- Test examples: See tests/ directory for additional usage examples
Contributing
We welcome contributions! Here's how you can help:
Getting Started
-
Fork the repository and clone your fork
-
Create a branch for your changes
# or -
Make your changes and ensure they work
- Run tests:
cargo test - Check formatting:
cargo fmt --check - Run clippy:
cargo clippy
- Run tests:
-
Commit your changes with clear, descriptive commit messages
-
Push to your fork and open a Pull Request
Development Guidelines
- Code Style: Follow Rust conventions and run
cargo fmtbefore committing - Testing: Add tests for new features and ensure all existing tests pass
- Documentation: Update relevant documentation for user-facing changes
- Commit Messages: Write clear, descriptive commit messages
- Pull Requests:
- Provide a clear description of your changes
- Reference any related issues
- Ensure CI checks pass
Reporting Issues
Found a bug or have a feature request? Please open an issue on GitHub with:
- A clear description of the problem or feature
- Steps to reproduce (for bugs)
- Expected vs actual behavior
- Your environment (OS, Rust version, etc.)
Questions?
Feel free to open a discussion or issue if you have questions about contributing!