Update __pre_init docs in cortex-m-rt to suggest use of naked ASM fn
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 48/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- rust
- Domain
- embedded-iot
Research direction
Start with the docs.rs cortex-m-rt features section and the linked #[pre_init] documentation, then review the linked Rust naked-functions announcement for the current guidance. Update the pre_init advice to recommend a naked assembly function where appropriate, while retaining the warning about running Rust code before RAM initialization.
Written by the indexing model from the issue text.
Description
https://docs.rs/cortex-m-rt/0.7.5/cortex_m_rt/#features
A #[pre_init] macro is also provided to run a function before RAM initialisation, but its use is deprecated as it is not defined behaviour to execute Rust code before initialisation. It is still possible to create a custom pre_init function using assembly.
I think it might be better advice to recommend a naked function, now that we have them.
https://blog.rust-lang.org/2025/07/03/stabilizing-naked-functions/
- Dominant language
- Rust
- Stars
- 1k
- Forks
- 201
- Avg merge
- 1h 8m
- Merged PRs (30d)
- 2
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from rust-embedded/cortex-m
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
rust-embedded/cortex-m#651 · 5 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
rust-embedded/cortex-m#637 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
rust-embedded/cortex-m#511 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
rust-embedded/cortex-m#695 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
rust-embedded/cortex-m#694 · 1 comment ·
All issues in rust-embedded/cortex-m
Similar issues
-
C-bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
rust-lang/rust-analyzer#23501 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
[Bug]: Web chat input doesn't regain focus after a reply finishesPossibly taken @GaijinSystems claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
zeroclaw-labs/zeroclaw#11658 ·
Maintainers usually reply within 2 days
-
good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
bytecodealliance/wasm-tools#2768 ·
Maintainers usually reply within 1 day