mkdir demo_rust_multitarget
cd demo_rust_multitarget
python -m venv .env
source .env/bin/activate
pip install maturin
maturin init
# Select pyo3 as binding type
maturin develop
python3 -c 'import demo_rust_multitarget;print(demo_rust_multitarget.sum_as_string(1,2))'
# (Output) 3
Avoid - on project name for better compatibility with Python module imports.