Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Update __pre_init docs in cortex-m-rt to suggest use of naked ASM fn

Open
#618 0 comments 3 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rust-embedded/cortex-m

All issues in rust-embedded/cortex-m

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.