Files
spacedrive/core/Cargo.toml
Jamie Pine 1c5a9d3558 Enhance content kind statistics and database structure
- Added a new `file_count` column to the `content_kinds` table to track the number of content identities for each kind, improving statistics calculation efficiency.
- Implemented a migration script to add the `file_count` column and ensure backward compatibility.
- Updated the `Library` struct to include a method for updating content kind counts based on existing content identities.
- Introduced a new query for retrieving content kind statistics, including file counts, to facilitate better data analysis and reporting.
- Refactored related components to support the new statistics functionality, enhancing overall data integrity and performance.
2025-12-20 05:30:01 -08:00

234 lines
7.1 KiB
TOML

[package]
edition = "2021"
name = "sd-core"
version = "2.0.0-pre.1"
[features]
default = []
# FFmpeg support for video thumbnails (enable for release builds)
ffmpeg = ["dep:sd-ffmpeg", "dep:sd-images"]
# AI models support
ai = []
# HEIF image support
heif = ["dep:sd-images", "sd-images/heif"]
# Mobile platform support
mobile = []
# CLI support (clap is now always available)
cli = []
[dependencies]
# Async runtime
async-channel = { workspace = true }
async-trait = "0.1"
futures = "0.3"
tokio = { version = "1.40", features = ["full"] }
# Database
sea-orm = { version = "1.1", features = [
"macros",
"runtime-tokio-rustls",
"sqlx-sqlite",
"uuid",
"with-chrono",
"with-json"
] }
sea-orm-migration = { version = "1.1", features = ["runtime-tokio-rustls", "sqlx-sqlite"] }
sqlx = { version = "0.8", features = ["runtime-tokio-rustls", "sqlite"] }
# API (temporarily disabled)
# axum = "0.7"
# Serialization
int-enum = "1.1"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
# HTTP client (for model downloads)
reqwest = { version = "0.11", features = ["stream"] }
specta = { git = "https://github.com/jamiepine/specta", branch = "main", features = [
"chrono",
"derive",
"export",
"serde",
"serde_json",
"uuid"
] }
specta-serde = { git = "https://github.com/jamiepine/specta", branch = "main" }
specta-swift = { git = "https://github.com/jamiepine/specta", branch = "main" }
specta-typescript = { git = "https://github.com/jamiepine/specta", branch = "main" }
strum = { version = "0.26", features = ["derive"] }
toml = "0.8"
hostname = "^0.4"
# Error handling
anyhow = "1.0"
thiserror = "1.0"
# Text processing
regex = "1.11"
# File operations
blake3 = "1.5" # Content addressing
bytes = "1.7" # Efficient byte buffers for I/O operations
hex = "0.4" # Hex encoding for volume fingerprints
notify = "6.1" # File system watching
sha2 = "0.10" # SHA-256 hashing for CAS IDs
# Cloud storage integration
opendal = { version = "0.54", features = [
"services-s3",
"services-gdrive",
"services-onedrive",
"services-dropbox",
"services-azblob",
"services-gcs",
] }
# Logging
tracing = "0.1"
tracing-appender = "0.2"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
# WASM Plugin System
wasmer = "4.2"
wasmer-middlewares = "4.2"
# Indexer rules engine
futures-concurrency = "7.6"
gix-ignore = { version = "0.11", features = ["serde"] }
globset = { version = "0.4", features = ["serde1"] }
# Job system dependencies
inventory = "0.3" # Automatic job registration
job-derive = { path = "../crates/job-derive" } # Job derive macros
rmp = "0.8" # MessagePack core types
rmp-serde = "1.3" # MessagePack serialization for job state
sd-task-system = { path = "../crates/task-system" }
# Vector database for memory files (optional for now)
# lancedb = "0.15" # Embedded vector database (conflicts with gpui)
# Media processing dependencies
blurhash = "0.2"
image = "0.25"
sd-ffmpeg = { path = "../crates/ffmpeg", optional = true }
sd-fs-watcher = { path = "../crates/fs-watcher" }
sd-images = { path = "../crates/images", optional = true }
sd-media-metadata = { path = "../crates/media-metadata" }
tokio-rustls = "0.26"
webp = "0.3"
# Speech-to-text dependencies (always included)
whisper-rs = "0.15.1"
hound = "3.5" # WAV file reading
rubato = "0.16" # Audio resampling to 16kHz
# Networking
# Iroh P2P networking with iOS support (using Oscar's patches)
iroh = { git = "https://github.com/n0-computer/iroh", rev = "e0c5091008d42f4c577f72b1085dfb26c28bd56f", features = [
"discovery-local-network"
] }
# Serialization for protocols
serde_cbor = "0.11"
# Cryptography for signing (backward compatibility)
ed25519-dalek = "2.1"
# Cryptography and networking utilities
aes-gcm = "0.10" # AES-GCM encryption for secure storage
argon2 = "0.5" # Password derivation
async-stream = "0.3" # File streaming
backoff = "0.4" # Retry logic
bincode = { version = "2.0.0-rc.3", features = ["serde"] } # Efficient encoding with serde compat
ring = "0.16" # Crypto primitives
tokio-stream = "0.1" # Async streams
# BIP39 wordlist support
bip39 = "2.0"
# Additional cryptography
chacha20poly1305 = "0.10" # Authenticated encryption for chunk-level security
hkdf = "0.12" # Key derivation function for session keys
hmac = "0.12"
x25519-dalek = "2.0"
# Network utilities
if-watch = "3.0"
local-ip-address = "0.5"
# colored already defined above
# Utils
chrono = { version = "0.4", features = ["serde"] }
dirs = "5.0"
once_cell = "1.20"
rand = "0.8" # Random number generation for secure delete
sysinfo = "0.31" # Cross-platform system information
tempfile = "3.14" # Temporary directories for testing
uuid = { version = "1.11", features = ["serde", "v4", "v5", "v7"] }
# High-performance ephemeral index
memmap2 = "0.9" # Memory-mapped file support for arena storage
smallvec = "1.13" # Small vector optimization for children arrays
parking_lot = "0.12" # Fast mutex for name cache
num_cpus = "1.16" # CPU count for parallel walker
whoami = "1.5"
# Secure storage
keyring = "3.6" # Only for device key in keychain
redb = "2.2" # Encrypted KV store for library keys, credentials, etc.
# CLI dependencies
clap = { version = "4.5", features = ["derive", "env"] }
colored = "2.1"
comfy-table = "7.1"
console = "0.15"
dialoguer = "0.11"
indicatif = "0.17"
owo-colors = "4.1"
supports-color = "3.0"
[build-dependencies]
chrono = { version = "0.4", features = ["serde"] }
colored = "2.1"
comfy-table = "7.1"
console = "0.15"
crossterm = "0.28"
dialoguer = "0.11"
indicatif = "0.17"
owo-colors = "4.1"
ratatui = "0.29"
serde_json = "1.0"
supports-color = "3.0"
vergen = { version = "8", features = ["cargo", "git", "gitcl"] }
# Platform specific
[target.'cfg(unix)'.dependencies]
libc = "0.2"
[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies]
whisper-rs = { version = "0.15.1", features = ["metal"] }
[[bin]]
name = "spacedrive"
path = "src/bin/cli.rs"
[[bin]]
name = "sd-daemon"
path = "src/bin/daemon.rs"
[dev-dependencies]
pretty_assertions = "1.4"
tempfile = "3.14"
# Patches for iOS compatibility
[patch.crates-io]
# https://github.com/n0-computer/iroh/pull/3409
iroh = { git = "https://github.com/n0-computer/iroh", rev = "e0c5091008d42f4c577f72b1085dfb26c28bd56f" }
# https://github.com/shellrow/netdev/pull/125
netdev = { git = "https://github.com/shellrow/netdev", rev = "b6ef275d2a72143b3c7d5845ee2f5a70b0e97771" }