pnf (Rust)
pnf is the official Rust binding for the PnF (Point and Figure) chart engine.
It exposes:
- Chart construction with P&F box/reversal rules.
- Indicator calculations (SMA, Bollinger, RSI, OBV, signals, patterns, support/resistance, congestion).
- JSON/ASCII exports.
- A real-time localhost dashboard server.
Installation
[]
= "0.1.0"
Quick Start
use ;
Real-Time Dashboard
use DashboardServer;
let mut server = new;
server.start.unwrap;
server.publish.unwrap;
println!;
API Highlights
- Core:
ChartChartConfig
- Indicators:
IndicatorsIndicatorConfig
- Data types:
OHLC,Signal,Pattern,SupportResistanceLevel- enums (
BoxType,ColumnType,ConstructionMethod,BoxSizeMethod,SignalType,PatternType)
- Dashboard:
DashboardServerbuild_snapshot_json
- Version:
version(),version_major(),version_minor(),version_patch()
Documentation
- Crate docs: https://docs.rs/pnf
- Project docs: https://github.com/gregorian-09/pnf-chart-system/tree/master/docs
- Rust binding reference: https://github.com/gregorian-09/pnf-chart-system/blob/master/docs/bindings/rust.md
Compatibility
- Rust edition: 2021
- Runtime: stable Rust toolchain
- Native backend: bundled C ABI bridge from the same project version
Troubleshooting
- If docs.rs build fails, verify optional dependencies/features are docs-safe.
- Keep
pnfcrate version aligned with the same released core version. - If linking errors occur in local workspace development, rebuild the core project first.