From eba94ddcb7b45c0f53f422939111ecc7cdc2ce13 Mon Sep 17 00:00:00 2001 From: Benjamin Klum Date: Fri, 20 Dec 2024 19:20:35 +0100 Subject: [PATCH] #1304 Avoid libssl dependency on Linux (due to Sentry's reqwest dependency) --- Cargo.lock | 262 +++++++++++++++++------------------------------- Cargo.toml | 2 +- main/Cargo.toml | 5 +- 3 files changed, 98 insertions(+), 171 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index dcaa7288e..56d800815 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -763,7 +763,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "rustc-hash", + "rustc-hash 1.1.0", "shlex", "syn 2.0.58", "which 4.4.2", @@ -1060,6 +1060,12 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + [[package]] name = "chacha20" version = "0.9.1" @@ -2137,15 +2143,6 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" -[[package]] -name = "encoding_rs" -version = "0.8.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" -dependencies = [ - "cfg-if", -] - [[package]] name = "enigo" version = "0.0.14" @@ -3444,6 +3441,7 @@ dependencies = [ "tokio", "tokio-rustls", "tower-service", + "webpki-roots", ] [[package]] @@ -3459,22 +3457,6 @@ dependencies = [ "tower-service", ] -[[package]] -name = "hyper-tls" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" -dependencies = [ - "bytes", - "http-body-util", - "hyper", - "hyper-util", - "native-tls", - "tokio", - "tokio-native-tls", - "tower-service", -] - [[package]] name = "hyper-util" version = "0.1.10" @@ -4387,7 +4369,7 @@ dependencies = [ "mlua-sys", "num-traits", "once_cell", - "rustc-hash", + "rustc-hash 1.1.0", "serde", "serde-value", ] @@ -4429,23 +4411,6 @@ dependencies = [ "rand", ] -[[package]] -name = "native-tls" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" -dependencies = [ - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", -] - [[package]] name = "ndk" version = "0.6.0" @@ -4854,9 +4819,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.18.0" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "opaque-debug" @@ -4888,50 +4853,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "openssl" -version = "0.10.68" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" -dependencies = [ - "bitflags 2.4.1", - "cfg-if", - "foreign-types 0.3.2", - "libc", - "once_cell", - "openssl-macros", - "openssl-sys", -] - -[[package]] -name = "openssl-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.58", -] - -[[package]] -name = "openssl-probe" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" - -[[package]] -name = "openssl-sys" -version = "0.9.104" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" -dependencies = [ - "cc 1.1.10", - "libc", - "pkg-config", - "vcpkg", -] - [[package]] name = "option-ext" version = "0.2.0" @@ -5539,6 +5460,55 @@ dependencies = [ "memchr", ] +[[package]] +name = "quinn" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2d2fb862b7ba45e615c1429def928f2e15f815bdf933b27a2d3824e224c1f46" +dependencies = [ + "bytes", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash 2.1.0", + "rustls", + "socket2 0.5.5", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "quinn-proto" +version = "0.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba92fb39ec7ad06ca2582c0ca834dfeadcaf06ddfc8e635c80aa7e1c05315fdd" +dependencies = [ + "bytes", + "rand", + "ring", + "rustc-hash 2.1.0", + "rustls", + "slab", + "thiserror", + "tinyvec", + "tracing", +] + +[[package]] +name = "quinn-udp" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c40286217b4ba3a71d644d752e6a0b71f13f1b6a2c5311acfcbe0c2418ed904" +dependencies = [ + "cfg_aliases", + "libc", + "once_cell", + "socket2 0.5.5", + "tracing", + "windows-sys 0.52.0", +] + [[package]] name = "quote" version = "1.0.35" @@ -5730,7 +5700,7 @@ dependencies = [ [[package]] name = "reaper-common-types" version = "0.1.0" -source = "git+https://github.com/helgoboss/reaper-rs.git?branch=master#9368c542f302d9ff194e4d0365dced9b435c149e" +source = "git+https://github.com/helgoboss/reaper-rs.git?branch=master#5018b7b0325efa287d307d495ccc6180070d95a8" dependencies = [ "hex-literal", "nutype", @@ -5741,7 +5711,7 @@ dependencies = [ [[package]] name = "reaper-fluent" version = "0.1.0" -source = "git+https://github.com/helgoboss/reaper-rs.git?branch=master#9368c542f302d9ff194e4d0365dced9b435c149e" +source = "git+https://github.com/helgoboss/reaper-rs.git?branch=master#5018b7b0325efa287d307d495ccc6180070d95a8" dependencies = [ "fragile", "reaper-low", @@ -5752,7 +5722,7 @@ dependencies = [ [[package]] name = "reaper-high" version = "0.1.0" -source = "git+https://github.com/helgoboss/reaper-rs.git?branch=master#9368c542f302d9ff194e4d0365dced9b435c149e" +source = "git+https://github.com/helgoboss/reaper-rs.git?branch=master#5018b7b0325efa287d307d495ccc6180070d95a8" dependencies = [ "backtrace", "base64 0.13.0", @@ -5783,7 +5753,7 @@ dependencies = [ [[package]] name = "reaper-low" version = "0.1.0" -source = "git+https://github.com/helgoboss/reaper-rs.git?branch=master#9368c542f302d9ff194e4d0365dced9b435c149e" +source = "git+https://github.com/helgoboss/reaper-rs.git?branch=master#5018b7b0325efa287d307d495ccc6180070d95a8" dependencies = [ "c_str_macro", "cc 1.1.10", @@ -5797,7 +5767,7 @@ dependencies = [ [[package]] name = "reaper-macros" version = "0.1.0" -source = "git+https://github.com/helgoboss/reaper-rs.git?branch=master#9368c542f302d9ff194e4d0365dced9b435c149e" +source = "git+https://github.com/helgoboss/reaper-rs.git?branch=master#5018b7b0325efa287d307d495ccc6180070d95a8" dependencies = [ "darling 0.10.2", "quote", @@ -5807,7 +5777,7 @@ dependencies = [ [[package]] name = "reaper-medium" version = "0.1.0" -source = "git+https://github.com/helgoboss/reaper-rs.git?branch=master#9368c542f302d9ff194e4d0365dced9b435c149e" +source = "git+https://github.com/helgoboss/reaper-rs.git?branch=master#5018b7b0325efa287d307d495ccc6180070d95a8" dependencies = [ "c_str_macro", "camino", @@ -5828,7 +5798,7 @@ dependencies = [ [[package]] name = "reaper-rx" version = "0.1.0" -source = "git+https://github.com/helgoboss/reaper-rs.git?branch=master#9368c542f302d9ff194e4d0365dced9b435c149e" +source = "git+https://github.com/helgoboss/reaper-rs.git?branch=master#5018b7b0325efa287d307d495ccc6180070d95a8" dependencies = [ "crossbeam-channel", "helgoboss-midi", @@ -5962,39 +5932,38 @@ checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f" dependencies = [ "base64 0.22.1", "bytes", - "encoding_rs", "futures-channel", "futures-core", "futures-util", - "h2", "http", "http-body", "http-body-util", "hyper", "hyper-rustls", - "hyper-tls", "hyper-util", "ipnet", "js-sys", "log", "mime", - "native-tls", "once_cell", "percent-encoding", "pin-project-lite", + "quinn", + "rustls", "rustls-pemfile", + "rustls-pki-types", "serde", "serde_json", "serde_urlencoded", "sync_wrapper", - "system-configuration", "tokio", - "tokio-native-tls", + "tokio-rustls", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", + "webpki-roots", "windows-registry", ] @@ -6126,7 +6095,7 @@ checksum = "6c20b6793b5c2fa6553b250154b78d6d0db37e72700ae35fad9387a46f487c97" [[package]] name = "rppxml-parser" version = "0.1.0" -source = "git+https://github.com/helgoboss/reaper-rs.git?branch=master#9368c542f302d9ff194e4d0365dced9b435c149e" +source = "git+https://github.com/helgoboss/reaper-rs.git?branch=master#5018b7b0325efa287d307d495ccc6180070d95a8" dependencies = [ "splitty", ] @@ -6239,6 +6208,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +[[package]] +name = "rustc-hash" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7fb8039b3032c191086b10f11f319a6e99e1e82889c5cc6046f515c9db1d497" + [[package]] name = "rustc_version" version = "0.3.3" @@ -6290,6 +6265,7 @@ version = "0.23.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5065c3f250cbd332cd894be57c40fa52387247659b14a2d6041d121547903b1b" dependencies = [ + "log", "once_cell", "ring", "rustls-pki-types", @@ -6399,15 +6375,6 @@ dependencies = [ "regex", ] -[[package]] -name = "schannel" -version = "0.1.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" -dependencies = [ - "windows-sys 0.59.0", -] - [[package]] name = "scoped-tls" version = "1.0.0" @@ -6420,19 +6387,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" -[[package]] -name = "security-framework" -version = "2.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525bc1abfda2e1998d152c45cf13e696f76d0a4972310b22fac1658b05df7c87" -dependencies = [ - "bitflags 1.3.2", - "core-foundation 0.9.1", - "core-foundation-sys 0.8.7", - "libc", - "security-framework-sys", -] - [[package]] name = "security-framework-sys" version = "2.9.1" @@ -6477,8 +6431,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "016958f51b96861dead7c1e02290f138411d05e94fad175c8636a835dee6e51e" dependencies = [ "httpdate", - "native-tls", "reqwest", + "rustls", "sentry-backtrace", "sentry-contexts", "sentry-core", @@ -6487,6 +6441,7 @@ dependencies = [ "sentry-tracing", "tokio", "ureq", + "webpki-roots", ] [[package]] @@ -7232,27 +7187,6 @@ dependencies = [ "windows 0.57.0", ] -[[package]] -name = "system-configuration" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" -dependencies = [ - "bitflags 2.4.1", - "core-foundation 0.9.1", - "system-configuration-sys", -] - -[[package]] -name = "system-configuration-sys" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" -dependencies = [ - "core-foundation-sys 0.8.7", - "libc", -] - [[package]] name = "system-deps" version = "6.0.2" @@ -7477,16 +7411,6 @@ dependencies = [ "syn 2.0.58", ] -[[package]] -name = "tokio-native-tls" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" -dependencies = [ - "native-tls", - "tokio", -] - [[package]] name = "tokio-rustls" version = "0.26.1" @@ -7962,9 +7886,11 @@ checksum = "02d1a66277ed75f640d608235660df48c8e3c19f3b4edb6a263315626cc3c01d" dependencies = [ "base64 0.22.1", "log", - "native-tls", "once_cell", + "rustls", + "rustls-pki-types", "url", + "webpki-roots", ] [[package]] @@ -8379,6 +8305,15 @@ dependencies = [ "web-sys", ] +[[package]] +name = "webpki-roots" +version = "0.26.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d642ff16b7e79272ae451b7322067cdc17cadf68c23264be9d94a32319efe7e" +dependencies = [ + "rustls-pki-types", +] + [[package]] name = "weezl" version = "0.1.8" @@ -8674,15 +8609,6 @@ dependencies = [ "windows-targets 0.52.6", ] -[[package]] -name = "windows-sys" -version = "0.59.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" -dependencies = [ - "windows-targets 0.52.6", -] - [[package]] name = "windows-targets" version = "0.42.2" diff --git a/Cargo.toml b/Cargo.toml index 7578915cd..7bbff4ac1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -191,7 +191,7 @@ pulldown-cmark = "0.9.2" rfd = "0.12.1" opener = "0.7.1" objc2 = "0.3.0-beta.3" -reqwest = "0.12.9" +reqwest = { version = "0.12.9", default-features = false } rustls = { version = "0.23.20", default-features = false } [profile.release] diff --git a/main/Cargo.toml b/main/Cargo.toml index d5b819df4..8d8e4f5ca 100644 --- a/main/Cargo.toml +++ b/main/Cargo.toml @@ -209,8 +209,9 @@ cached.workspace = true imageproc.workspace = true # For relativizing paths for Stream Deck button images pathdiff.workspace = true -# For fetching Helgobox remote config -reqwest.workspace = true +# For fetching Helgobox remote config. +# Important to not use default features because we want to avoid the libssl dependency on Linux. +reqwest = { workspace = true, default-features = false, features = ["rustls-tls-no-provider"] } [target.'cfg(any(target_os = "windows", target_os = "macos"))'.dependencies] # For speech source