Add "accel-*" features to arti-client and arti.
These need to be optional: they improve performance by shifting to asm implementations, which may not be everybody's idea of good practice. These are not 'pure' features, since they select one implementation but disable another. Therefore they don't go in `full`. Closes #441.
This commit is contained in:
parent
3673409735
commit
10b38a7d7c
|
@ -166,6 +166,7 @@ dependencies = [
|
|||
"tor-dirmgr",
|
||||
"tor-error",
|
||||
"tor-guardmgr",
|
||||
"tor-llcrypto",
|
||||
"tor-netdoc",
|
||||
"tor-persist",
|
||||
"tor-proto",
|
||||
|
|
|
@ -18,7 +18,16 @@ default = ["tokio", "native-tls"]
|
|||
# * 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"]
|
||||
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"]
|
||||
|
@ -29,11 +38,24 @@ static = ["static-sqlite", "static-native-tls"]
|
|||
static-sqlite = ["tor-dirmgr/static"]
|
||||
static-native-tls = ["tor-rtcompat/static", "native-tls"]
|
||||
|
||||
accel-sha1-asm = ["tor-llcrypto/with-sha1-asm"]
|
||||
accel-openssl = ["tor-llcrypto/with-openssl"]
|
||||
|
||||
# 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 = [
|
||||
"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 = []
|
||||
|
@ -60,6 +82,7 @@ tor-config = { path = "../tor-config", version = "0.4.0" }
|
|||
tor-dirmgr = { path = "../tor-dirmgr", version = "0.4.0" }
|
||||
tor-error = { path = "../tor-error", version = "0.3.1" }
|
||||
tor-guardmgr = { path = "../tor-guardmgr", version = "0.3.1" }
|
||||
tor-llcrypto = { path = "../tor-llcrypto", version = "0.3.1" }
|
||||
tor-netdoc = { path = "../tor-netdoc", version = "0.4.0" }
|
||||
tor-persist = { path = "../tor-persist", version = "0.4.0" }
|
||||
tor-proto = { path = "../tor-proto", version = "0.3.1" }
|
||||
|
|
|
@ -195,6 +195,15 @@
|
|||
//! * `static-native-tls` -- link with a static version of `native-tls`. Enables
|
||||
//! `native-tls`.
|
||||
//!
|
||||
//! ## Cryptographic acceleration features
|
||||
//!
|
||||
//! Libraries should not enable these by default, since they replace one
|
||||
//! implementation with another.
|
||||
//!
|
||||
//! * `accel-sha1-asm` -- Accelerate cryptography by using an assembly
|
||||
//! implementation of SHA1, if one is available.
|
||||
//! * `accel-openssl` -- Accelerate cryptography by using openssl as a backend.
|
||||
//!
|
||||
//! ## Experimental and unstable features
|
||||
//!
|
||||
//! Note that the APIs enabled by these features are NOT covered by semantic
|
||||
|
|
|
@ -25,6 +25,9 @@ static-sqlite = ["arti-client/static-sqlite"]
|
|||
static-native-tls = ["arti-client/static-native-tls", "native-tls"]
|
||||
journald = ["tracing-journald"]
|
||||
|
||||
accel-sha1-asm = ["arti-client/accel-sha1-asm"]
|
||||
accel-openssl = ["arti-client/accel-openssl"]
|
||||
|
||||
# This feature flag enables experimental features that are not supported. Turning it on may
|
||||
# void your API.
|
||||
experimental = ["arti-client/experimental"]
|
||||
|
|
|
@ -72,6 +72,15 @@
|
|||
//! * `static-native-tls` -- Link with a static version of `native-tls`. Enables
|
||||
//! `native-tls`.
|
||||
//!
|
||||
//! ## Cryptographic acceleration features
|
||||
//!
|
||||
//! Libraries should not enable these by default, since they replace one
|
||||
//! implementation with another.
|
||||
//!
|
||||
//! * `accel-sha1-asm` -- Accelerate cryptography by using an assembly
|
||||
//! implementation of SHA1, if one is available.
|
||||
//! * `accel-openssl` -- Accelerate cryptography by using openssl as a backend.
|
||||
//!
|
||||
//! ## Experimental features
|
||||
//!
|
||||
//! Note that the APIs enabled by these features are NOT covered by semantic
|
||||
|
|
Loading…
Reference in New Issue