[package] name = "foxhunt" version.workspace = true edition.workspace = true rust-version.workspace = true authors.workspace = true license.workspace = true repository.workspace = true homepage.workspace = true documentation.workspace = true publish.workspace = true keywords.workspace = true categories.workspace = true description = "Foxhunt HFT Trading System - High-frequency trading with ML and comprehensive monitoring" [dependencies] # Core dependencies for the root package tokio.workspace = true serde = { workspace = true, features = ["derive"] } serde_json.workspace = true tracing.workspace = true tracing-subscriber.workspace = true # Database dependencies for binaries redis.workspace = true sqlx.workspace = true # gRPC dependencies for service binaries tonic.workspace = true tokio-stream.workspace = true prost.workspace = true chrono.workspace = true thiserror.workspace = true prometheus.workspace = true lazy_static.workspace = true axum.workspace = true rand.workspace = true # Types from core module core = { workspace = true } # Risk management risk = { workspace = true } # TLI removed - should be standalone client only # Core ML and backtesting modules ml = { workspace = true } backtesting = { workspace = true } data = { workspace = true } adaptive-strategy = { workspace = true } # Benchmarking criterion = { workspace = true } fastrand = { workspace = true } async-trait = { workspace = true } futures = { workspace = true } uuid = { workspace = true } bincode = { workspace = true } flate2 = { workspace = true } http = { workspace = true } # GPU dependencies for GPU test candle-core = { workspace = true } candle-nn = { workspace = true } anyhow = { workspace = true } # Benchmarks for performance validation [[bench]] name = "simple_performance" harness = false [[bench]] name = "trading_latency" harness = false [[bench]] name = "ml_inference" harness = false [[bench]] name = "order_processing" harness = false [[bench]] name = "risk_calculations" harness = false [[bench]] name = "order_id_performance" harness = false [[bench]] name = "direct_performance" harness = false [[bench]] name = "minimal_performance" harness = false [[bench]] name = "tli_performance_validation" harness = false [[bench]] name = "tli_grpc_performance" harness = false [[bench]] name = "tli_database_performance" harness = false [[bench]] name = "tli_minimal_performance" harness = false [[bench]] name = "standalone_tli_benchmark" harness = false # Service binaries removed - they exist in dedicated service packages # - trading_service: services/trading_service/ # - backtesting_service: services/backtesting_service/ # GPU test binaries kept for benchmarking [[bin]] name = "gpu_test" path = "src/bin/gpu_test.rs" [[bin]] name = "gpu_validation_benchmark" path = "src/bin/gpu_validation_benchmark.rs" [[bin]] name = "simple_gpu_test" path = "src/bin/simple_gpu_test.rs" [[bin]] name = "ml_training_service" path = "services/ml_training_service/src/main.rs" [[bin]] name = "ml_validation_test" path = "src/bin/ml_validation_test.rs" [[bin]] name = "standalone_ml_test" path = "src/bin/standalone_ml_test.rs" [[bin]] name = "database_validation_simple" path = "database_validation_simple.rs" [workspace] resolver = "2" members = [ "core", "risk", "risk-data", "tli", "ml", "data", "backtesting", "adaptive-strategy", "common", "storage", "market-data", "database", "crates/config", "services/backtesting_service", "services/trading_service", "services/ml_training_service", "tests", "tests/e2e" ] exclude = [ "performance-tests", "tests/e2e/vault_integration" # Explicitly excludes itself from workspace ] [workspace.package] version = "1.0.0" edition = "2021" rust-version = "1.75" authors = ["Foxhunt HFT Trading System"] license = "MIT OR Apache-2.0" repository = "https://github.com/user/foxhunt" homepage = "https://github.com/user/foxhunt" documentation = "https://docs.rs/foxhunt" publish = false keywords = ["trading", "hft", "ml", "rust", "finance"] categories = ["finance", "algorithms", "science"] [workspace.dependencies] # Core async and utilities tokio = { version = "1.0", features = ["rt-multi-thread", "macros", "net", "sync", "time", "fs", "signal", "io-util"] } tokio-util = { version = "0.7", features = ["codec", "io"] } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" uuid = { version = "1.0", features = ["v4", "serde"] } thiserror = "1.0" anyhow = "1.0" futures = { version = "0.3", features = ["std", "alloc", "async-await"] } async-trait = "0.1" once_cell = "1.0" # Time handling chrono = { version = "0.4.31", features = ["serde"] } # Financial and numerical types rust_decimal = { version = "1.0", features = ["serde", "macros"] } rust_decimal_macros = "1.36" num-bigint = "0.4" num-traits = "0.2" num = "0.4" # Random number generation rand = { version = "0.8.5", features = ["small_rng"] } fastrand = "2.0" rand_chacha = "0.3.1" rand_distr = "0.4" # Logging and tracing tracing = "0.1" tracing-subscriber = { version = "0.3", features = ["std", "ansi", "env-filter", "fmt", "json", "registry", "tracing-log"] } # Serialization bincode = "1.3" # High-performance data structures rustc-hash = "1.1" ahash = "0.8" indexmap = { version = "2.0", features = ["serde"] } crossbeam = "0.8" crossbeam-queue = "0.3" crossbeam-channel = "0.5" crossbeam-utils = "0.8" parking_lot = { version = "0.12", features = ["deadlock_detection"] } arrayvec = { version = "0.7", features = ["serde"] } lazy_static = "1.4" memmap2 = "0.9" libc = "0.2" num_cpus = "1.16" dashmap = { version = "6.0", features = ["serde"] } bytes = "1.5" smallvec = { version = "1.11", features = ["serde", "const_generics"] } prometheus = "0.14" # GPU and ML dependencies - CUDA support enabled via workspace features candle-core = { version = "0.9.1", default-features = false } candle-nn = { version = "0.9.1", default-features = false } candle-transformers = { version = "0.9.1", default-features = false } candle-optimisers = { version = "0.9.0", default-features = false } nalgebra = { version = "0.33", features = ["serde", "rand"] } ndarray = { version = "0.15", features = ["serde"] } # PyTorch bindings for complex model support tch = { version = "0.15" } torch-sys = "0.15" # ONNX Runtime for broad model compatibility ort = { version = "1.16", features = ["copy-dylibs", "load-dynamic"] } # Additional GPU libraries - made optional for CPU-only builds wgpu = { version = "0.19" } cudarc = { version = "0.12", features = ["std", "f16", "cuda-12060"] } half = { version = "2.6.0", features = ["serde"] } # Network and HTTP reqwest = { version = "0.12", features = ["json", "stream", "rustls-tls", "gzip", "brotli", "deflate", "cookies", "hickory-dns"] } http = "1.0" # Security and cryptography argon2 = "0.5" sha2 = "0.10" # HashiCorp Vault integration vaultrs = "0.7" # Broker connectivity tokio-tungstenite = { version = "0.21" } xml-rs = "0.8" time = { version = "0.3", features = ["serde"] } ibapi = "1.2" native-tls = "0.2" tokio-native-tls = "0.3" # Configuration and file handling toml = "0.8" serde_yaml = "0.9" csv = "1.3" base64 = "0.22" regex = "1.0" url = "2.4" hex = "0.4" md5 = "0.7" # Database redis = { version = "0.27", features = ["tokio-comp", "json"] } sqlx = { version = "0.8", features = ["runtime-tokio-rustls", "postgres", "sqlite", "chrono", "uuid", "rust_decimal"] } # ML and statistics dependencies linfa = { version = "0.7", features = ["serde"] } linfa-clustering = "0.7" linfa-linear = "0.7" linfa-reduction = "0.7" smartcore = { version = "0.3", features = ["serde", "ndarray-bindings"] } statrs = "0.17" ta = "0.5" polars = { version = "0.35", features = ["lazy"] } approx = "0.5" orderbook = "0.1" # Performance and utilities rayon = "1.0" criterion = { version = "0.5", features = ["html_reports"] } wide = { version = "0.7", features = ["serde"] } bytemuck = { version = "1.14", features = ["derive"] } autocfg = "1.1" core_affinity = "0.8" nix = "0.27" bumpalo = { version = "3.14", features = ["collections"] } fs2 = "0.4" flate2 = "1.0" # Web framework for monitoring (minimal) axum = { version = "0.7", features = ["json"] } # gRPC and protocol buffers tonic = { version = "0.12", features = ["tls", "server", "channel"] } tonic-build = "0.12" prost = "0.12" prost-build = "0.12" prost-types = "0.12" tonic-health = "0.12" hyper = { version = "1.0", features = ["server", "client", "http1", "http2"] } tower = { version = "0.4", features = ["timeout", "limit"] } tower-http = { version = "0.5", features = ["trace"] } tokio-stream = { version = "0.1" } # Testing dependencies proptest = "1.0" tokio-test = "0.4" futures-test = "0.3" quickcheck = "1.0" tempfile = "3.0" mockall = "0.11" test-case = "3.0" rstest = "0.18" wiremock = "0.5" insta = "1.34" serial_test = "3.0" testcontainers = "0.15" # Database clients for integration testing influxdb2 = { version = "0.5", default-features = false, features = ["native-tls"] } # Additional test dependencies arc-swap = "1.6" # Local workspace crates (for inter-crate dependencies) core = { path = "core" } data = { path = "data" } tli = { path = "tli" } risk = { path = "risk" } risk-data = { path = "risk-data" } backtesting = { path = "backtesting" } ml = { path = "ml" } adaptive-strategy = { path = "adaptive-strategy" } common = { path = "common" } storage = { path = "storage" } market-data = { path = "market-data" } config = { path = "crates/config" } database = { path = "database" } # Enable CUDA features by default for GPU acceleration [features] default = ["cuda"] cuda = ["ml/cuda"] cudnn = ["ml/cudnn"] cpu-only = [] integration-tests = [] # CRITICAL: Patch removed - using default cudarc version to avoid conflicts [profile.release] opt-level = 3 debug = false debug-assertions = false overflow-checks = false lto = true panic = 'abort' codegen-units = 1 strip = true [profile.test] opt-level = 1 debug = true debug-assertions = true overflow-checks = true lto = false panic = 'unwind' incremental = true codegen-units = 256 # Comprehensive clippy configuration for production-ready HFT system [workspace.lints.clippy] # Module structure - allow mod.rs files for complex modules with subdirectories mod_module_files = "allow" self_named_module_files = "allow" # Critical safety lints - deny to prevent future unwrap/panic usage in production unwrap_used = "deny" expect_used = "deny" panic = "deny" indexing_slicing = "warn" float_arithmetic = "warn" out_of_bounds_indexing = "deny" unchecked_duration_subtraction = "deny" # High-priority restriction lints for HFT safety arithmetic_side_effects = "warn" as_conversions = "warn" assertions_on_result_states = "deny" clone_on_ref_ptr = "warn" create_dir = "deny" dbg_macro = "deny" decimal_literal_representation = "deny" default_numeric_fallback = "warn" deref_by_slicing = "deny" disallowed_script_idents = "deny" else_if_without_else = "deny" empty_drop = "deny" empty_structs_with_brackets = "deny" error_impl_error = "deny" exit = "deny" filetype_is_file = "deny" float_cmp_const = "deny" fn_to_numeric_cast_any = "deny" format_push_string = "deny" get_unwrap = "deny" host_endian_bytes = "deny" if_then_some_else_none = "deny" impl_trait_in_params = "deny" infinite_loop = "deny" inline_asm_x86_att_syntax = "deny" inline_asm_x86_intel_syntax = "deny" integer_division = "warn" large_include_file = "deny" let_underscore_must_use = "deny" lossy_float_literal = "deny" map_err_ignore = "warn" mem_forget = "deny" missing_enforced_import_renames = "deny" mixed_read_write_in_expression = "deny" modulo_arithmetic = "deny" multiple_inherent_impl = "deny" multiple_unsafe_ops_per_block = "warn" mutex_atomic = "deny" needless_raw_strings = "deny" non_ascii_literal = "deny" partial_pub_fields = "deny" print_stderr = "warn" print_stdout = "warn" pub_use = "allow" rc_buffer = "deny" rc_mutex = "deny" rest_pat_in_fully_bound_structs = "deny" same_name_method = "deny" semicolon_inside_block = "deny" shadow_reuse = "deny" shadow_same = "deny" shadow_unrelated = "deny" str_to_string = "deny" string_add = "deny" string_slice = "deny" string_to_string = "deny" suspicious_xor_used_as_pow = "deny" tests_outside_test_module = "deny" todo = "deny" try_err = "deny" undocumented_unsafe_blocks = "warn" unimplemented = "deny" unnecessary_safety_comment = "deny" unnecessary_safety_doc = "deny" unreachable = "deny" unseparated_literal_suffix = "deny" unwrap_in_result = "deny" use_debug = "deny" verbose_file_reads = "deny" wildcard_enum_match_arm = "deny" # Performance lints for HFT systems missing_const_for_fn = "warn" trivially_copy_pass_by_ref = "warn" large_types_passed_by_value = "warn" redundant_clone = "warn" unnecessary_wraps = "warn" single_char_lifetime_names = "warn" doc_markdown = "warn" manual_let_else = "warn" # Readability and maintainability lints cognitive_complexity = "warn" too_many_arguments = "warn" too_many_lines = "warn" type_complexity = "warn" large_enum_variant = "warn" enum_variant_names = "warn" module_name_repetitions = "warn" similar_names = "warn" single_match_else = "warn" unnecessary_cast = "warn" used_underscore_binding = "warn" wildcard_imports = "warn" [workspace.lints.rust] unsafe_code = "warn" missing_docs = "allow" unreachable_pub = "warn" unused_crate_dependencies = "warn" unused_extern_crates = "warn" unused_import_braces = "warn" unused_lifetimes = "warn" unused_qualifications = "warn" variant_size_differences = "warn"