Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rljacobson/bc403201c0120415b35ad46ee8a78e69 to your computer and use it in GitHub Desktop.
Save rljacobson/bc403201c0120415b35ad46ee8a78e69 to your computer and use it in GitHub Desktop.
How to write Rust libraries for the Python scientific computing ecosystem

Source: https://www.reddit.com/r/rust/comments/rk12bg/writing_rust_libraries_for_the_python_scientific/

One of Rust's many strengths is that it can be seamlessly integrated with Python and speed up critical code sections. I recently wrote a small library with an efficient ragged array datatype, and I figured it would make for a good example of how to set up a Rust Python package with PyO3 and maturin that interoperates with numpy. There are a lot of little details that took me quite a while to figure out:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment