robo9k / rust-magic-sys

Rust declarations crate for the `libmagic` C library
Apache License 2.0
10 stars 6 forks source link

Forbid or deny unsafe code #26

Open robo9k opened 3 years ago

robo9k commented 3 years ago

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.

robo9k commented 2 years ago

See robo9k/rust-magic#40 for some related high-level changes.

robo9k commented 1 year ago

Seems like there's an RFC for wholesale unsafe extern blocks https://github.com/Lokathor/rfcs/blob/unsafe-extern-blocks/text/0000-unsafe-extern-blocks.md