Cargo Features

[dependencies]
cargo-docs-md = { version = "0.2.4", default-features = false, features = ["simd-json", "trace", "source-parsing"] }
default = source-parsing

The source-parsing feature is set by default whenever cargo-docs-md is added without default-features = false somewhere in the dependency tree.

simd-json

Enable SIMD-accelerated JSON parsing (NOT RECOMMENDED - see benchmarks)
Benchmarks show serde_json is faster for typed struct deserialization

Enables simd-json

SIMD-accelerated JSON parsing (optional, enabled via 'simd-json' feature)
NOTE: Benchmarks show serde_json is actually 1.7x FASTER for typed deserialization (5.6ms vs 9.6ms). simd-json excels at raw Value parsing but the serde compatibility
layer adds overhead. NOT RECOMMENDED - kept for experimentation only.

trace

Enable CLI logging options (--log-level, --log-file)

Enables tracing-subscriber

tracing-subscriber is optional - only needed when the 'trace' feature is enabled

Affects cargo-docs-md::logger, cargo-docs-md::Cli.log_level, cargo-docs-md::Cli.log_file

source-parsing default

Enable source code parsing from ~/.cargo/registry/src/

Enables cargo_metadata, proc-macro2, quote, and syn

syn:

Source code parsing (optional, enabled via 'source-parsing' feature)

Affects cargo-docs-md::source, cargo-docs-md::CollectSourcesArgs