Skip to content

Files

Latest commit

1fc79b1 · Mar 10, 2025

History

History

simple

simple extension

Here, we use maturin for building Python wheels and nox for managing Python dependencies and virtualenvs.

Running nox inside this directory creates a virtualenv, installs Python dependencies and the extension into it and executes the tests from tests/test_exp.py.

By running

maturin develop

from inside a virtualenv, you can use the extension from the Python REPL:

>>> import numpy as np
>>> import rust_ext
>>> rust_ext.axpy(2.0, np.array([0.0, 1.0]), np.array([2.0, 3.0]))
array([2., 5.])