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
20082026
-
…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
comment by nextaccountic · 2026-10-14 · in 11 year old unsoundness bugs found in Rust borrow checker -
…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 -
…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 -
…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 -
…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 -
…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
comment by DSMan195276 · 2023-08-03 · in Why Rust helps even if you have to use a lot of `unsafe` -
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 -
…). 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 -
…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),…
comment by nyanpasu64 · 2022-02-19 · in ‘Zero-click’ hacks are growing in popularity -
…(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 -
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...
comment by cma · 2022-01-21 · in ISO C became unusable for operating systems development -
…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 -
…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 -
…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... *…
comment by fluffything · 2020-08-22 · in AutoCXX: Safely call C++ from Rust with auto generated bindings -
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 -
…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 -
…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
comment by majewsky · 2019-08-30 · in Linux kernel drivers in Rust might become an option in the future