Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Update rustls docs, add crate feature docs #907

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions rumqttc/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Filter PUBACK in pending save requests to fix unexpected PUBACK sent to reconnected broker.
* Resume session only if broker sends `CONNACK` with `session_present == 1`.
* Remove v5 PubAck/PubRec/PubRel/PubComp/Sub/Unsub failures from `StateError` and log warnings on these failures.
* Update crate documentation with feature flags and updated rustls docs.

### Security

Expand Down
22 changes: 15 additions & 7 deletions rumqttc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,22 @@
//! - Blocking inside the `connection.iter()`/`eventloop.poll()` loop will block
//! connection progress.
//!
//! ## FAQ
//! **Connecting to a broker using raw ip doesn't work**
//! ## Feature Flags
//!
//! You cannot create a TLS connection to a bare IP address with a self-signed
//! certificate. This is a [limitation of rustls](https://github.com/ctz/rustls/issues/184).
//! One workaround, which only works under *nix/BSD-like systems, is to add an
//! entry to wherever your DNS resolver looks (e.g. `/etc/hosts`) for the bare IP
//! address and use that name in your code.
//! This crate offers a few feature flags to configure additional functionality.
//!
//! * `proxy`: Enables support for connecting via a HTTP Connect proxy using the
//! [`async-http-proxy`] crate.
//! * `websocket`: Enables support for MQTT via WebSocket.
//!
//! To enable TLS support, one of these two options may be used:
//!
//! * `use-native-tls`: Enables TLS support using the [`native_tls`] library.
//! * `use-rustls`: Enables TLS support using the [`rustls`] TLS library.
//!
//! [`async-http-proxy`]: https://docs.rs/async-http-proxy/
//! [`native_tls`]: https://docs.rs/native-tls/
//! [`rustls`]: https://docs.rs/rustls/
#![cfg_attr(docsrs, feature(doc_cfg))]

#[macro_use]
Expand Down