4 ms·
> If you want to go further, you can disable unsafe in a crate by adding #[forbid(unsafe)]. Cool, so it's possible to exclude dependencies which include unsafe
by mk89 4y ago
> If you want to go further, you can disable unsafe in a crate by adding #[forbid(unsafe)].
Cool, so it's possible to exclude dependencies which include unsafe stuff! That's awesome.
See, this is the kind of stuff I was looking for.
From the perspective of a team writing new Rust code:
1) Don't allow unsafe (you can have an easy code search for this)
2) Forbid unsafe cargos
Finally: how do you catch unsafe in the standard library?
- jdorfman 4y ago> 1) Don't allow unsafe (you can have an easy code search for this) 2) Forbid unsafe cargos This can be accomplished with cargo vet (https://mozilla.github.io/cargo-vet/how-it-works.html?highlight=sourcegraph#auditing-workflow https://mozilla.github.io/cargo-vet/how-it-works.html?highli...)