| Crates.io | open-pql |
| lib.rs | open-pql |
| version | 0.0.3 |
| created_at | 2025-07-27 19:42:21.347985+00 |
| updated_at | 2025-08-13 10:19:25.644305+00 |
| description | Poker Query Language |
| homepage | https://github.com/solve-poker/open-pql |
| repository | https://github.com/solve-poker/open-pql |
| max_upload_size | |
| id | 1770360 |
| size | 522,027 |
⚠️ Work in Progress: This project is currently under active development and is not yet ready for production use.
The core library for Open PQL (Poker Query Language) - a high-performance Rust implementation for poker analysis and calculations.
This crate provides the fundamental building blocks for poker analysis, including:
benchmark - Enables benchmarking functionalityx86 - Optimizations for x86 architectureuse open_pql::*;
// Parse and evaluate poker hands
let hero_hand = parse_hand("AsKs")?;
let villain_range = parse_range("QQ+,AK")?;
let board = parse_board("Ah9s2c")?;
// Calculate equity
let equity = calculate_equity_vs_range(&hero_hand, &villain_range, &board)?;
println!("Hero equity: {:.2}%", equity * 100.0);
// Use PQL queries
let query = "select avg(boardsuitcount(river)) from hero='As9s', villain='*', board='2s3sJh', game='holdem'";
let result = execute_pql_query(query)?;
The library is organized into several key modules:
base: Core poker primitives (cards, ranks, suits, hands)functions: PQL function implementations for analysispql_parser: Parser for PQL query languagepql_type: Type system for PQL valuesrange_parser: Parser for poker hand rangesvm: Virtual machine for executing PQL queriesrunner: Query execution engineOpen PQL is designed for high performance:
x86 feature)# Standard build
cargo build
# With all features
cargo build --features "benchmark,x86"
# Release build with optimizations
cargo build --release
# Run all tests
cargo test
# Run with property-based testing
cargo test --features quickcheck
# Run benchmarks (requires benchmark feature)
cargo bench --features benchmark
Licensed under the MIT License. See LICENSE for details.