Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
🤔 What is miniFIX
minifix
is a high-performance, memory-safe Rust library for parsing, manipulating, and generating FIX (Financial Information Exchange) protocol messages. Designed for speed, safety, and ease of use in financial trading systems, it provides zero-copy parsing, type-safe field access, and comprehensive support for FIX protocol versions 4.0 through 4.4. miniFIX is a derivation of the FerrumFIX crate. Our goal is to create a slimmed-down-bare-essentials version of the original crate.
Please note that a lot of the code in miniFIX is drawn from FerrumFIX, and published in accordance with the MIT license (see LICENSE).
Use Cases
- Trading Systems: Parse and generate order messages, execution reports, and market data
- Market Data Processing: Handle real-time market data feeds with minimal latency
- FIX Gateway Development: Build protocol bridges and message routing systems
- Financial Analytics: Process historical trade data and market information
- Risk Management: Monitor and analyze trading activity in real-time
Architecture
miniFIX is organized into several focused crates:
- minifix: Main library with parsing, encoding, and field type handling
- minifix-dictionary: FIX protocol specifications and field definitions
- minifix-codegen: Code generation for FIX message structures
- minisofh: Simple Open Framing Header (SOFH) support
📷 Features
Core Parsing
- Zero-copy parsing - Process messages without unnecessary allocations
- Type safety - Compile-time guarantees for field types and message structure
- High performance - Optimized for low-latency trading applications
- Memory safety - No buffer overflows or undefined behavior
FIX Protocol Support
- Multiple FIX versions - Support for FIX 4.0, 4.1, 4.2, 4.3, and 4.4
- Message validation - Comprehensive message structure and field validation
- Repeating groups - Full support for FIX repeating group structures
- Field type handling - Type-safe field value handling with validation
Integration & Performance
- Async support - Built-in Tokio integration for async applications
- Session management - Session handling and heartbeat management
- JSON encoding - JSON representation of FIX messages
- SIMD optimizations - Vectorized operations where possible
Example Usage
use *;
// Parse a FIX message
let message = b"8=FIX.4.2|9=49|35=D|49=SENDER|56=TARGET|34=1|52=20230101-12:00:00|55=AAPL|54=1|38=100|10=123|";
let mut decoder = new;
decoder.config_mut.separator = b'|'; // For display (normally SOH)
let msg = decoder.decode?;
println!; // "AAPL"
// Type-safe field access
let seq_num: u32 = msg.get?; // Integer field
let symbol: & = msg.get?; // String field
let side: Side = msg.get?; // Enumeration field
// Encode a new message
let mut encoder = new;
let mut buffer = Vec new;
let mut new_msg = encoder.start_message;
new_msg.set;
new_msg.set;
new_msg.set;
new_msg.set;
let = new_msg.done;
println!;
🚙 How to Use
Installation
Add to your Cargo.toml
:
[]
= "0.1"
Or install with cargo:
Optional Features
Enable optional features as needed:
= { = "0.1", = [
"fix44", # FIX 4.4 support (includes 4.0-4.3)
"utils-chrono", # chrono integration for date/time fields
"utils-tokio", # async/Tokio support
"json-encoding" # JSON encoding support
]}
Example
use *;
use ;
📚 Documentation
Comprehensive documentation is available at docs.rs/minifix, including:
- API reference for all public types and functions
- Tutorial on FIX message parsing and encoding
- Examples of different message patterns and use cases
- Best practices for financial application development
🖊 Author
CryptoPatrick
Keybase Verification:
https://keybase.io/cryptopatrick/sigs/8epNh5h2FtIX1UNNmf8YQ-k33M8J-Md4LnAN
🐣 Support
Leave a ⭐ if you think this project is cool.
🗄 License
This project is licensed under MIT. See LICENSE for details.