summaryrefslogtreecommitdiff
path: root/crates/tor-netdoc/Cargo.toml
blob: d2d57491d737910a9bba68bb9cd017253e62f838 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
[package]
name = "tor-netdoc"
version = "0.6.0"
authors = ["The Tor Project, Inc.", "Nick Mathewson <[email protected]>"]
edition = "2021"
rust-version = "1.60"
license = "MIT OR Apache-2.0"
homepage = "https://gitlab.torproject.org/tpo/core/arti/-/wikis/home"
description = "Network document formats used with the Tor protocols."
keywords = ["tor", "arti"]
categories = ["parser-implementations"]
repository = "https://gitlab.torproject.org/tpo/core/arti.git/"

[features]
default = []

full = ["routerdesc", "ns_consensus"]
experimental = ["build_docs", "experimental-api", "onion-client", "onion-service"]

# Enable code to build the objects that represent different network documents.
build_docs = ["rand"]

# Enable the "router descriptor" document type, which is needed by relays and
# bridge clients.
routerdesc = []

# Enable the "ns consensus" document type, which some relays cache and serve.
ns_consensus = []

# Client-side and service-side support for onion services. 
# Experimental: not covered by semver guarantees.
# TODO hs: mark these as part of "full" once they are done and stable.
onion-client = ["onion-common"]
onion-service = ["onion-common", "rand"]
onion-common = ["tor-hscrypto", "tor-linkspec"]

# 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-api = []

# Expose various struct fields as "pub", for testing.
#
# This feature is *super* dangerous for stability and correctness. If you use it
# for anything besides testing, you are probably putting your users in danger.
#
# The struct fields exposed by this feature are not covered by semantic version.
# In fact, using this feature will give you the opposite of a "semver
# guarantee": you should be mildly surprised when your code _doesn't_ break from
# version to version.
dangerous-expose-struct-fields = ["visible", "visibility"]

[dependencies]
base64ct = { version = "1.5.1", features = ["alloc"] }
bitflags = "1"
derive_more = "0.99.3"
digest = "0.10.0"
educe = "0.4.6"
hex = "0.4"
humantime = "2"
once_cell = "1"
phf = { version = "0.11.1", features = ["macros"] }
rand = { version = "0.8", optional = true }
serde = "1.0.103"
serde_with = "2.0.1"
signature = "1"
thiserror = "1"
time = { version = "0.3", features = ["std", "parsing", "macros"] }
tinystr = "0.7.0"
tor-bytes = { path = "../tor-bytes", version = "0.6.0" }
tor-cert = { path = "../tor-cert", version = "0.6.0" }
tor-checkable = { path = "../tor-checkable", version = "0.4.0" }
tor-error = { path = "../tor-error", version = "0.4.0" }
tor-hscrypto = { path = "../tor-hscrypto", version = "0.1.0", optional = true } 
tor-linkspec = { path = "../tor-linkspec", version = "0.6.0", optional = true }
tor-llcrypto = { path = "../tor-llcrypto", version = "0.4.0" }
tor-protover = { path = "../tor-protover", version = "0.4.0" }
visibility = { version = "0.0.1", optional = true }
visible = { version = "0.0.1", optional = true }
weak-table = "0.3.0"

[dev-dependencies]
hex-literal = "0.3"
itertools = "0.10.1"
serde_json = "1.0.50"
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]