Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions docs/concepts/projects/init.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,15 +219,15 @@ Most Python projects are "pure Python", meaning they do not define modules in ot
C, C++, FORTRAN, or Rust. However, projects with extension modules are often used for performance
sensitive code.

Creating a project with an extension module requires an choosing an alternative build backend. uv
supports creating projects with the following build backends that support building extension
Creating a project with an extension module requires an choosing an alternative build system. uv
supports creating projects with the following build systems that support building extension
modules:

- [`maturin`](https://www.maturin.rs) for projects with Rust
- [`scikit-build`](https://scikit-build.readthedocs.io/en/latest/) for projects with C, C++,
FORTRAN, Cython

Using `maturin` is recommended for combining Rust and Python:
Specify the build system with the `--build-backend` flag:

```console
$ uv init --build-backend maturin example-ext
Expand All @@ -254,6 +254,10 @@ example-ext
└── _core.pyi
```

!!! note

If using `scikit-build`, you'll see CMake configuration and a `main.cpp` file instead.

The Rust library defines a simple function:

```rust title="src/lib.rs"
Expand Down