Production-grade FIX engine for Rust.
- ✓ FIX 4.0–FIX 5.0 SP2, FIXT 1.1, and FIX Latest
- ✓ Initiator and acceptor, including multi-session and dynamic acceptors
- ✓ QuickFIX/J-compatible
.cfgconfiguration - ✓ Persistent message stores and structured logs
- ✓ TLS and mTLS with rustls
- ✓ Async Tokio runtime
- ✓ 483/483 black-box FIX conformance scenario runs passing
cargo add truefixuse std::sync::Arc;
use truefix::config::SessionSettings;
use truefix::{Application, Engine};
let settings = SessionSettings::parse(&std::fs::read_to_string("session.cfg")?)?;
let engine = Engine::start(&settings, Arc::new(MyApp)).await?;MyApp implements the async Application callbacks for session and
application messages. Everything else—sessions, networking, TLS, persistence, schedules, reconnect,
and dictionaries—can be selected from configuration.
TrueFix is for teams that want Rust's memory safety and async ecosystem without giving up the operational features expected from an established FIX engine.
| Capability | TrueFix | QuickFIX/J | FerrumFIX |
|---|---|---|---|
| Rust native | Yes | No (Java/JVM) | Yes |
| Initiator + acceptor | Built in | Built in | Library primitives |
QuickFIX/J .cfg files |
Compatible | Reference format | No |
| Persistent stores | Memory, file, SQL, MSSQL, redb, MongoDB, custom | Built in | Application-provided |
| TLS / mTLS | Built in | Built in | Integration-dependent |
| Async Tokio integration | Built in | No | Runtime-agnostic |
| Black-box conformance gate | 483/483 scenario runs | Acceptance-tested | Project-specific tests |
This is a project-positioning comparison, not a claim of certification or complete feature identity. See QuickFIX/J parity for scope and evidence.
Create session.cfg:
[DEFAULT]
ConnectionType=initiator
ReconnectInterval=5
HeartBtInt=30
FileStorePath=.truefix/store
FileLogPath=.truefix/log
UseDataDictionary=Y
DataDictionary=FIX.4.4
[SESSION]
BeginString=FIX.4.4
SenderCompID=CLIENT
TargetCompID=BROKER
SocketConnectHost=127.0.0.1
SocketConnectPort=9876Implement the application callbacks and run the engine:
use std::sync::Arc;
use truefix::config::SessionSettings;
use truefix::{Application, Engine, SessionId};
struct MyApp;
#[async_trait::async_trait]
impl Application for MyApp {
async fn on_logon(&self, session: &SessionId) {
println!("logged on: {session}");
}
}
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let cfg = std::fs::read_to_string("session.cfg")?;
let settings = SessionSettings::parse(&cfg)?;
let engine = Engine::start(&settings, Arc::new(MyApp)).await?;
tokio::signal::ctrl_c().await?;
engine.shutdown();
Ok(())
}See Getting started and the runnable
executor, banzai,
ordermatch, and
multi_acceptor examples.
- Strict SOH codec with
BodyLength/CheckSumvalidation and typed FIX messages - Session sequencing, heartbeat, resend, gap-fill, reset, scheduling, and recovery
- Runtime data dictionaries plus generated typed messages, fields, and repeating groups
- Multi-endpoint reconnect, proxy support, socket controls, TLS/mTLS, and bounded backpressure
- Memory, file, cached-file, SQL, MSSQL, redb, MongoDB, and custom store/log backends
- Metrics-facade integration and structured tracing
- FAST and SBE codec crates alongside the tag-value FIX engine
The workspace also contains independent Rust clients for Futu, Interactive Brokers TWS, OKX, and IG. They are standalone SDKs, not a single unified gateway.
- Getting started — prerequisites and runnable workflows
- Architecture — workspace layers, dictionaries, and extension points
- Conformance — the 483-scenario release gate and validation commands
- QuickFIX/J parity — compatibility scope and historical parity work
- Security audits — safety policy and audit trail
- Full documentation index
cargo fmt --all --check
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace
cargo test -p truefix-at --test conformanceTrueFix uses Rust edition 2024 and has an MSRV of Rust 1.96. unsafe is forbidden workspace-wide;
critical non-test paths deny panic-prone operations through lint policy.
Licensed under either Apache License 2.0 or MIT, at your option.
TrueFix is independently implemented from the FIX specification. QuickFIX/J and QuickFIX/Go were used to study architecture and protocol behavior; their source and private data files were not copied or translated.