Skip to content

Commit dd9e8b6

Browse files
committed
Address review feedback: restore vendor-openssl for cross-compilation
- Remove TLS comment from asyncgit/Cargo.toml (context is in README) - Restore commented git2 lines that were unrelated to OpenSSL changes - Restore vendor-openssl feature for cross-compilation targets - Update Makefile to use vendor-openssl for musl, ARM, and Apple x86 builds The vendor-openssl feature is no longer in defaults, allowing native TLS on standard builds while still supporting vendored OpenSSL for cross-compilation where system libraries aren't available.
1 parent 7423333 commit dd9e8b6

File tree

3 files changed

+17
-15
lines changed

3 files changed

+17
-15
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ regex-fancy = ["syntect/regex-fancy", "two-face/syntect-fancy"]
3131
regex-onig = ["syntect/regex-onig", "two-face/syntect-onig"]
3232
timing = ["scopetime/enabled"]
3333
trace-libgit = ["asyncgit/trace-libgit"]
34+
vendor-openssl = ["asyncgit/vendor-openssl"]
3435

3536
[dependencies]
3637
anyhow = "1.0"

Makefile

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -47,19 +47,19 @@ release-linux-musl: build-linux-musl-release
4747
tar -C ./target/x86_64-unknown-linux-musl/release/ -czvf ./release/gitui-linux-x86_64.tar.gz ./gitui
4848

4949
build-apple-x86-debug:
50-
cargo build --target=x86_64-apple-darwin
50+
cargo build --features vendor-openssl --target=x86_64-apple-darwin
5151

5252
build-apple-x86-release:
53-
cargo build --release --target=x86_64-apple-darwin --locked
53+
cargo build --features vendor-openssl --release --target=x86_64-apple-darwin --locked
5454

5555
build-linux-musl-debug:
56-
cargo build --target=x86_64-unknown-linux-musl
56+
cargo build --features vendor-openssl --target=x86_64-unknown-linux-musl
5757

5858
build-linux-musl-release:
59-
cargo build --release --target=x86_64-unknown-linux-musl --locked
59+
cargo build --features vendor-openssl --release --target=x86_64-unknown-linux-musl --locked
6060

6161
test-linux-musl:
62-
cargo nextest run --workspace --target=x86_64-unknown-linux-musl
62+
cargo nextest run --features vendor-openssl --workspace --target=x86_64-unknown-linux-musl
6363

6464
release-linux-arm: build-linux-arm-release
6565
mkdir -p release
@@ -73,14 +73,14 @@ release-linux-arm: build-linux-arm-release
7373
tar -C ./target/arm-unknown-linux-gnueabihf/release/ -czvf ./release/gitui-linux-arm.tar.gz ./gitui
7474

7575
build-linux-arm-debug:
76-
cargo build --target=aarch64-unknown-linux-gnu
77-
cargo build --target=armv7-unknown-linux-gnueabihf
78-
cargo build --target=arm-unknown-linux-gnueabihf
76+
cargo build --features vendor-openssl --target=aarch64-unknown-linux-gnu
77+
cargo build --features vendor-openssl --target=armv7-unknown-linux-gnueabihf
78+
cargo build --features vendor-openssl --target=arm-unknown-linux-gnueabihf
7979

8080
build-linux-arm-release:
81-
cargo build --release --target=aarch64-unknown-linux-gnu --locked
82-
cargo build --release --target=armv7-unknown-linux-gnueabihf --locked
83-
cargo build --release --target=arm-unknown-linux-gnueabihf --locked
81+
cargo build --features vendor-openssl --release --target=aarch64-unknown-linux-gnu --locked
82+
cargo build --features vendor-openssl --release --target=armv7-unknown-linux-gnueabihf --locked
83+
cargo build --features vendor-openssl --release --target=arm-unknown-linux-gnueabihf --locked
8484

8585
test:
8686
cargo nextest run --workspace

asyncgit/Cargo.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,14 @@ keywords = ["git"]
1414
[features]
1515
default = ["trace-libgit"]
1616
trace-libgit = []
17+
vendor-openssl = ["openssl-sys"]
1718

1819
[dependencies]
1920
bitflags = "2"
2021
crossbeam-channel = "0.5"
2122
dirs = "6.0"
2223
easy-cast = "0.5"
2324
fuzzy-matcher = "0.3"
24-
# TLS is provided by platform-native libraries:
25-
# - Windows: WinHTTP/Schannel (built-in)
26-
# - macOS: SecureTransport (built-in)
27-
# - Linux: System OpenSSL (install via package manager)
2825
git2 = "0.20"
2926
git2-hooks = { path = "../git2-hooks", version = ">=0.6" }
3027
gix = { version = "0.77.0", default-features = false, features = [
@@ -34,6 +31,10 @@ gix = { version = "0.77.0", default-features = false, features = [
3431
"status",
3532
] }
3633
log = "0.4"
34+
# git2 = { path = "../../extern/git2-rs", features = ["vendored-openssl"]}
35+
# git2 = { git="https://github.com/extrawurst/git2-rs.git", rev="fc13dcc", features = ["vendored-openssl"]}
36+
# pinning to vendored openssl, using the git2 feature this gets lost with new resolver
37+
openssl-sys = { version = '0.9', features = ["vendored"], optional = true }
3738
rayon = "1.11"
3839
rayon-core = "1.13"
3940
scopetime = { path = "../scopetime", version = "0.1" }

0 commit comments

Comments
 (0)