build(deps): gate CUDA behind default feature, add CPU build scripts
Applies the stashed 'deps and cpu mode' work: cuda was hardcoded on the candle dependency lines, making the candle-cuda feature flag dead and any non-CUDA build impossible. Now default = [candle-cuda] for the main dev machine, with pnpm dev:app:cpu / build:app:cpu (--no-default-features) for CPU-only machines and CI. Also trims unused deps (log, uuid, tokio-full, chrono-serde). Verified: cargo check --locked --no-default-features passes.
This commit is contained in:
@@ -9,6 +9,8 @@
|
||||
"build:vite": "tsc && vite build",
|
||||
"clean:app": "cd src-tauri && cargo clean",
|
||||
"dev:app": "tauri dev",
|
||||
"dev:app:cpu": "tauri dev -- --no-default-features",
|
||||
"build:app:cpu": "tauri build -- --no-default-features",
|
||||
"dev:vite": "vite",
|
||||
"preview": "vite preview",
|
||||
"tauri": "tauri"
|
||||
|
||||
Generated
-16
@@ -4439,7 +4439,6 @@ dependencies = [
|
||||
"hnsw_rs",
|
||||
"image",
|
||||
"kamadak-exif",
|
||||
"log",
|
||||
"memmap2",
|
||||
"mozjpeg",
|
||||
"notify",
|
||||
@@ -4461,7 +4460,6 @@ dependencies = [
|
||||
"tokenizers",
|
||||
"tokio",
|
||||
"ureq",
|
||||
"uuid",
|
||||
"walkdir",
|
||||
"xxhash-rust",
|
||||
"zip 4.6.1",
|
||||
@@ -6537,25 +6535,11 @@ dependencies = [
|
||||
"bytes",
|
||||
"libc",
|
||||
"mio 1.2.0",
|
||||
"parking_lot",
|
||||
"pin-project-lite",
|
||||
"signal-hook-registry",
|
||||
"socket2",
|
||||
"tokio-macros",
|
||||
"windows-sys 0.61.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tokio-macros"
|
||||
version = "2.7.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "385a6cb71ab9ab790c5fe8d67f1645e6c450a7ce006a33de03daa956cf70a496"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.117",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tokio-native-tls"
|
||||
version = "0.3.1"
|
||||
|
||||
@@ -14,7 +14,9 @@ crate-type = ["staticlib", "cdylib", "rlib"]
|
||||
tauri-build = { version = "2", features = [] }
|
||||
|
||||
[features]
|
||||
default = []
|
||||
# CUDA is on by default for the main dev machine; build with
|
||||
# `--no-default-features` (pnpm dev:app:cpu) on machines without the toolkit.
|
||||
default = ["candle-cuda"]
|
||||
candle-cuda = ["candle-core/cuda", "candle-nn/cuda", "candle-transformers/cuda"]
|
||||
|
||||
[dependencies]
|
||||
@@ -33,18 +35,16 @@ image = { version = "0.25", default-features = false, features = ["jpeg", "png",
|
||||
fast_image_resize = { version = "6.0.0", features = ["image"] }
|
||||
walkdir = "2"
|
||||
rayon = "1"
|
||||
tokio = { version = "1", features = ["full"] }
|
||||
chrono = { version = "0.4", features = ["serde"] }
|
||||
uuid = { version = "1", features = ["v4"] }
|
||||
tokio = { version = "1", features = ["rt-multi-thread"] }
|
||||
chrono = "0.4"
|
||||
anyhow = "1"
|
||||
log = "0.4"
|
||||
ffmpeg-sidecar = "2.5.0"
|
||||
xxhash-rust = { version = "0.8", features = ["xxh3"] }
|
||||
memmap2 = "0.9"
|
||||
sysinfo = "0.38.4"
|
||||
candle-core = { version = "0.10.2", features = ["cuda"] }
|
||||
candle-nn = { version = "0.10.2", features = ["cuda"] }
|
||||
candle-transformers = { version = "0.10.2", features = ["cuda"] }
|
||||
candle-core = "0.10.2"
|
||||
candle-nn = "0.10.2"
|
||||
candle-transformers = "0.10.2"
|
||||
hf-hub = { version = "0.5.0", default-features = false, features = ["ureq", "native-tls"] }
|
||||
tokenizers = "0.22.1"
|
||||
ort = { version = "2.0.0-rc.12", default-features = false, features = ["std", "ndarray", "download-binaries", "copy-dylibs", "load-dynamic", "directml", "api-24", "tls-native"] }
|
||||
|
||||
Reference in New Issue
Block a user