Skip to content

Commit 39e5a58

Browse files
authored
Merge pull request #2358 from input-output-hk/dlachaume/add-features-documentation-in-client-lib
Docs: add features documentation for `mithril-client` library
2 parents a15435c + bedea5f commit 39e5a58

File tree

3 files changed

+30
-6
lines changed

3 files changed

+30
-6
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mithril-client/Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mithril-client"
3-
version = "0.11.12"
3+
version = "0.11.13"
44
description = "Mithril client library"
55
authors = { workspace = true }
66
edition = { workspace = true }
@@ -93,7 +93,7 @@ default = ["native-tls", "rug-backend", "enable-http-compression"]
9393
# Full feature set
9494
full = ["fs"]
9595

96-
# Enable file system releated functionnality, right now that mean ony snapshot download
96+
# Enable file system related functionality, right now that mean only snapshot download
9797
fs = ["flate2", "flume", "tar", "tokio/rt", "zstd"]
9898
portable = [] # deprecated, will be removed soon
9999
unstable = []
@@ -109,12 +109,12 @@ rustls-tls-manual-roots = ["reqwest/rustls-tls-manual-roots"]
109109
rustls-tls-webpki-roots = ["reqwest/rustls-tls-webpki-roots"]
110110
rustls-tls-native-roots = ["reqwest/rustls-tls-native-roots"]
111111

112-
# Support compressed traffic with `request`
112+
# Support compressed traffic with `reqwest`
113113
enable-http-compression = ["reqwest/gzip", "reqwest/zstd", "reqwest/deflate", "reqwest/brotli"]
114114

115-
# Enables `rug-backend` features for `mithril-common` dependency
115+
# Enables usage of `rug` numerical backend in `mithril-stm` (dependency of `mithril-common`).
116116
rug-backend = ["mithril-common/rug-backend"]
117-
# Enables `num-integer-backend` features for `mithril-common` dependency
117+
# Enables usage of `num-integer` numerical backend in `mithril-stm` (dependency of `mithril-common`)
118118
# by default it's `rug-backend`
119119
num-integer-backend = ["mithril-common/num-integer-backend"]
120120

mithril-client/src/lib.rs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,30 @@
6262
//! # Ok(())
6363
//! # }
6464
//! ```
65+
//!
66+
//! ## Optional Features
67+
//!
68+
//! The following are a list of [Cargo features](https://doc.rust-lang.org/stable/cargo/reference/manifest.html#the-features-section) that can be
69+
//! enabled or disabled:
70+
//!
71+
//! - **fs**: Enables file system related functionalities.
72+
//! - **unstable**: Enables experimental or in-development `mithril-client` features that may change.
73+
//! - **rug-backend** *(enabled by default)*: Enables usage of `rug` numerical backend in `mithril-stm` (dependency of `mithril-common`).
74+
//! - **num-integer-backend**: Enables usage of `num-integer` numerical backend in `mithril-stm` (dependency of `mithril-common`).
75+
//!
76+
//! To allow fine tuning of the http queries, the following [Reqwest](https://docs.rs/reqwest/latest/reqwest/#optional-features) features are re-exported:
77+
//! - **native-tls** *(enabled by default)*: Enables TLS functionality provided by `native-tls`.
78+
//! - **native-tls-vendored**: Enables the `vendored` feature of `native-tls`.
79+
//! - **native-tls-alpn**: Enables the `alpn` feature of `native-tls`.
80+
//! - **rustls-tls**: Enables TLS functionality provided by `rustls`.
81+
//! Equivalent to `rustls-tls-webpki-roots`.
82+
//! - **rustls-tls-manual-roots**: Enables TLS functionality provided by `rustls`,
83+
//! without setting any root certificates. Roots have to be specified manually.
84+
//! - **rustls-tls-webpki-roots**: Enables TLS functionality provided by `rustls`,
85+
//! while using root certificates from the `webpki-roots` crate.
86+
//! - **rustls-tls-native-roots**: Enables TLS functionality provided by `rustls`,
87+
//! while using root certificates from the `rustls-native-certs` crate.
88+
//! - **enable-http-compression** *(enabled by default)*: Enables compressed traffic with `reqwest`.
6589
6690
macro_rules! cfg_fs {
6791
($($item:item)*) => {

0 commit comments

Comments
 (0)