Skip to content

Commit a3ae6eb

Browse files
committed
feat: Phase 32 — Rust search engine core (codexa-core) with full integration
- Add codexa-core Rust crate: native VectorStore (rayon-parallel inner-product), BM25 index (identical tokenisation), code chunker, file scanner (blake3), and RRF hybrid fusion — all exposed via PyO3 bindings - Add rust_backend.py: unified Python bridge with automatic fallback detection - Integrate Rust backend into VectorStore: cached RustVectorStore mirror for accelerated search, dual-format save (vectors.bin + vectors.faiss) - Integrate Rust BM25 into keyword_search: transparent RustBM25Index dispatch with in-memory and disk caching - Integrate Rust RRF into hybrid_search: native reciprocal_rank_fusion_rs with Python fallback - Update search_service: detect both vectors.faiss and vectors.bin for auto-indexing - Update .gitignore: exclude codexa-core/target/ build artifacts - All 2596 existing tests pass — zero regressions
1 parent 30744e8 commit a3ae6eb

13 files changed

Lines changed: 1447 additions & 3 deletions

File tree

codexa-core/Cargo.toml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
[package]
2+
name = "codexa-core"
3+
version = "0.1.0"
4+
edition = "2021"
5+
description = "Rust-native search and indexing engine for CodexA"
6+
license = "MIT"
7+
8+
[lib]
9+
name = "codexa_core"
10+
crate-type = ["cdylib"]
11+
12+
[dependencies]
13+
pyo3 = { version = "0.22", features = ["extension-module"] }
14+
numpy = "0.22"
15+
rayon = "1"
16+
blake3 = "1"
17+
walkdir = "2"
18+
globset = "0.4"
19+
serde = { version = "1", features = ["derive"] }
20+
serde_json = "1"
21+
regex = "1"
22+
ignore = "0.4"
23+
memmap2 = "0.9"
24+
25+
[profile.release]
26+
opt-level = 3
27+
lto = "thin"
28+
codegen-units = 1

codexa-core/pyproject.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[build-system]
2+
requires = ["maturin>=1.0,<2.0"]
3+
build-backend = "maturin"
4+
5+
[project]
6+
name = "codexa-core"
7+
version = "0.1.0"
8+
description = "Rust-native search and indexing engine for CodexA"
9+
requires-python = ">=3.9"
10+
license = { text = "MIT" }
11+
classifiers = [
12+
"Programming Language :: Rust",
13+
"Programming Language :: Python :: Implementation :: CPython",
14+
]
15+
16+
[tool.maturin]
17+
features = ["pyo3/extension-module"]

0 commit comments

Comments
 (0)