Skip to content

docs: No std example - #6441

Open
Person-93 wants to merge 8 commits into
PyO3:mainfrom
Person-93:no_std_example
Open

Person-93 wants to merge 8 commits into
PyO3:mainfrom
Person-93:no_std_example

Conversation

@Person-93

Copy link
Copy Markdown
Contributor

This PR adds an example maturin-starter-nostd which is adapted from maturin-starter.

It also adds a nox session (and a small custom tool in rust) to analyze the compiled library and verify that it doesn't use anything from rust's std. This currently fails; I will be working towards fixing it in follow up PRs and once its fixed, we can add a CI job that runs the nox session.

@Person-93 Person-93 added CI-skip-changelog Skip checking changelog entry no_std Require `no_std` builds to pass labels Sep 19, 2026
@Person-93
Person-93 requested a review from davidhewitt October 8, 2026 21:42
@Person-93

Copy link
Copy Markdown
Contributor Author

@davidhewitt, just checking in about this. Is there a problem with the example? Is there something wrong with this approach to verifying that no symbols from std are required?

@davidhewitt davidhewitt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay, generally seems ok. Just have a lot of reviews queued so some things taking a while to get round to.

Comment thread examples/maturin-starter/README.md
Comment thread pyo3-verify-nostd/src/main.rs
@codspeed

codspeed Bot commented Oct 27, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 10.56%

1 warning

⚠️ Base and head ran on different runner types

Some benchmarks with significant performance changes were compared across different runner types, so the changes might not come from the code. Run base and head on the same runner type, or use CodSpeed Macro Runners for more stable results.

Learn more about Macro Runners

Open the report in CodSpeed to investigate

❌ 2 regressed benchmarks
✅ 141 untouched benchmarks
⏩ 6 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
❌ into_biguint_big 4.2 µs 4.7 µs -10.57%
❌ into_bigint_big_negative 4.2 µs 4.7 µs -10.55%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing Person-93:no_std_example (f83eb64) with main (26f9ec8)

Open in CodSpeed

Footnotes

  1. 6 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@Person-93
Person-93 requested a review from davidhewitt October 28, 2026 15:08

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI-skip-changelog Skip checking changelog entry no_std Require `no_std` builds to pass

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants