by binjooou · 3y ago · 0 comments
[workspace.dependencies] clap = "4.0.32" libc = "0.2.139" thiserror = "1.0.38" glob = "0.3.1" sha2 = "0.10.6" digest = "0.10.6" signal-hook = "0.3.15" log = "0.4.17" syslog = "6.0.1" env_logger = "0.9.3"
I love Rust as a language, but one of the challenges with many projects currently written in it is that they follow the NPM model of using dozens of tiny dependencies for even trivial functionality. Luckily this seems to be limited to users of crates.io for now, and maybe things will change as the library situation matures.
That doesn't mean there are a thousand dependencies. Dependencies take far more than one line in a lockfile.
$ cargo tree -e no-build --prefix none | sort | uniq | grep -v sudo | grep -v '\*'
aho-corasick v0.7.20
atty v0.2.14
bitflags v1.3.2
block-buffer v0.10.4
cfg-if v1.0.0
clap_builder v4.1.14
clap_derive v4.1.14 (proc-macro)
clap_lex v0.4.0
clap v4.1.14
cpufeatures v0.2.6
crypto-common v0.1.6
digest v0.10.6
env_logger v0.9.3
error-chain v0.12.4
generic-array v0.14.7
glob v0.3.1
heck v0.4.1
hostname v0.3.1
humantime v2.1.0
io-lifetimes v1.0.9
is-terminal v0.4.5
itoa v1.0.6
libc v0.2.140
linux-raw-sys v0.1.4
log v0.4.17
match_cfg v0.1.0
memchr v2.5.0
num_threads v0.1.6
once_cell v1.17.1
proc-macro2 v1.0.54
quote v1.0.26
regex-syntax v0.6.29
regex v1.7.3
rustix v0.36.11
sha2 v0.10.6
signal-hook-registry v1.4.1
signal-hook v0.3.15
strsim v0.10.0
syn v2.0.11
syslog v6.0.1
termcolor v1.2.0
thiserror-impl v1.0.40 (proc-macro)
thiserror v1.0.40
time-core v0.1.0
time v0.3.20
typenum v1.16.0
unicode-ident v1.0.8