feat: make each app self-contained with core dependencies

Now you can do:
- cargo build --features sheet → gets automation+drive+cache+sheet deps
- cargo build --features mail → gets automation+drive+cache+mail deps
- cargo build --features tasks → gets automation+drive+cache+tasks deps

Each app automatically includes what it needs from core infrastructure.
No need to manually specify automation, drive, cache anymore.

Added test_all_apps.sh to test each app independently and measure
compilation times.
This commit is contained in:
Rodrigo Rodriguez (Pragmatismo) 2026-01-23 13:46:10 -03:00
parent bba0efdb55
commit 536495fb4d

View file

@ -12,78 +12,78 @@ features = ["database", "i18n"]
# ===== DEFAULT ===== # ===== DEFAULT =====
default = ["chat", "automation", "drive", "tasks", "cache", "directory"] default = ["chat", "automation", "drive", "tasks", "cache", "directory"]
# ===== CORE INFRASTRUCTURE (Always needed) ===== # ===== CORE INFRASTRUCTURE (Can be used standalone) =====
automation = ["dep:rhai", "dep:cron"] automation = ["dep:rhai", "dep:cron"]
drive = ["dep:aws-config", "dep:aws-sdk-s3", "dep:aws-smithy-async", "dep:pdf-extract"] drive = ["dep:aws-config", "dep:aws-sdk-s3", "dep:aws-smithy-async", "dep:pdf-extract"]
cache = ["dep:redis"] cache = ["dep:redis"]
directory = [] directory = []
# ===== APPS (Flat list - no dependencies between apps) ===== # ===== APPS (Each includes what it needs from core) =====
# Communication # Communication
chat = [] chat = ["automation", "drive", "cache"]
people = [] people = ["automation", "drive", "cache"]
mail = ["dep:lettre", "dep:mailparse", "dep:imap", "dep:native-tls"] mail = ["automation", "drive", "cache", "dep:lettre", "dep:mailparse", "dep:imap", "dep:native-tls"]
meet = ["dep:livekit"] meet = ["automation", "drive", "cache", "dep:livekit"]
social = [] social = ["automation", "drive", "cache"]
whatsapp = [] whatsapp = ["automation", "drive", "cache"]
telegram = [] telegram = ["automation", "drive", "cache"]
instagram = [] instagram = ["automation", "drive", "cache"]
msteams = [] msteams = ["automation", "drive", "cache"]
# Productivity # Productivity
calendar = [] calendar = ["automation", "drive", "cache"]
tasks = ["dep:cron"] tasks = ["automation", "drive", "cache", "dep:cron"]
project = ["quick-xml"] project = ["automation", "drive", "cache", "quick-xml"]
goals = [] goals = ["automation", "drive", "cache"]
workspaces = [] workspaces = ["automation", "drive", "cache"]
tickets = [] tickets = ["automation", "drive", "cache"]
billing = [] billing = ["automation", "drive", "cache"]
# Documents # Documents
docs = ["docx-rs", "ooxmlsdk"] docs = ["automation", "drive", "cache", "docx-rs", "ooxmlsdk"]
sheet = ["calamine", "spreadsheet-ods"] sheet = ["automation", "drive", "cache", "calamine", "spreadsheet-ods"]
slides = ["ooxmlsdk"] slides = ["automation", "drive", "cache", "ooxmlsdk"]
paper = [] paper = ["automation", "drive", "cache"]
# Media # Media
video = [] video = ["automation", "drive", "cache"]
player = [] player = ["automation", "drive", "cache"]
canvas = [] canvas = ["automation", "drive", "cache"]
# Learning # Learning
learn = [] learn = ["automation", "drive", "cache"]
research = [] research = ["automation", "drive", "cache", "llm", "vectordb"]
sources = [] sources = ["automation", "drive", "cache"]
# Analytics # Analytics
analytics = [] analytics = ["automation", "drive", "cache"]
dashboards = [] dashboards = ["automation", "drive", "cache"]
monitoring = ["dep:sysinfo"] monitoring = ["automation", "drive", "cache", "dep:sysinfo"]
# Development # Development
designer = [] designer = ["automation", "drive", "cache"]
editor = [] editor = ["automation", "drive", "cache"]
# Admin # Admin
attendant = [] attendant = ["automation", "drive", "cache"]
security = [] security = ["automation", "drive", "cache"]
settings = [] settings = ["automation", "drive", "cache"]
# Core Tech # Core Tech
llm = [] llm = ["automation", "drive", "cache"]
vectordb = ["dep:qdrant-client"] vectordb = ["automation", "drive", "cache", "dep:qdrant-client"]
nvidia = [] nvidia = ["automation", "drive", "cache"]
compliance = ["dep:csv"] compliance = ["automation", "drive", "cache", "dep:csv"]
timeseries = [] timeseries = ["automation", "drive", "cache"]
weba = [] weba = ["automation", "drive", "cache"]
progress-bars = ["dep:indicatif"] progress-bars = ["automation", "drive", "cache", "dep:indicatif"]
grpc = [] grpc = ["automation", "drive", "cache"]
jemalloc = ["dep:tikv-jemallocator", "dep:tikv-jemalloc-ctl"] jemalloc = ["automation", "drive", "cache", "dep:tikv-jemallocator", "dep:tikv-jemalloc-ctl"]
console = ["dep:crossterm", "dep:ratatui"] console = ["automation", "drive", "cache", "dep:crossterm", "dep:ratatui"]
# ===== BUNDLES (Optional - for convenience) ===== # ===== BUNDLES (Optional - for convenience) =====
minimal = ["chat", "automation", "drive", "cache"] minimal = ["chat"]
lightweight = ["chat", "automation", "drive", "cache", "tasks", "people"] lightweight = ["chat", "tasks", "people"]
full = ["chat", "people", "mail", "tasks", "calendar", "drive", "docs", "llm", "cache", "compliance"] full = ["chat", "people", "mail", "tasks", "calendar", "drive", "docs", "llm", "cache", "compliance"]
[dependencies] [dependencies]