Skip to content

Commit

Permalink
feat: make zlib-ng-compat a default feature flag
Browse files Browse the repository at this point in the history
This way it can be turned off via `cargo build --no-deafult-flags` which
is required to link against a shared `libgit2`.

This PR also bumps `git2-rs` to link against the `1.6` branch of `libgit2`
  • Loading branch information
jbergstroem authored and hdevalke committed May 16, 2023
1 parent 2778b81 commit 4b17cb6
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 13 deletions.
21 changes: 10 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@ include = [
"README.md",
"LICENSE"
]
rust-version = "1.60" # for `--features`

[dependencies]
anyhow = { version = "1.0.68", features = ["backtrace"] }
clap = { version = "4.1.2", features = ["derive"] }
ctrlc = "3.2.4"
dialoguer = "0.10.3"
git2 = { version = "0.16.1", default-features = false, features = [ "zlib-ng-compat" ] }
git2 = { version = "0.17.1", default-features = false }
handlebars = "4.3.6"
regex = "1.7.1"
semver = "1.0.16"
Expand All @@ -38,6 +39,10 @@ clap = { version = "4.1.2", features = ["derive"] }
clap_complete = "4.1.1"
semver = "1.0.16"

[features]
default = ["zlib-ng-compat"]
zlib-ng-compat = ["git2/zlib-ng-compat"]

[package.metadata.deb]
depends = ""
extended-description = """\
Expand Down
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,15 @@ It provides the following commands:

`cargo install convco`

This build depends on `git2` with the `zlib-ng-compat` feature. It requires `cmake`.
## Building from source

Rust 1.60 or newer is required.

Building with `cargo` depends on `git2` and `cmake` due to linking with `zlib-ng`.
You can optionally disable this by changing the defaults for a build:
```console
$ cargo build --no-default-features
```

## Configuration

Expand Down

0 comments on commit 4b17cb6

Please sign in to comment.