https://github.com/chdb-io/chdb-rust
Rust FFI example binding for chDB, an embedded SQL Engine powered by ClickHouse
https://github.com/chdb-io/chdb-rust
binding chdb clickhouse ffi rust
Last synced: 6 months ago
JSON representation
Rust FFI example binding for chDB, an embedded SQL Engine powered by ClickHouse
- Host: GitHub
- URL: https://github.com/chdb-io/chdb-rust
- Owner: chdb-io
- License: apache-2.0
- Created: 2023-05-10T16:37:35.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-03-19T13:34:52.000Z (over 1 year ago)
- Last Synced: 2025-03-19T14:33:40.187Z (over 1 year ago)
- Topics: binding, chdb, clickhouse, ffi, rust
- Language: Rust
- Homepage: https://chdb.io
- Size: 68.4 KB
- Stars: 35
- Watchers: 6
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

[](https://github.com/chdb-io/chdb-rust/actions/workflows/rust.yml)
# chdb-rust 
Experimental [chDB](https://github.com/chdb-io/chdb) FFI bindings for Rust
## Status
- Experimental, unstable, subject to changes
- Automatically downloads and manages [`libchdb`](https://github.com/chdb-io/chdb) dependencies during build
## Usage
The library automatically downloads the required `libchdb` binary during the build process.
### Supported platforms:
- Linux x86_64
- Linux aarch64
- macOS x86_64
- macOS arm64 (Apple Silicon)
### Manual Installation (Optional)
If you prefer to install `libchdb` manually, you can:
Install it system-wide:
```bash
./update_libchdb.sh --global
```
Or use it in a local directory:
```bash
./update_libchdb.sh --local
```
### Build
```bash
RUST_BACKTRACE=full cargo build --verbose
```
### Run tests
`cargo test`
### Examples
- **Runnable examples**: See the `examples/` directory. Run them with `cargo run --example `
- **Documentation**: See `docs/examples.md` for detailed examples and explanations
- **Tests**: See `tests/` directory for test examples