zeusdb-vector-database 0.7.0__tar.gz → 0.9.0__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.
- {zeusdb_vector_database-0.7.0/vdb-core → zeusdb_vector_database-0.9.0}/Cargo.lock +60 -52
- zeusdb_vector_database-0.9.0/Cargo.toml +135 -0
- {zeusdb_vector_database-0.7.0 → zeusdb_vector_database-0.9.0}/PKG-INFO +738 -237
- {zeusdb_vector_database-0.7.0 → zeusdb_vector_database-0.9.0}/README.md +736 -236
- zeusdb_vector_database-0.9.0/bindings/python/Cargo.toml +69 -0
- {zeusdb_vector_database-0.7.0/vdb-core → zeusdb_vector_database-0.9.0/bindings/python}/src/conversion.rs +70 -4
- zeusdb_vector_database-0.9.0/bindings/python/src/hnsw_index/construct.rs +185 -0
- {zeusdb_vector_database-0.7.0/vdb-core → zeusdb_vector_database-0.9.0/bindings/python}/src/hnsw_index/input.rs +207 -130
- zeusdb_vector_database-0.9.0/bindings/python/src/hnsw_index/mod.rs +1292 -0
- zeusdb_vector_database-0.9.0/bindings/python/src/lib.rs +141 -0
- {zeusdb_vector_database-0.7.0/vdb-core → zeusdb_vector_database-0.9.0/bindings/python}/src/logging.rs +129 -10
- zeusdb_vector_database-0.9.0/crates/core/Cargo.toml +34 -0
- zeusdb_vector_database-0.9.0/crates/core/src/checksum.rs +110 -0
- zeusdb_vector_database-0.9.0/crates/core/src/columns.rs +1523 -0
- {zeusdb_vector_database-0.7.0/vdb-core → zeusdb_vector_database-0.9.0/crates/core}/src/distance.rs +626 -57
- zeusdb_vector_database-0.9.0/crates/core/src/error.rs +1148 -0
- zeusdb_vector_database-0.9.0/crates/core/src/filter.rs +1446 -0
- {zeusdb_vector_database-0.7.0/vdb-core → zeusdb_vector_database-0.9.0/crates/core}/src/graph/dump.rs +217 -139
- zeusdb_vector_database-0.9.0/crates/core/src/graph/fuzz.rs +1009 -0
- zeusdb_vector_database-0.7.0/vdb-core/src/hnsw_index/graph_guard_tests.rs → zeusdb_vector_database-0.9.0/crates/core/src/graph/guard_tests.rs +11 -12
- {zeusdb_vector_database-0.7.0/vdb-core → zeusdb_vector_database-0.9.0/crates/core}/src/graph/mod.rs +481 -61
- {zeusdb_vector_database-0.7.0/vdb-core → zeusdb_vector_database-0.9.0/crates/core}/src/graph/mutable/insert.rs +60 -27
- {zeusdb_vector_database-0.7.0/vdb-core → zeusdb_vector_database-0.9.0/crates/core}/src/graph/mutable/mod.rs +229 -78
- zeusdb_vector_database-0.9.0/crates/core/src/graph/store.rs +149 -0
- {zeusdb_vector_database-0.7.0/vdb-core → zeusdb_vector_database-0.9.0/crates/core}/src/graph/structure.rs +145 -46
- {zeusdb_vector_database-0.7.0/vdb-core → zeusdb_vector_database-0.9.0/crates/core}/src/graph/test_graph.rs +9 -6
- {zeusdb_vector_database-0.7.0/vdb-core → zeusdb_vector_database-0.9.0/crates/core}/src/graph/traverse.rs +136 -5
- zeusdb_vector_database-0.9.0/crates/core/src/lib.rs +61 -0
- {zeusdb_vector_database-0.7.0/vdb-core → zeusdb_vector_database-0.9.0/crates/core}/src/pq.rs +404 -43
- {zeusdb_vector_database-0.7.0/vdb-core → zeusdb_vector_database-0.9.0/crates/core}/src/rng.rs +14 -11
- {zeusdb_vector_database-0.7.0/vdb-core → zeusdb_vector_database-0.9.0/crates/core}/src/test_vectors.rs +6 -6
- zeusdb_vector_database-0.9.0/crates/hnsw/Cargo.toml +35 -0
- zeusdb_vector_database-0.9.0/crates/hnsw/src/collection/construct.rs +705 -0
- zeusdb_vector_database-0.9.0/crates/hnsw/src/collection/input.rs +102 -0
- zeusdb_vector_database-0.9.0/crates/hnsw/src/collection/insert.rs +1574 -0
- zeusdb_vector_database-0.9.0/crates/hnsw/src/collection/mod.rs +1001 -0
- zeusdb_vector_database-0.9.0/crates/hnsw/src/collection/persist.rs +810 -0
- zeusdb_vector_database-0.9.0/crates/hnsw/src/collection/search.rs +1279 -0
- {zeusdb_vector_database-0.7.0/vdb-core/src/hnsw_index → zeusdb_vector_database-0.9.0/crates/hnsw/src/collection}/stats.rs +205 -100
- {zeusdb_vector_database-0.7.0/vdb-core/src/hnsw_index → zeusdb_vector_database-0.9.0/crates/hnsw/src/collection}/training.rs +188 -119
- zeusdb_vector_database-0.9.0/crates/hnsw/src/lib.rs +50 -0
- zeusdb_vector_database-0.9.0/crates/hnsw/src/locks.rs +492 -0
- zeusdb_vector_database-0.9.0/crates/hnsw/src/persistence.rs +2255 -0
- {zeusdb_vector_database-0.7.0/vdb-core → zeusdb_vector_database-0.9.0/crates/hnsw}/src/rerank.rs +169 -57
- zeusdb_vector_database-0.9.0/pyproject.toml +85 -0
- {zeusdb_vector_database-0.7.0 → zeusdb_vector_database-0.9.0}/src/zeusdb_vector_database/__init__.py +9 -3
- {zeusdb_vector_database-0.7.0 → zeusdb_vector_database-0.9.0}/src/zeusdb_vector_database/logging_config.py +46 -1
- {zeusdb_vector_database-0.7.0 → zeusdb_vector_database-0.9.0}/src/zeusdb_vector_database/vector_database.py +268 -170
- zeusdb_vector_database-0.7.0/pyproject.toml +0 -60
- zeusdb_vector_database-0.7.0/vdb-core/Cargo.toml +0 -59
- zeusdb_vector_database-0.7.0/vdb-core/src/filter.rs +0 -226
- zeusdb_vector_database-0.7.0/vdb-core/src/hnsw_index/construct.rs +0 -459
- zeusdb_vector_database-0.7.0/vdb-core/src/hnsw_index/insert.rs +0 -833
- zeusdb_vector_database-0.7.0/vdb-core/src/hnsw_index/mod.rs +0 -1186
- zeusdb_vector_database-0.7.0/vdb-core/src/hnsw_index/persist.rs +0 -448
- zeusdb_vector_database-0.7.0/vdb-core/src/hnsw_index/search.rs +0 -481
- zeusdb_vector_database-0.7.0/vdb-core/src/lib.rs +0 -50
- zeusdb_vector_database-0.7.0/vdb-core/src/persistence.rs +0 -1679
- {zeusdb_vector_database-0.7.0 → zeusdb_vector_database-0.9.0}/LICENSE +0 -0
- {zeusdb_vector_database-0.7.0 → zeusdb_vector_database-0.9.0}/NOTICE +0 -0
- {zeusdb_vector_database-0.7.0/vdb-core → zeusdb_vector_database-0.9.0/crates/core}/src/graph/levels.rs +0 -0
- {zeusdb_vector_database-0.7.0 → zeusdb_vector_database-0.9.0}/src/zeusdb_vector_database/py.typed +0 -0
|
@@ -80,6 +80,17 @@ version = "1.0.4"
|
|
|
80
80
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
81
81
|
checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
|
|
82
82
|
|
|
83
|
+
[[package]]
|
|
84
|
+
name = "chacha20"
|
|
85
|
+
version = "0.10.1"
|
|
86
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
87
|
+
checksum = "d524456ba66e72eb8b115ff89e01e497f8e6d11d78b70b1aa13c0fbd97540a81"
|
|
88
|
+
dependencies = [
|
|
89
|
+
"cfg-if",
|
|
90
|
+
"cpufeatures",
|
|
91
|
+
"rand_core",
|
|
92
|
+
]
|
|
93
|
+
|
|
83
94
|
[[package]]
|
|
84
95
|
name = "chrono"
|
|
85
96
|
version = "0.4.45"
|
|
@@ -100,6 +111,15 @@ version = "0.8.7"
|
|
|
100
111
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
101
112
|
checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
|
|
102
113
|
|
|
114
|
+
[[package]]
|
|
115
|
+
name = "cpufeatures"
|
|
116
|
+
version = "0.3.0"
|
|
117
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
118
|
+
checksum = "8b2a41393f66f16b0823bb79094d54ac5fbd34ab292ddafb9a0456ac9f87d201"
|
|
119
|
+
dependencies = [
|
|
120
|
+
"libc",
|
|
121
|
+
]
|
|
122
|
+
|
|
103
123
|
[[package]]
|
|
104
124
|
name = "crossbeam-channel"
|
|
105
125
|
version = "0.5.16"
|
|
@@ -192,18 +212,6 @@ dependencies = [
|
|
|
192
212
|
"slab",
|
|
193
213
|
]
|
|
194
214
|
|
|
195
|
-
[[package]]
|
|
196
|
-
name = "getrandom"
|
|
197
|
-
version = "0.3.4"
|
|
198
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
199
|
-
checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd"
|
|
200
|
-
dependencies = [
|
|
201
|
-
"cfg-if",
|
|
202
|
-
"libc",
|
|
203
|
-
"r-efi 5.3.0",
|
|
204
|
-
"wasip2",
|
|
205
|
-
]
|
|
206
|
-
|
|
207
215
|
[[package]]
|
|
208
216
|
name = "getrandom"
|
|
209
217
|
version = "0.4.3"
|
|
@@ -212,7 +220,8 @@ checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099"
|
|
|
212
220
|
dependencies = [
|
|
213
221
|
"cfg-if",
|
|
214
222
|
"libc",
|
|
215
|
-
"r-efi
|
|
223
|
+
"r-efi",
|
|
224
|
+
"rand_core",
|
|
216
225
|
]
|
|
217
226
|
|
|
218
227
|
[[package]]
|
|
@@ -501,12 +510,6 @@ dependencies = [
|
|
|
501
510
|
"proc-macro2",
|
|
502
511
|
]
|
|
503
512
|
|
|
504
|
-
[[package]]
|
|
505
|
-
name = "r-efi"
|
|
506
|
-
version = "5.3.0"
|
|
507
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
508
|
-
checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f"
|
|
509
|
-
|
|
510
513
|
[[package]]
|
|
511
514
|
name = "r-efi"
|
|
512
515
|
version = "6.0.0"
|
|
@@ -515,19 +518,20 @@ checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf"
|
|
|
515
518
|
|
|
516
519
|
[[package]]
|
|
517
520
|
name = "rand"
|
|
518
|
-
version = "0.
|
|
521
|
+
version = "0.10.2"
|
|
519
522
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
520
|
-
checksum = "
|
|
523
|
+
checksum = "c7f5fa3a058cd35567ef9bfa5e75732bee0f9e4c55fa90477bef2dfcdbc4be80"
|
|
521
524
|
dependencies = [
|
|
522
|
-
"
|
|
525
|
+
"chacha20",
|
|
526
|
+
"getrandom",
|
|
523
527
|
"rand_core",
|
|
524
528
|
]
|
|
525
529
|
|
|
526
530
|
[[package]]
|
|
527
531
|
name = "rand_chacha"
|
|
528
|
-
version = "0.
|
|
532
|
+
version = "0.10.0"
|
|
529
533
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
530
|
-
checksum = "
|
|
534
|
+
checksum = "3e6af7f3e25ded52c41df4e0b1af2d047e45896c2f3281792ed68a1c243daedb"
|
|
531
535
|
dependencies = [
|
|
532
536
|
"ppv-lite86",
|
|
533
537
|
"rand_core",
|
|
@@ -535,12 +539,9 @@ dependencies = [
|
|
|
535
539
|
|
|
536
540
|
[[package]]
|
|
537
541
|
name = "rand_core"
|
|
538
|
-
version = "0.
|
|
542
|
+
version = "0.10.1"
|
|
539
543
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
540
|
-
checksum = "
|
|
541
|
-
dependencies = [
|
|
542
|
-
"getrandom 0.3.4",
|
|
543
|
-
]
|
|
544
|
+
checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69"
|
|
544
545
|
|
|
545
546
|
[[package]]
|
|
546
547
|
name = "rawpointer"
|
|
@@ -724,7 +725,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
724
725
|
checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd"
|
|
725
726
|
dependencies = [
|
|
726
727
|
"fastrand",
|
|
727
|
-
"getrandom
|
|
728
|
+
"getrandom",
|
|
728
729
|
"once_cell",
|
|
729
730
|
"rustix",
|
|
730
731
|
"windows-sys",
|
|
@@ -888,15 +889,6 @@ version = "0.0.18"
|
|
|
888
889
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
889
890
|
checksum = "051eb1abcf10076295e815102942cc58f9d5e3b4560e46e53c21e8ff6f3af7b1"
|
|
890
891
|
|
|
891
|
-
[[package]]
|
|
892
|
-
name = "wasip2"
|
|
893
|
-
version = "1.0.4+wasi-0.2.12"
|
|
894
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
895
|
-
checksum = "b67efb37e106e55ce722a510d6b5f9c17f083e5fc79afc2badeb12cc313d9487"
|
|
896
|
-
dependencies = [
|
|
897
|
-
"wit-bindgen",
|
|
898
|
-
]
|
|
899
|
-
|
|
900
892
|
[[package]]
|
|
901
893
|
name = "wasm-bindgen"
|
|
902
894
|
version = "0.2.127"
|
|
@@ -1020,12 +1012,6 @@ dependencies = [
|
|
|
1020
1012
|
"windows-link",
|
|
1021
1013
|
]
|
|
1022
1014
|
|
|
1023
|
-
[[package]]
|
|
1024
|
-
name = "wit-bindgen"
|
|
1025
|
-
version = "0.57.1"
|
|
1026
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1027
|
-
checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e"
|
|
1028
|
-
|
|
1029
1015
|
[[package]]
|
|
1030
1016
|
name = "zerocopy"
|
|
1031
1017
|
version = "0.8.56"
|
|
@@ -1047,23 +1033,45 @@ dependencies = [
|
|
|
1047
1033
|
]
|
|
1048
1034
|
|
|
1049
1035
|
[[package]]
|
|
1050
|
-
name = "zeusdb-vector-
|
|
1051
|
-
version = "0.
|
|
1036
|
+
name = "zeusdb-vector-core"
|
|
1037
|
+
version = "0.9.0"
|
|
1038
|
+
dependencies = [
|
|
1039
|
+
"rand",
|
|
1040
|
+
"rand_chacha",
|
|
1041
|
+
"rayon",
|
|
1042
|
+
"serde_json",
|
|
1043
|
+
"tempfile",
|
|
1044
|
+
"tracing",
|
|
1045
|
+
"wide",
|
|
1046
|
+
]
|
|
1047
|
+
|
|
1048
|
+
[[package]]
|
|
1049
|
+
name = "zeusdb-vector-hnsw"
|
|
1050
|
+
version = "0.9.0"
|
|
1052
1051
|
dependencies = [
|
|
1053
1052
|
"bincode",
|
|
1054
1053
|
"chrono",
|
|
1055
|
-
"numpy",
|
|
1056
|
-
"pyo3",
|
|
1057
1054
|
"rand",
|
|
1058
|
-
"rand_chacha",
|
|
1059
1055
|
"rayon",
|
|
1060
1056
|
"serde",
|
|
1061
1057
|
"serde_json",
|
|
1062
|
-
"
|
|
1058
|
+
"tracing",
|
|
1059
|
+
"zeusdb-vector-core",
|
|
1060
|
+
]
|
|
1061
|
+
|
|
1062
|
+
[[package]]
|
|
1063
|
+
name = "zeusdb-vector-python"
|
|
1064
|
+
version = "0.9.0"
|
|
1065
|
+
dependencies = [
|
|
1066
|
+
"chrono",
|
|
1067
|
+
"numpy",
|
|
1068
|
+
"pyo3",
|
|
1069
|
+
"serde_json",
|
|
1063
1070
|
"tracing",
|
|
1064
1071
|
"tracing-appender",
|
|
1065
1072
|
"tracing-subscriber",
|
|
1066
|
-
"
|
|
1073
|
+
"zeusdb-vector-core",
|
|
1074
|
+
"zeusdb-vector-hnsw",
|
|
1067
1075
|
]
|
|
1068
1076
|
|
|
1069
1077
|
[[package]]
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
# The workspace. Every crate in the tree is a member, the binding under
|
|
2
|
+
# bindings/ and the engine crates under crates/, and this is the manifest
|
|
3
|
+
# every cargo command reads from the repository root.
|
|
4
|
+
#
|
|
5
|
+
# Three things live here and nowhere else.
|
|
6
|
+
#
|
|
7
|
+
# [workspace.package] holds the version, the edition and the licence, and a
|
|
8
|
+
# member takes each one with `<key>.workspace = true`. The version is the one
|
|
9
|
+
# pyproject.toml and src/zeusdb_vector_database/__init__.py declare, and the
|
|
10
|
+
# release gate in .github/workflows/publish-pypi.yml reads it from this table.
|
|
11
|
+
#
|
|
12
|
+
# [workspace.dependencies] holds every dependency once, the external crates at
|
|
13
|
+
# one version and the workspace's own crates by path. A member names a
|
|
14
|
+
# dependency as `{ workspace = true }`, so a version or a path moves in one
|
|
15
|
+
# place and two members cannot resolve the same crate twice.
|
|
16
|
+
#
|
|
17
|
+
# [profile.*] is read from the workspace root only. A profile table in a
|
|
18
|
+
# member manifest is ignored, so every profile is declared here.
|
|
19
|
+
|
|
20
|
+
[workspace]
|
|
21
|
+
# Explicit, because a virtual manifest does not take the resolver from an
|
|
22
|
+
# edition the way a package manifest does.
|
|
23
|
+
resolver = "2"
|
|
24
|
+
# Every directory under crates/ and bindings/ that holds a manifest is a
|
|
25
|
+
# member. cargo treats a glob that matches nothing as a literal path and
|
|
26
|
+
# fails on it, so each of the two directories has to hold at least one crate.
|
|
27
|
+
members = ["crates/*", "bindings/*"]
|
|
28
|
+
|
|
29
|
+
[workspace.package]
|
|
30
|
+
version = "0.9.0"
|
|
31
|
+
edition = "2021"
|
|
32
|
+
# The same licence pyproject.toml declares, LICENSE holds and NOTICE restates.
|
|
33
|
+
# cargo-deny reads this field. The wheel's metadata is unaffected, because
|
|
34
|
+
# maturin takes it from pyproject.toml.
|
|
35
|
+
license = "Apache-2.0"
|
|
36
|
+
|
|
37
|
+
[workspace.dependencies]
|
|
38
|
+
# The workspace's own crates, by path. Each takes the workspace's version, so
|
|
39
|
+
# a member names one with `{ workspace = true }` and no version at all, and
|
|
40
|
+
# cargo-deny's allow-wildcard-paths admits the versionless edge.
|
|
41
|
+
zeusdb-vector-core = { path = "crates/core" }
|
|
42
|
+
zeusdb-vector-hnsw = { path = "crates/hnsw" }
|
|
43
|
+
# abi3-py310 builds against CPython's stable ABI, so one wheel per platform
|
|
44
|
+
# loads on every CPython from 3.10 up, including versions that do not exist
|
|
45
|
+
# yet. The feature lives here rather than in pyproject's [tool.maturin]
|
|
46
|
+
# features, so that cargo build, cargo clippy and cargo test all compile the
|
|
47
|
+
# same configuration the wheel ships. The floor matches requires-python.
|
|
48
|
+
#
|
|
49
|
+
# The cost is PyPy and the free-threaded builds. Neither is expressible in the
|
|
50
|
+
# stable ABI, and the abi3t feature that PEP 803 adds for free-threading is
|
|
51
|
+
# 3.15 only, so it buys nothing at a 3.10 floor.
|
|
52
|
+
#
|
|
53
|
+
# `extension-module` is not here. It is the binding crate's own feature, on by
|
|
54
|
+
# default, so `cargo build`, `cargo clippy` and the wheel are unchanged and
|
|
55
|
+
# only `cargo test --no-default-features` differs. See bindings/python/Cargo.toml.
|
|
56
|
+
pyo3 = { version = "0.29.0", features = ["abi3-py310"] }
|
|
57
|
+
numpy = "0.29.0"
|
|
58
|
+
serde_json = "1.0"
|
|
59
|
+
serde = { version = "1.0", features = ["derive"] }
|
|
60
|
+
rayon = "1.10"
|
|
61
|
+
rand = "0.10"
|
|
62
|
+
# The generator itself, named rather than taken from `rand::rngs::StdRng`,
|
|
63
|
+
# which `rand` documents as non-portable and free to change algorithm in any
|
|
64
|
+
# release. Every seeded draw in the engine runs on it, being the level stream a
|
|
65
|
+
# graph is built from and both of the product quantizer's. See
|
|
66
|
+
# crates/core/src/rng.rs.
|
|
67
|
+
#
|
|
68
|
+
# `rand` 0.10 builds `StdRng` on the `chacha20` crate rather than on
|
|
69
|
+
# `rand_chacha`, so this is a dependency of its own. The two crates
|
|
70
|
+
# implement the same generator and produce the same stream word for word,
|
|
71
|
+
# which crates/core/src/rng.rs holds by test.
|
|
72
|
+
rand_chacha = "0.10"
|
|
73
|
+
# The distance kernels' vector type. See the "How they are compiled" section of
|
|
74
|
+
# crates/core/src/distance.rs. It pulls in safe_arch and bytemuck, and it
|
|
75
|
+
# is a build-time abstraction over the target's own vector registers with no
|
|
76
|
+
# run time component, so it adds nothing to the wheel beyond the code it
|
|
77
|
+
# generates.
|
|
78
|
+
wide = "1"
|
|
79
|
+
bincode = "2.0.1"
|
|
80
|
+
chrono = { version = "0.4.41", features = ["serde"] } # <-- For timestamps
|
|
81
|
+
# Modern structured logging
|
|
82
|
+
tracing = "0.1"
|
|
83
|
+
tracing-appender = "0.2"
|
|
84
|
+
tracing-subscriber = { version = "0.3", default-features = false, features = ["fmt", "env-filter", "json", "time", "ansi", "registry"] }
|
|
85
|
+
# Terminal detection is `std::io::IsTerminal`, stable since Rust 1.70. The
|
|
86
|
+
# `atty` crate this replaced was unmaintained and carried RUSTSEC-2021-0145.
|
|
87
|
+
tempfile = "3"
|
|
88
|
+
|
|
89
|
+
# The profile the wheel is built with.
|
|
90
|
+
#
|
|
91
|
+
# Fat LTO with one codegen unit. Thin LTO rebuilds an edit in a fraction of
|
|
92
|
+
# the time and produces the same results, and whether it changes search
|
|
93
|
+
# latency is not decided, because on a developer machine two fat builds of one
|
|
94
|
+
# source differ from each other by as much as a fat build differs from a thin
|
|
95
|
+
# one. The wheel keeps fat so that two wheels built from two commits differ by
|
|
96
|
+
# the code between them alone. What would settle it is a paired comparison of
|
|
97
|
+
# a fat wheel and a thin wheel loaded into one interpreter on the runner that
|
|
98
|
+
# builds the wheel, which is where the wheel runs, rather than on a developer
|
|
99
|
+
# machine.
|
|
100
|
+
[profile.release]
|
|
101
|
+
lto = true # Fat link-time optimization
|
|
102
|
+
codegen-units = 1 # Single compilation unit
|
|
103
|
+
opt-level = 3 # Full optimization
|
|
104
|
+
|
|
105
|
+
# An optimised build that keeps `debug_assertions` on.
|
|
106
|
+
#
|
|
107
|
+
# The lock rank registry in crates/hnsw/src/locks.rs is gated
|
|
108
|
+
# on `cfg(debug_assertions)` and on nothing else, so it is live in any profile
|
|
109
|
+
# that leaves them on. This profile is the release profile with the assertions
|
|
110
|
+
# turned back on, so the registry runs at release speed. Build it with
|
|
111
|
+
#
|
|
112
|
+
# maturin develop --profile checked
|
|
113
|
+
#
|
|
114
|
+
# and run the suite as usual.
|
|
115
|
+
#
|
|
116
|
+
# Thin LTO rather than the release profile's fat, because this profile is
|
|
117
|
+
# built many times a day and thin LTO builds each edit in a fraction of the
|
|
118
|
+
# time, with the same results. The published wheel keeps fat; see the release
|
|
119
|
+
# profile.
|
|
120
|
+
[profile.checked]
|
|
121
|
+
inherits = "release"
|
|
122
|
+
debug-assertions = true
|
|
123
|
+
lto = "thin"
|
|
124
|
+
codegen-units = 16
|
|
125
|
+
|
|
126
|
+
# The release profile for a developer's own builds, being release with thin
|
|
127
|
+
# LTO so that an edit rebuilds in a fraction of the fat-LTO time. Its output is
|
|
128
|
+
# not what the wheel ships, so a wheel is built with `--release` and a working
|
|
129
|
+
# copy with
|
|
130
|
+
#
|
|
131
|
+
# maturin develop --profile dev-release
|
|
132
|
+
[profile.dev-release]
|
|
133
|
+
inherits = "release"
|
|
134
|
+
lto = "thin"
|
|
135
|
+
codegen-units = 16
|