-
Change directoy to
hello
and build core module.cd hello cargo build
-
Change directoy to
helloPython
cd ../helloPython
-
Create a new virtual environment in ./venv directory with:
python -m venv ./venv
-
Activate the virtual environment:
source ./venv/bin/activate
-
Install
maturin
pip install maturin
-
At this point, we can use Maturin to build and test the project:
maturin build maturin develop
-
Change directory to python directory. Execute
python main.py
.cd ../python python main.py
-
Exit virtual environment
-
Install
poetry
curl -sSL https://install.python-poetry.org | python - poetry --version
-
Change directory to
pythonPoetry
cd ../pythonPoetry
-
Install the project's dependencies as specified in the poetry.lock file.
poetry install
-
Run PythonPoetry project
poetry run pythonPoetry