From 296fea2b55424e14edb68aa83cfa0af7b49cf8d8 Mon Sep 17 00:00:00 2001 From: Emil Sayahi <97276123+emmyoh@users.noreply.github.com> Date: Wed, 24 Apr 2024 13:00:03 -0400 Subject: [PATCH] feat: Separate CLI from library. --- Cargo.toml | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 64bc868..882c66c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,31 +17,32 @@ crate-type=["rlib", "dylib", "staticlib"] name = "text-db" path = "src/main.rs" doc = false +required-features = ["cli"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] bincode = "1.3.3" -clap = { version = "4.5.4", features = ["derive"] } -fastembed = "3.4.0" +clap = { version = "4.5.4", features = ["derive"], optional = true } +fastembed = "3.5.0" hnsw = { version = "0.11.0", features = ["serde1"] } ordered-float = "4.2.0" pcg_rand = { version = "0.13.0", features = ["serde1"] } -serde = "1.0.197" -simsimd = "4.3.0" -space = "0.17" +serde = "1.0.198" +simsimd = "4.3.1" +space = "0.17.0" lz4_flex = { version = "0.11.3", default-features = false, features = ["frame"] } -ticky = "1.0.2" -pretty-duration = "0.1.1" -indicatif = "0.17.8" +ticky = { version = "1.0.2", optional = true } +pretty-duration = { version = "0.1.1", optional = true } +indicatif = { version = "0.17.8", optional = true } distances = "1.6.3" candle-examples = "0.4.1" candle-core = "0.4.1" candle-nn = "0.4.1" candle-transformers = "0.4.1" hf-hub = "0.3.2" -viuer = "0.7.1" -image = "0.24.9" +viuer = { version = "0.7.1", optional = true } +# image = "0.24.9" [features] default = [] @@ -50,4 +51,5 @@ cuda = ["candle-core/cuda", "candle-examples/cuda", "candle-nn/cuda", "candle-tr mkl = ["candle-core/mkl", "candle-examples/mkl", "candle-nn/mkl", "candle-transformers/mkl"] metal = ["candle-core/metal", "candle-examples/metal", "candle-nn/metal", "candle-transformers/metal"] sixel = ["viuer/sixel"] -avif = ["image/avif-encoder", "image/avif-decoder"] \ No newline at end of file +# avif = ["image/avif-encoder", "image/avif-decoder"] +cli = ["clap", "ticky", "pretty-duration", "indicatif", "viuer"]