clob-sync 0.1.2

A synchronous, high-performance Central Limit Order Book implementation in Rust featuring an in-memory architecture with zero-cost abstractions and type-safe financial primitives for ultra-low latency trading applications.
Documentation
# AGENTS

- Always include the string "[AGENTS-MD-OK]" on the first line of every reply.
- When you create a commit message, it MUST be a valid Conventional Commit starting with exactly one of:
  "feat:", "fix:", "refactor:", "chore:", "docs:", "test:", "perf:", "build:", "ci:", "style:", or "revert:".
- For any task that stages or commits code, FOLLOW the “Commit rules” section below exactly.

## Purpose

- This is a Rust 2024-edition library for deterministic synchronous order matching plus asynchronous subscribers.
- Primary entry points: `OrderBookFactory` in `src/order_book.rs` and the `prelude` in `src/prelude.rs`.

## Getting started

- Run `make setup` once per machine to install Git hooks (commit-msg, pre-commit, pre-push).
- After changing code, run `make pre-push` before submitting.

## Commit rules (MUST follow)

When you create a commit message, it MUST:

- Start with exactly one of: `feat`, `fix`, `refactor`, `chore`, `docs`, `test`, `perf`, `build`, `ci`, `style`, `revert`.
- Follow the pattern: `type[optional(scope)]: short description`.

Examples:

- `feat: implement new API`
- `fix(account): remove infinite loop`

If a commit fails with a message mentioning Conventional Commits, IMMEDIATELY propose a new commit message that matches the rules above.

## Repository layout & architecture (reference)

- `src/order.rs`: `Order` plus newtypes (`OrderId`, `Quantity`, `Symbol`, `OrderSide`, `Price`, `OrderType`).
- `src/order_book.rs`: `OrderBookFactory`, `InMemoryOrderBookFactory`, and `OrderBook::execute`.
- `src/order_book_side/`: `OrderBookSide` trait, `Match`/`PartialFill`/`FullFill`, in-memory heap implementation.
- `src/execution.rs`: maps match outcomes to `Execution` variants and uses `NonEmpty`.
- `src/error.rs`: `Error` enum with `thiserror`, re-exported via crate `Result` in `prelude.rs`.
- `src/prelude.rs`: `fatal!` macro, shared `Result<T>` alias, and `W<T>` wrapper.
- Benchmarks: `benches/` with Criterion; `Cargo.toml` sets `bench = false`.
- `Makefile`: `setup`, `binstall`, `pre-commit`, `pre-push`, `watch`, `bench`, `benchmark-ci`, etc.

For detailed build, test, benchmarking, observer pipeline, style, and Git hygiene guidelines, see comments in `Makefile`, `.pre-commit-config.yaml` and `src/prelude.rs`.