Skip to content

Calling Rust from Python: A Gentle Introduction to PyO3

License

Notifications You must be signed in to change notification settings

murilo-cunha/intro-to-pyo3

Repository files navigation

Calling Rust from Python

A Gentle Introduction to PyO3

Setup

git clone [email protected]:murilo-cunha/intro-to-pyo3.git
cd intro-to-pyo3

Dev Containers (VSCode)

Make sure you have Docker installed and the Dev Containers VSCode extension.

If you are on VSCode and don't have Rust installed and/or Python 3.12 installed, dev containers is a good option. Just open the project folder in VSCode and click on the green button at the bottom left corner of the screen. Make sure that the Docker daemon is running.

Virtual Environment and dependencies

python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

PDM

If you are using PDM, make sure to include pip in your virtual environment.

pdm install
pdm run python -m ensurepip

The exercise

If you'd like to follow the workshop self paced, start with the introduction presentation on the notebook. It explains the setup and the exercise. Good luck!

About

Calling Rust from Python: A Gentle Introduction to PyO3

Topics

Resources

License

Stars

Watchers

Forks

Languages