Skip to content

Commit

Permalink
Add cli default feature to remove unnecessary dependencies from lib…
Browse files Browse the repository at this point in the history
…rary
  • Loading branch information
ilai-deutel committed Nov 26, 2024
1 parent 029045a commit ce1036b
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,18 @@ edition = "2021"
[features]
all = ["cbor", "yaml"]
cbor = ["dep:hex", "dep:serde_cbor"]
default = []
cli = ["dep:clap", "dep:colored", "dep:env_logger", "dep:num-format"]
default = ["cli"]
yaml = ["dep:serde_yaml"]

[profile.release]
lto = "thin"
panic = "abort"

[[bin]]
name = "tokei"
required-features = ["cli"]

[build-dependencies]
tera = "1.20.0"
ignore = "0.4.22"
Expand All @@ -41,8 +46,8 @@ json5 = "0.4.1"
[dependencies]
aho-corasick = "1.1.3"
arbitrary = { version = "1.3.2", features = ["derive"] }
clap = { version = "4", features = ["cargo", "string", "wrap_help"] }
colored = "2.1.0"
clap = { version = "4", optional = true, features = ["cargo", "string", "wrap_help"] }
colored = { version = "2.1.0", optional = true }
crossbeam-channel = "0.5.13"
encoding_rs_io = "0.1.7"
grep-searcher = "0.1.13"
Expand All @@ -54,14 +59,15 @@ term_size = "0.3.2"
toml = "0.8.19"
parking_lot = "0.12.3"
dashmap = { version = "6.0.1", features = ["serde"] }
num-format = "0.4.4"
num-format = { version = "0.4.4", optional = true }
once_cell = "1.19.0"
regex = "1.10.6"
serde_json = "1.0.125"
etcetera = "0.8.0"
table_formatter = "0.6.1"

[dependencies.env_logger]
optional = true
features = []
version = "0.11.5"

Expand Down

0 comments on commit ce1036b

Please sign in to comment.