Open DarrienG opened 2 years ago
Hmm I do see there is an option to include a vendored version of openssl and libgit which seems to do the trick for removing openssl
in its entirety:
-git2 = { version = "0.13.25", default_features = false, features = [ "https" ] }
+git2 = { version = "0.13.25", default_features = false, features = [ "https", "vendored-libgit2", "vendored-openssl" ] }
It might be worth adding a section in the building for macOS section if this is the intended away for removing the need for openssl.
Via the README: https://github.com/rust-lang/git2-rs#building-on-osx-1010
However disabling the feature only removes the dependency on
openssh{-sys}
. git2 still depends onopenssl
when the Cargo.toml only has thehttps
feature:Reproducible example with git2 version:
0.13.25
: https://gitlab.com/DarrienG/git-sample2/-/blob/main/Cargo.lock#L99Is this intended? Based on the README it looked like removing
ssh
should have removed theopenssl
dependency in its entirety.I noticed this when intending to remove the openssl dependency in one of my larger projects: https://gitlab.com/ttyperacer/terminal-typeracer/-/merge_requests/86
I can confirm there are still attempts to bind with the C library with an attempt to cross compile to Linux from macOS:
If it is intended that's ok, I just want to make sure I understand. It would be nice for me to remove another C dep though :)