Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
184 lines (141 loc) · 4.53 KB
/
Copy pathCargo.toml
File metadata and controls
184 lines (141 loc) · 4.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
[package]
name = "apexbase"
version = "1.37.0"
edition = "2021"
authors = ["Birch Kwok <birchkwok@gmail.com>"]
description = "High-performance HTAP embedded database with Rust core"
license = "Apache-2.0"
readme = "README.md"
[lib]
name = "apexbase"
path = "apexbase/src/lib.rs"
crate-type = ["cdylib", "rlib"]
[features]
default = ["python"]
python = ["dep:pyo3", "dep:numpy"]
server = ["dep:pgwire", "dep:tokio", "dep:async-trait", "dep:futures", "dep:clap"]
flight = ["dep:arrow-flight", "dep:tonic", "dep:tokio", "dep:clap", "dep:futures"]
[dependencies]
# Python bindings with numpy support (optional — disabled for server binary)
pyo3 = { version = "0.22", features = ["multiple-pymethods"], optional = true }
numpy = { version = "0.22", optional = true }
# Memory-mapped I/O
memmap2 = "0.9"
# Serialization
serde = { version = "1.0", features = ["derive"] }
serde_json = { version = "1.0", features = ["raw_value"] }
bincode = "1.3"
# Arrow for zero-copy data transfer
arrow = { version = "59", default-features = false, features = ["ipc", "ffi", "csv", "json"] }
# Parquet for import/export
parquet = { version = "59", default-features = false, features = ["arrow", "snap"] }
# Error handling
thiserror = "1.0"
anyhow = "1.0"
libc = "0.2"
# Concurrency
parking_lot = "0.12"
rayon = "1.10"
dashmap = "5.5"
arc-swap = "1.7"
# Checksums
crc32fast = "1.4"
# Byte order handling
byteorder = "1.5"
# Shared byte buffers (used for zero-copy Arrow Buffer interop)
bytes = "1.6"
# Time handling
chrono = { version = "0.4", features = ["serde"] }
# Logging
log = "0.4"
env_logger = "0.11"
# Random number generation (for testing)
rand = "0.8"
# Regex for query parsing
regex = "1.10"
md5 = "0.7"
# Fast substring search
memchr = "2.7"
# Fast non-cryptographic hashing
ahash = "0.8"
# Fast float parsing for custom CSV parser
fast-float = "0.2"
# Bloom filter for fast membership testing
bloomfilter = "1.0"
# Cross-platform file locking
fs2 = "0.4"
# LZ4 compression (pure Rust, no C deps)
lz4_flex = "0.11"
# Zstd compression (default, higher ratio than LZ4)
zstd = "0.13"
# Lazy static initialization
once_cell = "1.19"
# ApexFTS primitives. The engine and on-disk format live in this repository.
roaring = "0.10"
unicode-normalization = "0.1"
unicode-segmentation = "1.12"
# ApexBase owns the process allocator instead of inheriting one from FTS.
mimalloc = { version = "0.1", default-features = false, features = ["local_dynamic_tls"] }
# JIT compilation for query expressions (Cranelift)
cranelift = "0.116"
cranelift-module = "0.116"
cranelift-jit = "0.116"
cranelift-native = "0.116"
target-lexicon = "0.13"
# PostgreSQL wire protocol server (optional — enabled for server binary)
pgwire = { version = "0.27", optional = true }
tokio = { version = "1", features = ["full"], optional = true }
async-trait = { version = "0.1", optional = true }
futures = { version = "0.3", optional = true }
clap = { version = "4", features = ["derive"], optional = true }
# Arrow Flight gRPC server (optional — enabled for flight binary)
arrow-flight = { version = "59", optional = true }
tonic = { version = "0.14", features = ["transport"], optional = true }
[[example]]
name = "bench_fts"
path = "examples/bench_fts.rs"
# ── Usage scenarios (ready-to-run, heavily commented) ────────────────────────
# Run one with:
# cargo run --example r01_config_store --no-default-features
[[example]]
name = "r01_config_store"
path = "usage-examples/Rust/r01_config_store.rs"
[[example]]
name = "r02_concurrent_writes"
path = "usage-examples/Rust/r02_concurrent_writes.rs"
[[example]]
name = "r03_batch_etl_csv"
path = "usage-examples/Rust/r03_batch_etl_csv.rs"
[[example]]
name = "r04_fulltext_search"
path = "usage-examples/Rust/r04_fulltext_search.rs"
[[example]]
name = "r05_vector_search"
path = "usage-examples/Rust/r05_vector_search.rs"
[[example]]
name = "r06_shared_file_analytics"
path = "usage-examples/Rust/r06_shared_file_analytics.rs"
[[example]]
name = "r07_rag_pipeline"
path = "usage-examples/Rust/r07_rag_pipeline.rs"
[[example]]
name = "r08_hybrid_retrieval"
path = "usage-examples/Rust/r08_hybrid_retrieval.rs"
[[example]]
name = "r09_embedded_data_lake"
path = "usage-examples/Rust/r09_embedded_data_lake.rs"
[[bin]]
name = "apexbase-server"
path = "apexbase/src/bin/server_main.rs"
required-features = ["server"]
[[bin]]
name = "apexbase-flight"
path = "apexbase/src/bin/flight_main.rs"
required-features = ["flight"]
[dev-dependencies]
tempfile = "3.10"
[profile.release]
opt-level = 3
lto = "fat"
codegen-units = 1
strip = true