[Migrated] debug_printf requires unsafe
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 3.4k
- Forks
- 125
- PR merge metrics
- No merged PRs in 30d
Description
Issue automatically imported from old repo: https://github.com/EmbarkStudios/rust-gpu/issues/997
Old labels: t: enhancement
Originally creatd by charles-r-earp on 2023-03-04T00:38:43Z
The debug_printf and debug_printfln macros generate an invocation of the asm macro, which requires an unsafe block. However, the macro appears to validate it's input, so it could potentially add the unsafe block to it's output. If there are still outstanding issues, perhaps a safety section could be added to the docs to reduce confusion? This is a really useful tool, and it seems strange to require unsafe just to debug stuff.
Contributor guide
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.
Research direction
Begin with the debug_printf and debug_printfln macro definitions and the asm macro they invoke. Check how input validation relates to the unsafe requirement, then establish whether completion means changing the generated invocation or documenting the safety expectations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 42/100