| 1 |
# spell-checker:ignore (features) bigdecimal zerocopy extendedbigdecimal tzdb zoneinfo logind libcrypto |
| 2 |
|
| 3 |
[package] |
| 4 |
name = "uucore" |
| 5 |
description = "uutils ~ 'core' uutils code library (cross-platform)" |
| 6 |
repository = "https://github.com/uutils/coreutils/tree/main/src/uucore" |
| 7 |
categories.workspace = true |
| 8 |
edition.workspace = true |
| 9 |
rust-version.workspace = true |
| 10 |
homepage.workspace = true |
| 11 |
keywords.workspace = true |
| 12 |
license.workspace = true |
| 13 |
version.workspace = true |
| 14 |
|
| 15 |
[package.metadata.docs.rs] |
| 16 |
all-features = true |
| 17 |
|
| 18 |
[lib] |
| 19 |
path = "src/lib/lib.rs" |
| 20 |
|
| 21 |
[dependencies] |
| 22 |
ariadne = { workspace = true, optional = true } |
| 23 |
base64-simd = { workspace = true, optional = true } |
| 24 |
clap = { workspace = true } |
| 25 |
data-encoding = { workspace = true, optional = true } |
| 26 |
data-encoding-macro = { workspace = true, optional = true } |
| 27 |
dunce = { workspace = true, optional = true } |
| 28 |
glob = { workspace = true, optional = true } |
| 29 |
itertools = { workspace = true, optional = true } |
| 30 |
jiff = { workspace = true, optional = true, features = [ |
| 31 |
"tzdb-bundle-platform", |
| 32 |
"tzdb-zoneinfo", |
| 33 |
"tzdb-concatenated", |
| 34 |
] } |
| 35 |
libc = { workspace = true, optional = true } |
| 36 |
os_display = { workspace = true } |
| 37 |
rustc-hash = { workspace = true } |
| 38 |
rustix = { workspace = true, optional = true } |
| 39 |
# Not optional: os_display already pulls unicode-width into every uucore build, |
| 40 |
# so making it a direct dependency here is free and keeps char_width available |
| 41 |
# on all targets (a feature-gated optional dep failed to activate on wasm). |
| 42 |
unicode-width = { workspace = true } |
| 43 |
unit-prefix = { workspace = true, optional = true } |
| 44 |
uucore_procs = { workspace = true } |
| 45 |
z85 = { workspace = true, optional = true } |
| 46 |
|
| 47 |
# Benchmark dependencies (optional) |
| 48 |
tempfile = { workspace = true, optional = true } |
| 49 |
|
| 50 |
digest = { workspace = true, optional = true } |
| 51 |
hex = { workspace = true, optional = true } |
| 52 |
memchr = { workspace = true, optional = true } |
| 53 |
md-5 = { workspace = true, optional = true } |
| 54 |
sha1 = { workspace = true, optional = true } |
| 55 |
sha2 = { workspace = true, optional = true } |
| 56 |
sha3 = { workspace = true, optional = true } |
| 57 |
shake = { workspace = true, optional = true } |
| 58 |
blake2b_simd = { workspace = true, optional = true } |
| 59 |
blake3 = { workspace = true, optional = true } |
| 60 |
sm3 = { workspace = true, optional = true } |
| 61 |
crc-fast = { workspace = true, optional = true, features = ["std"] } |
| 62 |
bigdecimal = { workspace = true, optional = true } |
| 63 |
num-traits = { workspace = true, optional = true } |
| 64 |
|
| 65 |
# icu stuff |
| 66 |
icu_calendar = { workspace = true, optional = true, features = [ |
| 67 |
"compiled_data", |
| 68 |
] } |
| 69 |
icu_collator = { workspace = true, optional = true, features = [ |
| 70 |
"compiled_data", |
| 71 |
] } |
| 72 |
icu_datetime = { workspace = true, optional = true, features = [ |
| 73 |
"compiled_data", |
| 74 |
] } |
| 75 |
icu_decimal = { workspace = true, optional = true, features = [ |
| 76 |
"compiled_data", |
| 77 |
] } |
| 78 |
icu_locale = { workspace = true, optional = true, features = ["compiled_data"] } |
| 79 |
icu_provider = { workspace = true, optional = true } |
| 80 |
jiff-icu = { workspace = true, optional = true } |
| 81 |
|
| 82 |
# Fluent dependencies (always available for localization) |
| 83 |
fluent = { workspace = true } |
| 84 |
fluent-syntax = { workspace = true } |
| 85 |
unic-langid = { workspace = true } |
| 86 |
thiserror = { workspace = true } |
| 87 |
|
| 88 |
[dev-dependencies] |
| 89 |
tempfile = { workspace = true } |
| 90 |
|
| 91 |
[target.'cfg(any(target_os = "linux", target_os = "android"))'.dependencies] |
| 92 |
selinux = { workspace = true, optional = true } |
| 93 |
|
| 94 |
[target.'cfg(any(target_os = "linux", target_os = "android", target_os = "cygwin"))'.dependencies] |
| 95 |
bstr = { workspace = true, optional = true } |
| 96 |
|
| 97 |
[target.'cfg(any(target_vendor = "apple", target_os = "cygwin", target_os = "freebsd", target_os = "linux", target_os = "netbsd"))'.dependencies] |
| 98 |
dns-lookup = { workspace = true, optional = true } |
| 99 |
|
| 100 |
[target.'cfg(unix)'.dependencies] |
| 101 |
# utmpx is unix-only, so its dependencies must not be pulled into other targets |
| 102 |
# (the uptime feature enables utmpx and now builds on windows too). |
| 103 |
time = { workspace = true, optional = true, features = [ |
| 104 |
"formatting", |
| 105 |
"local-offset", |
| 106 |
"macros", |
| 107 |
] } |
| 108 |
nix = { workspace = true, optional = true } |
| 109 |
walkdir = { workspace = true, optional = true } |
| 110 |
xattr = { workspace = true, optional = true } |
| 111 |
|
| 112 |
[target.'cfg(target_os = "linux")'.dependencies] |
| 113 |
procfs = { workspace = true, optional = true } |
| 114 |
|
| 115 |
[target.'cfg(windows)'.dependencies] |
| 116 |
wild = { workspace = true } |
| 117 |
windows-sys = { workspace = true, optional = true, default-features = false, features = [ |
| 118 |
"Wdk_System_SystemInformation", |
| 119 |
"Win32_Security", |
| 120 |
"Win32_Storage_FileSystem", |
| 121 |
"Win32_Foundation", |
| 122 |
"Win32_Globalization", |
| 123 |
"Win32_NetworkManagement_WNet", |
| 124 |
"Win32_System_Console", |
| 125 |
"Win32_System_Diagnostics_Debug", |
| 126 |
"Win32_System_IO", |
| 127 |
"Win32_System_Ioctl", |
| 128 |
"Win32_System_JobObjects", |
| 129 |
"Win32_System_RemoteDesktop", |
| 130 |
"Win32_System_SystemInformation", |
| 131 |
"Win32_System_Threading", |
| 132 |
"Win32_System_WindowsProgramming", |
| 133 |
] } |
| 134 |
|
| 135 |
[target.'cfg(not(target_env = "msvc"))'.dependencies] |
| 136 |
openssl = { workspace = true, features = ["vendored"], optional = true } |
| 137 |
# vendored openssl with MSVC needs complex setup... |
| 138 |
[target.'cfg(target_env = "msvc")'.dependencies] |
| 139 |
openssl = { workspace = true, features = ["aws-lc"], optional = true } |
| 140 |
|
| 141 |
[target.'cfg(target_os = "openbsd")'.dependencies] |
| 142 |
utmp-classic = { workspace = true, optional = true } |
| 143 |
|
| 144 |
[features] |
| 145 |
default = ["signals"] |
| 146 |
# * non-default features |
| 147 |
backup-control = [] |
| 148 |
colors = [] |
| 149 |
diagnostics = ["dep:ariadne"] |
| 150 |
checksum = ["base64-simd", "quoting-style", "rustix/fs", "sum"] |
| 151 |
encoding = ["data-encoding", "data-encoding-macro", "z85", "base64-simd"] |
| 152 |
entries = ["libc", "rustix/fs", "rustix/process"] |
| 153 |
extendedbigdecimal = ["bigdecimal", "num-traits"] |
| 154 |
fast-inc = [] |
| 155 |
fs = ["dunce", "libc", "rustix/fs", "windows-sys"] |
| 156 |
fsext = ["libc", "windows-sys", "bstr", "wide"] |
| 157 |
fsxattr = ["xattr", "itertools", "libc"] |
| 158 |
hardware = [] |
| 159 |
lines = [] |
| 160 |
feat_systemd_logind = ["utmpx", "libc"] |
| 161 |
format = [ |
| 162 |
"bigdecimal", |
| 163 |
"extendedbigdecimal", |
| 164 |
"itertools", |
| 165 |
"parser-num", |
| 166 |
"num-traits", |
| 167 |
"quoting-style", |
| 168 |
"unit-prefix", |
| 169 |
] |
| 170 |
i18n-all = ["i18n-charmap", "i18n-collator", "i18n-decimal", "i18n-datetime"] |
| 171 |
i18n-charmap = ["i18n-common"] |
| 172 |
i18n-common = ["icu_locale", "windows-sys"] |
| 173 |
i18n-collator = ["i18n-common", "icu_collator"] |
| 174 |
i18n-decimal = ["i18n-common", "icu_decimal", "icu_provider"] |
| 175 |
i18n-datetime = [ |
| 176 |
"i18n-common", |
| 177 |
"icu_calendar", |
| 178 |
"icu_datetime", |
| 179 |
"jiff-icu", |
| 180 |
"jiff", |
| 181 |
] |
| 182 |
mode = ["libc", "rustix/process"] |
| 183 |
perms = ["entries", "libc", "safe-traversal", "walkdir"] |
| 184 |
buf-copy = ["pipes"] |
| 185 |
parser-num = ["extendedbigdecimal", "num-traits"] |
| 186 |
parser-size = ["parser-num", "procfs"] |
| 187 |
parser-glob = ["glob"] |
| 188 |
parser = ["parser-num", "parser-size", "parser-glob"] |
| 189 |
pipes = ["fs", "rustix/pipe"] |
| 190 |
process = ["libc", "nix/user", "rustix/process", "windows-sys"] |
| 191 |
proc-info = ["tty", "walkdir"] |
| 192 |
quoting-style = ["i18n-common"] |
| 193 |
ranges = [] |
| 194 |
ringbuffer = [] |
| 195 |
safe-copy = ["rustix/fs"] |
| 196 |
safe-traversal = ["libc", "nix/fs", "nix/dir", "nix/user"] |
| 197 |
selinux = ["dep:selinux"] |
| 198 |
smack = ["xattr"] |
| 199 |
signals = ["nix/fs", "nix/signal", "nix/poll"] |
| 200 |
sum = [ |
| 201 |
"digest", |
| 202 |
"hex", |
| 203 |
"memchr", |
| 204 |
"md-5", |
| 205 |
"sha1", |
| 206 |
"sha2", |
| 207 |
"sha3", |
| 208 |
"shake", |
| 209 |
"blake2b_simd", |
| 210 |
"blake3", |
| 211 |
"sm3", |
| 212 |
"crc-fast", |
| 213 |
"data-encoding", |
| 214 |
] |
| 215 |
# Use OpenSSL (libcrypto) for md5/sha1/sha2-family digests instead of the |
| 216 |
# pure-Rust crates. This dramatically speeds up checksum utilities on CPUs |
| 217 |
# without SHA-NI by using OpenSSL's optimized assembly implementations. |
| 218 |
openssl = ["dep:openssl"] |
| 219 |
update-control = ["parser"] |
| 220 |
utf8 = [] |
| 221 |
utmpx = ["time", "time/macros", "libc", "dns-lookup"] |
| 222 |
version-cmp = [] |
| 223 |
wide = [] |
| 224 |
tty = [] |
| 225 |
time = ["jiff"] |
| 226 |
uptime = ["jiff", "libc", "rustix/time", "utmp-classic", "utmpx", "windows-sys"] |
| 227 |
benchmark = ["itertools", "tempfile"] |
| 228 |
|
| 229 |
[lints] |
| 230 |
workspace = true |