I just published a Rust crate called rust-order-book, which is a port of one of my Node.js projects nodejs-order-book. I built it mainly to learn Rust while implementing a real-world trading engine.
The crate provides a high-performance limit order book with market and limit orders, price-time priority, order modification/cancellation, journaling, and snapshot/replay support. Some features like conditional orders are not yet ported, but will be added over time.
Thanks a lot for your detailed feedback!
I’ll start refactoring based on your suggestions. If you don’t mind, I’d like to ping you once I implement the changes
For your wrapper types, like Price and OrderId, I would say it is more idiomatic to implement Deref and DerefMut for the wrapper, so that you do not have to reimplement methods for the wrapped type, such as Add or Mul.