How guitheg/technicalysis works
Project Type and Purpose
• This is an open-source, cross-language library for financial technical analysis indicators.
• Core is implemented in Rust (high performance, type safety) and exposed to both Rust consumers (Cargo) and Python consumers (PyO3/PyPI).
Key Components
• Rust Core Library (core/lib.rs): implements indicators (EMA, SMA, and placeholders for others).
• Python Binding Layer (core/pybinding.rs + python/technicalysis): uses PyO3 to expose Rust functions as a Python package.
• Packaging and Build:
• Cargo.toml / Cargo.lock: Rust crate configuration.
• pyproject.toml / requirements-dev.txt: Python package configuration and dev dependencies.
• GitHub Actions workflow (rust.yml): CI for building, testing, and publishing.
• Benchmarks and Examples:
• benches/: Rust and Python benchmarks for performance comparison.
• examples/: sample code demonstrating usage in both Rust and Python.
• launch_benchmark.sh: orchestrates bench runs.
Relationships and Data Flow
• Rust Consumer → pulls core crate from Cargo → calls indicators directly.
• Python Consumer → installs technicalysis from PyPI → at runtime Python code calls into the Rust core via PyO3.
• CI/CD builds both Rust crate and Python wheel, runs tests and benchmarks.
• Benchmarks compare native Rust vs. Python wrapper performance.
Architectural Patterns and Technologies
• Single code base in Rust, multi-language bindings via PyO3.
• Modular design: each indicator is a module under core/features.
• Test harnesses in both languages ensure correctness.
• Examples and benchmarks decoupled from core logic.