diff --git a/crates/storage/Cargo.toml b/crates/storage/Cargo.toml index 58ab465..1e95dc0 100644 --- a/crates/storage/Cargo.toml +++ b/crates/storage/Cargo.toml @@ -8,7 +8,12 @@ description = "SQLite persistence, BM25 search, and file storage for Kon" kon-core = { path = "../core" } # SQLite with compile-time checked queries -sqlx = { version = "0.8", features = ["sqlite", "runtime-tokio"] } +# default-features = false strips sqlx's `any`, `macros`, `migrate`, `json` — +# none of which this crate uses (it calls sqlx::query() / query_scalar() +# directly and runs its own migration machinery). Cuts ~40% of sqlx's +# compile graph, most visibly on Windows MSVC where each proc-macro crate +# (which `macros` pulls in) becomes a slow .dll link. +sqlx = { version = "0.8", default-features = false, features = ["runtime-tokio", "sqlite"] } # Async runtime tokio = { version = "1", features = ["rt", "sync", "macros"] } diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 93b1ebf..e9d5782 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -42,7 +42,9 @@ arboard = "3.6.1" # SqlitePool is named directly from src-tauri/src/lib.rs (the AppState # stores it). Must be unconditional, not Linux-only — naming a type from # a transitive dep requires the dep be listed here too. -sqlx = { version = "0.8", features = ["sqlite", "runtime-tokio"] } +# See crates/storage/Cargo.toml — default-features = false drops macros / +# migrate / any / json which this crate doesn't use. Only names SqlitePool. +sqlx = { version = "0.8", default-features = false, features = ["runtime-tokio", "sqlite"] } uuid = { version = "1", features = ["v4"] } [target.'cfg(target_os = "linux")'.dependencies]