Rust vs. C for Python Libraries: Evaluating Rust-Compatible Bindings Toolchains

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Amaral, Isabella Basso do, Ferreira, Renato Cordeiro, Goldman, Alfredo
Format: Preprint
Veröffentlicht: 2025
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866912458886610944
author Amaral, Isabella Basso do
Ferreira, Renato Cordeiro
Goldman, Alfredo
author_facet Amaral, Isabella Basso do
Ferreira, Renato Cordeiro
Goldman, Alfredo
contents The Python programming language is best known for its syntax and scientific libraries, but it is also notorious for its slow interpreter. Optimizing critical sections in Python entails special knowledge of the binary interactions between programming languages, and can be cumbersome to interface manually, with implementers often resorting to convoluted third-party libraries. This comparative study evaluates the performance and ease of use of the PyO3 Python bindings toolchain for Rust against ctypes and cffi. By using Rust tooling developed for Python, we can achieve state-of-the-art performance with no concern for API compatibility.
format Preprint
id arxiv_https___arxiv_org_abs_2507_00264
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Rust vs. C for Python Libraries: Evaluating Rust-Compatible Bindings Toolchains
Amaral, Isabella Basso do
Ferreira, Renato Cordeiro
Goldman, Alfredo
Programming Languages
Distributed, Parallel, and Cluster Computing
Performance
Software Engineering
D.2.13; D.2.8; D.3.3; B.8
The Python programming language is best known for its syntax and scientific libraries, but it is also notorious for its slow interpreter. Optimizing critical sections in Python entails special knowledge of the binary interactions between programming languages, and can be cumbersome to interface manually, with implementers often resorting to convoluted third-party libraries. This comparative study evaluates the performance and ease of use of the PyO3 Python bindings toolchain for Rust against ctypes and cffi. By using Rust tooling developed for Python, we can achieve state-of-the-art performance with no concern for API compatibility.
title Rust vs. C for Python Libraries: Evaluating Rust-Compatible Bindings Toolchains
topic Programming Languages
Distributed, Parallel, and Cluster Computing
Performance
Software Engineering
D.2.13; D.2.8; D.3.3; B.8
url https://arxiv.org/abs/2507.00264