Skip to content

Commit 9ae99d5

Browse files
committed
chore(workspace): migrate to workspace-managed dependencies and configuration
- Move common package metadata to workspace level in Cargo.toml - Replace individual dependency versions with workspace references - Add comprehensive workspace dependencies section for shared crates - Configure workspace lints for rust and clippy - Set up release and development profiles at workspace level - Update python and rust Cargo.toml files to use workspace inheritance - Consolidate all dependency management to central workspace configuration
1 parent 8d94f34 commit 9ae99d5

File tree

4 files changed

+182
-81
lines changed

4 files changed

+182
-81
lines changed

Cargo.toml

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,126 @@
11
[workspace]
22
members = ["rust", "python"]
33
resolver = "2"
4+
5+
[workspace.package]
6+
version = "0.1.19"
7+
edition = "2024"
8+
authors = ["zTgx <beautifularea@gmail.com>"]
9+
license = "Apache-2.0"
10+
repository = "https://github.com/vectorlessflow/vectorless"
11+
homepage = "https://vectorless.dev"
12+
documentation = "https://docs.rs/vectorless"
13+
14+
[workspace.dependencies]
15+
# Async runtime
16+
tokio = { version = "1", features = ["full"] }
17+
async-trait = "0.1"
18+
futures = "0.3"
19+
20+
# Serialization
21+
serde = { version = "1.0", features = ["derive"] }
22+
serde_json = "1.0"
23+
toml = "0.8"
24+
25+
# Error handling
26+
thiserror = "2"
27+
anyhow = "1"
28+
29+
# OpenAI-compatible API client
30+
async-openai = { version = "0.34", features = ["chat-completion"] }
31+
32+
# UUID
33+
uuid = { version = "1.10", features = ["v4", "serde"] }
34+
35+
# Time
36+
chrono = { version = "0.4", default-features = false, features = ["serde", "clock"] }
37+
38+
# Logging
39+
tracing = "0.1"
40+
41+
# Rate limiting
42+
governor = "0.6"
43+
nonzero_ext = "0.3"
44+
45+
# Token counting
46+
tiktoken-rs = "0.9"
47+
48+
# Text processing
49+
regex = "1.10"
50+
51+
# Markdown parsing
52+
pulldown-cmark = { version = "0.12", default-features = false, features = ["simd"] }
53+
54+
# Tree data structure
55+
indextree = { version = "4.8.0", features = ["deser"] }
56+
57+
# LRU cache
58+
lru = "0.12"
59+
60+
# Checksum
61+
sha2 = "0.10"
62+
63+
# BLAKE2b hashing
64+
blake2 = "0.10"
65+
base64 = "0.22"
66+
67+
# Synchronization primitives
68+
parking_lot = "0.12"
69+
70+
# Compression
71+
flate2 = "1.0"
72+
73+
# File locking (Unix)
74+
libc = "0.2"
75+
76+
# PDF processing
77+
pdf-extract = "0.10.0"
78+
lopdf = "0.34"
79+
80+
# DOCX processing
81+
zip = "2.2"
82+
roxmltree = "0.20"
83+
84+
# Random number generation
85+
rand = "0.8"
86+
87+
# BM25 scoring
88+
bm25 = { version = "2.3.2", features = ["parallelism"] }
89+
90+
# HTML parsing
91+
scraper = "0.22"
92+
93+
# Python bindings
94+
pyo3 = { version = "0.22", features = ["extension-module"] }
95+
96+
# Dev dependencies
97+
tempfile = "3.10"
98+
tokio-test = "0.4"
99+
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
100+
101+
[workspace.lints.rust]
102+
missing_docs = "warn"
103+
unsafe_code = "warn"
104+
105+
[workspace.lints.clippy]
106+
all = "warn"
107+
pedantic = "warn"
108+
109+
# Profile settings (must be at root level, not under workspace)
110+
[profile.release]
111+
opt-level = 3
112+
lto = "thin"
113+
codegen-units = 1
114+
strip = true
115+
panic = "abort"
116+
117+
[profile.dev]
118+
opt-level = 0
119+
debug = true
120+
121+
[profile.bench]
122+
inherits = "release"
123+
debug = true
124+
125+
[profile.release.package."*"]
126+
opt-level = 3

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<div align="center">
22

3-
![Vectorless](docs/design/logo-horizontal.svg)
3+
<img src="https://raw.githubusercontent.com/vectorlessflow/vectorless/main/docs/design/logo-horizontal.svg" alt="Vectorless" width="400">
44

5-
[![Crates.io](https://img.shields.io/crates/v/vectorless.svg)](https://crates.io/crates/vectorless)
65
[![PyPI](https://img.shields.io/pypi/v/vectorless.svg)](https://pypi.org/project/vectorless/)
7-
[![Downloads](https://img.shields.io/crates/d/vectorless.svg)](https://crates.io/crates/vectorless)
8-
[![Documentation](https://docs.rs/vectorless/badge.svg)](https://docs.rs/vectorless)
6+
[![Python](https://img.shields.io/pypi/pyversions/vectorless.svg)](https://pypi.org/project/vectorless/)
7+
[![Crates.io](https://img.shields.io/crates/v/vectorless.svg)](https://crates.io/crates/vectorless)
8+
[![Docs](https://docs.rs/vectorless/badge.svg)](https://docs.rs/vectorless)
99
[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE)
1010
[![Rust](https://img.shields.io/badge/rust-1.85%2B-orange.svg)](https://www.rust-lang.org/)
1111

@@ -23,7 +23,7 @@ Instead of chunking documents into vectors, Vectorless preserves the document's
2323

2424
## How It Works
2525

26-
![How it works](docs/design/how-it-works.svg)
26+
<img src="https://raw.githubusercontent.com/vectorlessflow/vectorless/main/docs/design/how-it-works.svg" alt="How it works" width="600">
2727

2828
### 1. Index: Build a Navigable Tree
2929

@@ -49,7 +49,7 @@ When you ask "How do I reset the device?":
4949

5050
## Traditional RAG vs Vectorless
5151

52-
![Traditional RAG vs Vectorless](docs/design/comparison.svg)
52+
<img src="https://raw.githubusercontent.com/vectorlessflow/vectorless/main/docs/design/comparison.svg" alt="Traditional RAG vs Vectorless" width="600">
5353

5454
| Aspect | Traditional RAG | Vectorless |
5555
|--------|----------------|------------|
@@ -164,7 +164,7 @@ async fn main() -> vectorless::Result<()> {
164164

165165
## Architecture
166166

167-
![Architecture](docs/design/architecture.svg)
167+
<img src="https://raw.githubusercontent.com/vectorlessflow/vectorless/main/docs/design/architecture.svg" alt="Architecture" width="600">
168168

169169
### Core Components
170170

python/Cargo.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
[package]
22
name = "vectorless-py"
33
version = "0.1.0"
4-
edition = "2024"
5-
authors = ["zTgx <beautifularea@gmail.com>"]
4+
edition.workspace = true
5+
authors.workspace = true
66
description = "Python bindings for vectorless"
7-
license = "Apache-2.0"
7+
license.workspace = true
8+
repository.workspace = true
89

910
[lib]
1011
name = "vectorless"
1112
crate-type = ["cdylib"]
1213

1314
[dependencies]
14-
pyo3 = { version = "0.22", features = ["extension-module"] }
15+
pyo3 = { workspace = true }
1516
tokio = { version = "1", features = ["rt-multi-thread"] }
1617
vectorless = { path = "../rust" }

rust/Cargo.toml

Lines changed: 47 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[package]
22
name = "vectorless"
3-
version = "0.1.19"
4-
edition = "2024"
5-
authors = ["zTgx <beautifularea@gmail.com>"]
3+
version.workspace = true
4+
edition.workspace = true
5+
authors.workspace = true
66
description = "Hierarchical, reasoning-native document intelligence engine"
7-
license = "Apache-2.0"
8-
repository = "https://github.com/vectorlessflow/vectorless"
9-
homepage = "https://vectorless.dev"
7+
license.workspace = true
8+
repository.workspace = true
9+
homepage.workspace = true
1010
documentation = "https://docs.rs/vectorless"
1111
keywords = ["rag", "document", "retrieval", "indexing", "llm"]
1212
categories = ["text-processing", "data-structures", "algorithms"]
@@ -15,111 +15,88 @@ exclude = ["samples/", "docs/", ".*"]
1515

1616
[dependencies]
1717
# Async runtime
18-
tokio = { version = "1", features = ["full"] }
19-
async-trait = "0.1"
20-
futures = "0.3"
18+
tokio = { workspace = true }
19+
async-trait = { workspace = true }
20+
futures = { workspace = true }
2121

2222
# Serialization
23-
serde = { version = "1.0", features = ["derive"] }
24-
serde_json = "1.0"
25-
toml = "0.8"
23+
serde = { workspace = true }
24+
serde_json = { workspace = true }
25+
toml = { workspace = true }
2626

2727
# Error handling
28-
thiserror = "2"
29-
anyhow = { version = "1", optional = true }
28+
thiserror = { workspace = true }
29+
anyhow = { workspace = true, optional = true }
3030

3131
# OpenAI-compatible API client
32-
async-openai = { version = "0.34", features = ["chat-completion"] }
32+
async-openai = { workspace = true }
3333

3434
# UUID
35-
uuid = { version = "1.10", features = ["v4", "serde"] }
35+
uuid = { workspace = true }
3636

3737
# Time
38-
chrono = { version = "0.4", default-features = false, features = ["serde", "clock"] }
38+
chrono = { workspace = true }
3939

4040
# Logging
41-
tracing = "0.1"
41+
tracing = { workspace = true }
4242

4343
# Rate limiting
44-
governor = "0.6"
45-
nonzero_ext = "0.3"
44+
governor = { workspace = true }
45+
nonzero_ext = { workspace = true }
4646

4747
# Token counting
48-
tiktoken-rs = "0.9"
48+
tiktoken-rs = { workspace = true }
4949

5050
# Text processing
51-
regex = "1.10"
51+
regex = { workspace = true }
5252

5353
# Markdown parsing
54-
pulldown-cmark = { version = "0.12", default-features = false, features = ["simd"] }
54+
pulldown-cmark = { workspace = true }
5555

5656
# Tree data structure
57-
indextree = { version = "4.8.0", features = ["deser"] }
57+
indextree = { workspace = true }
5858

5959
# LRU cache
60-
lru = "0.12"
60+
lru = { workspace = true }
6161

6262
# Checksum
63-
sha2 = "0.10"
63+
sha2 = { workspace = true }
6464

65-
# BLAKE2b hashing for fingerprints
66-
blake2 = "0.10"
67-
base64 = "0.22"
65+
# BLAKE2b hashing
66+
blake2 = { workspace = true }
67+
base64 = { workspace = true }
6868

69-
# Synchronization primitives (for memo store)
70-
parking_lot = "0.12"
69+
# Synchronization primitives
70+
parking_lot = { workspace = true }
7171

7272
# Compression
73-
flate2 = "1.0"
73+
flate2 = { workspace = true }
7474

7575
# File locking (Unix)
7676
[target.'cfg(unix)'.dependencies]
77-
libc = "0.2"
77+
libc = { workspace = true }
7878

7979
# PDF processing
80-
pdf-extract = "0.10.0"
81-
lopdf = "0.34"
80+
pdf-extract = { workspace = true }
81+
lopdf = { workspace = true }
8282

8383
# DOCX processing
84-
zip = "2.2"
85-
roxmltree = "0.20"
84+
zip = { workspace = true }
85+
roxmltree = { workspace = true }
8686

87-
# Random number generation (for sampling)
88-
rand = "0.8"
87+
# Random number generation
88+
rand = { workspace = true }
8989

9090
# BM25 scoring
91-
bm25 = { version = "2.3.2", features = ["parallelism"] }
91+
bm25 = { workspace = true }
9292

9393
# HTML parsing
94-
scraper = "0.22"
94+
scraper = { workspace = true }
9595

9696
[dev-dependencies]
97-
tempfile = "3.10"
98-
tokio-test = "0.4"
99-
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
100-
101-
[profile.release]
102-
opt-level = 3
103-
lto = "thin"
104-
codegen-units = 1
105-
strip = true
106-
panic = "abort"
107-
108-
[profile.dev]
109-
opt-level = 0
110-
debug = true
111-
112-
[profile.bench]
113-
inherits = "release"
114-
debug = true
115-
116-
[profile.release.package."*"]
117-
opt-level = 3
118-
119-
[lints.rust]
120-
missing_docs = "warn"
121-
unsafe_code = "warn"
122-
123-
[lints.clippy]
124-
all = "warn"
125-
pedantic = "warn"
97+
tempfile = { workspace = true }
98+
tokio-test = { workspace = true }
99+
tracing-subscriber = { workspace = true }
100+
101+
[lints]
102+
workspace = true

0 commit comments

Comments
 (0)