Cargo Features

[dependencies]
rustfmt_lib = { version = "2.0.0-rc.2", default-features = false, features = ["generic-simd", "config", "emitter"] }
default = config, emitter

FIXME: Refactor so that rustfmt can be built without config or emitter.

generic-simd

Enables generic-simd of bytecount

config default emitter = dirs, rustfmt-config_proc_macro, serde, serde_json, toml

Affects rustfmt_lib::config

emitter default = config, diff, serde, serde_json, term

Affects rustfmt_lib::emitter

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.

diff emitter

Enables diff

Optional dependencies

dirs config

Enables dirs ^2.0

rustfmt-config_proc_macro config
serde config emitter
serde_json config emitter
term emitter

Enables term ^0.6

toml config

Enables toml ^0.5