Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forbid or deny unsafe code #26

Open
robo9k opened this issue Nov 8, 2021 · 2 comments
Open

Forbid or deny unsafe code #26

robo9k opened this issue Nov 8, 2021 · 2 comments

Comments

@robo9k
Copy link
Owner

robo9k commented Nov 8, 2021

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
Copy link
Owner Author

robo9k commented Feb 12, 2022

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

@robo9k
Copy link
Owner Author

robo9k commented Sep 26, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant