zeusdb-vector-database 0.0.1__tar.gz → 0.0.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of zeusdb-vector-database might be problematic. Click here for more details.
- {zeusdb_vector_database-0.0.1 → zeusdb_vector_database-0.0.3}/PKG-INFO +81 -15
- {zeusdb_vector_database-0.0.1 → zeusdb_vector_database-0.0.3}/README.md +78 -13
- {zeusdb_vector_database-0.0.1 → zeusdb_vector_database-0.0.3}/pyproject.toml +6 -4
- {zeusdb_vector_database-0.0.1 → zeusdb_vector_database-0.0.3}/src/zeusdb_vector_database/__init__.py +4 -1
- zeusdb_vector_database-0.0.3/src/zeusdb_vector_database/vector_database.py +50 -0
- {zeusdb_vector_database-0.0.1 → zeusdb_vector_database-0.0.3}/vdb-core/Cargo.lock +79 -7
- {zeusdb_vector_database-0.0.1 → zeusdb_vector_database-0.0.3}/vdb-core/Cargo.toml +3 -2
- zeusdb_vector_database-0.0.3/vdb-core/src/hnsw_index.rs +723 -0
- {zeusdb_vector_database-0.0.1 → zeusdb_vector_database-0.0.3}/vdb-core/src/lib.rs +3 -2
- zeusdb_vector_database-0.0.1/src/zeusdb_vector_database/create_index_hnsw.py +0 -24
- zeusdb_vector_database-0.0.1/src/zeusdb_vector_database/vector_database.py +0 -33
- zeusdb_vector_database-0.0.1/vdb-core/src/create_index_hnsw.rs +0 -199
- {zeusdb_vector_database-0.0.1 → zeusdb_vector_database-0.0.3}/LICENSE +0 -0
- {zeusdb_vector_database-0.0.1 → zeusdb_vector_database-0.0.3}/NOTICE +0 -0
- {zeusdb_vector_database-0.0.1 → zeusdb_vector_database-0.0.3}/src/zeusdb_vector_database/py.typed +0 -0
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: zeusdb-vector-database
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.3
|
|
4
4
|
Classifier: Programming Language :: Rust
|
|
5
5
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
6
|
-
Requires-Dist:
|
|
6
|
+
Requires-Dist: numpy>=2.2.6,<3.0.0
|
|
7
|
+
Requires-Dist: maturin>=1.9.0 ; extra == 'dev'
|
|
7
8
|
Requires-Dist: pytest>=8.4.0 ; extra == 'dev'
|
|
8
9
|
Provides-Extra: dev
|
|
9
10
|
License-File: LICENSE
|
|
@@ -16,14 +17,17 @@ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
|
16
17
|
Project-URL: Repository, https://github.com/zeusdb/zeusdb-vector-database
|
|
17
18
|
Project-URL: Bug Tracker, https://github.com/zeusdb/zeusdb-vector-database/issues
|
|
18
19
|
|
|
19
|
-
|
|
20
|
+
<p align="center" width="100%">
|
|
21
|
+
<img src="https://github.com/user-attachments/assets/ad21baec-6f4c-445c-b423-88a081ca2b97" alt="zeusdb-vector-database-logo-cropped" />
|
|
22
|
+
<h1 align="center">ZeusDB Vector Database</h1>
|
|
23
|
+
</p>
|
|
20
24
|
|
|
21
25
|
<!-- <h2 align="center">Fast, Rust-powered vector database for similarity search</h2> -->
|
|
22
26
|
<!--**Fast, Rust-powered vector database for similarity search** -->
|
|
23
27
|
|
|
24
28
|
<!-- badges: start -->
|
|
25
29
|
|
|
26
|
-
<div align="
|
|
30
|
+
<div align="center">
|
|
27
31
|
<table>
|
|
28
32
|
<tr>
|
|
29
33
|
<td><strong>Meta</strong></td>
|
|
@@ -56,6 +60,8 @@ ZeusDB leverages the HNSW (Hierarchical Navigable Small World) algorithm for spe
|
|
|
56
60
|
|
|
57
61
|
🔥 High-performance Rust backend
|
|
58
62
|
|
|
63
|
+
📥 Supports multiple input formats using a single, easy-to-use Python method
|
|
64
|
+
|
|
59
65
|
🗂️ Metadata-aware filtering at query time
|
|
60
66
|
|
|
61
67
|
🐍 Simple and intuitive Python API
|
|
@@ -122,17 +128,16 @@ vdb = VectorDatabase()
|
|
|
122
128
|
# Initialize and set up the database resources
|
|
123
129
|
index = vdb.create_index_hnsw(dim = 8, space = "cosine", M = 16, ef_construction = 200, expected_size=5)
|
|
124
130
|
|
|
125
|
-
# Upload vector records
|
|
126
|
-
|
|
127
|
-
"doc_001":
|
|
128
|
-
"doc_002":
|
|
129
|
-
"doc_003":
|
|
130
|
-
"doc_004":
|
|
131
|
-
"doc_005":
|
|
132
|
-
|
|
131
|
+
# Upload vector records using the unified `add()` method
|
|
132
|
+
records = [
|
|
133
|
+
{"id": "doc_001", "values": [0.1, 0.2, 0.3, 0.1, 0.4, 0.2, 0.6, 0.7], "metadata": {"author": "Alice"}},
|
|
134
|
+
{"id": "doc_002", "values": [0.9, 0.1, 0.4, 0.2, 0.8, 0.5, 0.3, 0.9], "metadata": {"author": "Bob"}},
|
|
135
|
+
{"id": "doc_003", "values": [0.11, 0.21, 0.31, 0.15, 0.41, 0.22, 0.61, 0.72], "metadata": {"author": "Alice"}},
|
|
136
|
+
{"id": "doc_004", "values": [0.85, 0.15, 0.42, 0.27, 0.83, 0.52, 0.33, 0.95], "metadata": {"author": "Bob"}},
|
|
137
|
+
{"id": "doc_005", "values": [0.12, 0.22, 0.33, 0.13, 0.45, 0.23, 0.65, 0.71], "metadata": {"author": "Alice"}},
|
|
138
|
+
]
|
|
133
139
|
|
|
134
|
-
|
|
135
|
-
index.add_point(doc_id, vec, metadata=meta)
|
|
140
|
+
result = index.add(records)
|
|
136
141
|
|
|
137
142
|
# Perform a similarity search and print the top 2 results
|
|
138
143
|
# Query Vector
|
|
@@ -141,12 +146,73 @@ query_vec = [0.1, 0.2, 0.3, 0.1, 0.4, 0.2, 0.6, 0.7]
|
|
|
141
146
|
# Query with no filter (all documents)
|
|
142
147
|
print("\n--- Querying without filter (all documents) ---")
|
|
143
148
|
results = index.query(vector=query_vec, filter=None, top_k=2)
|
|
144
|
-
for doc_id, score in
|
|
149
|
+
for doc_id, score in results:
|
|
145
150
|
print(f"{doc_id} (score={score:.4f})")
|
|
146
151
|
```
|
|
147
152
|
|
|
148
153
|
<br/>
|
|
149
154
|
|
|
155
|
+
### ➕ Adding Vectors – Multiple Formats Supported
|
|
156
|
+
|
|
157
|
+
ZeusDB Vector Database supports multiple intuitive ways to insert data using index.add(...). All formats accept optional metadata per record.
|
|
158
|
+
|
|
159
|
+
#### ✅ Format 1 – Single Object
|
|
160
|
+
|
|
161
|
+
```python
|
|
162
|
+
index.add({
|
|
163
|
+
"id": "doc1",
|
|
164
|
+
"values": [0.1, 0.2],
|
|
165
|
+
"metadata": {"text": "hello"}
|
|
166
|
+
})
|
|
167
|
+
|
|
168
|
+
print(result.summary()) # ✅ 1 inserted, ❌ 0 errors
|
|
169
|
+
print(result.is_success()) # True
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
#### ✅ Format 2 – List of Objects
|
|
173
|
+
|
|
174
|
+
```python
|
|
175
|
+
index.add([
|
|
176
|
+
{"id": "doc1", "values": [0.1, 0.2], "metadata": {"text": "hello"}},
|
|
177
|
+
{"id": "doc2", "values": [0.3, 0.4], "metadata": {"text": "world"}}
|
|
178
|
+
])
|
|
179
|
+
|
|
180
|
+
print(result.summary()) # ✅ 2 inserted, ❌ 0 errors
|
|
181
|
+
print(result.vector_shape) # (2, 2)
|
|
182
|
+
print(result.errors) # []
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
#### ✅ Format 3 – Separate Arrays
|
|
186
|
+
|
|
187
|
+
```python
|
|
188
|
+
index.add({
|
|
189
|
+
"ids": ["doc1", "doc2"],
|
|
190
|
+
"embeddings": [[0.1, 0.2], [0.3, 0.4]],
|
|
191
|
+
"metadatas": [{"text": "hello"}, {"text": "world"}]
|
|
192
|
+
})
|
|
193
|
+
print(result) # BatchResult(inserted=2, errors=0, shape=(2, 2))
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
#### ✅ Format 4 – Using NumPy Arrays
|
|
197
|
+
|
|
198
|
+
ZeusDB also supports NumPy arrays as input for seamless integration with scientific and ML workflows.
|
|
199
|
+
|
|
200
|
+
```python
|
|
201
|
+
import numpy as np
|
|
202
|
+
|
|
203
|
+
data = [
|
|
204
|
+
{"id": "doc2", "values": np.array([0.1, 0.2, 0.3, 0.4], dtype=np.float32), "metadata": {"type": "blog"}},
|
|
205
|
+
{"id": "doc3", "values": np.array([0.5, 0.6, 0.7, 0.8], dtype=np.float32), "metadata": {"type": "news"}},
|
|
206
|
+
]
|
|
207
|
+
|
|
208
|
+
result = index.add(data)
|
|
209
|
+
|
|
210
|
+
print(result.summary()) # ✅ 2 inserted, ❌ 0 errors
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
Each format is automatically parsed and validated internally, including support for NumPy arrays (np.ndarray). Errors and successes are returned in a structured BatchResult object for easy debugging and logging.
|
|
214
|
+
|
|
215
|
+
<br/>
|
|
150
216
|
|
|
151
217
|
### 🧰 Additional functionality
|
|
152
218
|
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center" width="100%">
|
|
2
|
+
<img src="https://github.com/user-attachments/assets/ad21baec-6f4c-445c-b423-88a081ca2b97" alt="zeusdb-vector-database-logo-cropped" />
|
|
3
|
+
<h1 align="center">ZeusDB Vector Database</h1>
|
|
4
|
+
</p>
|
|
2
5
|
|
|
3
6
|
<!-- <h2 align="center">Fast, Rust-powered vector database for similarity search</h2> -->
|
|
4
7
|
<!--**Fast, Rust-powered vector database for similarity search** -->
|
|
5
8
|
|
|
6
9
|
<!-- badges: start -->
|
|
7
10
|
|
|
8
|
-
<div align="
|
|
11
|
+
<div align="center">
|
|
9
12
|
<table>
|
|
10
13
|
<tr>
|
|
11
14
|
<td><strong>Meta</strong></td>
|
|
@@ -38,6 +41,8 @@ ZeusDB leverages the HNSW (Hierarchical Navigable Small World) algorithm for spe
|
|
|
38
41
|
|
|
39
42
|
🔥 High-performance Rust backend
|
|
40
43
|
|
|
44
|
+
📥 Supports multiple input formats using a single, easy-to-use Python method
|
|
45
|
+
|
|
41
46
|
🗂️ Metadata-aware filtering at query time
|
|
42
47
|
|
|
43
48
|
🐍 Simple and intuitive Python API
|
|
@@ -104,17 +109,16 @@ vdb = VectorDatabase()
|
|
|
104
109
|
# Initialize and set up the database resources
|
|
105
110
|
index = vdb.create_index_hnsw(dim = 8, space = "cosine", M = 16, ef_construction = 200, expected_size=5)
|
|
106
111
|
|
|
107
|
-
# Upload vector records
|
|
108
|
-
|
|
109
|
-
"doc_001":
|
|
110
|
-
"doc_002":
|
|
111
|
-
"doc_003":
|
|
112
|
-
"doc_004":
|
|
113
|
-
"doc_005":
|
|
114
|
-
|
|
112
|
+
# Upload vector records using the unified `add()` method
|
|
113
|
+
records = [
|
|
114
|
+
{"id": "doc_001", "values": [0.1, 0.2, 0.3, 0.1, 0.4, 0.2, 0.6, 0.7], "metadata": {"author": "Alice"}},
|
|
115
|
+
{"id": "doc_002", "values": [0.9, 0.1, 0.4, 0.2, 0.8, 0.5, 0.3, 0.9], "metadata": {"author": "Bob"}},
|
|
116
|
+
{"id": "doc_003", "values": [0.11, 0.21, 0.31, 0.15, 0.41, 0.22, 0.61, 0.72], "metadata": {"author": "Alice"}},
|
|
117
|
+
{"id": "doc_004", "values": [0.85, 0.15, 0.42, 0.27, 0.83, 0.52, 0.33, 0.95], "metadata": {"author": "Bob"}},
|
|
118
|
+
{"id": "doc_005", "values": [0.12, 0.22, 0.33, 0.13, 0.45, 0.23, 0.65, 0.71], "metadata": {"author": "Alice"}},
|
|
119
|
+
]
|
|
115
120
|
|
|
116
|
-
|
|
117
|
-
index.add_point(doc_id, vec, metadata=meta)
|
|
121
|
+
result = index.add(records)
|
|
118
122
|
|
|
119
123
|
# Perform a similarity search and print the top 2 results
|
|
120
124
|
# Query Vector
|
|
@@ -123,12 +127,73 @@ query_vec = [0.1, 0.2, 0.3, 0.1, 0.4, 0.2, 0.6, 0.7]
|
|
|
123
127
|
# Query with no filter (all documents)
|
|
124
128
|
print("\n--- Querying without filter (all documents) ---")
|
|
125
129
|
results = index.query(vector=query_vec, filter=None, top_k=2)
|
|
126
|
-
for doc_id, score in
|
|
130
|
+
for doc_id, score in results:
|
|
127
131
|
print(f"{doc_id} (score={score:.4f})")
|
|
128
132
|
```
|
|
129
133
|
|
|
130
134
|
<br/>
|
|
131
135
|
|
|
136
|
+
### ➕ Adding Vectors – Multiple Formats Supported
|
|
137
|
+
|
|
138
|
+
ZeusDB Vector Database supports multiple intuitive ways to insert data using index.add(...). All formats accept optional metadata per record.
|
|
139
|
+
|
|
140
|
+
#### ✅ Format 1 – Single Object
|
|
141
|
+
|
|
142
|
+
```python
|
|
143
|
+
index.add({
|
|
144
|
+
"id": "doc1",
|
|
145
|
+
"values": [0.1, 0.2],
|
|
146
|
+
"metadata": {"text": "hello"}
|
|
147
|
+
})
|
|
148
|
+
|
|
149
|
+
print(result.summary()) # ✅ 1 inserted, ❌ 0 errors
|
|
150
|
+
print(result.is_success()) # True
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
#### ✅ Format 2 – List of Objects
|
|
154
|
+
|
|
155
|
+
```python
|
|
156
|
+
index.add([
|
|
157
|
+
{"id": "doc1", "values": [0.1, 0.2], "metadata": {"text": "hello"}},
|
|
158
|
+
{"id": "doc2", "values": [0.3, 0.4], "metadata": {"text": "world"}}
|
|
159
|
+
])
|
|
160
|
+
|
|
161
|
+
print(result.summary()) # ✅ 2 inserted, ❌ 0 errors
|
|
162
|
+
print(result.vector_shape) # (2, 2)
|
|
163
|
+
print(result.errors) # []
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
#### ✅ Format 3 – Separate Arrays
|
|
167
|
+
|
|
168
|
+
```python
|
|
169
|
+
index.add({
|
|
170
|
+
"ids": ["doc1", "doc2"],
|
|
171
|
+
"embeddings": [[0.1, 0.2], [0.3, 0.4]],
|
|
172
|
+
"metadatas": [{"text": "hello"}, {"text": "world"}]
|
|
173
|
+
})
|
|
174
|
+
print(result) # BatchResult(inserted=2, errors=0, shape=(2, 2))
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
#### ✅ Format 4 – Using NumPy Arrays
|
|
178
|
+
|
|
179
|
+
ZeusDB also supports NumPy arrays as input for seamless integration with scientific and ML workflows.
|
|
180
|
+
|
|
181
|
+
```python
|
|
182
|
+
import numpy as np
|
|
183
|
+
|
|
184
|
+
data = [
|
|
185
|
+
{"id": "doc2", "values": np.array([0.1, 0.2, 0.3, 0.4], dtype=np.float32), "metadata": {"type": "blog"}},
|
|
186
|
+
{"id": "doc3", "values": np.array([0.5, 0.6, 0.7, 0.8], dtype=np.float32), "metadata": {"type": "news"}},
|
|
187
|
+
]
|
|
188
|
+
|
|
189
|
+
result = index.add(data)
|
|
190
|
+
|
|
191
|
+
print(result.summary()) # ✅ 2 inserted, ❌ 0 errors
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Each format is automatically parsed and validated internally, including support for NumPy arrays (np.ndarray). Errors and successes are returned in a structured BatchResult object for easy debugging and logging.
|
|
195
|
+
|
|
196
|
+
<br/>
|
|
132
197
|
|
|
133
198
|
### 🧰 Additional functionality
|
|
134
199
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "zeusdb-vector-database"
|
|
3
|
-
version = "0.0.
|
|
3
|
+
version = "0.0.3"
|
|
4
4
|
description = "Blazing-fast vector DB with real-time similarity search and metadata filtering."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
authors = [
|
|
@@ -12,10 +12,12 @@ classifiers = [
|
|
|
12
12
|
"Programming Language :: Rust",
|
|
13
13
|
"Programming Language :: Python :: Implementation :: CPython",
|
|
14
14
|
]
|
|
15
|
-
dependencies = [
|
|
15
|
+
dependencies = [
|
|
16
|
+
"numpy>=2.2.6,<3.0.0"
|
|
17
|
+
]
|
|
16
18
|
|
|
17
19
|
[build-system]
|
|
18
|
-
requires = ["maturin>=1.
|
|
20
|
+
requires = ["maturin>=1.9.0,<2.0"]
|
|
19
21
|
build-backend = "maturin"
|
|
20
22
|
|
|
21
23
|
[tool.maturin]
|
|
@@ -28,7 +30,7 @@ include = ["LICENSE", "NOTICE", "README.md", "src/**"]
|
|
|
28
30
|
|
|
29
31
|
[project.optional-dependencies]
|
|
30
32
|
dev = [
|
|
31
|
-
"maturin >=1.
|
|
33
|
+
"maturin >=1.9.0",
|
|
32
34
|
"pytest >=8.4.0",
|
|
33
35
|
]
|
|
34
36
|
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"""
|
|
2
|
+
vector_database.py
|
|
3
|
+
|
|
4
|
+
Pure factory for creating vector indexes using Rust backend.
|
|
5
|
+
Currently supports HNSW (Hierarchical Navigable Small World).
|
|
6
|
+
"""
|
|
7
|
+
from .zeusdb_vector_database import HNSWIndex
|
|
8
|
+
|
|
9
|
+
class VectorDatabase:
|
|
10
|
+
"""
|
|
11
|
+
Pure factory for creating vector indexes.
|
|
12
|
+
No state management - just creates and returns indexes.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self):
|
|
16
|
+
"""Initialize VectorDatabase factory."""
|
|
17
|
+
pass
|
|
18
|
+
|
|
19
|
+
def create_index_hnsw(
|
|
20
|
+
self,
|
|
21
|
+
dim: int = 1536,
|
|
22
|
+
space: str = "cosine",
|
|
23
|
+
M: int = 16,
|
|
24
|
+
ef_construction: int = 200,
|
|
25
|
+
expected_size: int = 10000
|
|
26
|
+
) -> HNSWIndex:
|
|
27
|
+
"""
|
|
28
|
+
Creates a new HNSW (Hierarchical Navigable Small World) index.
|
|
29
|
+
|
|
30
|
+
Args:
|
|
31
|
+
dim: Vector dimension (default: 1536)
|
|
32
|
+
space: Distance metric, only 'cosine' supported (default: 'cosine')
|
|
33
|
+
M: Bidirectional links per node (default: 16, max: 256)
|
|
34
|
+
ef_construction: Construction candidate list size (default: 200)
|
|
35
|
+
expected_size: Expected number of vectors (default: 10000)
|
|
36
|
+
|
|
37
|
+
Returns:
|
|
38
|
+
HNSWIndex: Use this index directly for all operations
|
|
39
|
+
|
|
40
|
+
Example:
|
|
41
|
+
vdb = VectorDatabase()
|
|
42
|
+
index = vdb.create_index_hnsw(dim=1536, expected_size=10000)
|
|
43
|
+
index.add_point("doc1", vector, metadata)
|
|
44
|
+
results = index.query(query_vector, k=10)
|
|
45
|
+
"""
|
|
46
|
+
try:
|
|
47
|
+
return HNSWIndex(dim, space, M, ef_construction, expected_size)
|
|
48
|
+
except Exception as e:
|
|
49
|
+
raise RuntimeError(f"Failed to create HNSW index: {e}") from e
|
|
50
|
+
|
|
@@ -301,9 +301,9 @@ dependencies = [
|
|
|
301
301
|
|
|
302
302
|
[[package]]
|
|
303
303
|
name = "indexmap"
|
|
304
|
-
version = "2.
|
|
304
|
+
version = "2.10.0"
|
|
305
305
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
306
|
-
checksum = "
|
|
306
|
+
checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661"
|
|
307
307
|
dependencies = [
|
|
308
308
|
"equivalent",
|
|
309
309
|
"hashbrown",
|
|
@@ -375,13 +375,23 @@ checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94"
|
|
|
375
375
|
|
|
376
376
|
[[package]]
|
|
377
377
|
name = "mach2"
|
|
378
|
-
version = "0.4.
|
|
378
|
+
version = "0.4.3"
|
|
379
379
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
380
|
-
checksum = "
|
|
380
|
+
checksum = "d640282b302c0bb0a2a8e0233ead9035e3bed871f0b7e81fe4a1ec829765db44"
|
|
381
381
|
dependencies = [
|
|
382
382
|
"libc",
|
|
383
383
|
]
|
|
384
384
|
|
|
385
|
+
[[package]]
|
|
386
|
+
name = "matrixmultiply"
|
|
387
|
+
version = "0.3.10"
|
|
388
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
389
|
+
checksum = "a06de3016e9fae57a36fd14dba131fccf49f74b40b7fbdb472f96e361ec71a08"
|
|
390
|
+
dependencies = [
|
|
391
|
+
"autocfg",
|
|
392
|
+
"rawpointer",
|
|
393
|
+
]
|
|
394
|
+
|
|
385
395
|
[[package]]
|
|
386
396
|
name = "memchr"
|
|
387
397
|
version = "2.7.5"
|
|
@@ -423,6 +433,21 @@ dependencies = [
|
|
|
423
433
|
"windows",
|
|
424
434
|
]
|
|
425
435
|
|
|
436
|
+
[[package]]
|
|
437
|
+
name = "ndarray"
|
|
438
|
+
version = "0.16.1"
|
|
439
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
440
|
+
checksum = "882ed72dce9365842bf196bdeedf5055305f11fc8c03dee7bb0194a6cad34841"
|
|
441
|
+
dependencies = [
|
|
442
|
+
"matrixmultiply",
|
|
443
|
+
"num-complex",
|
|
444
|
+
"num-integer",
|
|
445
|
+
"num-traits",
|
|
446
|
+
"portable-atomic",
|
|
447
|
+
"portable-atomic-util",
|
|
448
|
+
"rawpointer",
|
|
449
|
+
]
|
|
450
|
+
|
|
426
451
|
[[package]]
|
|
427
452
|
name = "nix"
|
|
428
453
|
version = "0.26.4"
|
|
@@ -436,6 +461,24 @@ dependencies = [
|
|
|
436
461
|
"pin-utils",
|
|
437
462
|
]
|
|
438
463
|
|
|
464
|
+
[[package]]
|
|
465
|
+
name = "num-complex"
|
|
466
|
+
version = "0.4.6"
|
|
467
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
468
|
+
checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495"
|
|
469
|
+
dependencies = [
|
|
470
|
+
"num-traits",
|
|
471
|
+
]
|
|
472
|
+
|
|
473
|
+
[[package]]
|
|
474
|
+
name = "num-integer"
|
|
475
|
+
version = "0.1.46"
|
|
476
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
477
|
+
checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f"
|
|
478
|
+
dependencies = [
|
|
479
|
+
"num-traits",
|
|
480
|
+
]
|
|
481
|
+
|
|
439
482
|
[[package]]
|
|
440
483
|
name = "num-traits"
|
|
441
484
|
version = "0.2.19"
|
|
@@ -455,6 +498,22 @@ dependencies = [
|
|
|
455
498
|
"libc",
|
|
456
499
|
]
|
|
457
500
|
|
|
501
|
+
[[package]]
|
|
502
|
+
name = "numpy"
|
|
503
|
+
version = "0.25.0"
|
|
504
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
505
|
+
checksum = "29f1dee9aa8d3f6f8e8b9af3803006101bb3653866ef056d530d53ae68587191"
|
|
506
|
+
dependencies = [
|
|
507
|
+
"libc",
|
|
508
|
+
"ndarray",
|
|
509
|
+
"num-complex",
|
|
510
|
+
"num-integer",
|
|
511
|
+
"num-traits",
|
|
512
|
+
"pyo3",
|
|
513
|
+
"pyo3-build-config",
|
|
514
|
+
"rustc-hash",
|
|
515
|
+
]
|
|
516
|
+
|
|
458
517
|
[[package]]
|
|
459
518
|
name = "once_cell"
|
|
460
519
|
version = "1.21.3"
|
|
@@ -635,6 +694,12 @@ dependencies = [
|
|
|
635
694
|
"getrandom",
|
|
636
695
|
]
|
|
637
696
|
|
|
697
|
+
[[package]]
|
|
698
|
+
name = "rawpointer"
|
|
699
|
+
version = "0.2.1"
|
|
700
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
701
|
+
checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3"
|
|
702
|
+
|
|
638
703
|
[[package]]
|
|
639
704
|
name = "rayon"
|
|
640
705
|
version = "1.10.0"
|
|
@@ -693,6 +758,12 @@ version = "0.8.5"
|
|
|
693
758
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
694
759
|
checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
|
|
695
760
|
|
|
761
|
+
[[package]]
|
|
762
|
+
name = "rustc-hash"
|
|
763
|
+
version = "2.1.1"
|
|
764
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
765
|
+
checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d"
|
|
766
|
+
|
|
696
767
|
[[package]]
|
|
697
768
|
name = "same-file"
|
|
698
769
|
version = "1.0.6"
|
|
@@ -736,9 +807,9 @@ checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03"
|
|
|
736
807
|
|
|
737
808
|
[[package]]
|
|
738
809
|
name = "syn"
|
|
739
|
-
version = "2.0.
|
|
810
|
+
version = "2.0.104"
|
|
740
811
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
741
|
-
checksum = "
|
|
812
|
+
checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40"
|
|
742
813
|
dependencies = [
|
|
743
814
|
"proc-macro2",
|
|
744
815
|
"quote",
|
|
@@ -1029,8 +1100,9 @@ dependencies = [
|
|
|
1029
1100
|
|
|
1030
1101
|
[[package]]
|
|
1031
1102
|
name = "zeusdb-vector-database"
|
|
1032
|
-
version = "0.0.
|
|
1103
|
+
version = "0.0.3"
|
|
1033
1104
|
dependencies = [
|
|
1034
1105
|
"hnsw_rs",
|
|
1106
|
+
"numpy",
|
|
1035
1107
|
"pyo3",
|
|
1036
1108
|
]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "zeusdb-vector-database"
|
|
3
|
-
version = "0.0.
|
|
3
|
+
version = "0.0.3"
|
|
4
4
|
edition = "2021"
|
|
5
5
|
resolver = "2" # <-- Avoid compiling unnecessary features from dependencies.
|
|
6
6
|
|
|
@@ -10,8 +10,9 @@ name = "zeusdb_vector_database" # <-- This is the name of the compiled Python mo
|
|
|
10
10
|
crate-type = ["cdylib"]
|
|
11
11
|
|
|
12
12
|
[dependencies]
|
|
13
|
-
pyo3 = { version = "0.25.
|
|
13
|
+
pyo3 = { version = "0.25.1", features = ["extension-module"] }
|
|
14
14
|
hnsw_rs = "0.3.2"
|
|
15
|
+
numpy = "0.25.0"
|
|
15
16
|
|
|
16
17
|
[profile.release]
|
|
17
18
|
lto = true # <-- Enable Link-Time Optimization
|