Files
foxhunt/Cargo.lock
jgrusewski 91535deb1a refactor(ml): make leaf ml-* sub-crates optional via cargo features
Eight sub-crates whose Rust modules in crates/ml/src/ are leaf-level
(no other ml/src module references them) are now feature-gated:

  ml-backtesting       → feature `backtest-mod`         (ml::backtesting)
  ml-paper-trading     → feature `paper-trading-mod`    (ml::paper_trading)
  ml-stress-testing    → feature `stress-testing-mod`   (ml::stress_testing)
  ml-explainability    → feature `explainability-mod`   (ml::explainability)
  ml-universe          → feature `universe-mod`         (ml::universe)
  ml-regime-detection  → feature `regime-detection-mod` (ml::regime_detection)
  ml-validation        → feature `validation-mod`       (ml::validation)
  ml-data-validation   → feature `data-validation-mod`  (ml::data_validation)

Added `full-stack` feature aggregating all eight, included in `default`.
Callers using `ml.workspace = true` see no behavioral change because
the workspace dep keeps default-features = true.

Per-service ml-* dep count (cargo tree):
  ml-training-service   24 → 16   (already used default-features = false)
  trading-agent-service 22 → 14   (already used default-features = false)
  trading-service       23 → 22   (still uses default = true; gated
                                   sub-crates would drop with future
                                   default-features = false flip)
  backtesting-service   23 → 22   (same — future commit can drop them)

cargo check --workspace passes (only pre-existing 11 ml warnings).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 01:39:25 +02:00

283 KiB