Skip to content

[REQ] [Rust] Add support for native-tls and rustls-tls Cargo features for the reqwest library #21924

@JMLX42

Description

@JMLX42

Is your feature request related to a problem? Please describe.

The Rust client SDK generator has 3 Cargo feature related problems:

  1. The Cargo feature to chose between native-tls and rustls-tls is not made available for the reqwest library (only the reqwest-trait library). As a result, a transitive dependency to openssl-sys is pulled. Which is not suitable for some targets.
  2. The feature naming is inconsistent with the rest of the ecosystem: the rustls feature should be called rustls-tls.

Describe the solution you'd like

reqwest = { version = "^0.12", default-features = false, features = ["json", "multipart"] }

[features]
default = ["native-tls"]
native-tls = ["reqwest/native-tls"]
rustls = ["reqwest/rustls-tls"]

Describe alternatives you've considered

Overriding Cargo.mustache works. But I'm sure I'm not the only one with this problem.

Additional context

I will open a PR.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions