Cargo Features

[dependencies]
snapbox = { version = "0.5.9", default-features = false, features = ["harness", "detect-encoding", "path", "cmd", "examples", "json", "term-svg", "structured-data", "debug", "diff", "color", "color-auto", "document-features"] }
default = color-auto, diff

These default features are set whenever snapbox is added without default-features = false somewhere in the dependency tree.

harness

Feature Flags

Simple input/output test harness

Enables ignore and libtest-mimic

Affects snapbox::harness

detect-encoding path?

Smarter binary file detection

Enables content_inspector

path = detect-encoding

Snapshotting of paths

Enables dunce, filetime, tempfile, and walkdir

Affects snapbox::assert_subset_eq, snapbox::assert_subset_matches, path::Walk, path::copy_template

cmd

Snapshotting of commands

Enables libc, os_pipe, wait-timeout, and windows-sys

Affects cmd::display_exit_status

examples

Building of examples for snapshotting

Enables escargot

json = structured-data

Snapshotting of json

Enables serde_json

term-svg = structured-data

Snapshotting of term styling

Enables anstyle-svg

structured-data json? term-svg?

Snapshotting of structured data

Enables serde_json

debug

Extra debugging information

Enables backtrace, debug of snapbox-macros

diff default

Default Feature Flags

Fancy diffs on failure

Enables similar

color color-auto

Colored output support

Enables anstream, color of snapbox-macros

color-auto default = color

Auto-detect whether to use colors

Features from optional dependencies

document-features implicit feature

Enables document-features

document-features:

Extract documentation for the feature flags from comments in Cargo.toml