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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
|
[package]
name = "tor-netdoc"
version = "0.34.0"
authors = ["The Tor Project, Inc.", "Nick Mathewson <[email protected]>"]
edition = "2024"
rust-version = "1.85.1"
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 = [
"hs-client",
"hs-service",
"routerdesc",
"ns_consensus",
"plain-consensus",
"tor-basic-utils/full",
"tor-bytes/full",
"tor-cert/full",
"tor-checkable/full",
"tor-error/full",
"tor-hscrypto?/full",
"tor-linkspec?/full",
"tor-llcrypto/full",
"tor-protover/full",
"tor-units?/full",
"tor-cell/full",
]
experimental = [
"build_docs",
"dangerous-expose-struct-fields",
"experimental-api",
"hsdesc-inner-docs",
"hs-dir",
"hs-pow-full",
"ns-vote",
"parse2",
]
# Enable code to build the objects that represent different network documents.
build_docs = ["rand", "__is_experimental"]
# Enable the "router descriptor" document type, which is needed by relays and
# bridge clients.
routerdesc = []
# Expose interfaces useful for testing
testing = ["hex-literal", "hsdesc-inner-docs", "visibility"]
# Enable the "ns consensus" document type, which some relays cache and serve.
plain-consensus = []
ns_consensus = ["plain-consensus"] # deprecated
# Enable support for votes. Very very experimental!
ns-vote = ["__is_experimental"]
# Enable the `parse` derive-based netdoc parser
parse2 = ["__is_experimental"]
# Client-side, directory-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.
hs-dir = ["hs-common", "__is_experimental"]
hs-client = ["hs-common"]
hs-service = ["hs-common", "tor-cert/encode"]
hs-common = ["rand", "tor-hscrypto", "tor-linkspec", "tor-units"]
# Testing only : expose code to parse inner layers of onion service descriptors.
hsdesc-inner-docs = [
"visibility",
"__is_experimental",
] # TODO maybe fold this feature into `testing`
# Onion service proof of work schemes
hs-pow-full = ["tor-hscrypto/hs-pow-full", "__is_experimental"]
# 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 = ["testing", "__is_experimental"]
# Obsolete cargo feature. The items exposed by this are now exposed by default.
dangerous-expose-struct-fields = ["__is_experimental"]
__is_experimental = []
[dependencies]
amplify = { version = "4", default-features = false, features = ["derive"] }
base64ct = { version = "1.5.1", features = ["alloc"] }
bitflags = "2"
cipher = { version = "0.4.1", features = ["zeroize"] }
derive-deftly = { version = "~1.3.0", features = ["full", "beta"] }
derive_builder = { version = "0.11.2", package = "derive_builder_fork_arti" }
derive_more = { version = "2.0.1", features = ["full"] }
digest = "0.10.0"
educe = "0.4.22"
hex = "0.4"
hex-literal = { version = "1.0", optional = true }
humantime = "2"
itertools = "0.14.0"
memchr = "2.5"
paste = "1"
phf = { version = "0.13.1", features = ["macros"] }
rand = { version = "0.9.1", optional = true }
serde = { version = "1.0.103", features = ["derive"] }
serde_with = "3.0.0"
signature = "2"
smallvec = "1.10"
strum = { version = "0.27.1", features = ["derive"] }
subtle = "2"
thiserror = "2"
time = { version = "0.3", features = ["std", "parsing", "macros", "formatting"] }
tinystr = "0.8.0"
tor-basic-utils = { path = "../tor-basic-utils", version = "0.34.0" }
tor-bytes = { path = "../tor-bytes", version = "0.34.0" }
tor-cell = { path = "../tor-cell", version = "0.34.0" }
tor-cert = { path = "../tor-cert", version = "0.34.0" }
tor-checkable = { path = "../tor-checkable", version = "0.34.0" }
tor-error = { path = "../tor-error", version = "0.34.0" }
tor-hscrypto = { path = "../tor-hscrypto", version = "0.34.0", optional = true }
tor-linkspec = { path = "../tor-linkspec", version = "0.34.0", optional = true }
tor-llcrypto = { path = "../tor-llcrypto", version = "0.34.0" }
tor-protover = { path = "../tor-protover", version = "0.34.0", features = ["serde"] }
tor-units = { version = "0.34.0", path = "../tor-units", optional = true }
visibility = { version = "0.1.0", optional = true }
visible = { version = "0.0.1", optional = true }
void = "1"
weak-table = "0.3.0"
zeroize = "1"
[dev-dependencies]
anyhow = "1.0.23"
hex-literal = "1.0"
itertools = "0.14.0"
serde_json = "1.0.50"
testresult = "0.4.1"
tor-basic-utils = { version = "0.34.0", path = "../tor-basic-utils" }
[package.metadata.docs.rs]
all-features = true
|