From 082a19f66e68d128f82257c398c293e810c50f05 Mon Sep 17 00:00:00 2001 From: WaterWhisperer Date: Fri, 12 Jun 2026 20:15:59 +0800 Subject: [PATCH] docs: mention maturin develop --release in quickstart --- README.md | 2 ++ guide/src/getting-started.md | 3 +++ 2 files changed, 5 insertions(+) diff --git a/README.md b/README.md index 804fae9d7bd..40c42db6111 100644 --- a/README.md +++ b/README.md @@ -103,6 +103,8 @@ $ python '25' ``` +When checking runtime performance, run `maturin develop --release` to build with optimizations. + To make changes to the package, just edit the Rust source code and then re-run `maturin develop` to recompile. To run this all as a single copy-and-paste, use the bash script below (replace `string_sum` in the first command with the desired package name): diff --git a/guide/src/getting-started.md b/guide/src/getting-started.md index b7d6fb98046..f8b1d768842 100644 --- a/guide/src/getting-started.md +++ b/guide/src/getting-started.md @@ -192,6 +192,9 @@ $ python '25' ``` +By default, `maturin develop` builds your Rust code with Cargo's default [`dev` profile](https://doc.rust-lang.org/cargo/reference/profiles.html#default-profiles), which includes debug information and limited optimizations. +When checking runtime performance, run `maturin develop --release` to build with Cargo's `release` profile and enable optimizations. + For more instructions on how to use Python code from Rust, see the [Python from Rust](python-from-rust.md) page. ## Maturin Import Hook