Skip to content

Commit 3ff6fba

Browse files
feat: rewrite as Rust bindings for RayforceDB v2
1 parent c35ffbf commit 3ff6fba

136 files changed

Lines changed: 12717 additions & 11963 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.cargo/config.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[env]
2+
LIBCLANG_PATH = "/Library/Developer/CommandLineTools/usr/lib"
3+
RUST_TEST_THREADS = "1"

.github/workflows/ci.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [master, main]
6+
pull_request:
7+
8+
env:
9+
CARGO_TERM_COLOR: always
10+
RAYFORCE_SRC: ${{ github.workspace }}/rayforce-core
11+
12+
jobs:
13+
test:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout bindings
17+
uses: actions/checkout@v4
18+
19+
- name: Checkout RayforceDB core
20+
uses: actions/checkout@v4
21+
with:
22+
repository: RayforceDB/rayforce
23+
path: rayforce-core
24+
25+
- name: Install toolchain deps
26+
run: sudo apt-get update && sudo apt-get install -y clang libclang-dev build-essential
27+
28+
- name: Install Rust
29+
uses: dtolnay/rust-toolchain@stable
30+
with:
31+
components: rustfmt, clippy
32+
33+
- name: Cache cargo
34+
uses: actions/cache@v4
35+
with:
36+
path: |
37+
~/.cargo/registry
38+
~/.cargo/git
39+
target
40+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
41+
42+
- name: Format check
43+
run: cargo fmt --all -- --check
44+
45+
- name: Clippy
46+
run: cargo clippy --workspace --all-targets -- -D warnings
47+
48+
- name: Test
49+
run: cargo test --workspace

.github/workflows/docs.yml

Lines changed: 18 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,44 @@
1-
name: Deploy Documentation
1+
name: Docs
22

33
on:
44
push:
5-
branches:
6-
- master
7-
paths:
8-
- 'docs/**'
9-
- '.github/workflows/docs.yml'
5+
branches: [master, main]
106
workflow_dispatch:
117

128
permissions:
139
contents: read
1410
pages: write
1511
id-token: write
1612

13+
# Allow one concurrent deployment.
1714
concurrency:
18-
group: "pages"
19-
cancel-in-progress: false
15+
group: pages
16+
cancel-in-progress: true
2017

2118
jobs:
22-
build:
19+
build-deploy:
2320
runs-on: ubuntu-latest
21+
environment:
22+
name: github-pages
23+
url: ${{ steps.deploy.outputs.page_url }}
2424
steps:
25-
- name: Checkout
26-
uses: actions/checkout@v4
25+
- uses: actions/checkout@v4
2726

28-
- name: Setup Python
29-
uses: actions/setup-python@v5
27+
- uses: actions/setup-python@v5
3028
with:
31-
python-version: '3.x'
29+
python-version: "3.x"
3230

33-
- name: Install dependencies
34-
run: |
35-
pip install -r docs/requirements.txt
31+
- name: Install MkDocs Material
32+
run: pip install mkdocs-material
3633

37-
- name: Build documentation
38-
run: |
39-
cd docs
40-
mkdocs build --strict
41-
42-
- name: Setup Pages
43-
uses: actions/configure-pages@v4
34+
- name: Build the site
35+
run: mkdocs build --strict -f docs/mkdocs.yml
4436

4537
- name: Upload artifact
4638
uses: actions/upload-pages-artifact@v3
4739
with:
48-
path: 'docs/site'
40+
path: docs/site
4941

50-
deploy:
51-
environment:
52-
name: github-pages
53-
url: ${{ steps.deployment.outputs.page_url }}
54-
runs-on: ubuntu-latest
55-
needs: build
56-
steps:
5742
- name: Deploy to GitHub Pages
58-
id: deployment
43+
id: deploy
5944
uses: actions/deploy-pages@v4
60-

.gitignore

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
1-
target/
1+
# Rust
2+
/target/
3+
**/*.rs.bk
4+
5+
# Cargo.lock is not committed (this is primarily a library workspace)
6+
Cargo.lock
7+
8+
# MkDocs build output
9+
/docs/site/
10+
11+
# macOS
12+
.DS_Store
13+
14+
# Logs / local state
215
*.log
3-
*.lock
416
.rayhist.dat
5-
docs/site

Cargo.toml

Lines changed: 9 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,14 @@
1-
[package]
2-
name = "rayforce"
1+
[workspace]
2+
resolver = "2"
3+
members = ["rayforce-sys", "rayforce"]
4+
5+
[workspace.package]
36
version = "0.1.0"
47
edition = "2021"
5-
authors = ["RayforceDB Team"]
6-
description = "Safe Rust bindings for RayforceDB - the ultra-fast columnar database"
78
license = "MIT"
9+
authors = ["RayforceDB"]
810
repository = "https://github.com/RayforceDB/rayforce-rs"
9-
homepage = "https://rayforcedb.com"
10-
documentation = "https://rs.rayforcedb.com"
11-
readme = "README.md"
12-
keywords = ["database", "rayforce", "columnar", "time-series", "analytics"]
13-
categories = ["database", "api-bindings"]
14-
rust-version = "1.70"
15-
16-
[lib]
17-
name = "rayforce"
18-
crate-type = ["rlib", "cdylib"]
19-
20-
[dependencies]
21-
libc = "0.2"
22-
thiserror = "2.0"
23-
chrono = "0.4"
24-
uuid = { version = "1.0", features = ["v4"] }
25-
26-
[dev-dependencies]
27-
tokio = { version = "1.36", features = ["full"] }
28-
once_cell = "1.19"
29-
serial_test = "3.0"
30-
reedline = "0.38"
31-
nu-ansi-term = "0.50"
32-
dirs-next = "2.0"
33-
34-
[build-dependencies]
35-
bindgen = "0.69.1"
36-
cc = "1.0"
37-
pkg-config = "0.3"
11+
rust-version = "1.74"
3812

39-
[features]
40-
default = []
41-
# Enable this to use system-installed rayforce instead of building from source
42-
system-rayforce = []
13+
[workspace.dependencies]
14+
rayforce-sys = { path = "rayforce-sys", version = "0.1.0" }

LICENCE renamed to LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2025 Anton Kundenko <singaraiona@gmail.com>
3+
Copyright (c) 2026 RayforceDB Team
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)