rusty_ems/lib.rs
1#![allow(clippy::needless_range_loop)]
2
3//! Rusty Execution Management System (EMS)
4//!
5//! A high-performance, low-latency trading execution system for connecting to crypto exchanges
6
7pub mod auth;
8/// Module for handling exchange connectivity and connection management
9pub mod connectivity;
10/// Error types and error handling utilities for the EMS
11pub mod error;
12/// Exchange implementations for different cryptocurrency exchanges
13pub mod exchanges;
14// Note: Common websocket utilities are implemented in individual exchange modules
15// and rusty-common::websocket for shared functionality. No separate websocket module needed.
16
17// Re-export error types for convenience
18pub use error::{EMSError, Result};
19
20// Re-export authentication types for convenience
21pub use auth::{AuthenticationManager, UnifiedAuthManager, create_auth_adapter};
22/// Core execution engine for order processing and lifecycle management
23pub mod execution_engine;
24/// Lock-free implementation of the execution engine for high-performance scenarios
25pub mod execution_engine_lockfree;
26/// Optimized execution engine with advanced performance features
27pub mod execution_engine_optimized;
28/// Factory pattern implementation for creating exchange components and configurations
29pub mod factory;
30/// Integration module for market data feeder components
31pub mod feeder_integration;
32/// FIX protocol implementation for financial messaging standards
33pub mod fix_protocol;
34/// Registry for managing trading instruments and metadata
35pub mod instrument_registry;
36/// Memory pool integration for zero-allocation operations
37pub mod memory_integration;
38/// Position management and tracking utilities
39pub mod position_manager;
40/// Protocol definitions and data structures for exchange communication
41pub mod protocol;
42/// Rate limiting and throttling utilities for API calls
43pub mod throttle;
44/// Utility functions and helper modules
45pub mod utils;
46
47pub use execution_engine::{Exchange, ExecutionEngine, ExecutionEvent, ExecutionReport};
48pub use execution_engine_lockfree::LockFreeExecutionEngine;
49pub use factory::{ConfigLoader, EMSConfig, ExchangeFactory, GlobalSettings};
50pub use feeder_integration::MarketDataProvider;
51pub use protocol::{ExchangeConfig, ExchangeMessage, OrderOperation, OrderRequest};
52
53// Export optimized execution engine for high-frequency trading scenarios
54pub use execution_engine_optimized::{ExecutionStats, OptimizedExecutionEngine};
55
56// Export memory pool integration for zero-allocation operations
57pub use memory_integration::{
58 PooledExecutionReportManager, PooledOrderManager, PooledWebSocketManager,
59 get_pool_operation_stats, reset_pool_operation_stats,
60};
61
62// Conditionally export rusty-feeder integration
63#[cfg(feature = "feeder")]
64pub use feeder_integration::FeederMarketDataProvider;
65
66// Export instrument registry
67pub use instrument_registry::{
68 CacheStats, DefaultInstrumentRegistry, InstrumentRegistry, OrderMetadata,
69 create_shared_registry, create_shared_registry_with_ttl,
70};
71
72// Export position management
73pub use position_manager::{DefaultPositionManager, PositionManager};