Hacker GitHub

← All repos

rust-lang/unsafe-code-guidelines

View on GitHub ↗ ★ 755

Forum for discussion about what unsafe code can and can't do

17 mentions on Hacker News by 13 people: 0 stories, 17 comments · first 2019-08-30 · latest 2026-10-14

Mentions per year 17 mentions · busiest year 2022 (4)
20082026
  1. …the unsafe code guidelines repo [1] [0] https://goals.rust-lang.org/2026/roadmap-project-zero.html https://github.com/rust-lang/unsafe-code-guidelines/issues
  2. …call might not expect an uninitialized buffer and trigger language UB). See the discussion here: https://github.com/rust-lang/unsafe-code-guidelines/issues/3... Currently, the team is leaning in the direction of not requiring recursive…
    comment by NobodyNada · 2025-05-21 · in Writing into Uninitialized Buffers in Rust
  3. …and the opsem team who are working on answering these questions & creating a formal specification: https://github.com/rust-lang/unsafe-code-guidelines/issues
    comment by NobodyNada · 2025-03-16 · in Zlib-rs is faster than C
  4. …https://github.com/rust-lang/rust/issues/20198 [3] https://github.com/rust-lang/rfcs/pull/2990 [4] https://github.com/rust-lang/unsafe-code-guidelines/issues/4...
    comment by lifthrasiir · 2024-09-04 · in An Optimization That's Impossible in Rust
  5. …side is this issue [1]. It sounds like some of the author's concerns are addressed already. [1]: https://github.com/rust-lang/unsafe-code-guidelines/issues/4...
    comment by cbarrick · 2024-01-16 · in Passing nothing is surprisingly difficult
  6. …is also harder to do and ends up causing you to mark completely safe code with an `unsafe`. [0]: https://github.com/rust-lang/unsafe-code-guidelines
  7. I think there are some aspects of this rule that are still undecided. See for example: - https://github.com/rust-lang/unsafe-code-guidelines/issues/8... - https://github.com/rust-lang/miri/issues/2732
    comment by oconnor663 · 2023-03-05 · in Safety and Soundness in Rust
  8. …). However, the rules may be relaxed or more ergonomic alternatives added ( https://github.com/rust-lang/unsafe-code-guidelines/issues/3... ), it's uncertain right now. (Also I go by "they".)
    comment by nyanpasu64 · 2022-06-27 · in Build a PinePhone App with Zig and Zgt
  9. …created from a Box<T>, you can't mix &mut and const but you might be able to mix Vec<T> and const ( https://github.com/rust-lang/unsafe-code-guidelines/issues/2... ), self-referential &mut or Pin<&mut> is likely unsound but undetermined),…
  10. …(I'm not sure about the results, but the last time I looked at it was probably over a year ago): https://github.com/rust-lang/unsafe-code-guidelines Perhaps another catch is that, at least in my experience, the most common situation where…
    comment by DSMan195276 · 2022-01-31 · in Uninitialized memory: Unsafe Rust is too hard
  11. Rust code in unsafe blocks has lots of similar issues with fuzziness around aliasing rules: https://github.com/rust-lang/unsafe-code-guidelines/blob/mas...
  12. …the logic behind the two. https://whileydave.com/2021/12/06/modelling-borrow-checking-... https://github.com/rust-lang/unsafe-code-guidelines/blob/mas...
    comment by natded · 2021-12-19 · in Thread Safety in C++ and Rust
  13. …when compared to Lisp macros. EDIT: here's an example of a discussion about that in Rust: https://github.com/rust-lang/unsafe-code-guidelines/issues/2...
    comment by valenterry · 2021-06-28 · in BLisp: A Statically Typed Lisp Like Language
  14. …was unsound for a long time: * https://internals.rust-lang.org/t/pre-rfc-add-a-new-offset-o... * https://github.com/rust-lang/unsafe-code-guidelines/issues/1... * https://github.com/rust-lang/unsafe-code-guidelines/issues/2... *…
  15. There's a talk here https://www.youtube.com/watch?v=h9Fh4jRDGLo and some extra info here https://github.com/rust-lang/unsafe-code-guidelines/blob/mas...
    comment by PudgePacket · 2020-02-09 · in Stacked Borrows: An Aliasing Model for Rust
  16. …of the `unsafe` operations in it. [0] https://doc.rust-lang.org/nomicon/what-unsafe-does.html [1] https://github.com/rust-lang/unsafe-code-guidelines [2] https://github.com/rust-lang/rust/commit/1975b8d21b21d5ede54... [3]…
    comment by DSMan195276 · 2020-01-07 · in Hobby x86 kernel written with Zig
  17. …hold off on using Rust for more central parts of the kernel until this work is farther ahead. [1] https://github.com/rust-lang/unsafe-code-guidelines