[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. # This also applies to dev-dependencies. # We depend on this for publishing to crates.io. e.g. # see # https://blog.iany.me/2020/10/gotchas-to-publish-rust-crates-in-a-workspace/#cyclic-dependencies members = [ "crates/oneshot-fused-workaround", "crates/web-time-compat", "crates/slotmap-careful", "crates/test-temp-dir", "crates/fslock-guard", "crates/hashx", "crates/equix", "crates/tor-basic-utils", "crates/caret", "crates/fs-mistrust", "crates/safelog", "crates/retry-error", "crates/tor-error", "crates/tor-general-addr", "crates/tor-events", "crates/tor-geoip", "crates/tor-memquota-cost", "crates/tor-llcrypto", "crates/tor-cert-x509", "crates/tor-rtcompat", "crates/tor-rtmock", "crates/futures-copy", "crates/tor-async-utils", "crates/tor-config", "crates/tor-config-path", "crates/tor-rpc-connect", "crates/tor-log-ratelim", "crates/tor-rpcbase", "crates/tor-memquota", "crates/tor-units", "crates/tor-bytes", "crates/tor-protover", "crates/tor-checkable", "crates/tor-cert", "crates/tor-key-forge", "crates/tor-hscrypto", "crates/tor-socksproto", "crates/tor-linkspec", "crates/tor-cell", "crates/tor-persist", "crates/tor-keymgr", "crates/tor-relay-crypto", "crates/tor-proto", "crates/tor-netdoc", "crates/tor-consdiff", "crates/tor-netdir", "crates/tor-relay-selection", "crates/tor-chanmgr", "crates/tor-ptmgr", "crates/tor-dircommon", "crates/tor-guardmgr", "crates/tor-circmgr", "crates/tor-dirclient", "crates/tor-dirpublish", "crates/tor-dirmgr", "crates/tor-dirserver", "crates/tor-hsclient", "crates/tor-hsservice", "crates/tor-hsrproxy", "crates/arti-client", "crates/arti-relay", "crates/arti-rpcserver", "crates/arti-config", "crates/arti", "crates/arti-bench", "crates/arti-testing", "crates/arti-ureq", "crates/arti-rpc-client-core", "maint/fixup-features", "maint/keygen-client-auth-test", "maint/keygen-openssh-test", "maint/dependencies-bodge", "examples/gsoc2023/connection-checker", "examples/gsoc2023/dns-resolver", "examples/gsoc2023/obfs4-checker", "examples/gsoc2023/pt-proxy", "examples/hyper-examples", "examples/axum/axum-hello-world", "examples/download-manager", "examples/ureq-examples", ] # We have to specify the resolver manually. It can't be inferred from # package.edition as normal, since a virtual workspace doesn't have # one of those. # See https://doc.rust-lang.org/cargo/reference/workspaces.html#virtual-workspace resolver = "3" [profile.dev.package.num-bigint-dig] # Even for testing, we want to optimize num-bigint-dig. # Otherwise, RSA key generation in our tests takes a # ridiculous amount of time. # # When we upgrade to rsa 0.10.* we should revisit this; # a new crypto library may be in use. opt-level = 2 [profile.release] # For release builds, we want the most tuned Arti we can get; # that seems to be with these options. lto = true codegen-units = 1 [profile.release-small] # We define a separate "small" release profile, for the case where # we care more strongly about download or binary size than we do # about performance. inherits = "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. strip = "debuginfo" # # Using LTO saves a further 14% of download size, and improves performance, # at the cost of compile time. # # We already have `lto = true` in "release". # # Setting codegen-units=1 saves a further 7% download size. It also # improves performance at the cost of compile time. # # We already have codegen-units = 1 in "release". # # 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.release.package.slotmap-careful] opt-level = 2 [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). # Start from dev. In particular we want debug assertions etc enabled. inherits = "dev" # Enable just enough optimization to avoid huge performance penalties # for integration tests, usage on the real network, etc. opt-level = 1 [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"