OPENSSL_NO_VENDOR allows openssl-sys to use the openssl we provide instead of its own included one. This can reduce closure size and (perhaps?) improve security since we only have to track a small number of openssl versions.
However, there is no obvious signs indicating this should be used, unless missing it causes a build failure, or someone check Cargo.toml very carefully. A search on GitHub shows that currently only 63 packages have this environment variable included.
I would like to ask
Is this necessary or does the benefits worth using by default?
Can we include this environment variable in buildRustPackage by default?
Are there other ways to indicate that some packages need to add OPENSSL_NO_VENDOR?
One solution would be going further than vendoring every Cargo.Lock: create a central place to put all cargo packages (being used) and turn them into Nix derivations, so we can deal with this kind of issues easily.
OPENSSL_NO_VENDOR
allows openssl-sys to use the openssl we provide instead of its own included one. This can reduce closure size and (perhaps?) improve security since we only have to track a small number of openssl versions.However, there is no obvious signs indicating this should be used, unless missing it causes a build failure, or someone check
Cargo.toml
very carefully. A search on GitHub shows that currently only 63 packages have this environment variable included.I would like to ask
buildRustPackage
by default?OPENSSL_NO_VENDOR
?One solution would be going further than vendoring every
Cargo.Lock
: create a central place to put all cargo packages (being used) and turn them into Nix derivations, so we can deal with this kind of issues easily.