Thank you for your interest in contributing to nanobook!
- Fork the repository
- Clone your fork:
git clone https://github.com/YOUR_USERNAME/nanobook.git - Create a branch:
git checkout -b feature/your-feature - Make your changes
- Run tests:
cargo test --all-features - Run lints:
cargo fmt && cargo clippy -- -D warnings - Commit and push
- Open a pull request
# Install Rust (if needed)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Clone and build
git clone https://github.com/BoringQuantSystems/nanobook.git
cd nanobook
cargo build
# Run tests
cargo test --all-features
# Run benchmarks
cargo bench
# Try the CLI
cargo run --bin lob- Follow standard Rust conventions
- Run
cargo fmtbefore committing - All code must pass
cargo clippy -- -D warnings - Add tests for new functionality
- Update documentation for API changes
- Keep PRs focused on a single change
- Include tests for bug fixes and new features
- Update CHANGELOG.md for user-facing changes
- Ensure CI passes before requesting review
# Run all tests
cargo test --all-features
# Run with no default features (no event logging)
cargo test --no-default-features
# Run benchmarks
cargo benchSee README.md for the developer reference. Key crates:
| Crate | Purpose |
|---|---|
nanobook |
Core LOB engine, portfolio simulator, backtest bridge |
nanobook-broker |
Broker trait + IBKR/Binance implementations + mock |
nanobook-risk |
Pre-trade risk engine (position limits, leverage, drawdown) |
nanobook-rebalancer |
Target-weight portfolio rebalancer with audit trail |
python/ |
PyO3 bindings for all of the above |
- Search existing issues first
- Include Rust version (
rustc --version) - Provide minimal reproduction steps
- Include expected vs actual behavior
By contributing, you agree that your contributions will be licensed under the MIT License.