Rust SDK hard-codes native-tls (OpenSSL); offer a rustls TLS backend so musl/static builds work
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 52/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- rust
调研方向
首先检查 rust/Cargo.toml,并为 x86_64-unknown-linux-musl 运行所述的 cargo build。跟踪 reqwest 和 tokio-tungstenite 的 TLS features,然后确认所选的默认或 feature-gated backend 可以在不要求系统 OpenSSL 的情况下构建,同时保留所请求的客户端功能。
由索引模型根据 Issue 内容生成。
描述
Summary
The Rust crate (rust/Cargo.toml) hard-codes the OpenSSL-backed native-tls stack for its HTTP and WebSocket clients, with no way to opt into rustls:
reqwest = { version = "0.12", default-features = false, features = ["stream", "http2", "default-tls"] }
tokio-tungstenite = { version = "0.24", default-features = false, features = ["connect", "native-tls"] }
default-tls (reqwest) and native-tls (tokio-tungstenite) both pull in openssl-sys, which links the system OpenSSL on Linux. These deps were introduced with the HTTP request callback support in #1689.
Impact
- musl / fully-static targets fail to build. Cross-compiling to
*-unknown-linux-muslfails in theopenssl-sysbuild script withCould not find openssl via pkg-config/Could not find directory of OpenSSL installation, because there is no OpenSSL sysroot for the musl target. Consumers that ship static binaries (Alpine, distroless, hardened CI) cannot build the Rust SDK without vendoring OpenSSL. - glibc binaries gain a dynamic libssl runtime dependency. Even where the build succeeds, the resulting binary now dynamically links
libssl.so.3/libcrypto.so.3, narrowing portability for consumers that previously shipped self-contained rustls binaries.
Request
Make the TLS backend rustls-based, or feature-gate it so consumers can choose. Two shapes:
- Default to rustls — reqwest
rustls-tls(orrustls-tls-native-roots) and tokio-tungsteniterustls-tls-native-roots. Thering/aws-lc-rsbackends cross-compile to musl with no system OpenSSL, keeping the SDK OpenSSL-free out of the box. - Expose cargo features (e.g.
native-tlsvsrustls-tls) so downstreams pick a backend, while keeping native-tls available for those who want it.
Option 1 keeps the SDK cross-compilable by default; option 2 preserves choice. Happy to open a PR once you confirm the preferred shape.
Repro
With musl-tools installed:
cargo build -p <rust-sdk-crate> --target x86_64-unknown-linux-musl
fails in the openssl-sys build script.
- 主要语言
- Java
- 星标
- 10.5k
- 派生
- 1.5k
- 平均合并
- 1 天 9 小时
- 30 天内合并 PR
- 130
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
github/copilot-sdk 的其他 Issue
-
agentic-workflows
难度 2/5 1-3 小时 新手友好度 65/100
github/copilot-sdk#2760 ·
-
难度 2/5 1-3 小时 新手友好度 65/100
github/copilot-sdk#2759 ·
-
documentation
难度 1/5 1 小时以内 新手友好度 85/100
github/copilot-sdk#2758 ·
-
agentic-workflows
难度 2/5 1-3 小时 新手友好度 68/100
github/copilot-sdk#2709 · 1 条评论 ·
-
难度 1/5 1 小时以内 新手友好度 78/100
github/copilot-sdk#2673 ·
查看 github/copilot-sdk 的全部 Issue
相似的 Issue
-
area/plugin
难度 2/5 1-3 小时 新手友好度 75/100
kestra-io/plugin-kestra#190 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
google-ai-edge/LiteRT-LM#3739 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
integra-team-red/meet-map#249 ·
-
[Studio][Bug] Cancelled create-user dialog keeps the password and admin switch for the next attempt 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
apache/rocketmq-dashboard#5064 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
wso2/dpdp-accelerator#287 ·