Crates.io | quickfix |
lib.rs | quickfix |
version | |
source | src |
created_at | 2024-02-12 12:27:59.665005 |
updated_at | 2025-02-02 20:10:06.28374 |
description | High level binding to quickfix C++ library |
homepage | |
repository | https://github.com/arthurlm/quickfix-rs |
max_upload_size | |
id | 1136878 |
Cargo.toml error: | TOML parse error at line 19, column 1 | 19 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
This project is an unofficial binding between quickfix library and Rust projects.
External website:
Here is the minimal application you can write to getting started with quickfix:
use std::{
env,
io::{stdin, Read},
process::exit,
};
use quickfix::*;
#[derive(Default)]
pub struct MyApplication;
impl ApplicationCallback for MyApplication {
// Implement whatever callback you need
fn on_create(&self, _session: &SessionId) {
// Do whatever you want here 😁
}
}
fn main() -> Result<(), QuickFixError> {
let args: Vec<_> = env::args().collect();
let Some(config_file) = args.get(1) else {
eprintln!("Bad program usage: {} <config_file>", args[0]);
exit(1);
};
let settings = SessionSettings::try_from_path(config_file)?;
let store_factory = FileMessageStoreFactory::try_new(&settings)?;
let log_factory = LogFactory::try_new(&StdLogger::Stdout)?;
let app = Application::try_new(&MyApplication)?;
let mut acceptor = SocketAcceptor::try_new(&settings, &app, &store_factory, &log_factory)?;
acceptor.start()?;
println!(">> App running, press 'q' to quit");
let mut stdin = stdin().lock();
let mut stdin_buf = [0];
loop {
let _ = stdin.read_exact(&mut stdin_buf);
if stdin_buf[0] == b'q' {
break;
}
}
acceptor.stop()?;
Ok(())
}
You may consider checking out this directory for more examples.
Yes. But keep in mind that not every feature of the original FIX library are available. If some of your needs are missing: PR / feedbacks are welcomed 😁!
API MAY CHANGE IN FUTURE VERSION
Crate is still in the reviewing process.
Feel free to participate and share your point of view on this github issue.
NOTE: I am personally not using for now the generated message struct. I know they works fine thanks to unit tests and can be used in production code. Feedback on this part are welcomed !
I am not actively developing many more features to this project.
To me it is actually pretty completed !
If something is missing to you, feel free to open an issue / create PR. Contribution are welcomed.
Following package must be install to build the library:
cmake
rustup
/ rustc
/ cargo
(obviously 😉)rustfmt
for auto generated messages from spec.