Production Open source · MIT

rust-mexc-ws

Zero-unsafe Rust client engineered for sub-millisecond latency and sustained 1,300+ msgs/sec throughput.

Language Rust
Started 2025
Stack WebSocket · Protocol Buffers · Tokio
Role Creator / Lead Developer

Overview

Role: Creator / Lead Developer Timeline: 2025 — Present Status: Open Source / Production Ready

Key Features

  • Production-grade WebSocket client for MEXC exchange
  • Protocol Buffers support for minimal latency
  • HFT-ready architecture with sub-millisecond performance
  • Zero-panic design with comprehensive safety mechanisms
  • Multithreaded architecture supporting 1,300+ msgs/sec sustained throughput
  • Memory-bounded operations with automatic cleanup

Technical Stack

  • Language: Rust (100% safe code, zero unsafe blocks)
  • Protocols: WebSocket, Protocol Buffers, gRPC
  • Architecture: Lock-free design, ring buffers, object pools
  • Concurrency: Tokio async runtime, atomic operations
  • Testing: Comprehensive test suite with 100% Clippy compliance

Technical Achievements

  • Lock-free hot path: ring buffers and object pools for microsecond latency
  • Zero-allocation operations: pre-allocated objects eliminate heap allocations in critical paths
  • Intelligent backpressure: emergency mode with probabilistic throttling
  • Memory safety: hard limits with emergency cleanup (512MB default)
  • Multithreaded scaling: 10 symbols × 3 channels = 30 concurrent streams
  • Financial precision: complete Decimal usage eliminates floating-point errors

Impact & Recognition

  • Production-ready library for algorithmic trading systems
  • Comprehensive documentation with multiple demo applications
  • Zero-crash design through elimination of all panic points
  • HFT-grade performance optimisations for enterprise use
  • Open source contribution to Rust cryptocurrency ecosystem