refactor: make Lua deps optional, remove unused dependencies

- Make meval, reqwest optional (behind 'lua' feature)
- Remove unused zbus and tokio dependencies
- Change default features from ["lua"] to []
- Update justfile install-local to use --no-default-features

Core binary now has 18 dependencies instead of 27 when built
without the lua feature, reducing compile time and binary size.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-30 03:14:53 +01:00
parent 384dd016a0
commit 10722bc016
3 changed files with 27 additions and 244 deletions

View File

@@ -20,9 +20,6 @@ gtk4 = { version = "0.10", features = ["v4_12"] }
# Layer shell support for Wayland overlay behavior
gtk4-layer-shell = "0.7"
# Async runtime for non-blocking operations
tokio = { version = "1", features = ["rt", "sync", "process", "fs"] }
# Fuzzy matching for search
fuzzy-matcher = "0.3"
@@ -49,8 +46,8 @@ toml = "0.8"
# CLI argument parsing
clap = { version = "4", features = ["derive"] }
# Math expression evaluation for calculator
meval = "0.2"
# Math expression evaluation (for Lua plugins)
meval = { version = "0.2", optional = true }
# JSON serialization for data persistence
serde_json = "1"
@@ -58,11 +55,8 @@ serde_json = "1"
# Date/time for frecency calculations
chrono = { version = "0.4", features = ["serde"] }
# D-Bus for MPRIS media player integration
zbus = { version = "4", default-features = false, features = ["tokio"] }
# HTTP client for weather API
reqwest = { version = "0.12", default-features = false, features = ["rustls-tls", "json", "blocking"] }
# HTTP client (for Lua plugins)
reqwest = { version = "0.12", default-features = false, features = ["rustls-tls", "json", "blocking"], optional = true }
# Lua runtime for plugin system (optional - can be loaded dynamically via owlry-lua)
mlua = { version = "0.10", features = ["lua54", "vendored", "send", "serialize"], optional = true }
@@ -85,8 +79,9 @@ tempfile = "3"
glib-build-tools = "0.20"
[features]
default = ["lua"]
default = []
# Enable verbose debug logging (for development/testing builds)
dev-logging = []
# Enable built-in Lua runtime (disable to use external owlry-lua package)
lua = ["dep:mlua"]
# Includes: mlua, meval (math), reqwest (http)
lua = ["dep:mlua", "dep:meval", "dep:reqwest"]