FrankenNumPy

Docs/Overview

Installation

On this page 3 sections

Build the workspace

git clone https://github.com/Dicklesworthstone/franken_numpy.git
cd franken_numpy
cargo build --workspace
cargo test  --workspace      # 9,086 #[test] functions (2026-10-08 count)
cargo test  --workspace --all-features

Requirements: Rust nightly nightly-2026-08-31, pinned in rust-toolchain.toml and mirrored in .github/workflows/ci.yml via the RUST_TOOLCHAIN env var (single source of truth).

Python access via the fnp_python PyO3 extension

cargo build -p fnp-python --release --features python-extension
# The compiled cdylib's filename varies by platform; rename and place on PYTHONPATH:
#   Linux:   target/release/libfnp_python.so    → fnp_python.so
#   macOS:   target/release/libfnp_python.dylib → fnp_python.so
#   Windows: target/release/fnp_python.dll      → fnp_python.pyd
import fnp_python as np
np.__version__              # workspace version (0.5.0)
np.__numpy_version__        # version of numpy used as fallback oracle
np.linalg.solve([[3, 1], [1, 2]], [9, 8])   # 2-D: numpy.linalg.solve (LAPACK)

A wheel is one command (added 2026-09-03; pyproject.toml at the repo root drives maturin):

pip install maturin
maturin build --release          # -> target/wheels/frankennumpy-0.5.0-cp313-*.whl
pip install target/wheels/frankennumpy-*.whl
# or, in one step from the checkout:
pip install .

The installed package re-exports the whole extension namespace (python/fnp_python/__init__.py), so import fnp_python, fnp_python.Nditer, import fnp_python.linalg and fnp_python.__numpy_version__ all resolve exactly as they do from the bare cdylib. Verified on Linux / CPython 3.13 / numpy 2.5.2 in a fresh venv: the 381-cell behavioural smoke suite scores the same 371 bit-exact cells against the installed wheel as against the raw build. There is no PyPI publish yet, and no macOS/Windows wheels have been built; requires-python is >=3.13 because the extension uses interpreter symbols first exported in 3.13.

If you need fnp-runtime's optional asupersync async integration or frankentui terminal dashboards (both default off), see the Optional features table immediately below for the per-feature cargo invocations.

Optional features

Crate Feature Effect Enable with
fnp-python python-extension Compile as PyO3 cdylib (default for the build above) cargo build -p fnp-python --features python-extension
fnp-runtime asupersync Optional structured-async integration for conformance/artifact pipelines (gates 5 #[cfg(feature = "asupersync")] blocks in fnp-runtime/src/lib.rs) cargo build -p fnp-runtime --features asupersync
fnp-runtime frankentui Optional terminal-native dashboards for parity-drift and perf deltas (gates #[cfg(feature = "frankentui")] blocks) cargo build -p fnp-runtime --features frankentui

CI coverage caveat. The G1–G8 gates run with default features only (no --features flags appear in .github/workflows/ci.yml); G9 adds only fnp-python's python-extension, which pyproject.toml enables for the wheel build. Building or testing with asupersync or frankentui enabled is not currently part of the CI matrix; if you change code under either feature flag, run cargo check -p fnp-runtime --features asupersync,frankentui locally before committing. Verified 2026-05-20 on a clean target dir: the combined-feature build finishes cleanly in ~30 s (the optional features pull in asupersync + ftui crates only when activated).


This section in the README on GitHub