skillfed

maturin

Build and publish crates with pyo3, cffi and uniffi bindings as well as rust binaries as python packages

maturin v1.14.1 19.4M downloads/30d#1,067 on PyPI5,752
Permissive license MIT OR Apache-2.0 Active released

What it is and what it does

Maturin is a build tool that automates the creation of Python packages from Rust source code. It handles the complexity of compiling Rust code with Python bindings (via PyO3, CFFI, or Uniffi), generating platform-specific wheels, and publishing to PyPI—all with minimal configuration beyond a Cargo.toml and optional pyproject.toml. It supports building for Python 3.8+ across Windows, Linux, macOS, and FreeBSD, with basic support for PyPy and GraalPy.

The tool provides three main workflows: `maturin new` scaffolds a new project, `maturin build` compiles wheels for distribution, and `maturin develop` installs a compiled module directly into your current virtualenv for rapid iteration. It integrates with standard Python packaging (PEP 621 metadata, console scripts, trove classifiers) and works alongside existing Cargo and setuptools configurations, making it suitable for mixed Rust/Python projects or pure Rust binaries packaged as Python tools.

Use it for:

  • Package a Rust library with PyO3 bindings as a pip-installable wheel for distribution on PyPI.
  • Build performance-critical Python modules in Rust while maintaining a pure-Python API surface.
  • Develop a mixed Rust/Python project where Python handles orchestration and Rust handles compute-intensive tasks.
  • Create command-line tools written in Rust and distribute them as Python packages for easy installation via pip.
  • Automate multi-platform wheel building (x86_64, ARM, RISC-V) for CI/CD pipelines without manual cross-compilation.
  • Integrate Rust FFI bindings (CFFI) or Uniffi interfaces into existing Python packages without setuptools-rust boilerplate.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Maturin builds and publishes Python packages containing Rust code with PyO3, CFFI, or Uniffi bindings, handling wheel creation and PyPI distribution with minimal configuration.

Yes, if you are building Python packages from Rust code. Maturin is the modern standard for this workflow, actively maintained, widely used (top 5000 PyPI packages), and eliminates significant build configuration overhead. Install it as a build tool (via pipx or uv recommended) rather than as a runtime dependency. Not relevant for pure-Python projects or if you are only consuming Rust-based packages.

Install

maturin on PyPI

pip

pip install maturin

uv

uv add maturin

poetry

poetry add maturin

Installing maturin

Before you install

Medium install friction due to platform-specific wheel distribution across many architectures (x86_64, ARM, RISC-V, etc.), but pre-built binaries are available for all major platforms. Active maintenance with recent releases (56 days since last update) and strong repository activity (5752 stars) suggest reliable ongoing support.

License in practice

Dual-licensed under MIT OR Apache-2.0 (permissive), meaning you may choose either license when using or distributing maturin. Both are permissive open-source licenses with minimal restrictions on commercial or proprietary use.

Quickstart

pip install maturin
maturin new my_project
cd my_project
maturin build
# Or for development:
maturin develop

Requires Rust toolchain (cargo) to be installed on your system; maturin itself is a build tool, not a runtime library.

Verify before relying

  • Whether the package works reliably with all advertised Python versions (3.8+) and interpreters (PyPy, GraalPy) in practice.
  • Performance characteristics and build time overhead compared to setuptools-rust or other Rust-Python build tools.
  • Compatibility with less common platforms or edge cases in mixed Rust/Python project structures.

Package facts

License MIT OR Apache-2.0 (permissive)
Python support supports the current Python release (>=3.7)
Install friction medium — platform-specific wheel
Runtime dependencies 1 — tomli
Maintenance actively maintained — 56 days since the last release
Last repo commit
First released
Downloads 19,379,125/month — #1,067 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: maturin-1.14.1-py3-none-linux_armv6l.whl; maturin-1.14.1-py3-none-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl; maturin-1.14.1-py3-none-macosx_10_12_x86_64.whl; maturin-1.14.1-py3-none-manylinux_2_12_i686.manylinux2010_i686.musllinux_1_1_i686.whl; maturin-1.14.1-py3-none-manylinux_2_12_x86_64.manylinux2010_x86_64.musllinux_1_1_x86_64.whl; maturin-1.14.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl; maturin-1.14.1-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.musllinux_1_1_armv7l.whl; maturin-1.14.1-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.musllinux_1_1_ppc64le.whl; maturin-1.14.1-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl; maturin-1.14.1-py3-none-manylinux_2_31_riscv64.musllinux_1_1_riscv64.whl; maturin-1.14.1-py3-none-win32.whl; maturin-1.14.1-py3-none-win_amd64.whl; maturin-1.14.1-py3-none-win_arm64.whl

Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: GraalPyProgramming Language :: Python :: Implementation :: PyPyProgramming Language :: RustTopic :: Software Development :: Build Tools

Tags

rust python bindings buildpyo3 wheel builderrust to python packagingcffi bindings compilerrust binary python packagemanylinux wheel buildercargo python integration
rust-python-bindingswheel-builderpyo3

More Build Tools packages