Cargo Features

libgit2-sys has no features set by default.

libgit2-sys = { version = "0.16.2+1.7.2", features = ["ssh", "https", "vendored", "vendored-openssl", "zlib-ng-compat"] }
ssh = libssh2-sys
https = openssl-sys

Affects libgit2-sys::openssl_init

ssh_key_from_memory vendored

Enables vendored of openssl-sys


Enables zlib-ng-compat of optional libssh2-sys and zlib-ng of libz-sys


(Omit the libc feature if you don't require the corresponding functions.)

This allows higher-level crates depending on your library to opt into zlib-ng if desired.

Building zlib-ng requires cmake.

Features from optional dependencies

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

libssh2-sys ssh?
openssl-sys unix https? vendored-openssl?