You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLAUDE.md
+7-35Lines changed: 7 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,9 +40,6 @@ maturin develop
40
40
# Build with release optimizations
41
41
maturin develop --release
42
42
43
-
# Run Rust unit tests
44
-
cd rust && cargo test
45
-
46
43
# Force pure Python mode (disable Rust backend)
47
44
DIFF_DIFF_BACKEND=python pytest
48
45
@@ -53,35 +50,9 @@ DIFF_DIFF_BACKEND=rust pytest
53
50
pytest tests/test_rust_backend.py -v
54
51
```
55
52
56
-
#### Troubleshooting Rust Tests (PyO3 Linking)
57
-
58
-
If `cargo test` fails with `library 'pythonX.Y' not found`, PyO3 cannot find the Python library. This commonly happens on macOS when using the system Python (which lacks development headers in expected locations).
59
-
60
-
**Solution**: Use a Python environment with proper library paths (e.g., conda, Homebrew, or pyenv):
61
-
62
-
```bash
63
-
# Using miniconda (example path - adjust for your system)
64
-
cd rust
65
-
PYO3_PYTHON=/path/to/miniconda3/bin/python3 \
66
-
DYLD_LIBRARY_PATH="/path/to/miniconda3/lib" \
67
-
cargo test
68
-
69
-
# Using Homebrew Python
70
-
PYO3_PYTHON=/opt/homebrew/bin/python3 \
71
-
DYLD_LIBRARY_PATH="/opt/homebrew/lib" \
72
-
cargo test
73
-
```
74
-
75
-
**Environment variables:**
76
-
-`PYO3_PYTHON`: Path to Python interpreter with development headers
77
-
-`DYLD_LIBRARY_PATH` (macOS) / `LD_LIBRARY_PATH` (Linux): Path to `libpythonX.Y.dylib`/`.so`
78
-
79
-
**Verification**: All 22 Rust tests should pass, including bootstrap weight tests:
80
-
```
81
-
test bootstrap::tests::test_webb_variance_approx_correct ... ok
82
-
test bootstrap::tests::test_webb_values_correct ... ok
83
-
test bootstrap::tests::test_webb_mean_approx_zero ... ok
84
-
```
53
+
**Note**: As of v2.2.0, the Rust backend uses the pure-Rust `faer` library for linear algebra,
54
+
eliminating external BLAS/LAPACK dependencies. This enables Windows wheel builds and simplifies
55
+
cross-platform compilation - no OpenBLAS or Intel MKL installation required.
85
56
86
57
## Architecture
87
58
@@ -173,16 +144,17 @@ test bootstrap::tests::test_webb_mean_approx_zero ... ok
173
144
- Exports `HAS_RUST_BACKEND` flag and Rust function references
174
145
- Other modules import from here to avoid circular imports with `__init__.py`
175
146
176
-
-**`rust/`** - Optional Rust backend for accelerated computation (v2.0.0):
147
+
-**`rust/`** - Optional Rust backend for accelerated computation (v2.0.0+):
0 commit comments