summaryrefslogtreecommitdiff
path: root/Cargo.toml
blob: 431f5d2ff3249bf7dfc7ff866ade7233aabc74f5 (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
90
91
92
93
94
95
96
97
98
99
100
101
102
[workspace]

# Here we declare that this is a workspace, containing several crates
# within it.
#
# Please keep this list topologically sorted by dependency relation, so
# that every crate appears _before_ any other crate that depends on it.
members = [
    "crates/hashx",
    "crates/equix",
    "crates/tor-basic-utils",
    "crates/tor-async-utils",
    "crates/caret",
    "crates/fs-mistrust",
    "crates/safelog",
    "crates/retry-error",
    "crates/tor-error",
    "crates/tor-config",
    "crates/tor-events",
    "crates/tor-units",
    "crates/tor-geoip",
    "crates/tor-rtcompat",
    "crates/tor-rtmock",
    "crates/tor-log-ratelim",
    "crates/tor-rpcbase",
    "crates/tor-llcrypto",
    "crates/tor-protover",
    "crates/tor-bytes",
    "crates/tor-hscrypto",
    "crates/tor-hspow",
    "crates/tor-socksproto",
    "crates/tor-checkable",
    "crates/tor-cert",
    "crates/tor-linkspec",
    "crates/tor-cell",
    "crates/tor-proto",
    "crates/tor-netdoc",
    "crates/tor-consdiff",
    "crates/tor-netdir",
    "crates/tor-congestion",
    "crates/tor-persist",
    "crates/tor-chanmgr",
    "crates/tor-ptmgr",
    "crates/tor-guardmgr",
    "crates/tor-circmgr",
    "crates/tor-dirclient",
    "crates/tor-dirmgr",
    "crates/tor-keymgr",
    "crates/tor-hsclient",
    "crates/tor-hsservice",
    "crates/tor-hsrproxy",
    "crates/arti-client",
    "crates/arti-rpcserver",
    "crates/arti-config",
    "crates/arti-hyper",
    "crates/arti",
    "crates/arti-bench",
    "crates/arti-testing",

    "examples/gsoc2023/connection-checker",
    "examples/gsoc2023/dns-resolver",
    "examples/gsoc2023/download-manager",
    "examples/gsoc2023/obfs4-checker",
    "examples/gsoc2023/pt-proxy",
]

resolver = "2"

[profile.release]
# By default we'd like to get good performance and a small download size.
# (Assuming xz compression on the binary.)
#
# The biggest win is to run `strip --strip-debug` on the binary after
# generating it, to throw out debugging symbols that we inherited from
# other libraries.  Don't do `strip --strip-unused`, though, or you'll
# break backtraces.  That saves about 21% download size.

# Using LTO saves a further 14% of download size, and improves performance,
# at the cost of compile time.
lto = true
# Setting codegen-units=1 saves a further 7% download size.  It also
# improves performance at the cost of compile time.
codegen-units = 1
# Optimize for size.  [Actually this is even smaller than 'z' on rust
# 1.56.  It saves about 11% download size over the default value of '3'.]
opt-level = 's'

[profile.quicktest]
# This profile is meant to be a compromise between "release" (which
# takes a long time to build) and "dev" (which can be too slow to actually
# use when connecting over the Tor network).
inherits = "release"
lto = "thin"
codegen-units = 16
opt-level = 2
incremental = true

[profile.bench]
# For "cargo bench", which is only used by some crates.
# Inherits release build settings, but adds full debug symbols.
debug = 2
strip = "none"