Skip to content

Commit 04654ee

Browse files
committed
Add TLS backend options to README.md, including instructions for switching to native-tls and available feature options
1 parent 7773ce3 commit 04654ee

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,28 @@ actually testing features on dbs/documents.
9090
If bash is available on your environment, you can also use the `test.sh` script which basically does the same thing
9191
described above.
9292

93+
## TLS Backend
94+
95+
By default, `couch_rs` uses `rustls` as the TLS backend for `reqwest`. This provides a pure Rust implementation that works across platforms without requiring system TLS libraries.
96+
97+
### Switching to native-tls
98+
99+
If you need to use the system's native TLS implementation instead (for example, to support system certificate stores or for compatibility with certain corporate proxy configurations), you can disable the default features and explicitly enable `native-tls`:
100+
101+
```toml
102+
[dependencies]
103+
couch_rs = { version = "0.12", default-features = false, features = ["derive", "native-tls"] }
104+
```
105+
106+
Available TLS feature options (choose one):
107+
- `rustls-tls` (default) - Uses rustls, a pure Rust TLS implementation
108+
- `native-tls` - Uses the platform's native TLS library (OpenSSL on Linux, Secure Transport on macOS, SChannel on Windows)
109+
- `native-tls-vendored` - Same as `native-tls`, but compiles and statically links OpenSSL
110+
- `native-tls-alpn` - Native TLS with ALPN support
111+
- `rustls-no-provider` - rustls without a default crypto provider (for advanced use cases)
112+
113+
Note: When using `default-features = false`, make sure to re-enable the `derive` feature if you want to use the `#[derive(CouchDocument)]` macro.
114+
93115
## License
94116

95117
Licensed under either of these:

0 commit comments

Comments
 (0)