We just massively overdelivered on a project thanks to Rust (and Python bindings)

This page summarizes the projects mentioned and recommended in the original post on reddit.com/r/rust

Our great sponsors
  • OPS - Build and Run Open Source Unikernels
  • SonarLint - Deliver Cleaner and Safer Code - Right in Your IDE of Choice!
  • Scout APM - Less time debugging, more time building
  • GitHub repo Python-Rust-benchmark

    Python vs Rust benchmark using a toy visual problem (linear algebra).

    got the same reaction for this project: https://github.com/Ismail-Maj/python-rust-benchmark Around 3000x faster too :)

  • GitHub repo PyO3

    Rust bindings for the Python interpreter

    I haven't done extensive comparisons, but my general experience is that if you are just working on something that can translate to looping over array elements, you can get excellent performance with cython or numba. It is likely on-par with rust performance if you can avoid creating a bunch of temporary/intermediate numpy arrays. I typically only reach for rust as a method for writing a python extension (e.g. using pyo3) if the problem involves more complicated data structures or dealing with json, xml or other file types and possibly instances where multi-threading is important. Even in the case of multi-threading, if there is a natural way to break up an array processing problem you can use cython or numba, release the GIL and then use the `concurrent.futures` module to distribute work. Also it's currently the case that pyo3 can have some performance overhead that you don't see with cython, for example https://github.com/PyO3/pyo3/issues/661

  • OPS

    OPS - Build and Run Open Source Unikernels. Quickly and easily build and deploy open source unikernels in tens of seconds. Deploy in any language to any cloud.

  • GitHub repo maturin

    Build and publish crates with pyo3, rust-cpython and cffi bindings as well as rust binaries as python packages

    Thank you for the idea, opened a tracking issue in maturin: https://github.com/PyO3/maturin/issues/657

  • GitHub repo Warframe-OCR

    A relic inventory recognition system for Warframe, based on experimental Rust bindings to Tesseract OCR. Supports detection in real-time. Very much WIP.

    I don't like maturin workflow either because it installs directly to the python environment. This is not very useful during development. I wrote a module import file which loads the python module from the shared library. You could easily invoke cargo before importing the module (remember to delete the previous shared library file) to have a fully automated development processes.

  • GitHub repo Rustlings

    :crab: Small exercises to get you used to reading and writing Rust code!

    This is also considered a good resource for exercises but I didn't try it: https://github.com/rust-lang/rustlings

  • GitHub repo napi-rs

    A framework for building compiled Node.js add-ons in Rust via Node-API

    I had the same experience but with Node.js and https://napi.rs

  • GitHub repo TablaM

    The practical relational programing language for data-oriented applications

    P.D: And my current dream is making a spiritual successor of FoxPro, in Rust!

  • SonarLint

    Deliver Cleaner and Safer Code - Right in Your IDE of Choice!. SonarLint is a free and open source IDE extension that identifies and catches bugs and vulnerabilities as you code, directly in the IDE. Install from your favorite IDE marketplace today.

  • GitHub repo faster_fishers

    Fast implementation of Fisher's exact test in Rust for Python.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts