Expand description
§quickfix-tokio
A pure-Rust FIX protocol engine built natively on tokio — no C++ bindings, no blocking threads. Protocol behavior follows the reference QuickFIX engines (C++, Go, .NET); the concurrency model is one tokio task per session that owns all session state, with sockets and API handles connected purely by channels.
The engine is written entirely in safe Rust (#![forbid(unsafe_code)]).
use std::sync::Arc;
use quickfix_tokio::{Application, Engine, Settings, MemoryStoreFactory, TracingLogFactory};
struct MyApp;
impl Application for MyApp {}
let settings = Settings::from_file("fix.cfg").await?;
let engine = Engine::start(
&settings,
Arc::new(MyApp),
Arc::new(MemoryStoreFactory::new()),
Arc::new(TracingLogFactory),
).await?;Re-exports§
pub use application::Application;pub use application::ApplicationError;pub use application::ChannelApplication;pub use application::DoNotSend;pub use application::SessionEvent;pub use application::event_channel;pub use datadictionary::DataDictionary;pub use datadictionary::ValidationSettings;pub use engine::Engine;pub use error::Error;pub use error::RejectError;pub use error::Result;pub use error::SessionRejectReason;pub use field_map::FieldMap;pub use field_map::GroupTemplate;pub use log::FileLogFactory;pub use log::Log;pub use log::LogFactory;pub use log::NullLogFactory;pub use log::Rotation;pub use log::TracingLogFactory;pub use message::Message;pub use message::Tag;pub use session::SessionHandle;pub use session::SessionStatus;pub use session_id::SessionId;pub use settings::ConnectionType;pub use settings::SessionConfig;pub use settings::Settings;pub use settings::TlsSettings;pub use store::FileStoreFactory;pub use store::MemoryStoreFactory;pub use store::MessageStore;pub use store::MessageStoreFactory;pub use value::FixDate;pub use value::TimestampPrecision;pub use value::UtcTimestamp;
Modules§
- application
- The application callback interface — the async equivalent of the seven classic QuickFIX callbacks.
- datadictionary
- FIX data dictionary: loads the standard QuickFIX XML specs
(
spec/FIX44.xmletc.) and validates messages against them. - engine
- The engine: builds sessions from settings, spawns their tasks, binds acceptor listeners, and runs initiator connect loops.
- error
- field_
map - An ordered collection of FIX fields, preserving wire order and allowing duplicate tags (as required for repeating groups).
- fix44
- GENERATED by
generate-fix— do not edit by hand. Typed messages for FIX.4.4 — generated from its spec XML. - log
- Session logging: raw wire traffic and human-readable events.
- message
- The FIX message: standard header, body, and trailer, with wire-format parsing and serialization.
- parser
- Stream framing: carve complete FIX messages out of a raw byte stream.
- schedule
- Session schedules: when a session is active and when it resets, ported
from quickfix C++’s
TimeRange. - session
- The FIX session layer: logon negotiation, heartbeats, sequence number tracking, resend/gap-fill recovery, and the per-session run loop.
- session_
id - Session identity: BeginString + CompIDs (+ optional sub/location IDs and
qualifier), matching the reference engines’
SessionID. - settings
- QuickFIX-compatible configuration:
[DEFAULT]+[SESSION]INI sections. - store
- Message stores: persist sequence numbers and sent messages for resend.
- tags
- Well-known FIX tag numbers used by the session layer, plus classification of standard header/trailer tags needed to parse a message without a data dictionary.
- value
- Conversions between Rust types and FIX wire representations of field values.
Macros§
- dec
- Transform a literal number directly to a
Decimalat compile time.
Structs§
- Decimal
Decimalrepresents a 128 bit representation of a fixed-precision decimal number. The finite set of values of typeDecimalare of the form m / 10e, where m is an integer such that -296 < m < 296, and e is an integer between 0 and 28 inclusive.
Type Aliases§
- Amount
- The numeric type for FIX float-family fields (Price, Qty, Amt, Float,
Percentage). Exact fixed-point
rust_decimal::Decimalwith thedecimalfeature (default), orf64without it. Generated typed accessors use this alias, so the whole typed API switches with the feature.