├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── README.md └── src └── main.rs /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "aho-corasick" 7 | version = "0.7.20" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" 10 | dependencies = [ 11 | "memchr", 12 | ] 13 | 14 | [[package]] 15 | name = "aho-corasick" 16 | version = "1.1.3" 17 | source = "registry+https://github.com/rust-lang/crates.io-index" 18 | checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" 19 | dependencies = [ 20 | "memchr", 21 | ] 22 | 23 | [[package]] 24 | name = "android-tzdata" 25 | version = "0.1.1" 26 | source = "registry+https://github.com/rust-lang/crates.io-index" 27 | checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" 28 | 29 | [[package]] 30 | name = "android_system_properties" 31 | version = "0.1.5" 32 | source = "registry+https://github.com/rust-lang/crates.io-index" 33 | checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" 34 | dependencies = [ 35 | "libc", 36 | ] 37 | 38 | [[package]] 39 | name = "ansi_term" 40 | version = "0.12.1" 41 | source = "registry+https://github.com/rust-lang/crates.io-index" 42 | checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" 43 | dependencies = [ 44 | "winapi", 45 | ] 46 | 47 | [[package]] 48 | name = "arrayvec" 49 | version = "0.7.4" 50 | source = "registry+https://github.com/rust-lang/crates.io-index" 51 | checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" 52 | 53 | [[package]] 54 | name = "atty" 55 | version = "0.2.14" 56 | source = "registry+https://github.com/rust-lang/crates.io-index" 57 | checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" 58 | dependencies = [ 59 | "hermit-abi 0.1.19", 60 | "libc", 61 | "winapi", 62 | ] 63 | 64 | [[package]] 65 | name = "autocfg" 66 | version = "1.3.0" 67 | source = "registry+https://github.com/rust-lang/crates.io-index" 68 | checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" 69 | 70 | [[package]] 71 | name = "bitflags" 72 | version = "1.3.2" 73 | source = "registry+https://github.com/rust-lang/crates.io-index" 74 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 75 | 76 | [[package]] 77 | name = "bitflags" 78 | version = "2.5.0" 79 | source = "registry+https://github.com/rust-lang/crates.io-index" 80 | checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" 81 | 82 | [[package]] 83 | name = "block-buffer" 84 | version = "0.10.4" 85 | source = "registry+https://github.com/rust-lang/crates.io-index" 86 | checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" 87 | dependencies = [ 88 | "generic-array", 89 | ] 90 | 91 | [[package]] 92 | name = "bstr" 93 | version = "1.9.1" 94 | source = "registry+https://github.com/rust-lang/crates.io-index" 95 | checksum = "05efc5cfd9110c8416e471df0e96702d58690178e206e61b7173706673c93706" 96 | dependencies = [ 97 | "memchr", 98 | "serde", 99 | ] 100 | 101 | [[package]] 102 | name = "bumpalo" 103 | version = "3.16.0" 104 | source = "registry+https://github.com/rust-lang/crates.io-index" 105 | checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" 106 | 107 | [[package]] 108 | name = "camino" 109 | version = "1.1.6" 110 | source = "registry+https://github.com/rust-lang/crates.io-index" 111 | checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" 112 | dependencies = [ 113 | "serde", 114 | ] 115 | 116 | [[package]] 117 | name = "cargo-loc" 118 | version = "0.1.2" 119 | dependencies = [ 120 | "cargo_metadata", 121 | "tokei", 122 | ] 123 | 124 | [[package]] 125 | name = "cargo-platform" 126 | version = "0.1.8" 127 | source = "registry+https://github.com/rust-lang/crates.io-index" 128 | checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" 129 | dependencies = [ 130 | "serde", 131 | ] 132 | 133 | [[package]] 134 | name = "cargo_metadata" 135 | version = "0.18.1" 136 | source = "registry+https://github.com/rust-lang/crates.io-index" 137 | checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" 138 | dependencies = [ 139 | "camino", 140 | "cargo-platform", 141 | "semver", 142 | "serde", 143 | "serde_json", 144 | "thiserror", 145 | ] 146 | 147 | [[package]] 148 | name = "cc" 149 | version = "1.0.97" 150 | source = "registry+https://github.com/rust-lang/crates.io-index" 151 | checksum = "099a5357d84c4c61eb35fc8eafa9a79a902c2f76911e5747ced4e032edd8d9b4" 152 | 153 | [[package]] 154 | name = "cfg-if" 155 | version = "1.0.0" 156 | source = "registry+https://github.com/rust-lang/crates.io-index" 157 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 158 | 159 | [[package]] 160 | name = "chrono" 161 | version = "0.4.38" 162 | source = "registry+https://github.com/rust-lang/crates.io-index" 163 | checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" 164 | dependencies = [ 165 | "android-tzdata", 166 | "iana-time-zone", 167 | "num-traits", 168 | "windows-targets", 169 | ] 170 | 171 | [[package]] 172 | name = "chrono-tz" 173 | version = "0.8.6" 174 | source = "registry+https://github.com/rust-lang/crates.io-index" 175 | checksum = "d59ae0466b83e838b81a54256c39d5d7c20b9d7daa10510a242d9b75abd5936e" 176 | dependencies = [ 177 | "chrono", 178 | "chrono-tz-build", 179 | "phf", 180 | ] 181 | 182 | [[package]] 183 | name = "chrono-tz-build" 184 | version = "0.2.1" 185 | source = "registry+https://github.com/rust-lang/crates.io-index" 186 | checksum = "433e39f13c9a060046954e0592a8d0a4bcb1040125cbf91cb8ee58964cfb350f" 187 | dependencies = [ 188 | "parse-zoneinfo", 189 | "phf", 190 | "phf_codegen", 191 | ] 192 | 193 | [[package]] 194 | name = "clap" 195 | version = "2.34.0" 196 | source = "registry+https://github.com/rust-lang/crates.io-index" 197 | checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" 198 | dependencies = [ 199 | "ansi_term", 200 | "atty", 201 | "bitflags 1.3.2", 202 | "strsim", 203 | "textwrap", 204 | "unicode-width", 205 | "vec_map", 206 | ] 207 | 208 | [[package]] 209 | name = "core-foundation-sys" 210 | version = "0.8.6" 211 | source = "registry+https://github.com/rust-lang/crates.io-index" 212 | checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" 213 | 214 | [[package]] 215 | name = "cpufeatures" 216 | version = "0.2.12" 217 | source = "registry+https://github.com/rust-lang/crates.io-index" 218 | checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" 219 | dependencies = [ 220 | "libc", 221 | ] 222 | 223 | [[package]] 224 | name = "crossbeam-channel" 225 | version = "0.5.12" 226 | source = "registry+https://github.com/rust-lang/crates.io-index" 227 | checksum = "ab3db02a9c5b5121e1e42fbdb1aeb65f5e02624cc58c43f2884c6ccac0b82f95" 228 | dependencies = [ 229 | "crossbeam-utils", 230 | ] 231 | 232 | [[package]] 233 | name = "crossbeam-deque" 234 | version = "0.8.5" 235 | source = "registry+https://github.com/rust-lang/crates.io-index" 236 | checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" 237 | dependencies = [ 238 | "crossbeam-epoch", 239 | "crossbeam-utils", 240 | ] 241 | 242 | [[package]] 243 | name = "crossbeam-epoch" 244 | version = "0.9.18" 245 | source = "registry+https://github.com/rust-lang/crates.io-index" 246 | checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" 247 | dependencies = [ 248 | "crossbeam-utils", 249 | ] 250 | 251 | [[package]] 252 | name = "crossbeam-utils" 253 | version = "0.8.19" 254 | source = "registry+https://github.com/rust-lang/crates.io-index" 255 | checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" 256 | 257 | [[package]] 258 | name = "crypto-common" 259 | version = "0.1.6" 260 | source = "registry+https://github.com/rust-lang/crates.io-index" 261 | checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" 262 | dependencies = [ 263 | "generic-array", 264 | "typenum", 265 | ] 266 | 267 | [[package]] 268 | name = "dashmap" 269 | version = "4.0.2" 270 | source = "registry+https://github.com/rust-lang/crates.io-index" 271 | checksum = "e77a43b28d0668df09411cb0bc9a8c2adc40f9a048afe863e05fd43251e8e39c" 272 | dependencies = [ 273 | "cfg-if", 274 | "num_cpus", 275 | "serde", 276 | ] 277 | 278 | [[package]] 279 | name = "deunicode" 280 | version = "1.4.4" 281 | source = "registry+https://github.com/rust-lang/crates.io-index" 282 | checksum = "322ef0094744e63628e6f0eb2295517f79276a5b342a4c2ff3042566ca181d4e" 283 | 284 | [[package]] 285 | name = "digest" 286 | version = "0.10.7" 287 | source = "registry+https://github.com/rust-lang/crates.io-index" 288 | checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" 289 | dependencies = [ 290 | "block-buffer", 291 | "crypto-common", 292 | ] 293 | 294 | [[package]] 295 | name = "dirs" 296 | version = "3.0.2" 297 | source = "registry+https://github.com/rust-lang/crates.io-index" 298 | checksum = "30baa043103c9d0c2a57cf537cc2f35623889dc0d405e6c3cccfadbc81c71309" 299 | dependencies = [ 300 | "dirs-sys", 301 | ] 302 | 303 | [[package]] 304 | name = "dirs-sys" 305 | version = "0.3.7" 306 | source = "registry+https://github.com/rust-lang/crates.io-index" 307 | checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" 308 | dependencies = [ 309 | "libc", 310 | "redox_users", 311 | "winapi", 312 | ] 313 | 314 | [[package]] 315 | name = "either" 316 | version = "1.11.0" 317 | source = "registry+https://github.com/rust-lang/crates.io-index" 318 | checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" 319 | 320 | [[package]] 321 | name = "encoding_rs" 322 | version = "0.8.34" 323 | source = "registry+https://github.com/rust-lang/crates.io-index" 324 | checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" 325 | dependencies = [ 326 | "cfg-if", 327 | ] 328 | 329 | [[package]] 330 | name = "encoding_rs_io" 331 | version = "0.1.7" 332 | source = "registry+https://github.com/rust-lang/crates.io-index" 333 | checksum = "1cc3c5651fb62ab8aa3103998dade57efdd028544bd300516baa31840c252a83" 334 | dependencies = [ 335 | "encoding_rs", 336 | ] 337 | 338 | [[package]] 339 | name = "env_logger" 340 | version = "0.8.4" 341 | source = "registry+https://github.com/rust-lang/crates.io-index" 342 | checksum = "a19187fea3ac7e84da7dacf48de0c45d63c6a76f9490dae389aead16c243fce3" 343 | dependencies = [ 344 | "atty", 345 | "humantime", 346 | "log", 347 | "regex", 348 | "termcolor", 349 | ] 350 | 351 | [[package]] 352 | name = "generic-array" 353 | version = "0.14.7" 354 | source = "registry+https://github.com/rust-lang/crates.io-index" 355 | checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" 356 | dependencies = [ 357 | "typenum", 358 | "version_check", 359 | ] 360 | 361 | [[package]] 362 | name = "getrandom" 363 | version = "0.2.15" 364 | source = "registry+https://github.com/rust-lang/crates.io-index" 365 | checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" 366 | dependencies = [ 367 | "cfg-if", 368 | "libc", 369 | "wasi", 370 | ] 371 | 372 | [[package]] 373 | name = "globset" 374 | version = "0.4.14" 375 | source = "registry+https://github.com/rust-lang/crates.io-index" 376 | checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1" 377 | dependencies = [ 378 | "aho-corasick 1.1.3", 379 | "bstr", 380 | "log", 381 | "regex-automata", 382 | "regex-syntax", 383 | ] 384 | 385 | [[package]] 386 | name = "globwalk" 387 | version = "0.8.1" 388 | source = "registry+https://github.com/rust-lang/crates.io-index" 389 | checksum = "93e3af942408868f6934a7b85134a3230832b9977cf66125df2f9edcfce4ddcc" 390 | dependencies = [ 391 | "bitflags 1.3.2", 392 | "ignore", 393 | "walkdir", 394 | ] 395 | 396 | [[package]] 397 | name = "grep-matcher" 398 | version = "0.1.7" 399 | source = "registry+https://github.com/rust-lang/crates.io-index" 400 | checksum = "47a3141a10a43acfedc7c98a60a834d7ba00dfe7bec9071cbfc19b55b292ac02" 401 | dependencies = [ 402 | "memchr", 403 | ] 404 | 405 | [[package]] 406 | name = "grep-searcher" 407 | version = "0.1.13" 408 | source = "registry+https://github.com/rust-lang/crates.io-index" 409 | checksum = "ba536ae4f69bec62d8839584dd3153d3028ef31bb229f04e09fb5a9e5a193c54" 410 | dependencies = [ 411 | "bstr", 412 | "encoding_rs", 413 | "encoding_rs_io", 414 | "grep-matcher", 415 | "log", 416 | "memchr", 417 | "memmap2", 418 | ] 419 | 420 | [[package]] 421 | name = "hermit-abi" 422 | version = "0.1.19" 423 | source = "registry+https://github.com/rust-lang/crates.io-index" 424 | checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" 425 | dependencies = [ 426 | "libc", 427 | ] 428 | 429 | [[package]] 430 | name = "hermit-abi" 431 | version = "0.3.9" 432 | source = "registry+https://github.com/rust-lang/crates.io-index" 433 | checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" 434 | 435 | [[package]] 436 | name = "humansize" 437 | version = "2.1.3" 438 | source = "registry+https://github.com/rust-lang/crates.io-index" 439 | checksum = "6cb51c9a029ddc91b07a787f1d86b53ccfa49b0e86688c946ebe8d3555685dd7" 440 | dependencies = [ 441 | "libm", 442 | ] 443 | 444 | [[package]] 445 | name = "humantime" 446 | version = "2.1.0" 447 | source = "registry+https://github.com/rust-lang/crates.io-index" 448 | checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" 449 | 450 | [[package]] 451 | name = "iana-time-zone" 452 | version = "0.1.60" 453 | source = "registry+https://github.com/rust-lang/crates.io-index" 454 | checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" 455 | dependencies = [ 456 | "android_system_properties", 457 | "core-foundation-sys", 458 | "iana-time-zone-haiku", 459 | "js-sys", 460 | "wasm-bindgen", 461 | "windows-core", 462 | ] 463 | 464 | [[package]] 465 | name = "iana-time-zone-haiku" 466 | version = "0.1.2" 467 | source = "registry+https://github.com/rust-lang/crates.io-index" 468 | checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" 469 | dependencies = [ 470 | "cc", 471 | ] 472 | 473 | [[package]] 474 | name = "ignore" 475 | version = "0.4.22" 476 | source = "registry+https://github.com/rust-lang/crates.io-index" 477 | checksum = "b46810df39e66e925525d6e38ce1e7f6e1d208f72dc39757880fcb66e2c58af1" 478 | dependencies = [ 479 | "crossbeam-deque", 480 | "globset", 481 | "log", 482 | "memchr", 483 | "regex-automata", 484 | "same-file", 485 | "walkdir", 486 | "winapi-util", 487 | ] 488 | 489 | [[package]] 490 | name = "instant" 491 | version = "0.1.12" 492 | source = "registry+https://github.com/rust-lang/crates.io-index" 493 | checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" 494 | dependencies = [ 495 | "cfg-if", 496 | ] 497 | 498 | [[package]] 499 | name = "itoa" 500 | version = "1.0.11" 501 | source = "registry+https://github.com/rust-lang/crates.io-index" 502 | checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" 503 | 504 | [[package]] 505 | name = "js-sys" 506 | version = "0.3.69" 507 | source = "registry+https://github.com/rust-lang/crates.io-index" 508 | checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" 509 | dependencies = [ 510 | "wasm-bindgen", 511 | ] 512 | 513 | [[package]] 514 | name = "lazy_static" 515 | version = "1.4.0" 516 | source = "registry+https://github.com/rust-lang/crates.io-index" 517 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 518 | 519 | [[package]] 520 | name = "libc" 521 | version = "0.2.154" 522 | source = "registry+https://github.com/rust-lang/crates.io-index" 523 | checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346" 524 | 525 | [[package]] 526 | name = "libm" 527 | version = "0.2.8" 528 | source = "registry+https://github.com/rust-lang/crates.io-index" 529 | checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" 530 | 531 | [[package]] 532 | name = "libredox" 533 | version = "0.1.3" 534 | source = "registry+https://github.com/rust-lang/crates.io-index" 535 | checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" 536 | dependencies = [ 537 | "bitflags 2.5.0", 538 | "libc", 539 | ] 540 | 541 | [[package]] 542 | name = "lock_api" 543 | version = "0.4.12" 544 | source = "registry+https://github.com/rust-lang/crates.io-index" 545 | checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" 546 | dependencies = [ 547 | "autocfg", 548 | "scopeguard", 549 | ] 550 | 551 | [[package]] 552 | name = "log" 553 | version = "0.4.21" 554 | source = "registry+https://github.com/rust-lang/crates.io-index" 555 | checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" 556 | 557 | [[package]] 558 | name = "memchr" 559 | version = "2.7.2" 560 | source = "registry+https://github.com/rust-lang/crates.io-index" 561 | checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" 562 | 563 | [[package]] 564 | name = "memmap2" 565 | version = "0.9.4" 566 | source = "registry+https://github.com/rust-lang/crates.io-index" 567 | checksum = "fe751422e4a8caa417e13c3ea66452215d7d63e19e604f4980461212f3ae1322" 568 | dependencies = [ 569 | "libc", 570 | ] 571 | 572 | [[package]] 573 | name = "num-format" 574 | version = "0.4.4" 575 | source = "registry+https://github.com/rust-lang/crates.io-index" 576 | checksum = "a652d9771a63711fd3c3deb670acfbe5c30a4072e664d7a3bf5a9e1056ac72c3" 577 | dependencies = [ 578 | "arrayvec", 579 | "itoa", 580 | ] 581 | 582 | [[package]] 583 | name = "num-traits" 584 | version = "0.2.19" 585 | source = "registry+https://github.com/rust-lang/crates.io-index" 586 | checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" 587 | dependencies = [ 588 | "autocfg", 589 | ] 590 | 591 | [[package]] 592 | name = "num_cpus" 593 | version = "1.16.0" 594 | source = "registry+https://github.com/rust-lang/crates.io-index" 595 | checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" 596 | dependencies = [ 597 | "hermit-abi 0.3.9", 598 | "libc", 599 | ] 600 | 601 | [[package]] 602 | name = "once_cell" 603 | version = "1.19.0" 604 | source = "registry+https://github.com/rust-lang/crates.io-index" 605 | checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" 606 | 607 | [[package]] 608 | name = "parking_lot" 609 | version = "0.11.2" 610 | source = "registry+https://github.com/rust-lang/crates.io-index" 611 | checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" 612 | dependencies = [ 613 | "instant", 614 | "lock_api", 615 | "parking_lot_core", 616 | ] 617 | 618 | [[package]] 619 | name = "parking_lot_core" 620 | version = "0.8.6" 621 | source = "registry+https://github.com/rust-lang/crates.io-index" 622 | checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" 623 | dependencies = [ 624 | "cfg-if", 625 | "instant", 626 | "libc", 627 | "redox_syscall", 628 | "smallvec", 629 | "winapi", 630 | ] 631 | 632 | [[package]] 633 | name = "parse-zoneinfo" 634 | version = "0.3.1" 635 | source = "registry+https://github.com/rust-lang/crates.io-index" 636 | checksum = "1f2a05b18d44e2957b88f96ba460715e295bc1d7510468a2f3d3b44535d26c24" 637 | dependencies = [ 638 | "regex", 639 | ] 640 | 641 | [[package]] 642 | name = "percent-encoding" 643 | version = "2.3.1" 644 | source = "registry+https://github.com/rust-lang/crates.io-index" 645 | checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" 646 | 647 | [[package]] 648 | name = "pest" 649 | version = "2.7.10" 650 | source = "registry+https://github.com/rust-lang/crates.io-index" 651 | checksum = "560131c633294438da9f7c4b08189194b20946c8274c6b9e38881a7874dc8ee8" 652 | dependencies = [ 653 | "memchr", 654 | "thiserror", 655 | "ucd-trie", 656 | ] 657 | 658 | [[package]] 659 | name = "pest_derive" 660 | version = "2.7.10" 661 | source = "registry+https://github.com/rust-lang/crates.io-index" 662 | checksum = "26293c9193fbca7b1a3bf9b79dc1e388e927e6cacaa78b4a3ab705a1d3d41459" 663 | dependencies = [ 664 | "pest", 665 | "pest_generator", 666 | ] 667 | 668 | [[package]] 669 | name = "pest_generator" 670 | version = "2.7.10" 671 | source = "registry+https://github.com/rust-lang/crates.io-index" 672 | checksum = "3ec22af7d3fb470a85dd2ca96b7c577a1eb4ef6f1683a9fe9a8c16e136c04687" 673 | dependencies = [ 674 | "pest", 675 | "pest_meta", 676 | "proc-macro2", 677 | "quote", 678 | "syn", 679 | ] 680 | 681 | [[package]] 682 | name = "pest_meta" 683 | version = "2.7.10" 684 | source = "registry+https://github.com/rust-lang/crates.io-index" 685 | checksum = "d7a240022f37c361ec1878d646fc5b7d7c4d28d5946e1a80ad5a7a4f4ca0bdcd" 686 | dependencies = [ 687 | "once_cell", 688 | "pest", 689 | "sha2", 690 | ] 691 | 692 | [[package]] 693 | name = "phf" 694 | version = "0.11.2" 695 | source = "registry+https://github.com/rust-lang/crates.io-index" 696 | checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" 697 | dependencies = [ 698 | "phf_shared", 699 | ] 700 | 701 | [[package]] 702 | name = "phf_codegen" 703 | version = "0.11.2" 704 | source = "registry+https://github.com/rust-lang/crates.io-index" 705 | checksum = "e8d39688d359e6b34654d328e262234662d16cc0f60ec8dcbe5e718709342a5a" 706 | dependencies = [ 707 | "phf_generator", 708 | "phf_shared", 709 | ] 710 | 711 | [[package]] 712 | name = "phf_generator" 713 | version = "0.11.2" 714 | source = "registry+https://github.com/rust-lang/crates.io-index" 715 | checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" 716 | dependencies = [ 717 | "phf_shared", 718 | "rand", 719 | ] 720 | 721 | [[package]] 722 | name = "phf_shared" 723 | version = "0.11.2" 724 | source = "registry+https://github.com/rust-lang/crates.io-index" 725 | checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" 726 | dependencies = [ 727 | "siphasher", 728 | ] 729 | 730 | [[package]] 731 | name = "ppv-lite86" 732 | version = "0.2.17" 733 | source = "registry+https://github.com/rust-lang/crates.io-index" 734 | checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" 735 | 736 | [[package]] 737 | name = "proc-macro2" 738 | version = "1.0.82" 739 | source = "registry+https://github.com/rust-lang/crates.io-index" 740 | checksum = "8ad3d49ab951a01fbaafe34f2ec74122942fe18a3f9814c3268f1bb72042131b" 741 | dependencies = [ 742 | "unicode-ident", 743 | ] 744 | 745 | [[package]] 746 | name = "quote" 747 | version = "1.0.36" 748 | source = "registry+https://github.com/rust-lang/crates.io-index" 749 | checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" 750 | dependencies = [ 751 | "proc-macro2", 752 | ] 753 | 754 | [[package]] 755 | name = "rand" 756 | version = "0.8.5" 757 | source = "registry+https://github.com/rust-lang/crates.io-index" 758 | checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 759 | dependencies = [ 760 | "libc", 761 | "rand_chacha", 762 | "rand_core", 763 | ] 764 | 765 | [[package]] 766 | name = "rand_chacha" 767 | version = "0.3.1" 768 | source = "registry+https://github.com/rust-lang/crates.io-index" 769 | checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 770 | dependencies = [ 771 | "ppv-lite86", 772 | "rand_core", 773 | ] 774 | 775 | [[package]] 776 | name = "rand_core" 777 | version = "0.6.4" 778 | source = "registry+https://github.com/rust-lang/crates.io-index" 779 | checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" 780 | dependencies = [ 781 | "getrandom", 782 | ] 783 | 784 | [[package]] 785 | name = "rayon" 786 | version = "1.10.0" 787 | source = "registry+https://github.com/rust-lang/crates.io-index" 788 | checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" 789 | dependencies = [ 790 | "either", 791 | "rayon-core", 792 | ] 793 | 794 | [[package]] 795 | name = "rayon-core" 796 | version = "1.12.1" 797 | source = "registry+https://github.com/rust-lang/crates.io-index" 798 | checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" 799 | dependencies = [ 800 | "crossbeam-deque", 801 | "crossbeam-utils", 802 | ] 803 | 804 | [[package]] 805 | name = "redox_syscall" 806 | version = "0.2.16" 807 | source = "registry+https://github.com/rust-lang/crates.io-index" 808 | checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" 809 | dependencies = [ 810 | "bitflags 1.3.2", 811 | ] 812 | 813 | [[package]] 814 | name = "redox_users" 815 | version = "0.4.5" 816 | source = "registry+https://github.com/rust-lang/crates.io-index" 817 | checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" 818 | dependencies = [ 819 | "getrandom", 820 | "libredox", 821 | "thiserror", 822 | ] 823 | 824 | [[package]] 825 | name = "regex" 826 | version = "1.10.4" 827 | source = "registry+https://github.com/rust-lang/crates.io-index" 828 | checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" 829 | dependencies = [ 830 | "aho-corasick 1.1.3", 831 | "memchr", 832 | "regex-automata", 833 | "regex-syntax", 834 | ] 835 | 836 | [[package]] 837 | name = "regex-automata" 838 | version = "0.4.6" 839 | source = "registry+https://github.com/rust-lang/crates.io-index" 840 | checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" 841 | dependencies = [ 842 | "aho-corasick 1.1.3", 843 | "memchr", 844 | "regex-syntax", 845 | ] 846 | 847 | [[package]] 848 | name = "regex-syntax" 849 | version = "0.8.3" 850 | source = "registry+https://github.com/rust-lang/crates.io-index" 851 | checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" 852 | 853 | [[package]] 854 | name = "ryu" 855 | version = "1.0.18" 856 | source = "registry+https://github.com/rust-lang/crates.io-index" 857 | checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" 858 | 859 | [[package]] 860 | name = "same-file" 861 | version = "1.0.6" 862 | source = "registry+https://github.com/rust-lang/crates.io-index" 863 | checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" 864 | dependencies = [ 865 | "winapi-util", 866 | ] 867 | 868 | [[package]] 869 | name = "scopeguard" 870 | version = "1.2.0" 871 | source = "registry+https://github.com/rust-lang/crates.io-index" 872 | checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" 873 | 874 | [[package]] 875 | name = "semver" 876 | version = "1.0.23" 877 | source = "registry+https://github.com/rust-lang/crates.io-index" 878 | checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" 879 | dependencies = [ 880 | "serde", 881 | ] 882 | 883 | [[package]] 884 | name = "serde" 885 | version = "1.0.201" 886 | source = "registry+https://github.com/rust-lang/crates.io-index" 887 | checksum = "780f1cebed1629e4753a1a38a3c72d30b97ec044f0aef68cb26650a3c5cf363c" 888 | dependencies = [ 889 | "serde_derive", 890 | ] 891 | 892 | [[package]] 893 | name = "serde_derive" 894 | version = "1.0.201" 895 | source = "registry+https://github.com/rust-lang/crates.io-index" 896 | checksum = "c5e405930b9796f1c00bee880d03fc7e0bb4b9a11afc776885ffe84320da2865" 897 | dependencies = [ 898 | "proc-macro2", 899 | "quote", 900 | "syn", 901 | ] 902 | 903 | [[package]] 904 | name = "serde_json" 905 | version = "1.0.117" 906 | source = "registry+https://github.com/rust-lang/crates.io-index" 907 | checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" 908 | dependencies = [ 909 | "itoa", 910 | "ryu", 911 | "serde", 912 | ] 913 | 914 | [[package]] 915 | name = "sha2" 916 | version = "0.10.8" 917 | source = "registry+https://github.com/rust-lang/crates.io-index" 918 | checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" 919 | dependencies = [ 920 | "cfg-if", 921 | "cpufeatures", 922 | "digest", 923 | ] 924 | 925 | [[package]] 926 | name = "siphasher" 927 | version = "0.3.11" 928 | source = "registry+https://github.com/rust-lang/crates.io-index" 929 | checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" 930 | 931 | [[package]] 932 | name = "slug" 933 | version = "0.1.5" 934 | source = "registry+https://github.com/rust-lang/crates.io-index" 935 | checksum = "3bd94acec9c8da640005f8e135a39fc0372e74535e6b368b7a04b875f784c8c4" 936 | dependencies = [ 937 | "deunicode", 938 | "wasm-bindgen", 939 | ] 940 | 941 | [[package]] 942 | name = "smallvec" 943 | version = "1.13.2" 944 | source = "registry+https://github.com/rust-lang/crates.io-index" 945 | checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" 946 | 947 | [[package]] 948 | name = "strsim" 949 | version = "0.8.0" 950 | source = "registry+https://github.com/rust-lang/crates.io-index" 951 | checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" 952 | 953 | [[package]] 954 | name = "syn" 955 | version = "2.0.63" 956 | source = "registry+https://github.com/rust-lang/crates.io-index" 957 | checksum = "bf5be731623ca1a1fb7d8be6f261a3be6d3e2337b8a1f97be944d020c8fcb704" 958 | dependencies = [ 959 | "proc-macro2", 960 | "quote", 961 | "unicode-ident", 962 | ] 963 | 964 | [[package]] 965 | name = "tera" 966 | version = "1.19.1" 967 | source = "registry+https://github.com/rust-lang/crates.io-index" 968 | checksum = "970dff17c11e884a4a09bc76e3a17ef71e01bb13447a11e85226e254fe6d10b8" 969 | dependencies = [ 970 | "chrono", 971 | "chrono-tz", 972 | "globwalk", 973 | "humansize", 974 | "lazy_static", 975 | "percent-encoding", 976 | "pest", 977 | "pest_derive", 978 | "rand", 979 | "regex", 980 | "serde", 981 | "serde_json", 982 | "slug", 983 | "unic-segment", 984 | ] 985 | 986 | [[package]] 987 | name = "term_size" 988 | version = "0.3.2" 989 | source = "registry+https://github.com/rust-lang/crates.io-index" 990 | checksum = "1e4129646ca0ed8f45d09b929036bafad5377103edd06e50bf574b353d2b08d9" 991 | dependencies = [ 992 | "libc", 993 | "winapi", 994 | ] 995 | 996 | [[package]] 997 | name = "termcolor" 998 | version = "1.4.1" 999 | source = "registry+https://github.com/rust-lang/crates.io-index" 1000 | checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" 1001 | dependencies = [ 1002 | "winapi-util", 1003 | ] 1004 | 1005 | [[package]] 1006 | name = "textwrap" 1007 | version = "0.11.0" 1008 | source = "registry+https://github.com/rust-lang/crates.io-index" 1009 | checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" 1010 | dependencies = [ 1011 | "unicode-width", 1012 | ] 1013 | 1014 | [[package]] 1015 | name = "thiserror" 1016 | version = "1.0.60" 1017 | source = "registry+https://github.com/rust-lang/crates.io-index" 1018 | checksum = "579e9083ca58dd9dcf91a9923bb9054071b9ebbd800b342194c9feb0ee89fc18" 1019 | dependencies = [ 1020 | "thiserror-impl", 1021 | ] 1022 | 1023 | [[package]] 1024 | name = "thiserror-impl" 1025 | version = "1.0.60" 1026 | source = "registry+https://github.com/rust-lang/crates.io-index" 1027 | checksum = "e2470041c06ec3ac1ab38d0356a6119054dedaea53e12fbefc0de730a1c08524" 1028 | dependencies = [ 1029 | "proc-macro2", 1030 | "quote", 1031 | "syn", 1032 | ] 1033 | 1034 | [[package]] 1035 | name = "tokei" 1036 | version = "12.1.2" 1037 | source = "registry+https://github.com/rust-lang/crates.io-index" 1038 | checksum = "a41f915e075a8a98ad64a5f7be6b7cc1710fc835c5f07e4a3efcaeb013291c00" 1039 | dependencies = [ 1040 | "aho-corasick 0.7.20", 1041 | "clap", 1042 | "crossbeam-channel", 1043 | "dashmap", 1044 | "dirs", 1045 | "encoding_rs_io", 1046 | "env_logger", 1047 | "grep-searcher", 1048 | "ignore", 1049 | "log", 1050 | "num-format", 1051 | "once_cell", 1052 | "parking_lot", 1053 | "rayon", 1054 | "regex", 1055 | "serde", 1056 | "serde_json", 1057 | "tera", 1058 | "term_size", 1059 | "toml", 1060 | ] 1061 | 1062 | [[package]] 1063 | name = "toml" 1064 | version = "0.5.11" 1065 | source = "registry+https://github.com/rust-lang/crates.io-index" 1066 | checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" 1067 | dependencies = [ 1068 | "serde", 1069 | ] 1070 | 1071 | [[package]] 1072 | name = "typenum" 1073 | version = "1.17.0" 1074 | source = "registry+https://github.com/rust-lang/crates.io-index" 1075 | checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" 1076 | 1077 | [[package]] 1078 | name = "ucd-trie" 1079 | version = "0.1.6" 1080 | source = "registry+https://github.com/rust-lang/crates.io-index" 1081 | checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" 1082 | 1083 | [[package]] 1084 | name = "unic-char-property" 1085 | version = "0.9.0" 1086 | source = "registry+https://github.com/rust-lang/crates.io-index" 1087 | checksum = "a8c57a407d9b6fa02b4795eb81c5b6652060a15a7903ea981f3d723e6c0be221" 1088 | dependencies = [ 1089 | "unic-char-range", 1090 | ] 1091 | 1092 | [[package]] 1093 | name = "unic-char-range" 1094 | version = "0.9.0" 1095 | source = "registry+https://github.com/rust-lang/crates.io-index" 1096 | checksum = "0398022d5f700414f6b899e10b8348231abf9173fa93144cbc1a43b9793c1fbc" 1097 | 1098 | [[package]] 1099 | name = "unic-common" 1100 | version = "0.9.0" 1101 | source = "registry+https://github.com/rust-lang/crates.io-index" 1102 | checksum = "80d7ff825a6a654ee85a63e80f92f054f904f21e7d12da4e22f9834a4aaa35bc" 1103 | 1104 | [[package]] 1105 | name = "unic-segment" 1106 | version = "0.9.0" 1107 | source = "registry+https://github.com/rust-lang/crates.io-index" 1108 | checksum = "e4ed5d26be57f84f176157270c112ef57b86debac9cd21daaabbe56db0f88f23" 1109 | dependencies = [ 1110 | "unic-ucd-segment", 1111 | ] 1112 | 1113 | [[package]] 1114 | name = "unic-ucd-segment" 1115 | version = "0.9.0" 1116 | source = "registry+https://github.com/rust-lang/crates.io-index" 1117 | checksum = "2079c122a62205b421f499da10f3ee0f7697f012f55b675e002483c73ea34700" 1118 | dependencies = [ 1119 | "unic-char-property", 1120 | "unic-char-range", 1121 | "unic-ucd-version", 1122 | ] 1123 | 1124 | [[package]] 1125 | name = "unic-ucd-version" 1126 | version = "0.9.0" 1127 | source = "registry+https://github.com/rust-lang/crates.io-index" 1128 | checksum = "96bd2f2237fe450fcd0a1d2f5f4e91711124f7857ba2e964247776ebeeb7b0c4" 1129 | dependencies = [ 1130 | "unic-common", 1131 | ] 1132 | 1133 | [[package]] 1134 | name = "unicode-ident" 1135 | version = "1.0.12" 1136 | source = "registry+https://github.com/rust-lang/crates.io-index" 1137 | checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" 1138 | 1139 | [[package]] 1140 | name = "unicode-width" 1141 | version = "0.1.12" 1142 | source = "registry+https://github.com/rust-lang/crates.io-index" 1143 | checksum = "68f5e5f3158ecfd4b8ff6fe086db7c8467a2dfdac97fe420f2b7c4aa97af66d6" 1144 | 1145 | [[package]] 1146 | name = "vec_map" 1147 | version = "0.8.2" 1148 | source = "registry+https://github.com/rust-lang/crates.io-index" 1149 | checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" 1150 | 1151 | [[package]] 1152 | name = "version_check" 1153 | version = "0.9.4" 1154 | source = "registry+https://github.com/rust-lang/crates.io-index" 1155 | checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" 1156 | 1157 | [[package]] 1158 | name = "walkdir" 1159 | version = "2.5.0" 1160 | source = "registry+https://github.com/rust-lang/crates.io-index" 1161 | checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" 1162 | dependencies = [ 1163 | "same-file", 1164 | "winapi-util", 1165 | ] 1166 | 1167 | [[package]] 1168 | name = "wasi" 1169 | version = "0.11.0+wasi-snapshot-preview1" 1170 | source = "registry+https://github.com/rust-lang/crates.io-index" 1171 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 1172 | 1173 | [[package]] 1174 | name = "wasm-bindgen" 1175 | version = "0.2.92" 1176 | source = "registry+https://github.com/rust-lang/crates.io-index" 1177 | checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" 1178 | dependencies = [ 1179 | "cfg-if", 1180 | "wasm-bindgen-macro", 1181 | ] 1182 | 1183 | [[package]] 1184 | name = "wasm-bindgen-backend" 1185 | version = "0.2.92" 1186 | source = "registry+https://github.com/rust-lang/crates.io-index" 1187 | checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" 1188 | dependencies = [ 1189 | "bumpalo", 1190 | "log", 1191 | "once_cell", 1192 | "proc-macro2", 1193 | "quote", 1194 | "syn", 1195 | "wasm-bindgen-shared", 1196 | ] 1197 | 1198 | [[package]] 1199 | name = "wasm-bindgen-macro" 1200 | version = "0.2.92" 1201 | source = "registry+https://github.com/rust-lang/crates.io-index" 1202 | checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" 1203 | dependencies = [ 1204 | "quote", 1205 | "wasm-bindgen-macro-support", 1206 | ] 1207 | 1208 | [[package]] 1209 | name = "wasm-bindgen-macro-support" 1210 | version = "0.2.92" 1211 | source = "registry+https://github.com/rust-lang/crates.io-index" 1212 | checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" 1213 | dependencies = [ 1214 | "proc-macro2", 1215 | "quote", 1216 | "syn", 1217 | "wasm-bindgen-backend", 1218 | "wasm-bindgen-shared", 1219 | ] 1220 | 1221 | [[package]] 1222 | name = "wasm-bindgen-shared" 1223 | version = "0.2.92" 1224 | source = "registry+https://github.com/rust-lang/crates.io-index" 1225 | checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" 1226 | 1227 | [[package]] 1228 | name = "winapi" 1229 | version = "0.3.9" 1230 | source = "registry+https://github.com/rust-lang/crates.io-index" 1231 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 1232 | dependencies = [ 1233 | "winapi-i686-pc-windows-gnu", 1234 | "winapi-x86_64-pc-windows-gnu", 1235 | ] 1236 | 1237 | [[package]] 1238 | name = "winapi-i686-pc-windows-gnu" 1239 | version = "0.4.0" 1240 | source = "registry+https://github.com/rust-lang/crates.io-index" 1241 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 1242 | 1243 | [[package]] 1244 | name = "winapi-util" 1245 | version = "0.1.8" 1246 | source = "registry+https://github.com/rust-lang/crates.io-index" 1247 | checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" 1248 | dependencies = [ 1249 | "windows-sys", 1250 | ] 1251 | 1252 | [[package]] 1253 | name = "winapi-x86_64-pc-windows-gnu" 1254 | version = "0.4.0" 1255 | source = "registry+https://github.com/rust-lang/crates.io-index" 1256 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 1257 | 1258 | [[package]] 1259 | name = "windows-core" 1260 | version = "0.52.0" 1261 | source = "registry+https://github.com/rust-lang/crates.io-index" 1262 | checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" 1263 | dependencies = [ 1264 | "windows-targets", 1265 | ] 1266 | 1267 | [[package]] 1268 | name = "windows-sys" 1269 | version = "0.52.0" 1270 | source = "registry+https://github.com/rust-lang/crates.io-index" 1271 | checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" 1272 | dependencies = [ 1273 | "windows-targets", 1274 | ] 1275 | 1276 | [[package]] 1277 | name = "windows-targets" 1278 | version = "0.52.5" 1279 | source = "registry+https://github.com/rust-lang/crates.io-index" 1280 | checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" 1281 | dependencies = [ 1282 | "windows_aarch64_gnullvm", 1283 | "windows_aarch64_msvc", 1284 | "windows_i686_gnu", 1285 | "windows_i686_gnullvm", 1286 | "windows_i686_msvc", 1287 | "windows_x86_64_gnu", 1288 | "windows_x86_64_gnullvm", 1289 | "windows_x86_64_msvc", 1290 | ] 1291 | 1292 | [[package]] 1293 | name = "windows_aarch64_gnullvm" 1294 | version = "0.52.5" 1295 | source = "registry+https://github.com/rust-lang/crates.io-index" 1296 | checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" 1297 | 1298 | [[package]] 1299 | name = "windows_aarch64_msvc" 1300 | version = "0.52.5" 1301 | source = "registry+https://github.com/rust-lang/crates.io-index" 1302 | checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" 1303 | 1304 | [[package]] 1305 | name = "windows_i686_gnu" 1306 | version = "0.52.5" 1307 | source = "registry+https://github.com/rust-lang/crates.io-index" 1308 | checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" 1309 | 1310 | [[package]] 1311 | name = "windows_i686_gnullvm" 1312 | version = "0.52.5" 1313 | source = "registry+https://github.com/rust-lang/crates.io-index" 1314 | checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" 1315 | 1316 | [[package]] 1317 | name = "windows_i686_msvc" 1318 | version = "0.52.5" 1319 | source = "registry+https://github.com/rust-lang/crates.io-index" 1320 | checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" 1321 | 1322 | [[package]] 1323 | name = "windows_x86_64_gnu" 1324 | version = "0.52.5" 1325 | source = "registry+https://github.com/rust-lang/crates.io-index" 1326 | checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" 1327 | 1328 | [[package]] 1329 | name = "windows_x86_64_gnullvm" 1330 | version = "0.52.5" 1331 | source = "registry+https://github.com/rust-lang/crates.io-index" 1332 | checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" 1333 | 1334 | [[package]] 1335 | name = "windows_x86_64_msvc" 1336 | version = "0.52.5" 1337 | source = "registry+https://github.com/rust-lang/crates.io-index" 1338 | checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" 1339 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "cargo-loc" 3 | version = "0.1.2" 4 | edition = "2021" 5 | authors = ["Sergey \"Shnatsel\" Davidoff "] 6 | description = "Count lines of code across your entire dependency tree" 7 | repository = "https://github.com/Shnatsel/cargo-loc" 8 | license = "MIT OR Apache-2.0" 9 | categories = ["command-line-utilities", "development-tools::cargo-plugins"] 10 | 11 | [dependencies] 12 | cargo_metadata = "0.18.1" 13 | tokei = "12.1.2" 14 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # `cargo loc` 2 | 3 | Counts the lines of code across your entire dependency tree in a Cargo project. Powered by [`tokei`](https://github.com/XAMPPRocky/tokei). 4 | 5 | ## Installation 6 | 7 | `cargo install cargo-loc` 8 | 9 | ## What works 10 | 11 | - Feature selection with `--no-default-features`, `--all-features`, `--features=...` 12 | - Restricting the analysis to specific platform, e.g. `--filter-platform=x86_64-unknown-linux-gnu` 13 | - Specifying the project with `--manifest-path` 14 | - Recognizes lots of languages, presents a breakdown by language 15 | - Telling code apart from comments and blank lines, in all those languages 16 | 17 | ## What doesn't work (yet?) 18 | 19 | - Excluding dev-dependencies and build-dependencies 20 | - Analyzing an entire Cargo workspace as opposed to a single crate (and its dependencies) 21 | - Fancy table output like in `tokei` 22 | - Configuration of any kind 23 | - Understanding which parts of a huge crate like `libc` you're actually using and counting accordingly (see [painter](https://github.com/rustfoundation/painter)) 24 | 25 | ## Sample output 26 | 27 | Here's `cargo loc` running on itself: 28 | 29 | ``` 30 | Top 20 largest dependencies: 31 | 504205 lines (133025 code): encoding_rs v0.8.34 32 | 384808 lines (384747 code): windows-sys v0.52.0 33 | 180430 lines (177051 code): winapi v0.3.9 34 | 121145 lines (109166 code): libc v0.2.154 35 | 54867 lines (51333 code): syn v2.0.63 36 | 52523 lines (49170 code): regex-syntax v0.8.3 37 | 40453 lines (29483 code): regex-automata v0.4.6 38 | 25319 lines (19553 code): rayon v1.10.0 39 | 24113 lines (22640 code): pest v2.7.10 40 | 23105 lines (18998 code): chrono v0.4.38 41 | 20150 lines (16943 code): serde_json v1.0.117 42 | 19282 lines (10602 code): wasm-bindgen v0.2.92 43 | 17237 lines (10962 code): regex v1.10.4 44 | 17095 lines (12062 code): clap v2.34.0 45 | 16593 lines (13567 code): crossbeam-channel v0.5.12 46 | 16379 lines (13118 code): chrono-tz v0.8.6 47 | 15108 lines (11379 code): aho-corasick v1.1.3 48 | 14221 lines (11915 code): tera v1.19.1 49 | 13421 lines (9231 code): libm v0.2.8 50 | 12701 lines (10742 code): serde v1.0.201 51 | 52 | Breakdown of the total lines by language: 53 | Rust: 1436510 54 | Plain Text: 369964 55 | Markdown: 35129 56 | TOML: 19082 57 | C: 8803 58 | HTML: 4028 59 | JavaScript: 2790 60 | Python: 2759 61 | JSON: 1432 62 | Makefile: 1361 63 | C Header: 1153 64 | F*: 830 65 | Pest: 735 66 | YAML: 238 67 | Shell: 186 68 | BASH: 183 69 | ReStructuredText: 179 70 | C++: 67 71 | Dockerfile: 9 72 | Pan: 3 73 | 74 | Total lines: 1885441 75 | (1355598 code, 444701 comments, 85142 blank lines) 76 | ``` 77 | 78 | Spooky! 79 | -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | use std::{collections::BTreeMap, path::Path}; 2 | 3 | use cargo_metadata::{MetadataCommand, PackageId}; 4 | use tokei::Languages; 5 | 6 | fn main() { 7 | let mut args: Vec<_> = std::env::args().skip(1).collect(); 8 | if Some("loc") == args.first().map(|s| s.as_str()) { 9 | args.remove(0); 10 | } 11 | 12 | // TODO: rewrite --target into --filter-platform, other similar stuff 13 | let metadata = MetadataCommand::new() 14 | .other_options(args) // forwards our own arguments for feature selection, --offline etc 15 | .verbose(true) // forwards errors to stdout 16 | .exec() 17 | .unwrap(); 18 | 19 | let resolve = metadata.resolve.unwrap(); 20 | if !resolve.root.is_some() { 21 | unimplemented!( 22 | "Running in the workspace root is not yet supported. Please run on a specific crate." 23 | ) 24 | } 25 | 26 | // TODO: filter out dev-dependencies? And optionally build-dependencies? 27 | // I've written this once for `cargo auditable`, 28 | // maybe I should uplift this into the `cargo_metadata` crate 29 | // to share code and stop everyone from reimplementing it over and over 30 | 31 | let mut reports: BTreeMap = BTreeMap::new(); 32 | 33 | for node in &resolve.nodes { 34 | // TODO: technically quadratic, but does it matter? 35 | // Could be optimized with a BTreeMap but probably won't show up on profile 36 | let pkg = metadata.packages.iter().find(|p| p.id == node.id).unwrap(); 37 | 38 | // Chop off the "/Cargo.toml" from the end of the manifest path 39 | let dir = pkg.manifest_path.as_std_path().parent().unwrap(); 40 | 41 | // TODO: parallelize this even more? This is embarrassingly parallel. But is it worth the complexity? 42 | let report = count_crate_loc(dir); 43 | reports.insert(pkg.id.clone(), report); 44 | } 45 | 46 | // print N largest dependencies 47 | { 48 | // satisfy the borrow checker 49 | let n = 20; 50 | println!("Top {n} largest dependencies:"); 51 | for (pkg_id, stats) in top_n(&reports, n) { 52 | let pkg = metadata.packages.iter().find(|p| p.id == *pkg_id).unwrap(); 53 | let total = stats.total(); 54 | println!( 55 | "{} lines ({} code): {} v{}", 56 | total.lines(), 57 | total.code, 58 | pkg.name, 59 | pkg.version 60 | ); 61 | } 62 | println!(); // blank line for padding 63 | } 64 | 65 | let mut combined_report = Languages::new(); 66 | for (_pkg, report) in reports { 67 | merge_reports(&mut combined_report, report) 68 | } 69 | 70 | // TODO: fancy pretty-printing like in tokei itself 71 | println!("Breakdown of the total lines by language:"); 72 | { 73 | let mut sorted_langs: Vec<_> = combined_report.iter().collect(); 74 | sorted_langs.sort_by_key(|(_lang, stats)| stats.lines()); 75 | sorted_langs.reverse(); // because the sorting put smaller keys first 76 | for (lang, stats) in &sorted_langs { 77 | println!("{lang}: {}", stats.lines()); 78 | } 79 | println!(); // blank line for padding 80 | } 81 | 82 | let total = combined_report.total(); 83 | println!("Total lines: {}", total.lines()); 84 | println!( 85 | "({} code, {} comments, {} blank lines)", 86 | total.code, total.comments, total.blanks 87 | ); 88 | } 89 | 90 | fn count_crate_loc(dir: &Path) -> tokei::Languages { 91 | let included = &[dir]; 92 | 93 | // The `tests` dir is not excluded because we cannot exclude same-file unit tests. 94 | // If we cannot exclude them, at least handle them consistently so we can document the behavior. 95 | // TODO: verify this really does the intended thing 96 | let excluded = &["benches", "examples"]; 97 | 98 | let mut config = tokei::Config::default(); 99 | config.sort = Some(tokei::Sort::Lines); 100 | 101 | let mut languages = tokei::Languages::new(); 102 | languages.get_statistics(included, excluded, &config); 103 | languages 104 | } 105 | 106 | fn merge_reports(destination: &mut Languages, source: Languages) { 107 | for (lang, source_stats) in source { 108 | // += seems to be implemented only for `Language`, not `&mut Language` 109 | // so we work around that with `mem::take` 110 | let mut dest = std::mem::take(destination.entry(lang).or_default()); 111 | dest += source_stats; 112 | destination.insert(lang, dest); 113 | } 114 | } 115 | 116 | fn top_n(reports: &BTreeMap, n: usize) -> Vec<(&PackageId, &Languages)> { 117 | let mut result: Vec<(&PackageId, &Languages)> = reports.iter().collect(); 118 | result.sort_by_key(|(_pkg, stats)| stats.total().lines()); 119 | // sorting puts smaller elements first, so the ones we need are at the end 120 | if result.len() > n { 121 | result.drain(..result.len() - n); 122 | } 123 | // reverse the remaining elements to put the largest one in front 124 | result.reverse(); 125 | result 126 | } 127 | --------------------------------------------------------------------------------