Getting Started with Rust
QuantWave is built in Rust and provides high-performance crates for core logic, Polars integration, and backtesting.
Short answer
Most users should start with Python + Polars. This page is for Rust-native binaries, embedded services, or library contributors.
Installation
Add the crates you need to your Cargo.toml (workspace version 0.6.0):
[dependencies]
quantwave-core = "0.6"
quantwave-polars = "0.6"
# optional:
quantwave-backtest = "0.6"
Quick Start (Polars)
use polars::prelude::*;
use quantwave_polars::QuantWaveExt;
fn main() -> PolarsResult<()> {
let df = df!("close" => &[44.0, 44.5, 43.8, 44.2, 45.0])?;
let out = df.lazy().ta().rsi("close", 14).collect()?;
println!("{out}");
Ok(())
}
Quick Start (Streaming)
use quantwave_core::indicators::RSI;
use quantwave_core::traits::Next;
fn main() {
let mut rsi = RSI::new(14);
for price in [44.0, 44.5, 43.8, 44.2, 45.0] {
println!("RSI: {:?}", rsi.next(price));
}
}
Rust guides (MkDocs)
Curated concepts — full API depth lives on docs.rs:
| Guide | Topic |
|---|---|
| Rust overview | When to use Rust vs Python |
| Crate map | Which crate + docs.rs links |
Next<T> pattern |
Streaming indicators |
| Backtest engine | quantwave-backtest entry |
docs.rs API reference
- quantwave-core — indicators,
Next<T>, features - quantwave-polars —
.ta()/.bt()from Rust - quantwave-backtest — simulation engine
- quantwave-plugins — Polars expression plugins
- quantwave — umbrella crate
Where to go next
| Goal | Next step |
|---|---|
| Polars from Python | Python getting started |
| Indicator catalog | Full catalog |
| Backtest from Python | Backtest quickstart |
| Benchmarks | Performance numbers |
| Full funnel | Getting Started hub |