From 8d78aa4aa1e0f778927c5728854955ee91a87db2 Mon Sep 17 00:00:00 2001 From: Bryan Helmkamp <19+brynary@users.noreply.github.com> Date: Thu, 19 Mar 2026 08:48:40 -0400 Subject: [PATCH] Remove OpenSSL runtime dependency from CLI binary (#94) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary - Disable git2 default features (`ssh`, `https`) which pulled in `openssl-sys` and `libssh2-sys` - These transports are unused — all git2 usage in the codebase is local repo operations (commits, blobs, revwalks) - The CLI binary no longer dynamically links against `libssl.3.dylib` / `libcrypto.3.dylib` Fixes #92 ## Verification - `otool -L target/debug/fabro | grep ssl` returns nothing (no OpenSSL linkage) - `cargo tree -i openssl-sys` returns nothing (fully removed from dep tree) - All 179 workspace tests pass ## Test plan - [ ] Build release binary and verify with `otool -L` (macOS) or `ldd` (Linux) that no OpenSSL refs remain - [ ] Run on a machine without OpenSSL v3 installed — should launch without `dyld` error 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.6 (1M context) --- Cargo.lock | 28 ++-------------------------- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 27 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 01ace6431..a804dc467 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2130,8 +2130,6 @@ dependencies = [ "libc", "libgit2-sys", "log", - "openssl-probe 0.1.6", - "openssl-sys", "url", ] @@ -2872,9 +2870,7 @@ checksum = "c9b3acc4b91781bb0b3386669d325163746af5f6e4f73e6d2d630e09a35f3487" dependencies = [ "cc", "libc", - "libssh2-sys", "libz-sys", - "openssl-sys", "pkg-config", ] @@ -2906,20 +2902,6 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "libssh2-sys" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "220e4f05ad4a218192533b300327f5150e809b54c4ec83b5a1d91833601811b9" -dependencies = [ - "cc", - "libc", - "libz-sys", - "openssl-sys", - "pkg-config", - "vcpkg", -] - [[package]] name = "libz-sys" version = "1.1.24" @@ -3153,7 +3135,7 @@ dependencies = [ "libc", "log", "openssl", - "openssl-probe 0.2.1", + "openssl-probe", "openssl-sys", "schannel", "security-framework", @@ -3582,12 +3564,6 @@ dependencies = [ "syn", ] -[[package]] -name = "openssl-probe" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" - [[package]] name = "openssl-probe" version = "0.2.1" @@ -4437,7 +4413,7 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "612460d5f7bea540c490b2b6395d8e34a953e52b491accd6c86c8164c5932a63" dependencies = [ - "openssl-probe 0.2.1", + "openssl-probe", "rustls-pki-types", "schannel", "security-framework", diff --git a/Cargo.toml b/Cargo.toml index 44f9120fe..c765bd22f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -33,7 +33,7 @@ tar = "0.4" cli-table = { version = "0.5", default-features = false } console = "0.15" dialoguer = "0.12" -git2 = "0.20" +git2 = { version = "0.20", default-features = false } tracing = "0.1" tracing-subscriber = { version = "0.3", features = ["fmt", "env-filter"] } tracing-appender = "0.2"