Skip to content

Commit f9dc628

Browse files
committed
Add rustls feature
This allows library to be used without adding native-tls to dependencies with: ``` openai-api-rs = { version = "^5.0", default-features = false, features = ["rustls"] } ``` Default usage without features is unaffected.
1 parent 597d787 commit f9dc628

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Cargo.toml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,15 @@ repository = "https://github.com/dongri/openai-api-rs"
99

1010
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1111

12+
[features]
13+
default = ["default-tls"]
14+
rustls = ["reqwest/rustls-tls"]
15+
default-tls = ["reqwest/default-tls"]
16+
1217
[dependencies.reqwest]
1318
version = "0.12"
14-
features = ["json", "multipart", "socks"]
19+
default-features = false
20+
features = ["charset", "http2", "json", "multipart", "socks"]
1521

1622
[dependencies.tokio]
1723
version = "1"

0 commit comments

Comments
 (0)