Cargo Features

[dependencies]
cotton = { version = "0.1.1", default-features = false, features = ["regex", "args", "logging", "time", "term", "hashing", "files", "signals", "errors", "app", "process", "backtrace"] }
default = app, args, errors, exec, files, hashing, logging, process, regex, signals, term, time

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

regex default

Regular expressions

Enables regex

args default = clap

Parsing of arguments

logging default = log, stderrlog

Logger and logging

time default = chrono

Date/Time

term default = ansi_term, atty, term_size, zzz

Terminal

hashing default = digest, hex, sha2

Hashing

files default = file-mode, file-owner, filetime, tempfile

Files

signals default = signal-hook, uninterruptible

UNIX signals

errors default = assert_matches, error-context, problem, scopeguard

Error handling

app default = directories

Application environment

process default = cradle, exec, mkargs, shellwords

Process execution

backtrace

Optional features

Enables backtrace of problem

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.

clap args

Affects cotton::prelude.ArgsDryRun, cotton::prelude.ArgsLogger, cotton::prelude.setup_logger

scopeguard errors
tempfile files
filetime files
file-mode files
problem backtrace? errors
error-context errors
assert_matches errors
log logging
stderrlog logging

Enables stderrlog ^0.5.4

Affects cotton::prelude.setup_logger, cotton::prelude._setup_logger, cotton::prelude.ArgsLogger, cotton::prelude.setup_logger

ansi_term term
atty term

Affects cotton::prelude.stdout_is_tty, cotton::prelude.stderr_is_tty

zzz term

Enables zzz ^0.2.0

term_size term
chrono time
signal-hook signals
uninterruptible signals
directories app
shellwords process
hex hashing
sha2 hashing
digest hashing
mkargs process
cradle process

Affects process::check_status, process::collect_errors, process::collect_output_and_errors

file-owner unix files
exec unix default process

Affects process::ExecError, process::exec, process::exec_with_name