Crate fefix[−][src]
Expand description
A Financial Information eXchange (FIX) protocol implementation in Rust.
FerrumFIX is a collection of reusable components to produce and consume FIX-compliant data. It is not a FIX engine, although you can very easily build one with FerrumFIX. FerrumFIX is intended to be:
- Comprehensive. Most standards adopted by the FIX Community are either available or planned, from session layers to encodings and dictionary-related logic.
- Foundational. FerrumFIX is foundational in the sense that it exposes a large amount of primitives in its public interface, so that users can easily build upon them to implement custom solutions tailored for their needs. You’ll often find that there are many ways of doing the same thing. It’s up to you to choose whatever works best.
- Unopinionated. We try to provide good defaults, but you can discard them entirely and provide your own should you choose to do so. Customization is mostly done via Rust traits, which allows for inlining and maintains great performance.
- Fast. Everything is planned around zero-copy and zero-allocations in the hot paths.
Please check out the README for more general information regarding FerrumFIX.
Cargo features
FerrumFIX puts a lot of functionality behind optional features in order to optimize compilation times. The following features are available:
fix40
, fix41
, fix42
, fix43
, fix44
, fix50
, fix50sp1
, fix50sp2
, fixt11
Version-specific FIX utilities. See the modules within definitions
and
the similarly named Dictionary
methods.
utils-chrono
, utils-decimal
, utils-rust-decimal
FixValue
implementations for third-party crates and type conversions.
utils-slog
Logging of tagvalue::Message
s.
utils-bytes
, utils-tokio
FIX decoders and encoders that integrate nicely with the Tokio ecosystem.
json-encoding
Decode and encode FIX messages with JSON.
codegen
This feature it intended to be used within Cargo’s [build-dependencies]
, like this:
fefix = { version = "0.1", features = ["codegen"] }
codegen
allows you to generate Rust files with lots of FIX version
-specific constants, types, and documentation. This is not mandatory by any
means and you can decide to simply use Dictionary
, which provides
dynamic access to mostly the same information, but you’ll lose on
performance, type safety, and quality of life. There’s no reason not to use
codegen
if your use case allows it (it likely does!).
FAQ
-
Q. I simply want to read FIX messages. Where do I start?
A. Usefefix::tagvalue::Decoder
andfefix::tagvalue::DecoderBuffered
. The former is for individual messages, the latter is for streams. -
Q. What about
serde
integration?
A. FIX semantics don’t map well toserde
and there are subtle performance implications. It’s not a good idea.
External resources
Modules
codegen
Code generation utilities.
Field and message definitions for all FIX application versions.
Access to FIX Dictionary reference and message specifications.
A wide collection of FixValue
implementors.
json-encoding
Encoding and decoding of FIX messages using JSON.
Convenience re-exports of common traits and various items within fefix
.
FIX message processing between counterparties.
Core FIX utilities, as well as encoding and decoding of FIX messages using
the standard tag=value|
syntax.
Structs
Specifies business semantics for application-level entities within the FIX Protocol.
Traits
Operations on a growable in-memory buffer.
Provides (de)serialization logic for a Rust type as FIX field values.
Allows to get mutable and immutable references to configuration options.
Type Definitions
Type alias for FIX tags: 16-bit unsigned integers, strictly positive.