git clone https://github.com/amjadjibon/mercury
cd mercury
cargo build --workspace
cargo test --workspace
- No
f64 for financial values — use rust_decimal::Decimal and the dec!() macro.
Symbol is 16 bytes — strings longer than 16 bytes are silently truncated.
- No heap allocation on the hot path — prefer stack types in
on_book and on_trade.
- Comments only when the why is non-obvious — well-named identifiers document the what.
cargo install mdbook
mdbook serve docs --open
- Fork the repository and create a feature branch.
- Run
cargo test --workspace and cargo build --workspace — both must pass with zero warnings.
- Open a pull request with a description of what changed and why.