Add "full" and "experimental" features to arti-client and below.

The "full" feature is a catch-all for all features, _except_:

   * Those that select a particular implementation (like
     tor-llcrypto/with-openssl) or build flag (like "static")
   * Those that are experimental or unstable (like "experimental-api")
   * Those that are testing-only.
This commit is contained in:
Nick Mathewson 2022-06-10 15:26:51 -04:00
parent e7681ca135
commit 8a586a40fa
10 changed files with 32 additions and 4 deletions

2
Cargo.lock generated
View File

@ -158,7 +158,9 @@ dependencies = [
"tokio",
"tokio-util",
"tor-basic-utils",
"tor-cell",
"tor-chanmgr",
"tor-checkable",
"tor-circmgr",
"tor-config",
"tor-dirmgr",

View File

@ -13,22 +13,30 @@ repository = "https://gitlab.torproject.org/tpo/core/arti.git/"
[features]
default = ["tokio", "native-tls"]
# "full" is a top-level selector that turns on every feature, _EXCEPT FOR_:
# * Features that are experimental or unstable
# * Features that are testing-only
# * Features which are select a particular implementation or build flag and
# which therefore are not strictly additive.
full = ["tokio", "async-std", "native-tls", "rustls", "tor-rtcompat/full", "tor-proto/full", "tor-netdoc/full", "tor-dirmgr/full"]
async-std = ["tor-rtcompat/async-std"]
tokio = ["tor-rtcompat/tokio", "tor-proto/tokio"]
native-tls = ["tor-rtcompat/native-tls"]
rustls = ["tor-rtcompat/rustls"]
static = ["static-sqlite", "static-native-tls"]
static-sqlite = ["tor-dirmgr/static"]
static-native-tls = ["tor-rtcompat/static", "native-tls"]
dirfilter = ["tor-dirmgr/dirfilter"]
error_detail = []
# Enable experimental APIs that are not yet officially supported.
#
# These APIs are not covered by semantic versioning. Using this
# feature voids your "semver warrantee".
experimental = ["dirfilter", "experimental-api", "error_detail", "tor-proto/experimental", "tor-cell/experimental", "tor-checkable/experimental", "tor-netdoc/experimental", "tor-dirmgr/experimental", "tor-circmgr/experimental"]
experimental-api = []
dirfilter = ["tor-dirmgr/dirfilter"]
error_detail = []
[dependencies]
derive_builder = { version = "0.11.2", package = "derive_builder_fork_arti" }
@ -44,7 +52,9 @@ safelog = { path = "../safelog", version = "0.1.0" }
serde = { version = "1.0.103", features = ["derive"] }
thiserror = "1"
tor-basic-utils = { path = "../tor-basic-utils", version = "0.3.1" }
tor-cell = { path = "../tor-cell", version = "0.3.1" }
tor-chanmgr = { path = "../tor-chanmgr", version = "0.3.1" }
tor-checkable = { path = "../tor-checkable", version = "0.3.0" }
tor-circmgr = { path = "../tor-circmgr", version = "0.3.1" }
tor-config = { path = "../tor-config", version = "0.4.0" }
tor-dirmgr = { path = "../tor-dirmgr", version = "0.4.0" }

View File

@ -13,6 +13,7 @@ repository = "https://gitlab.torproject.org/tpo/core/arti.git/"
[features]
default = []
experimental = ["experimental-udp"]
# Enable experimental UDP support.
experimental-udp = []
# Enable testing only API

View File

@ -12,6 +12,7 @@ categories = ["cryptography", "rust-patterns"]
repository = "https://gitlab.torproject.org/tpo/core/arti.git/"
[features]
experimental = ["experimental-api"]
experimental-api = []
[dependencies]

View File

@ -12,10 +12,12 @@ categories = ["network-programming", "cryptography"]
repository = "https://gitlab.torproject.org/tpo/core/arti.git/"
[features]
# Enable experimental APIs that are not yet officially supported.
#
# These APIs are not covered by semantic versioning. Using this
# feature voids your "semver warrantee".
experimental = ["experimental-api"]
experimental-api = []
[dependencies]

View File

@ -13,6 +13,9 @@ repository = "https://gitlab.torproject.org/tpo/core/arti.git/"
[features]
default = ["mmap"]
full = ["routerdesc"]
experimental = ["experimental-api", "dirfilter"]
mmap = ["memmap2"]
static = ["rusqlite/bundled"]
# (Incomplete) support for downloading and storing router descriptors

View File

@ -14,6 +14,8 @@ repository = "https://gitlab.torproject.org/tpo/core/arti.git/"
[features]
default = []
experimental = ["experimental-api"]
# Enable experimental APIs that are not yet officially supported.
#
# These APIs are not covered by semantic versioning. Using this

View File

@ -14,6 +14,9 @@ repository = "https://gitlab.torproject.org/tpo/core/arti.git/"
[features]
default = []
full = ["routerdesc", "ns_consensus"]
experimental = ["build_docs", "experimental-api"]
# Enable code to build the objects that represent different network documents.
build_docs = ["rand"]

View File

@ -13,6 +13,8 @@ repository = "https://gitlab.torproject.org/tpo/core/arti.git/"
[features]
default = []
full = ["tokio"]
experimental = ["hs", "ntor_v3"]
hs = []
ntor_v3 = []
tokio = ["tokio-crate", "tokio-util"]

View File

@ -14,6 +14,8 @@ repository = "https://gitlab.torproject.org/tpo/core/arti.git/"
[features]
default = []
full = ["async-std", "tokio", "native-tls", "rustls"]
async-std = ["async-std-crate", "async-io", "async_executors/async_std"]
tokio = ["tokio-crate", "tokio-util", "async_executors/tokio_tp"]
# TODO: This feature makes us link native-tls statically even if we