How kmurf1999/rust_poker works
RustPoker is a Rust poker library whose principal workflow parses player ranges and public cards, combines compatible hole-card assignments, then calculates range-versus-range equity by simulation or exact enumeration. It also provides standalone hand evaluation, range filtering, and optional hand indexing. The graph reflects README capabilities and sampled references; several internal calls and the Rust-to-C indexer boundary were not shown, so uncertain links are omitted.
Main entry points: hand_range.rs Range parser · simulator.rs Equity simulator · hand_index.h Indexer interface · mod.rs Equity API
Components 14
Range inputs
- Range parser
src/hand_range.rs - Range filters
src/range_filter/mod.rs
Equity calculation
- Combined ranges
src/equity_calculator/combined_range.rs - Equity API
src/equity_calculator/mod.rs - Equity simulator
src/equity_calculator/simulator.rs
Hand evaluation
- Hand representation
src/hand_evaluator/hand.rs - Hand evaluator
src/hand_evaluator/evaluator.rs - Card constants
src/constants.rs
Hand indexing
- Rust indexer API
hand_indexer/src/hand_indexer.rs - C index engine
hand_indexer/c_hand_indexer/src/hand_index.c - Indexer interface
hand_indexer/c_hand_indexer/src/hand_index.h - Deck utilities
hand_indexer/c_hand_indexer/src/deck.h - Indexer internals
hand_indexer/c_hand_indexer/src/hand_index-impl.h
Other components
- Library caller
Connections 18
- Library caller → Range parser: parses ranges
README.md - Library caller → Equity API: requests equity
README.md - Library caller → Hand evaluator: evaluates hands
README.md - Library caller → Rust indexer API: indexes hands
README.md - Range filters → Range parser: filters ranges
src/range_filter/mod.rs - Equity API → Combined ranges: builds assignments
src/equity_calculator/mod.rs - Equity API → Equity simulator: runs calculations
src/equity_calculator/mod.rs - Combined ranges → Range parser: reads ranges
src/equity_calculator/combined_range.rs - Equity simulator → Combined ranges: uses assignments
src/equity_calculator/simulator.rs - Equity simulator → Range parser: reads ranges
src/equity_calculator/simulator.rs - Equity simulator → Hand evaluator: scores hands
src/equity_calculator/simulator.rs - Hand evaluator → Hand representation: evaluates hand
src/hand_evaluator/evaluator.rs - Hand representation → Card constants: uses card tables
src/hand_evaluator/hand.rs - Range parser → Card constants: uses card tables
src/hand_range.rs - C index engine → Indexer interface: implements interface
hand_indexer/c_hand_indexer/src/hand_index.c - Indexer interface → Deck utilities: includes deck
hand_indexer/c_hand_indexer/src/hand_index.h - Indexer interface → Indexer internals: includes internals
hand_indexer/c_hand_indexer/src/hand_index.h - Rust indexer API → Indexer interface: uses interface