$npx skillfedfor your agent

setuptools-rust

Setuptools Rust extension plugin

With conditionsPyPI Version ControlReleased Jun 20266.9M downloads / mopermissive licensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — setuptools_rust-1.13.0-py3-none-any.whl
v1.13.0 · released 2026-06-27 · Python >=3.9 · 2 runtime deps: setuptools, semantic_version

Yes, if you are writing Python extensions in Rust. The plugin is actively maintained, has no known vulnerabilities, low install friction, and permissive licensing. It is the standard way to package Rust extensions for PyPI distribution. Install it only in your build-system requirements (pyproject.toml), not as a runtime dependency.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Rust toolchain (rustc, cargo) installed on the build system; Python 3.9 or later.
  • Low install friction; pure Python wheel with only setuptools and semantic_version as runtime dependencies.
  • Actively maintained with recent releases and 677 repository stars.

License · maintenance · safety

permissive license (permissive) — MIT-licensed under permissive terms, allowing use in commercial and private projects without significant restrictions.

last release 2026-06-27 (48 days) · last repo commit 2026-08-12 · 677 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 6,925,523 downloads/mo, #1,809 on PyPI

Verify before relying

# In pyproject.toml:
[build-system]
requires = ["setuptools", "setuptools-rust"]
build-backend = "setuptools.build_meta"

[[tool.setuptools-rust.ext-modules]]
target = "my_module._lib"
binding = "PyO3"

# Then build and install:
python -m pip install -e .
  • Whether cross-compilation support (crossenv, cross, cargo-zigbuild) is production-ready or experimental.
  • Performance overhead or compilation time impact compared to C extensions.
  • Whether binary wheel distribution is supported on all major platforms (Linux, macOS, Windows).
Same gist for agents: .md · .json

What it is and what it does

setuptools-rust bridges the gap between Rust and Python packaging by acting as a setuptools plugin that knows how to compile Rust code into Python extension modules. It handles the build process for extensions written with PyO3 or rust-cpython, letting you distribute them as wheels just like C extensions. The plugin reads configuration from pyproject.toml, invokes the Rust toolchain (cargo), and integrates the compiled binaries into your Python package.

You use it by declaring Rust extension modules in your pyproject.toml, pointing to your Cargo.toml and specifying the binding framework (PyO3 or rust-cpython). It then manages compilation during package installation or wheel building. The plugin supports both library modules (for import) and binary executables, and handles cross-compilation via tools like crossenv or cargo-zigbuild.

Use it for

  • Package a performance-critical Python library written in Rust for distribution on PyPI.
  • Build a Python extension module that calls Rust code for CPU-intensive tasks.
  • Distribute a Rust binary tool alongside Python code as a single wheel.
  • Create a namespace package that mixes Rust extension modules with pure Python code.
  • Cross-compile Rust extensions for deployment on different architectures.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you are writing Python extensions in Rust.

The plugin is actively maintained, has no known vulnerabilities, low install friction, and permissive licensing. It is the standard way to package Rust extensions for PyPI distribution. Install it only in your build-system requirements (pyproject.toml), not as a runtime dependency.

Install

setuptools-rust on PyPI

Before you install

Low install friction; pure Python wheel with only setuptools and semantic_version as runtime dependencies. Actively maintained with recent releases and 677 repository stars.

Requires Rust toolchain (rustc, cargo) installed on the build system; Python 3.9 or later.

License in practice

MIT-licensed under permissive terms, allowing use in commercial and private projects without significant restrictions.

Quickstart

# In pyproject.toml:
[build-system]
requires = ["setuptools", "setuptools-rust"]
build-backend = "setuptools.build_meta"

[[tool.setuptools-rust.ext-modules]]
target = "my_module._lib"
binding = "PyO3"

# Then build and install:
python -m pip install -e .

Verify before relying

  • Whether cross-compilation support (crossenv, cross, cargo-zigbuild) is production-ready or experimental.
  • Performance overhead or compilation time impact compared to C extensions.
  • Whether binary wheel distribution is supported on all major platforms (Linux, macOS, Windows).

Package facts

Licensepermissive license permissive
Python supportSupports the current Python release >=3.9
Install frictionLow. Pure-Python wheel
Runtime dependencies
2 packages
setuptoolssemantic_version
MaintenanceActively maintained 48 days since the last release
Last repo commit
First released
Downloads6,925,523 / month, #1,809 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIXProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Version Control

Evidence: setuptools_rust-1.13.0-py3-none-any.whl

Tags

Capabilities
rust python extensionsetuptools rust pluginpyo3 packagingcompile rust to pythonrust cpython bindingsbuild rust modulespython rust integration
Topics
rust-bindingsextension-buildingpackaging
PyPI keywords
distutilssetuptoolsrust

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “rust python extension”

  • setuptools-rustsetuptools-rust is a setuptools plugin that compiles and packages…
  • chalkpy-rsProvides a native Rust extension package that serves as the compiled…
  • phonorsPhonors provides Rust-accelerated numerical kernels for phonopy and…

Give your agent the search over MCP, or paste the wish link into any chat.

More Version Control packages

setuptools-scm Worth it
PyPI · Libraries · released Jul 2026

Automatically extracts and manages Python package versions from git or Mercurial metadata instead of hardcoding them, and includes SCM-tracked files in source distributions.

permissive licensepure Python · 3.8+
134.2Mdownloads / mo
dulwich With conditions
PyPI · Version Control · released Jul 2026

Dulwich provides pure Python access to Git repositories—both local and remote—without requiring Git or native code to be installed, offering an alternative to calling Git directly.

Apache-2.0 OR GPL-2.0-or-laterpure Python · 3.10+
99.4Mdownloads / mo
pygit2 With conditions
PyPI · Version Control · released Aug 2026

pygit2 provides Python bindings to libgit2, enabling direct programmatic access to Git repository operations at the plumbing level without shelling out to the git command-line tool.

copyleftcompiled wheel · 3.11+
5.6Mdownloads / mo
poetry-dynamic-versioning Worth it
PyPI · Version Control · released Feb 2026

A Poetry plugin that automatically derives and injects version numbers from version control tags into your project during builds, using Dunamai to support multiple VCS systems.

Install it if you use Poetry 1.2.0+ and want to eliminate manual version management in your build workflow.

MITpure Python
4.0Mdownloads / mo
whatthepatch Worth it
PyPI · Software Development · released Nov 2024

Parses and applies patch files in multiple diff formats (unified, context, normal, ed, rcs) and from several source control systems (Git, SVN, CVS).

MITpure Python · 3.9+
2.6Mdownloads / mo
versioningit Worth it
PyPI · Build Tools · released Jun 2025

Automatically determines your Python package's version from Git or Mercurial tags and writes it to your build system, with customizable version formatting and optional runtime file generation.

MITpure Python · 3.8+
2.2Mdownloads / mo

See also maturin · puccinialin · result · advent-of-code · cargo-lambda · retworkx · pybigtools · chia-rs · pip-hello-world · moviepilot-rust