Skip to content

Commit b969665

Browse files
committed
Refactor update_libchdb.sh for system-wide install and improve README documentation
1 parent 35d4223 commit b969665

File tree

6 files changed

+432
-189
lines changed

6 files changed

+432
-189
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Cargo.lock
33
*.tar.gz
44
*.so
5-
*.h
5+
chdb.h
66
var
77
udf
88
*.parquet

README.md

+25-4
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,42 @@
33
[![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)
44

55
# chdb-rust <img src="https://upload.wikimedia.org/wikipedia/commons/thumb/d/d5/Rust_programming_language_black_logo.svg/1024px-Rust_programming_language_black_logo.svg.png" height=20 />
6+
67
Experimental [chDB](https://github.com/chdb-io/chdb) FFI bindings for Rust
78

8-
### Status
9+
## Status
910

1011
- Experimental, unstable, subject to changes
11-
- Requires [`libchdb`](https://github.com/chdb-io/chdb) on the system
12+
- Requires [`libchdb`](https://github.com/chdb-io/chdb) on the system. You can install the compatible version from
13+
`install_libchdb.sh`
14+
15+
## Usage
16+
17+
### Install libchdb
18+
19+
You can install it system-wide
20+
21+
```bash
22+
./update_libchdb.sh --global
23+
```
24+
25+
or use it in a local directory
26+
27+
```bash
28+
./update_libchdb.sh --local
29+
```
30+
31+
### Build
1232

13-
#### Build binding
1433
```bash
15-
./update_libchdb.sh
1634
RUST_BACKTRACE=full cargo build --verbose
35+
1736
```
1837

1938
### Run tests
39+
2040
`cargo test`
2141

2242
### Examples
43+
2344
See `tests` directory.

build.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ fn main() {
1616
let bindings = bindgen::Builder::default()
1717
// The input header we would like to generate
1818
// bindings for.
19-
.header("chdb.h")
19+
.header("wrapper.h")
2020
// Tell cargo to invalidate the built crate whenever any of the
2121
// included header files changed.
2222
.parse_callbacks(Box::new(bindgen::CargoCallbacks::new()))

0 commit comments

Comments
 (0)