Skip to content

Commit

Permalink
Avoid unconditional dependency on libssh2-sys when using zlib-ng-comp…
Browse files Browse the repository at this point in the history
…at (#833)

Use a weak dependency feature to enable zlib-ng-compat on libssh2-sys
without forcibly enabling libssh2-sys.
  • Loading branch information
joshtriplett committed Apr 27, 2022
1 parent 2d391e9 commit d8ee105
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions libgit2-sys/Cargo.toml
Expand Up @@ -38,9 +38,4 @@ https = ["openssl-sys"]
ssh_key_from_memory = []
vendored = []
vendored-openssl = ["openssl-sys/vendored"]
# Cargo does not support requiring features on an optional dependency without
# requiring the dependency. Rather than introduce additional complexity, we
# just require libssh2 when using zlib-ng-compat. This will require building
# libssh2, but it will not add code to the final binary without the "ssh"
# feature enabled.
zlib-ng-compat = ["libz-sys/zlib-ng", "libssh2-sys/zlib-ng-compat"]
zlib-ng-compat = ["libz-sys/zlib-ng", "libssh2-sys?/zlib-ng-compat"]

0 comments on commit d8ee105

Please sign in to comment.