# Contributing to `quantlib_rs`
Thank you for your interest in contributing to `quantlib_rs`! Our goal is to build the standard,
rock-solid, idiomatic Rust quantitative finance library.
## Ground Rules & Standards
1. **Safety and Concurrency**:
- Safe Rust only. `#![deny(unsafe_code)]` is enforced across the library.
- All core structs and traits must be `Send + Sync` to support fearless concurrency (e.g. Rayon-parallel Monte Carlo and parallel calibration).
2. **Correctness & Mathematical Verification**:
- Every numerical routine must be verified against independently published or derivable reference values (textbook examples, closed-form formulas, model-free identities such as put-call parity, or QuantLib test-suite oracle values).
- Never invent or hardcode an unverified reference number. Document the mathematical derivation or literature citation in the test.
3. **Clean Code & Tooling**:
- Format: `cargo fmt --all --check` must be clean.
- Lints: `cargo clippy --all-targets --all-features -- -D warnings` must produce zero warnings.
- Tests: `cargo test --all-targets --all-features` must pass 100%.
- Documentation: Every public item must have a doc comment with a runnable `# Examples` doc-test.
4. **Licensing**:
- Contributions are dual-licensed under `MIT OR Apache-2.0`.
- Do not copy C++ source code from QuantLib verbatim; implement public-domain quantitative algorithms in clean, idiomatic Rust.
## Development Workflow
1. Fork and clone the repository.
2. Ensure you have Rust 1.75+ installed (`rustup update stable`).
3. Create a feature branch: `git checkout -b feature/your-feature-name`.
4. Implement your changes with accompanying unit and doc-tests.
5. Verify locally:
```bash
cargo fmt --check
cargo clippy --all-targets --all-features -- -D warnings
cargo test
cargo doc --no-deps
```
6. Submit a Pull Request.
## Good First Issues
Looking to contribute? Here are great areas to get started:
- Adding additional national and financial market calendars (`src/time/calendars/`)
- Adding specialized day count conventions (`src/time/day_counters/`)
- Expanding the root finder toolkit (e.g. Brent's method, Halley's method)
- Adding additional parametric volatility models or interpolation methods
- Improving documentation and benchmark suites