You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since the crate contains no unsafe code except in mod tests, it would be possible to add #![deny(unsafe_code)] and then #[allow(unsafe_code)] for the tests.
I don't really see the advantage in that.
Users of this crate will have to use unsafe code to interact with the extern "C" functions anyways.
Activity
robo9k commentedon Feb 12, 2022
See robo9k/rust-magic#40 for some related high-level changes.
robo9k commentedon Sep 26, 2023
Seems like there's an RFC for wholesale
unsafe externblocks https://github.com/Lokathor/rfcs/blob/unsafe-extern-blocks/text/0000-unsafe-extern-blocks.mdrobo9k commentedon Feb 21, 2025
Edition 2024 requires
unsafeonexternblocks https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-extern.htmlEverything else in the crate could still deny unsafe.