Rust
and
Python
John Vandenberg https://github.com/jayvdb
08/09/23
2
RustPython
●
https://rustpython.github.io/
●
Started May 2018
●
Version 0.2 released January 2023
●
Includes standard library written in Rust
●
70% of the CPython 3.11 test suite passes
●
pip works
●
RustPython can be compiled to WebAssembly, allowing running Python
code in the web browser
●
Has an experimental JIT compiler to compile python to native code
08/09/23
3
Python packaging
●
https://github.com/PyO3 (Pythonium Trioxide)
●
setuptools-rust
– 50,000 downloads per day
– https://github.com/PyO3/setuptools-rust
●
maturin
– 20,000 downloads per day
– https://github.com/PyO3/maturin
08/09/23
4
Python packages
●
Cryptography – Using setuptools-rust
– 7 million downloads per day
– Approx 15th
most downloaded package
– https://github.com/pyca/cryptography
●
Pydantic - Using maturin
– 3 million downloads per day
– https://github.com/pydantic/pydantic-core
●
Rpds-py - Using maturin
– 2 million downloads per day (dep of jsonschema)
– https://github.com/crate-py/rpds
jsonschema-rs will be
on this list soon.
08/09/23
5
Python packages
●
orjson – Using maturin
– 500,000 downloads per day
– https://github.com/ijl/orjson
●
LibCST - Using setuptools-rust
– 250,000 downloads per day
– https://github.com/Instagram/LibCST
●
Ruff (Python linter) - Using maturin
– 175,000 downloads per day
●
polars - Using maturin
– 50,000 downloads per day
– https://github.com/pola-rs/polars
08/09/23
6
result
from result import Result, Ok, Err
def divide(a: int, b: int) -> Result[int, str]:
if b == 0:
return Err("Cannot divide by zero")
return Ok(a // b)
values = [(10, 0), (10, 5)]
for a, b in values:
divide_result = divide(a, b)
match divide_result:
case Ok(value):
print(f"{a} // {b} == {value}")
case Err(e):
print(e)
https://github.com/rustedpy/result
4k downloads/day
08/09/23
7
PyOxidizer
●
https://github.com/indygreg/PyOxidizer
●
Combines CPython runtime, Python code and dependencies into a single
executable
●
Supports Windows, Linux and Mac executable formats
●
Also creates installers for Windows, Linux and Mac
●
Pyembed crate controls an embedded CPython inside Rust
08/09/23
8
Python tools
●
Package managers like pipenv, poetry, etc
– https://github.com/mitsuhiko/rye
●
Also includes Python runtime management, like pyenv
– https://github.com/cnpryer/huak
●
Incomplete and not as actively developed
●
Vulnerability scanner
– https://github.com/aswinnnn/pyscan
●
Static code analysis
– Ruff
– https://github.com/mtshiba/pylyzer
08/09/23
9
py2many
●
https://github.com/py2many/py2many
●
Transpiles subset of Python to:
– C++, Dart, Go, Julia, Kotlin, Nim, Rust, V
●
Supports CLI sys.argv and sys.stdout

More Related Content

PDF
Rust & Python : Python WA October meetup
PPT
Cmpe202 01 Research
PDF
Programming in Civil Engineering_UNIT 1_NOTES
PPTX
Introduction of python programming
PDF
PYTHON CURRENT TREND APPLICATIONS- AN OVERVIEW
PPT
Python_basics_tuples_sets_lists_control_loops.ppt
PDF
IRJET- Why Python Rocks for Research....???
PPTX
Rusty Python
Rust & Python : Python WA October meetup
Cmpe202 01 Research
Programming in Civil Engineering_UNIT 1_NOTES
Introduction of python programming
PYTHON CURRENT TREND APPLICATIONS- AN OVERVIEW
Python_basics_tuples_sets_lists_control_loops.ppt
IRJET- Why Python Rocks for Research....???
Rusty Python

Similar to Rust & Python : Rust WA meetup 1 (20)

PDF
Introduction to python
PDF
Python. Why to learn?
PPTX
Python | What is Python | History of Python | Python Tutorial
PDF
Time travel: Let’s learn from the history of Python packaging!
PDF
silver gemstone sun pendant silver pendant gemstones
PPTX
Introduction to Python Programming in Civil Engineering
ODP
10 popular software programs written in python
PDF
Python+gradle
PPTX
What is python
PDF
RDM 2020: Python, Numpy, and Pandas
PDF
Christian Strappazzon - Presentazione Python Milano - Codemotion Milano 2017
PDF
Python and Its fascinating applications in the real world.pdf
PPTX
python bridge course for second year.pptx
ZIP
An Introduction to PyPy
PPTX
Python-History.pptx
PPTX
Python a Versatile Programming Language - Introduction
PPTX
P1 2018 python
PPTX
Python 101 For The Net Developer
PDF
12 Reasons Why Python is One of Best Language of Web App Development
PDF
Python: The Versatile Programming Language - Introduction
Introduction to python
Python. Why to learn?
Python | What is Python | History of Python | Python Tutorial
Time travel: Let’s learn from the history of Python packaging!
silver gemstone sun pendant silver pendant gemstones
Introduction to Python Programming in Civil Engineering
10 popular software programs written in python
Python+gradle
What is python
RDM 2020: Python, Numpy, and Pandas
Christian Strappazzon - Presentazione Python Milano - Codemotion Milano 2017
Python and Its fascinating applications in the real world.pdf
python bridge course for second year.pptx
An Introduction to PyPy
Python-History.pptx
Python a Versatile Programming Language - Introduction
P1 2018 python
Python 101 For The Net Developer
12 Reasons Why Python is One of Best Language of Web App Development
Python: The Versatile Programming Language - Introduction
Ad

More from John Vandenberg (15)

PDF
Software of unknown pedigree (SOUP) for Rust and TypeScript
PDF
butane Rust ORM
PDF
Rust ORMs and Migrations
ODP
Besut Kode seminar Lampung
ODP
Besut Kode Seminar Malang
ODP
Besut Kode - Workshop 2
ODP
Besut Kode - Workshop 1
ODP
Besut Kode Challenge 1
PPTX
Wikimedia indigenous voices
ODP
SGU - Creating an English Wikipedia draft
PPTX
SGU Wikimedia in Education overview
PPTX
ODP
SLQ Wikipedia workshop: creating a draft
PPTX
Intelligent info 2012 wikipedia
Software of unknown pedigree (SOUP) for Rust and TypeScript
butane Rust ORM
Rust ORMs and Migrations
Besut Kode seminar Lampung
Besut Kode Seminar Malang
Besut Kode - Workshop 2
Besut Kode - Workshop 1
Besut Kode Challenge 1
Wikimedia indigenous voices
SGU - Creating an English Wikipedia draft
SGU Wikimedia in Education overview
SLQ Wikipedia workshop: creating a draft
Intelligent info 2012 wikipedia
Ad

Recently uploaded (20)

PPTX
Modernising the Digital Integration Hub
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PDF
sustainability-14-14877-v2.pddhzftheheeeee
PDF
1 - Historical Antecedents, Social Consideration.pdf
PDF
Hybrid model detection and classification of lung cancer
PDF
August Patch Tuesday
PDF
A Late Bloomer's Guide to GenAI: Ethics, Bias, and Effective Prompting - Boha...
PPTX
Benefits of Physical activity for teenagers.pptx
DOCX
search engine optimization ppt fir known well about this
PDF
Enhancing emotion recognition model for a student engagement use case through...
PDF
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
PDF
Getting Started with Data Integration: FME Form 101
PPTX
Web Crawler for Trend Tracking Gen Z Insights.pptx
PDF
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
PPTX
The various Industrial Revolutions .pptx
PPTX
O2C Customer Invoices to Receipt V15A.pptx
PPTX
Chapter 5: Probability Theory and Statistics
PDF
A comparative study of natural language inference in Swahili using monolingua...
PDF
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
Modernising the Digital Integration Hub
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
sustainability-14-14877-v2.pddhzftheheeeee
1 - Historical Antecedents, Social Consideration.pdf
Hybrid model detection and classification of lung cancer
August Patch Tuesday
A Late Bloomer's Guide to GenAI: Ethics, Bias, and Effective Prompting - Boha...
Benefits of Physical activity for teenagers.pptx
search engine optimization ppt fir known well about this
Enhancing emotion recognition model for a student engagement use case through...
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
Getting Started with Data Integration: FME Form 101
Web Crawler for Trend Tracking Gen Z Insights.pptx
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
The various Industrial Revolutions .pptx
O2C Customer Invoices to Receipt V15A.pptx
Chapter 5: Probability Theory and Statistics
A comparative study of natural language inference in Swahili using monolingua...
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
Univ-Connecticut-ChatGPT-Presentaion.pdf

Rust & Python : Rust WA meetup 1