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 unsafe code #36

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

Shnatsel
Copy link

@Shnatsel Shnatsel commented Sep 8, 2019

#![forbid(unsafe_code)] annotation makes rustc abort compilation if there are any unsafe blocks in the crate.

Presence of this annotation is picked up by tools such as cargo-geiger and lets them ensure that there is indeed no unsafe code as opposed to something they couldn't detect (e.g. unsafe added via macro expansion, etc).

This also adds a badge advertising that unsafe code is forbidden. Being 100% safe is a desirable property for a crate and should be advertised. The badge currently links to Secure Code WG's community outreach repo, but I'm fine with changing the link or making the badge non-clickable.

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

Successfully merging this pull request may close these issues.

1 participant