# pyo3/maturin

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/pyo3-maturin).**

5,413 stars · 382 forks · Rust · apache-2.0

## Links

- GitHub: https://github.com/PyO3/maturin
- Homepage: https://maturin.rs
- awesome-repositories: https://awesome-repositories.com/repository/pyo3-maturin.md

## Topics

`cffi` `cpython` `cross-compile` `hacktoberfest` `manylinux` `packaging` `pyo3` `pypi` `pypy` `python` `uniffi` `wheels`

## Description

Maturin is a build tool that compiles Rust crates into Python wheel packages, supporting multiple binding systems such as PyO3, CFFI, and UniFFI to create native extension modules. It manages the full build pipeline from Rust compilation to wheel assembly, including cross-compilation for different operating systems and architectures without requiring native hardware.

The tool integrates development-mode installation with automatic rebuilds: when a Python import hook detects source changes, it triggers recompilation before the module loads. Editable installs link the compiled module into site-packages so Python edits take effect instantly. For supply chain compliance, maturin generates and embeds a software bill of materials from the Rust dependency graph and external libraries into the wheel metadata.

Beyond building, maturin offers project scaffolding for hybrid Rust/Python projects, CI workflow generation for automated publishing, and type stub generation for static type checking. It can also distribute CLI binaries bundled with the wheel and bundle arbitrary data files. Publishing to PyPI is supported, including with OpenID Connect authentication for tokenless releases.

Maturin is available as a command-line tool that can be installed via pip or cargo and integrates with existing Rust and Python development workflows.

## Tags

### Development Tools & Productivity

- [Rust Python Extension Developers](https://awesome-repositories.com/f/development-tools-productivity/compilers-toolchains/c-extension-interfaces/c-extension-development/rust-python-extension-developers.md) — Builds fast Python extension modules from Rust using PyO3, CFFI, or C bindings.
- [Target Registries](https://awesome-repositories.com/f/development-tools-productivity/cross-platform-build-targets/target-registries.md) — Provides preconfigured toolchain profiles and target triples for building Python wheels across many platforms.
- [Editable Installations](https://awesome-repositories.com/f/development-tools-productivity/python-development-tools/editable-installations.md) — Installs packages in editable mode so Python changes reflect instantly without rebuilding the extension. ([source](https://maturin.rs))
- [Source Distribution Builders](https://awesome-repositories.com/f/development-tools-productivity/source-builds/source-distribution-builders.md) — Generates Python source distributions from Rust crates, enabling native compilation during installation. ([source](https://maturin.rs/index.html))
- [Native Module Rebuild Triggers](https://awesome-repositories.com/f/development-tools-productivity/workflow-automation-tools/development-automation/development-rebuild-triggers/native-module-rebuild-triggers.md) — Installs Rust-based Python modules so edits trigger automatic rebuild on import.
- [Rust Compilation Configurations](https://awesome-repositories.com/f/development-tools-productivity/build-tooling/build-orchestration-logic/build-orchestration-configuration/build-configuration-systems/compiler-configurations/rust-compilation-configurations.md) — Lets developers specify Rust build profiles, features, and flags to control compilation before packaging. ([source](https://maturin.rs/config.html))
- [SBOM Generators](https://awesome-repositories.com/f/development-tools-productivity/package-managers/dependency/sbom-generators.md) — Generates and embeds a software bill of materials from the Rust dependency graph into wheel metadata.
- [Hybrid Language Scaffolders](https://awesome-repositories.com/f/development-tools-productivity/project-scaffolding-config-code-generation/project-scaffolding-configuration/project-scaffolding/hybrid-language-scaffolders.md) — Creates new projects mixing Rust and Python with automatic build configuration for native extensions.
- [Rust Python Extension Scaffolders](https://awesome-repositories.com/f/development-tools-productivity/project-scaffolding-config-code-generation/project-scaffolding-configuration/project-scaffolding/rust-python-extension-scaffolders.md) — Scaffolds new Rust projects with build configuration for Python extensions. ([source](https://cdn.jsdelivr.net/gh/pyo3/maturin@main/README.md))
- [Type Stub Generators](https://awesome-repositories.com/f/development-tools-productivity/static-type-generators/type-stub-generators.md) — Generates and bundles Python type stub files into the wheel for static type checking support. ([source](https://maturin.rs/print))

### Programming Languages & Runtimes

- [Wheel Compilation](https://awesome-repositories.com/f/programming-languages-runtimes/python-compilers/binary-compilers/wheel-compilation.md) — Compiles Rust crates into platform-specific Python wheels with native extensions for multiple Python versions.
- [Python Bindings](https://awesome-repositories.com/f/programming-languages-runtimes/language-interoperability/interoperability/python-bindings.md) — Generates native Python extension modules from Rust code using PyO3, CFFI, and UniFFI binding systems.
- [CFFI Binding Generators](https://awesome-repositories.com/f/programming-languages-runtimes/language-interoperability/native-c-interoperability/c-function-bindings/cffi-binding-generators.md) — Generates C header files from Rust code and builds Python packages via the C Foreign Function Interface. ([source](https://maturin.rs/print))
- [Automatic Rust Module Builders](https://awesome-repositories.com/f/programming-languages-runtimes/module-importing/automatic-rust-module-builders.md) — Automatically builds Rust source files into Python modules when imported. ([source](https://maturin.rs/import_hook.html))
- [Portability Validators](https://awesome-repositories.com/f/programming-languages-runtimes/python-compilers/binary-compilers/wheel-compilation/portability-validators.md) — Validates Linux wheels against manylinux rules and bundles missing shared libraries for broad distribution compatibility.
- [Rust Cross-Platform Wheel Compilers](https://awesome-repositories.com/f/programming-languages-runtimes/python-compilers/binary-compilers/wheel-compilation/rust-cross-platform-wheel-compilers.md) — Compiles Rust crates into platform-specific Python wheels with cross-compilation support.
- [Python Runtime Compatibility](https://awesome-repositories.com/f/programming-languages-runtimes/python-runtime-compatibility.md) — Builds extensions compatible with CPython, PyPy, and GraalPy across multiple Python versions. ([source](https://maturin.rs/platform_support.html))
- [Python Wheel](https://awesome-repositories.com/f/programming-languages-runtimes/rust-based-compilers/cross-compilation-managers/python-wheel.md) — Cross-compiles Rust-based Python wheels for alternative architectures without needing native hardware. ([source](https://maturin.rs/print))
- [Cross-Compilation Tools](https://awesome-repositories.com/f/programming-languages-runtimes/cross-compilation-tools.md) — Enables building Python wheels for multiple OS and CPU architectures from a single host without native hardware.

### DevOps & Infrastructure

- [Import-Hook Rebuild Triggers](https://awesome-repositories.com/f/devops-infrastructure/automated-container-updaters/automatic-rebuild-triggers/import-hook-rebuild-triggers.md) — Detects Rust source changes via a Python import hook and triggers automatic recompilation before module loading.
- [Multi-Binding](https://awesome-repositories.com/f/devops-infrastructure/build-pipelines/multi-binding.md) — Provides a uniform build pipeline supporting PyO3, CFFI, uniffi, and binary scripts for Rust-to-Python wheel generation.
- [PyO3 Extension Builders](https://awesome-repositories.com/f/devops-infrastructure/cicd-pipeline-automation/core-build-engines/bundling-extension-architectures/build-system-extensions/pyo3-extension-builders.md) — Builds native Python extension modules from Rust code using the PyO3 binding system. ([source](https://maturin.rs/print))
- [Development Module Installers](https://awesome-repositories.com/f/devops-infrastructure/deployment-management-strategies/execution-platforms-and-targets/deployment-environments/python-environment-installations/development-module-installers.md) — Compiles and installs Rust crates as Python modules into the active virtual environment. ([source](https://maturin.rs/local_development.html))
- [CI Workflow Generators](https://awesome-repositories.com/f/devops-infrastructure/automation-orchestration/task-execution-frameworks/ci-workflow-automations/ci-workflow-generators.md) — Generates CI workflow files for GitHub Actions to automate building and publishing wheels. ([source](https://maturin.rs/print))
- [CLI Binary Distributions](https://awesome-repositories.com/f/devops-infrastructure/binary-distribution-tools/cli-binary-distributions.md) — Wraps compiled Rust binaries as Python scripts, making them command-line tools after installation. ([source](https://maturin.rs/bindings.html))
- [Package Metadata](https://awesome-repositories.com/f/devops-infrastructure/package-metadata.md) — Merges Python package metadata from pyproject.toml with Rust project configuration for full control. ([source](https://maturin.rs/print))
- [PyPI Uploaders](https://awesome-repositories.com/f/devops-infrastructure/python-distribution-packaging/pypi-uploaders.md) — Uploads built Python packages to the Python Package Index for public distribution. ([source](https://maturin.rs/index.html))

### Software Engineering & Architecture

- [UniFFI](https://awesome-repositories.com/f/software-engineering-architecture/integration-extensibility/programmatic-interfaces/binding-generators/uniffi.md) — Generates Python bindings from an interface definition file using UniFFI for cross-platform compatibility. ([source](https://maturin.rs/print))
- [Mixed-Source Project Organizations](https://awesome-repositories.com/f/software-engineering-architecture/source-file-organization/mixed-source-project-organizations.md) — Organizes projects with both Rust and Python source files, placing the native extension alongside Python code. ([source](https://cdn.jsdelivr.net/gh/pyo3/maturin@main/README.md))

### Part of an Awesome List

- [Pure Rust Wheel Packagers](https://awesome-repositories.com/f/awesome-lists/devtools/rust-projects/pure-rust-wheel-packagers.md) — Builds a Python wheel from a pure Rust crate, automatically generating an initialization module. ([source](https://maturin.rs/project_layout.html))

### Operating Systems & Systems Programming

- [Portability Compliance Validators](https://awesome-repositories.com/f/operating-systems-systems-programming/platform-development-integration/platform-sdks/linux-sdks/linux-build-targets/portability-compliance-validators.md) — Validates Linux wheels against portability rules and tags them for broad distribution compatibility. ([source](https://maturin.rs))
