Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,174 changes: 1,070 additions & 104 deletions Cargo.lock

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ strip = true
rusqlite = { version = "0.34", features = ["bundled", "modern_sqlite"] }
sqlite-vec = "0.1"
zerocopy = { version = "0.8", features = ["derive"] }
# libSQL / Turso backend (fork): remote (sqld) + embedded replica + sync.
libsql = { version = "0.9", default-features = false, features = ["core", "replication", "remote", "sync", "tls"] }
libsql-ffi = "0.9"
once_cell = "1"

# Embeddings (optional)
fastembed = "4"
Expand Down
10 changes: 7 additions & 3 deletions crates/icm-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,13 @@ name = "icm"
path = "src/main.rs"

[features]
default = ["embeddings", "tui"]
default = ["embeddings", "tui", "backend-rusqlite"]
embeddings = ["icm-core/embeddings", "icm-mcp/embeddings"]
tui = ["dep:ratatui", "dep:crossterm"]
backend-rusqlite = ["icm-store/backend-rusqlite", "icm-mcp/backend-rusqlite"]
# Opt-in libSQL/Turso backend: build with
# `--no-default-features --features turso,embeddings,tui`.
turso = ["icm-store/turso", "icm-mcp/turso"]
web = ["dep:axum", "dep:tokio", "dep:tower-http", "dep:rust-embed", "dep:mime_guess", "dep:getrandom"]
# `openssl` is not used directly in our source code, but it gets pulled
# transitively via reqwest / hyper-tls / etc. (depending on the active
Expand All @@ -30,8 +34,8 @@ vendored-openssl = ["openssl/vendored"]

[dependencies]
icm-core = { path = "../icm-core" }
icm-store = { path = "../icm-store" }
icm-mcp = { path = "../icm-mcp" }
icm-store = { path = "../icm-store", default-features = false }
icm-mcp = { path = "../icm-mcp", default-features = false }
anyhow = { workspace = true }
clap = { workspace = true }
chrono = { workspace = true }
Expand Down
6 changes: 4 additions & 2 deletions crates/icm-mcp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ version = "0.10.34"
edition = "2021"

[features]
default = []
default = ["backend-rusqlite"]
backend-rusqlite = ["icm-store/backend-rusqlite"]
turso = ["icm-store/turso"]
embeddings = ["icm-core/embeddings"]

[dependencies]
icm-core = { path = "../icm-core" }
icm-store = { path = "../icm-store" }
icm-store = { path = "../icm-store", default-features = false }
chrono = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
Expand Down
17 changes: 16 additions & 1 deletion crates/icm-store/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"

[dependencies]
icm-core = { path = "../icm-core" }
rusqlite = { workspace = true }
rusqlite = { workspace = true, optional = true }
sqlite-vec = { workspace = true }
zerocopy = { workspace = true }
serde_json = { workspace = true }
Expand All @@ -15,5 +15,20 @@ lru = { workspace = true }
sha2 = { workspace = true }
ulid = { workspace = true }

# Optional libSQL/Turso backend. With `--features turso` the store runs over the
# async libsql client (local file, remote sqld/Turso server, or embedded
# replica); without it, behaviour is exactly upstream rusqlite.
libsql = { workspace = true, optional = true }
libsql-ffi = { workspace = true, optional = true }
once_cell = { workspace = true, optional = true }
tokio = { workspace = true, optional = true }

[features]
# Exactly one backend. Default is rusqlite (unchanged upstream); for libSQL/Turso
# build with `--no-default-features --features turso`.
default = ["backend-rusqlite"]
backend-rusqlite = ["dep:rusqlite"]
turso = ["dep:libsql", "dep:libsql-ffi", "dep:once_cell", "dep:tokio"]

[dev-dependencies]
tempfile = "3"
Loading
Loading