Skip to content

Commit e0c4076

Browse files
Add native-tls feature for musl build compatibility
- Add `native-tls` feature (enabled by default) for backwards compatibility - Disable reqwest/rabbitmq_http_client default features, enable explicitly - Update musl build script to use --no-default-features (rustls-only) - This avoids OpenSSL dependency on musl targets
1 parent 810b620 commit e0c4076

File tree

3 files changed

+27
-4
lines changed

3 files changed

+27
-4
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,31 @@ repository = "https://github.com/rabbitmq/rabbitmqadmin-ng"
66
description = "rabbitmqadmin v2 is a modern CLI tool for the RabbitMQ HTTP API"
77
license = "MIT OR Apache-2.0"
88

9+
[features]
10+
default = ["native-tls"]
11+
# native-tls: Uses platform-native TLS (SecureTransport/SChannel/OpenSSL) alongside rustls.
12+
# Disable this feature for musl builds to avoid OpenSSL dependency.
13+
native-tls = ["reqwest/default-tls", "rabbitmq_http_client/default-tls"]
14+
915
[dependencies]
1016
clap = { version = "4", features = ["help", "color", "cargo", "env"] }
1117
url = "2"
1218
sysexits = "0.10"
13-
reqwest = { version = "0.12", features = [
19+
# reqwest: disable defaults to control TLS features explicitly.
20+
# Base features always included; native-tls added via the native-tls feature above.
21+
reqwest = { version = "0.12", default-features = false, features = [
1422
"blocking",
1523
"json",
1624
"multipart",
17-
"__rustls",
25+
"http2",
26+
"charset",
27+
"macos-system-configuration",
1828
"rustls-tls-native-roots",
1929
] }
20-
rabbitmq_http_client = { version = "0.71.0", features = [
30+
rabbitmq_http_client = { version = "0.71.0", default-features = false, features = [
2131
"blocking",
2232
"tabled",
33+
"rustls-tls",
2334
] }
2435
serde = { version = "1.0", features = ["derive", "std"] }
2536
serde_json = "1"

scripts/release-linux.nu

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,5 +93,6 @@ def 'build-with-cargo' [] {
9393

9494
def 'build-static-with-cargo' [] {
9595
$env.RUSTFLAGS = '-C target-feature=+crt-static'
96-
cargo rustc --bin $binary --target $target --release
96+
# Disable native-tls feature for musl builds (no OpenSSL dependency)
97+
cargo rustc --bin $binary --target $target --release --no-default-features
9798
}

0 commit comments

Comments
 (0)