An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

          

[![Rust](https://github.com/chdb-io/chdb-rust/actions/workflows/rust.yml/badge.svg)](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