You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
flate2 includes plenty of unsafe code that's only used for interaction C backends, and can be omitted from the Rust backend builds. We should use conditional compilation to leave it out of the build when it's not in use, so that any auditing or refactoring efforts can focus on the unsafe code that's actually executed.
For example, the entirety of src/ffi/c.rs can be left out of builds that use Rust backend only; this brings down the unsafe expression count from 107 to 43 according to cargo-geiger.
The text was updated successfully, but these errors were encountered:
I've taken a stab at this, but the easy solution from here didn't work (likely due to 2018 edition module changes), and the module reexport hack described here is a bit over my head.
flate2 includes plenty of unsafe code that's only used for interaction C backends, and can be omitted from the Rust backend builds. We should use conditional compilation to leave it out of the build when it's not in use, so that any auditing or refactoring efforts can focus on the unsafe code that's actually executed.
For example, the entirety of src/ffi/c.rs can be left out of builds that use Rust backend only; this brings down the unsafe expression count from 107 to 43 according to cargo-geiger.
The text was updated successfully, but these errors were encountered: