Skip to content

feat: support MATURIN_PGO env var to activate --pgo#3271

Merged
messense merged 1 commit into
PyO3:mainfrom
messense:maturin-pgo-env
Jul 19, 2026
Merged

feat: support MATURIN_PGO env var to activate --pgo#3271
messense merged 1 commit into
PyO3:mainfrom
messense:maturin-pgo-env

Conversation

@messense

Copy link
Copy Markdown
Member

Allow enabling Profile-Guided Optimization via the MATURIN_PGO environment variable in maturin build, maturin publish, maturin develop and PEP 517 builds (e.g. pip install .).

Values are parsed leniently: 0, false, no, off or an empty string disable it, anything else enables it. The pep517 subcommands also accept an explicit --pgo flag, so it can be passed through MATURIN_PEP517_ARGS as well.

Allow enabling Profile-Guided Optimization via the MATURIN_PGO
environment variable in `maturin build`, `maturin publish`,
`maturin develop` and PEP 517 builds (e.g. `pip install .`).

Values are parsed leniently: `0`, `false`, `no`, `off` or an empty
string disable it, anything else enables it. The pep517 subcommands
also accept an explicit `--pgo` flag, so it can be passed through
MATURIN_PEP517_ARGS as well.
@messense
messense enabled auto-merge (squash) July 19, 2026 11:56
@messense
messense merged commit 249eff2 into PyO3:main Jul 19, 2026
45 checks passed
@messense
messense deleted the maturin-pgo-env branch July 19, 2026 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant