--- id: maturin version: "1.14.1" license: MIT OR Apache-2.0 license_treatment: permissive maintenance: active --- # maturin — Build and publish crates with pyo3, cffi and uniffi bindings as well as rust binaries as python packages License: permissive · Maintenance: active · Downloads: 19.4M/mo ## 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 above — 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 pip install maturin uv add maturin 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_current - Install friction: medium - Maintenance: active - Downloads: 19.4M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags rust python bindings build, pyo3 wheel builder, rust to python packaging, cffi bindings compiler, rust binary python package, manylinux wheel builder, cargo python integration, rust-python-bindings, wheel-builder, pyo3 [View on SkillFed](https://skillfed.io/packages/maturin) · [View on PyPI](https://pypi.org/project/maturin/)