Skip to content

Commit 565e65c

Browse files
Cargo.toml: Vendor openssl dependency
To handle HTTP requests, `patch-hub` uses the `reqwest` crate, which depends on the `openssl` crate. There are two issues related to this dependency: 1. When running a pre-compiled release of `patch-hub`, the `openssl` lib fails to dynamically link, which resulting in the app crashing at start up (issue #19). 2. When trying to build the `x86_64-unknown-linux-musl` trough the CI pipeline defined in `release.yml`, we encounter errors similar to the previous point (part of issue #18). To fix both of these problems, vendor the `openssl` dependency by explicitly declaring it as a dependency and enabling the `vendored` feature. This is actually a fairly common practice in the Rust community when dealing with this dependency (so much it has a plug-n-play flag for it). The obvious drawback, is that we are absorving this crate into our codebase, which results in longer compile times (in my setup, approximately doubled the time), and bloats our executables. Closes: #19 Signed-off-by: David Tadokoro <davidbtadokoro@usp.br>
1 parent b6dc402 commit 565e65c

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

Cargo.lock

Lines changed: 15 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ reqwest = { version = "0.12.5", features = ["blocking"] }
1212
serde = { version = "1.0.203", features = ["derive"] }
1313
serde-xml-rs = "0.6.0"
1414
serde_json = "1.0.120"
15+
openssl = { version = "0.10.66", features = ["vendored"] }
1516

1617
# The profile that 'cargo dist' will build with
1718
[profile.dist]

0 commit comments

Comments
 (0)