Cargo Features

[dependencies]
git2 = { version = "0.18.1", default-features = false, features = ["unstable", "ssh", "https", "vendored-libgit2", "vendored-openssl", "ssh_key_from_memory", "zlib-ng-compat"] }
default = https, ssh, ssh_key_from_memory

These default features are set whenever git2 is added without default-features = false somewhere in the dependency tree.

unstable
ssh default

Enables ssh of libgit2-sys

https default = openssl-probe, openssl-sys

Enables https of libgit2-sys

vendored-libgit2

Enables vendored of libgit2-sys

vendored-openssl

Enables vendored-openssl of libgit2-sys, vendored of openssl-sys

ssh_key_from_memory default

Enables ssh_key_from_memory of libgit2-sys

zlib-ng-compat

Enables zlib-ng-compat of libgit2-sys

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features.

openssl-probe cfg(all(unix, not(target_os = "macos"))) https
openssl-sys cfg(all(unix, not(target_os = "macos"))) https