Re-implementation of navis
core functions in Rust.
We provide precompiled binaries for all major Python versions, CPU architectures and operating systems.
From PyPI:
pip install navis-fastcore
If that fails, try building from source (see below).
navis-fastcore
itself does not depend on navis
. This is to allow
using fastcore
in libraries other than navis
. Please see the
docs for examples.
navis
will automatically use fastcore
if it is available.
The integration is still work in progress, so for now you
should install navis
from Github to make sure you have the
latest version.
- Install rust
- Clone this repository
cd
intofastcore-rs/py
directory- Create a virtual environment:
python3 -m venv .venv
- Activate virtual environment:
source .venv/bin/activate
- Compile via either:
maturin develop --release
which will compile the extension into thefastcore/
directorymaturin build --release
to build wheel in/target/wheels
- To install the Python package either do:
pip install -e .
to install in editable modepip install targets/wheels/navis_fastcore....whl
Note that unless you compiled with the --release
flag,
timings will be much slower (up to 10x) than in a release build!
First make sure pytest
is installed:
pip install pytest -U
Then run the test-suite like so:
pytest --verbose -s