Cargo Features

tor-netdoc has no features set by default.

[dependencies]
tor-netdoc = { version = "0.25.0", features = ["full", "experimental", "build_docs", "routerdesc", "testing", "ns_consensus", "hs-dir", "hs-client", "hs-service", "hs-common", "hsdesc-inner-docs", "hs-pow-full", "experimental-api", "dangerous-expose-struct-fields"] }
full = hs-client, hs-service, ns_consensus, routerdesc

Enables full of tor-basic-utils, tor-bytes, tor-cell, tor-cert, tor-checkable, tor-error, optional tor-hscrypto, optional tor-linkspec, tor-llcrypto, tor-protover, and optional tor-units

experimental = build_docs, dangerous-expose-struct-fields, experimental-api, hs-dir, hs-pow-full, hsdesc-inner-docs
build_docs experimental? = rand

Enable code to build the objects that represent different network documents.

routerdesc full?

Enable the "router descriptor" document type, which is needed by relays and bridge clients.

Affects doc::routerdesc

testing experimental-api? = hex-literal, hsdesc-inner-docs, visibility

Expose interfaces useful for testing

ns_consensus full?

Enable the "ns consensus" document type, which some relays cache and serve.

Affects netstatus::NsConsensus, netstatus::UnvalidatedNsConsensus, netstatus::UncheckedNsConsensus

hs-dir experimental? = hs-common

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.

Affects hsdesc::StoredHsDescMeta, hsdesc::UncheckedStoredHsDescMeta

hs-client full? = hs-common
hs-service full? = hs-common

Enables encode of tor-cert

hs-common hs-client? hs-dir? hs-service? = rand, tor-hscrypto, tor-linkspec, tor-units

Affects doc::hsdesc

hsdesc-inner-docs experimental? testing? = visibility

Testing only : expose code to parse inner layers of onion service descriptors. TODO maybe fold this feature into testing

hs-pow-full experimental?

Onion service proof of work schemes

Enables hs-pow-full of tor-hscrypto

experimental-api experimental? = testing

Enable experimental APIs that are not yet officially supported.

These APIs are not covered by semantic versioning. Using this feature voids your "semver warrantee".

dangerous-expose-struct-fields experimental? = visibility, visible

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.

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

hex-literal testing?
rand build_docs? hs-common?
tor-hscrypto hs-common? hs-pow-full?
tor-linkspec hs-common?
tor-units hs-common?
visibility dangerous-expose-struct-fields? hsdesc-inner-docs? testing?
visible dangerous-expose-struct-fields?