1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*!
ferro_ta_core — Pure Rust indicator library.
This crate contains all indicator implementations as pure functions operating
on `&[f64]` slices and returning `Vec<f64>`. It has **no dependency on PyO3
or numpy** so it can be used from any Rust project, or compiled to WASM /
Node.js via napi-rs without dragging in Python bindings.
The Python wheel (`ferro_ta` PyPI package) is built from a thin binding crate
that calls into this core and converts NumPy arrays to/from Rust slices.
# Two-layer architecture
The root crate (`ferro_ta`) contains PyO3 `#[pyfunction]` wrappers that convert
numpy arrays to `&[f64]` and delegate to this core crate.
# Usage (Rust)
```rust
use ferro_ta_core::overlap;
let close = vec![1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0];
let sma = overlap::sma(&close, 3);
assert!(sma[0].is_nan());
assert!((sma[2] - 2.0).abs() < 1e-10);
```
*/