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 in each crate #813

Closed
kevaundray opened this issue Feb 11, 2023 · 0 comments · Fixed by #824
Closed

Forbid unsafe code in each crate #813

kevaundray opened this issue Feb 11, 2023 · 0 comments · Fixed by #824
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@kevaundray
Copy link
Contributor

Problem

Currently, we do not use any unsafe code and its advantageous to keep it this way so that we rely on the static analysis done by the compiler.

Solution

We can signal/assert that we have no unsafe code by adding #![forbid(unsafe_code)] to the crate root of each crate.

The crate root for a library is lib.rs and the crate root for a binary is main.rs.

We only have one binary in the nargo crate, though since this file is doing nothing, we only need to modify the lib.rs files.

Alternatives considered

Additional context

@kevaundray kevaundray added enhancement New feature or request good first issue Good for newcomers help wanted Contributions welcome, read CONTRIBUTING.md for how-to and removed help wanted Contributions welcome, read CONTRIBUTING.md for how-to labels Feb 11, 2023
@0xYYY 0xYYY mentioned this issue Feb 12, 2023
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant