by jakelazaroff · 4y ago · 0 comments
Not super familiar with Rust, so this may be a silly question: could Rust mitigate this by forbidding third-party packages to use unsafe code, except for ones you specifically allowlist? e.g. your Cargo.toml might look like this
[dependencies]
trusted = { version = "1.0.0", unsafe = true }
untrusted = "1.0.0"
The trusted library would be allowed to use unsafe code, but the untrusted one would not.