From 4f36598a0d827da420aa18aa640564a8eda9a802 Mon Sep 17 00:00:00 2001 From: Ekaterina Mekhnetsova Date: Fri, 6 May 2022 09:08:30 +0300 Subject: [PATCH] [documentation] #2113: Document features in Cargo.toml files Signed-off-by: Ekaterina Mekhnetsova --- actor/Cargo.toml | 1 + cli/Cargo.toml | 9 +++++++++ core/Cargo.toml | 7 +++++++ core/test_network/Cargo.toml | 2 ++ futures/Cargo.toml | 1 + futures/derive/Cargo.toml | 1 + telemetry/Cargo.toml | 3 +++ tools/kagami/Cargo.toml | 4 ++++ tools/parity_scale_decoder/Cargo.toml | 2 ++ version/Cargo.toml | 5 ++++- 10 files changed, 34 insertions(+), 1 deletion(-) diff --git a/actor/Cargo.toml b/actor/Cargo.toml index c7b3e9b775d..925c4dbe802 100644 --- a/actor/Cargo.toml +++ b/actor/Cargo.toml @@ -8,6 +8,7 @@ edition = "2021" [features] default = [] +# Enable deadlock detection deadlock_detection = ["petgraph"] [dependencies] diff --git a/cli/Cargo.toml b/cli/Cargo.toml index a154be7cdb2..6a66bbe7146 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -14,11 +14,20 @@ categories = ["cryptography::cryptocurrencies"] [features] default = ["bridge", "telemetry", "schema-endpoint"] +# Support interoperability with popular blockchain networks (Substrate, Ether, etc.) bridge = ["iroha_core/bridge"] +# Support Decentralised Exchange, including functionality for atomic exchange instruction dex = ["iroha_core/dex"] +# Support lightweight telemetry, including diagnostics telemetry = ["iroha_telemetry", "iroha_core/telemetry"] +# Support developer-specific telemetry. +# Should not be enabled on production builds. dev-telemetry = ["iroha_core/dev-telemetry", "iroha_telemetry"] +# Support schema generation from the `schema` endpoint in the local binary. +# Useful for debugging issues with decoding in SDKs. schema-endpoint = ["iroha_schema_gen"] +# Support internal testing infrastructure for integration tests. +# Disable in production. test-network = [] [badges] diff --git a/core/Cargo.toml b/core/Cargo.toml index 4beaf8056b0..948051427d9 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -14,11 +14,18 @@ categories = ["cryptography::cryptocurrencies"] [features] default = ["bridge", "cli", "telemetry"] +# Interoperability with popular blockchain networks (Substrate, Ether, etc.) bridge = [] +# Support lightweight telemetry, including diagnostics telemetry = [] +# Support the included CLI cli = [] +# Support Decentralised Exchange, including functionality for atomic exchange instruction dex = [] +# Support developer-specific telemetry. +# Should not be enabled on production builds. dev-telemetry = ["telemetry", "iroha_telemetry/dev-telemetry"] +# Support Prometheus metrics. See https://prometheus.io/. expensive-telemetry = ["iroha_telemetry/metric-instrumentation"] [badges] diff --git a/core/test_network/Cargo.toml b/core/test_network/Cargo.toml index 47fafc8ea90..657fb389547 100644 --- a/core/test_network/Cargo.toml +++ b/core/test_network/Cargo.toml @@ -6,7 +6,9 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [features] +# Enable mock tests mock = [] +# Create a mock query for testing query = [] [dependencies] diff --git a/futures/Cargo.toml b/futures/Cargo.toml index 81bf79ab961..94f934ee2c9 100644 --- a/futures/Cargo.toml +++ b/futures/Cargo.toml @@ -8,6 +8,7 @@ edition = "2021" [features] default = [] +# Support lightweight telemetry, including diagnostics telemetry = ["iroha_futures_derive/telemetry"] [dependencies] diff --git a/futures/derive/Cargo.toml b/futures/derive/Cargo.toml index a36f65d5b76..fb119798e39 100644 --- a/futures/derive/Cargo.toml +++ b/futures/derive/Cargo.toml @@ -6,6 +6,7 @@ edition = "2021" [features] default = ["telemetry"] +# Support lightweight telemetry, including diagnostics telemetry = [] [lib] diff --git a/telemetry/Cargo.toml b/telemetry/Cargo.toml index 86bcf735378..3c31450727e 100644 --- a/telemetry/Cargo.toml +++ b/telemetry/Cargo.toml @@ -6,7 +6,10 @@ edition = "2021" build = "build.rs" [features] +# Support developer-specific telemetry. +# Should not be enabled on production builds. dev-telemetry = [] +# Export Prometheus metrics. See https://prometheus.io/. metric-instrumentation = [] [dependencies] diff --git a/tools/kagami/Cargo.toml b/tools/kagami/Cargo.toml index 618da8daaaf..20909b1943c 100644 --- a/tools/kagami/Cargo.toml +++ b/tools/kagami/Cargo.toml @@ -14,8 +14,12 @@ edition = "2021" # be fixed soon. [features] default = ["dex", "telemetry", "dev-telemetry"] +# Support Decentralised Exchange, including functionality for atomic exchange instruction dex = ["iroha_core/dex"] +# Support lightweight telemetry, including diagnostics telemetry = ["iroha_core/telemetry"] +# Support developer-specific telemetry. +# Should not be enabled on production builds. dev-telemetry = ["iroha_core/dev-telemetry"] diff --git a/tools/parity_scale_decoder/Cargo.toml b/tools/parity_scale_decoder/Cargo.toml index 7b8fb2265a3..c16ad12eb9e 100644 --- a/tools/parity_scale_decoder/Cargo.toml +++ b/tools/parity_scale_decoder/Cargo.toml @@ -7,6 +7,8 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [features] +# Disable colour for all program output. +# Useful for Docker-based deployment and terminals without colour support. no-color = ["colored/no-color"] [dependencies] diff --git a/version/Cargo.toml b/version/Cargo.toml index 8ce53d5e9b7..cb9eb14ecdf 100644 --- a/version/Cargo.toml +++ b/version/Cargo.toml @@ -9,10 +9,13 @@ edition = "2021" [features] default = ["std", "derive", "scale", "json"] # Enable static linkage of the rust standard library. -# Please refer to https://docs.rust-embedded.org/book/intro/no-std.html +# Please refer to https://docs.rust-embedded.org/book/intro/no-std.html. std = ["iroha_macro/std", "parity-scale-codec/std", "thiserror"] +# Enable macros for versioning derive = ["iroha_version_derive"] +# Support SCALE codec for encoding and decoding scale = ["parity-scale-codec/full"] +# Support JSON (de)serialisation json = ["serde", "serde_json"] [dependencies]