chore: feature gate vector_index (#7428)

Signed-off-by: discord9 <discord9@163.com>
This commit is contained in:
discord9
2025-12-17 15:14:25 +08:00
committed by GitHub
parent 62808b887b
commit 1afcddd5a9
2 changed files with 5 additions and 1 deletions

View File

@@ -7,6 +7,9 @@ license.workspace = true
[lints] [lints]
workspace = true workspace = true
[features]
vector_index = ["dep:usearch"]
[dependencies] [dependencies]
async-trait.workspace = true async-trait.workspace = true
asynchronous-codec = "0.7.0" asynchronous-codec = "0.7.0"
@@ -41,7 +44,7 @@ tantivy = { version = "0.24", features = ["zstd-compression"] }
tantivy-jieba = "0.16" tantivy-jieba = "0.16"
tokio.workspace = true tokio.workspace = true
tokio-util.workspace = true tokio-util.workspace = true
usearch = { version = "2.21", default-features = false, features = ["fp16lib"] } usearch = { version = "2.21", default-features = false, features = ["fp16lib"], optional = true }
uuid.workspace = true uuid.workspace = true
[dev-dependencies] [dev-dependencies]

View File

@@ -22,6 +22,7 @@ pub mod external_provider;
pub mod fulltext_index; pub mod fulltext_index;
pub mod inverted_index; pub mod inverted_index;
pub mod target; pub mod target;
#[cfg(feature = "vector_index")]
pub mod vector; pub mod vector;
pub type Bytes = Vec<u8>; pub type Bytes = Vec<u8>;