-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from chdb-io/fixPipeline
Fix pipeline
- Loading branch information
Showing
4 changed files
with
124 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,17 @@ | ||
<a href="https://chdb.fly.dev" target="_blank"> | ||
<img src="https://avatars.githubusercontent.com/u/132536224" width=130 /> | ||
</a> | ||
<img src="https://avatars.githubusercontent.com/u/132536224" width=130 /> | ||
|
||
[![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 <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 /> | ||
Experimental [chDB](https://github.com/auxten/chdb) FFI bindings for Rust | ||
Experimental [chDB](https://github.com/chdb-io/chdb) FFI bindings for Rust | ||
### Status | ||
|
||
- experimental, unstable, subject to changes | ||
- requires [`libchdb`](https://github.com/chdb-io/chdb) on the system | ||
- ffi hack for testing. not a proper library or crate! | ||
- Experimental, unstable, subject to changes | ||
- Requires [`libchdb`](https://github.com/chdb-io/chdb) on the system | ||
|
||
#### Build binding | ||
```bash | ||
cargo build | ||
cargo run | ||
./update_libchdb.sh | ||
RUST_BACKTRACE=full cargo build --verbose | ||
cargo run --example basic | ||
``` | ||
|
||
:wave: _Rust developer? Jump in and help us evolve this example into a stable crate!_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
|
||
#!/bin/bash | ||
|
||
# Get the newest release version | ||
LATEST_RELEASE=$(curl --silent "https://api.github.com/repos/chdb-io/chdb/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/') | ||
|
||
# Download the correct version based on the platform | ||
case "$(uname -s)" in | ||
Linux) | ||
if [[ $(uname -m) == "aarch64" ]]; then | ||
PLATFORM="linux-aarch64-libchdb.tar.gz" | ||
else | ||
PLATFORM="linux-x86_64-libchdb.tar.gz" | ||
fi | ||
;; | ||
Darwin) | ||
if [[ $(uname -m) == "arm64" ]]; then | ||
PLATFORM="macos-arm64-libchdb.tar.gz" | ||
else | ||
PLATFORM="macos-x86_64-libchdb.tar.gz" | ||
fi | ||
;; | ||
*) | ||
echo "Unsupported platform" | ||
exit 1 | ||
;; | ||
esac | ||
|
||
DOWNLOAD_URL="https://github.com/chdb-io/chdb/releases/download/$LATEST_RELEASE/$PLATFORM" | ||
|
||
echo "Downloading $PLATFORM from $DOWNLOAD_URL" | ||
|
||
# Download the file | ||
curl -L -o libchdb.tar.gz $DOWNLOAD_URL | ||
|
||
# Untar the file | ||
tar -xzf libchdb.tar.gz | ||
|
||
# Set execute permission for libchdb.so | ||
chmod +x libchdb.so | ||
|
||
# Clean up | ||
rm -f libchdb.tar.gz |