Loading...
Rust vs. C for Python Libraries: Evaluating Rust-Compatible Bindings Toolchains
do Amaral,Isabella Basso ; Ferreira,Renato Cordeiro ; Goldman,Alfredo
do Amaral,Isabella Basso
Ferreira,Renato Cordeiro
Goldman,Alfredo
Abstract
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.
Description
10 pages, 27 figures (1 diagram, 4 graphs, 9 tables, 13 code listings), submitted to SBAC-PAD 2025
Date
2025-06-30
Journal Title
Journal ISSN
Volume Title
Publisher
Files
Loading...
2507.00264v1.pdf
Adobe PDF, 319.48 KB
Research Projects
Organizational Units
Journal Issue
Keywords
SE4AI, ML Engineering, High-Performance Computing, FFI, C, Rust, Python, NumPy, Benchmarking
Citation
do Amaral, I B, Ferreira, R C & Goldman, A 2025 'Rust vs. C for Python Libraries : Evaluating Rust-Compatible Bindings Toolchains'.
