├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── README.md └── src ├── config.rs ├── downloader.rs ├── image_processing.rs ├── kafka.rs ├── main.rs ├── model.rs └── s3_publisher.rs /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | .idea/ 3 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | [[package]] 4 | name = "adler32" 5 | version = "1.0.4" 6 | source = "registry+https://github.com/rust-lang/crates.io-index" 7 | checksum = "5d2e7343e7fc9de883d1b0341e0b13970f764c14101234857d2ddafa1cb1cac2" 8 | 9 | [[package]] 10 | name = "ansi_term" 11 | version = "0.11.0" 12 | source = "registry+https://github.com/rust-lang/crates.io-index" 13 | checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" 14 | dependencies = [ 15 | "winapi 0.3.8", 16 | ] 17 | 18 | [[package]] 19 | name = "anyhow" 20 | version = "1.0.26" 21 | source = "registry+https://github.com/rust-lang/crates.io-index" 22 | checksum = "7825f6833612eb2414095684fcf6c635becf3ce97fe48cf6421321e93bfbd53c" 23 | 24 | [[package]] 25 | name = "arc-swap" 26 | version = "0.4.4" 27 | source = "registry+https://github.com/rust-lang/crates.io-index" 28 | checksum = "d7b8a9123b8027467bce0099fe556c628a53c8d83df0507084c31e9ba2e39aff" 29 | 30 | [[package]] 31 | name = "arrayref" 32 | version = "0.3.6" 33 | source = "registry+https://github.com/rust-lang/crates.io-index" 34 | checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" 35 | 36 | [[package]] 37 | name = "arrayvec" 38 | version = "0.5.1" 39 | source = "registry+https://github.com/rust-lang/crates.io-index" 40 | checksum = "cff77d8686867eceff3105329d4698d96c2391c176d5d03adc90c7389162b5b8" 41 | 42 | [[package]] 43 | name = "atty" 44 | version = "0.2.14" 45 | source = "registry+https://github.com/rust-lang/crates.io-index" 46 | checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" 47 | dependencies = [ 48 | "hermit-abi", 49 | "libc", 50 | "winapi 0.3.8", 51 | ] 52 | 53 | [[package]] 54 | name = "autocfg" 55 | version = "0.1.7" 56 | source = "registry+https://github.com/rust-lang/crates.io-index" 57 | checksum = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" 58 | 59 | [[package]] 60 | name = "autocfg" 61 | version = "1.0.0" 62 | source = "registry+https://github.com/rust-lang/crates.io-index" 63 | checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" 64 | 65 | [[package]] 66 | name = "backtrace" 67 | version = "0.3.43" 68 | source = "registry+https://github.com/rust-lang/crates.io-index" 69 | checksum = "7f80256bc78f67e7df7e36d77366f636ed976895d91fe2ab9efa3973e8fe8c4f" 70 | dependencies = [ 71 | "backtrace-sys", 72 | "cfg-if", 73 | "libc", 74 | "rustc-demangle", 75 | ] 76 | 77 | [[package]] 78 | name = "backtrace-sys" 79 | version = "0.1.32" 80 | source = "registry+https://github.com/rust-lang/crates.io-index" 81 | checksum = "5d6575f128516de27e3ce99689419835fce9643a9b215a14d2b5b685be018491" 82 | dependencies = [ 83 | "cc", 84 | "libc", 85 | ] 86 | 87 | [[package]] 88 | name = "base64" 89 | version = "0.10.1" 90 | source = "registry+https://github.com/rust-lang/crates.io-index" 91 | checksum = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" 92 | dependencies = [ 93 | "byteorder", 94 | ] 95 | 96 | [[package]] 97 | name = "base64" 98 | version = "0.11.0" 99 | source = "registry+https://github.com/rust-lang/crates.io-index" 100 | checksum = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" 101 | 102 | [[package]] 103 | name = "bitflags" 104 | version = "1.2.1" 105 | source = "registry+https://github.com/rust-lang/crates.io-index" 106 | checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" 107 | 108 | [[package]] 109 | name = "blake2b_simd" 110 | version = "0.5.10" 111 | source = "registry+https://github.com/rust-lang/crates.io-index" 112 | checksum = "d8fb2d74254a3a0b5cac33ac9f8ed0e44aa50378d9dbb2e5d83bd21ed1dc2c8a" 113 | dependencies = [ 114 | "arrayref", 115 | "arrayvec", 116 | "constant_time_eq", 117 | ] 118 | 119 | [[package]] 120 | name = "block-buffer" 121 | version = "0.7.3" 122 | source = "registry+https://github.com/rust-lang/crates.io-index" 123 | checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" 124 | dependencies = [ 125 | "block-padding", 126 | "byte-tools", 127 | "byteorder", 128 | "generic-array", 129 | ] 130 | 131 | [[package]] 132 | name = "block-padding" 133 | version = "0.1.5" 134 | source = "registry+https://github.com/rust-lang/crates.io-index" 135 | checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" 136 | dependencies = [ 137 | "byte-tools", 138 | ] 139 | 140 | [[package]] 141 | name = "bumpalo" 142 | version = "3.1.2" 143 | source = "registry+https://github.com/rust-lang/crates.io-index" 144 | checksum = "5fb8038c1ddc0a5f73787b130f4cc75151e96ed33e417fde765eb5a81e3532f4" 145 | 146 | [[package]] 147 | name = "byte-tools" 148 | version = "0.3.1" 149 | source = "registry+https://github.com/rust-lang/crates.io-index" 150 | checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" 151 | 152 | [[package]] 153 | name = "byteorder" 154 | version = "1.3.2" 155 | source = "registry+https://github.com/rust-lang/crates.io-index" 156 | checksum = "a7c3dd8985a7111efc5c80b44e23ecdd8c007de8ade3b96595387e812b957cf5" 157 | 158 | [[package]] 159 | name = "bytes" 160 | version = "0.4.12" 161 | source = "registry+https://github.com/rust-lang/crates.io-index" 162 | checksum = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" 163 | dependencies = [ 164 | "byteorder", 165 | "either", 166 | "iovec", 167 | ] 168 | 169 | [[package]] 170 | name = "bytes" 171 | version = "0.5.4" 172 | source = "registry+https://github.com/rust-lang/crates.io-index" 173 | checksum = "130aac562c0dd69c56b3b1cc8ffd2e17be31d0b6c25b61c96b76231aa23e39e1" 174 | 175 | [[package]] 176 | name = "c2-chacha" 177 | version = "0.2.3" 178 | source = "registry+https://github.com/rust-lang/crates.io-index" 179 | checksum = "214238caa1bf3a496ec3392968969cab8549f96ff30652c9e56885329315f6bb" 180 | dependencies = [ 181 | "ppv-lite86", 182 | ] 183 | 184 | [[package]] 185 | name = "cc" 186 | version = "1.0.50" 187 | source = "registry+https://github.com/rust-lang/crates.io-index" 188 | checksum = "95e28fa049fda1c330bcf9d723be7663a899c4679724b34c81e9f5a326aab8cd" 189 | 190 | [[package]] 191 | name = "cfg-if" 192 | version = "0.1.10" 193 | source = "registry+https://github.com/rust-lang/crates.io-index" 194 | checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" 195 | 196 | [[package]] 197 | name = "chrono" 198 | version = "0.4.10" 199 | source = "registry+https://github.com/rust-lang/crates.io-index" 200 | checksum = "31850b4a4d6bae316f7a09e691c944c28299298837edc0a03f755618c23cbc01" 201 | dependencies = [ 202 | "num-integer", 203 | "num-traits", 204 | "time", 205 | ] 206 | 207 | [[package]] 208 | name = "clap" 209 | version = "2.33.0" 210 | source = "registry+https://github.com/rust-lang/crates.io-index" 211 | checksum = "5067f5bb2d80ef5d68b4c87db81601f0b75bca627bc2ef76b141d7b846a3c6d9" 212 | dependencies = [ 213 | "ansi_term", 214 | "atty", 215 | "bitflags", 216 | "strsim", 217 | "textwrap", 218 | "unicode-width", 219 | "vec_map", 220 | ] 221 | 222 | [[package]] 223 | name = "cloudabi" 224 | version = "0.0.3" 225 | source = "registry+https://github.com/rust-lang/crates.io-index" 226 | checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" 227 | dependencies = [ 228 | "bitflags", 229 | ] 230 | 231 | [[package]] 232 | name = "color_quant" 233 | version = "1.0.1" 234 | source = "registry+https://github.com/rust-lang/crates.io-index" 235 | checksum = "0dbbb57365263e881e805dc77d94697c9118fd94d8da011240555aa7b23445bd" 236 | 237 | [[package]] 238 | name = "colored" 239 | version = "1.9.2" 240 | source = "registry+https://github.com/rust-lang/crates.io-index" 241 | checksum = "8815e2ab78f3a59928fc32e141fbeece88320a240e43f47b2fd64ea3a88a5b3d" 242 | dependencies = [ 243 | "atty", 244 | "lazy_static", 245 | "winapi 0.3.8", 246 | ] 247 | 248 | [[package]] 249 | name = "constant_time_eq" 250 | version = "0.1.5" 251 | source = "registry+https://github.com/rust-lang/crates.io-index" 252 | checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" 253 | 254 | [[package]] 255 | name = "cookie" 256 | version = "0.12.0" 257 | source = "registry+https://github.com/rust-lang/crates.io-index" 258 | checksum = "888604f00b3db336d2af898ec3c1d5d0ddf5e6d462220f2ededc33a87ac4bbd5" 259 | dependencies = [ 260 | "time", 261 | "url 1.7.2", 262 | ] 263 | 264 | [[package]] 265 | name = "cookie_store" 266 | version = "0.7.0" 267 | source = "registry+https://github.com/rust-lang/crates.io-index" 268 | checksum = "46750b3f362965f197996c4448e4a0935e791bf7d6631bfce9ee0af3d24c919c" 269 | dependencies = [ 270 | "cookie", 271 | "failure", 272 | "idna 0.1.5", 273 | "log", 274 | "publicsuffix", 275 | "serde", 276 | "serde_json", 277 | "time", 278 | "try_from", 279 | "url 1.7.2", 280 | ] 281 | 282 | [[package]] 283 | name = "core-foundation" 284 | version = "0.6.4" 285 | source = "registry+https://github.com/rust-lang/crates.io-index" 286 | checksum = "25b9e03f145fd4f2bf705e07b900cd41fc636598fe5dc452fd0db1441c3f496d" 287 | dependencies = [ 288 | "core-foundation-sys", 289 | "libc", 290 | ] 291 | 292 | [[package]] 293 | name = "core-foundation-sys" 294 | version = "0.6.2" 295 | source = "registry+https://github.com/rust-lang/crates.io-index" 296 | checksum = "e7ca8a5221364ef15ce201e8ed2f609fc312682a8f4e0e3d4aa5879764e0fa3b" 297 | 298 | [[package]] 299 | name = "crc32fast" 300 | version = "1.2.0" 301 | source = "registry+https://github.com/rust-lang/crates.io-index" 302 | checksum = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" 303 | dependencies = [ 304 | "cfg-if", 305 | ] 306 | 307 | [[package]] 308 | name = "crossbeam-deque" 309 | version = "0.7.2" 310 | source = "registry+https://github.com/rust-lang/crates.io-index" 311 | checksum = "c3aa945d63861bfe624b55d153a39684da1e8c0bc8fba932f7ee3a3c16cea3ca" 312 | dependencies = [ 313 | "crossbeam-epoch", 314 | "crossbeam-utils 0.7.0", 315 | ] 316 | 317 | [[package]] 318 | name = "crossbeam-epoch" 319 | version = "0.8.0" 320 | source = "registry+https://github.com/rust-lang/crates.io-index" 321 | checksum = "5064ebdbf05ce3cb95e45c8b086f72263f4166b29b97f6baff7ef7fe047b55ac" 322 | dependencies = [ 323 | "autocfg 0.1.7", 324 | "cfg-if", 325 | "crossbeam-utils 0.7.0", 326 | "lazy_static", 327 | "memoffset", 328 | "scopeguard", 329 | ] 330 | 331 | [[package]] 332 | name = "crossbeam-queue" 333 | version = "0.1.2" 334 | source = "registry+https://github.com/rust-lang/crates.io-index" 335 | checksum = "7c979cd6cfe72335896575c6b5688da489e420d36a27a0b9eb0c73db574b4a4b" 336 | dependencies = [ 337 | "crossbeam-utils 0.6.6", 338 | ] 339 | 340 | [[package]] 341 | name = "crossbeam-queue" 342 | version = "0.2.1" 343 | source = "registry+https://github.com/rust-lang/crates.io-index" 344 | checksum = "c695eeca1e7173472a32221542ae469b3e9aac3a4fc81f7696bcad82029493db" 345 | dependencies = [ 346 | "cfg-if", 347 | "crossbeam-utils 0.7.0", 348 | ] 349 | 350 | [[package]] 351 | name = "crossbeam-utils" 352 | version = "0.6.6" 353 | source = "registry+https://github.com/rust-lang/crates.io-index" 354 | checksum = "04973fa96e96579258a5091af6003abde64af786b860f18622b82e026cca60e6" 355 | dependencies = [ 356 | "cfg-if", 357 | "lazy_static", 358 | ] 359 | 360 | [[package]] 361 | name = "crossbeam-utils" 362 | version = "0.7.0" 363 | source = "registry+https://github.com/rust-lang/crates.io-index" 364 | checksum = "ce446db02cdc3165b94ae73111e570793400d0794e46125cc4056c81cbb039f4" 365 | dependencies = [ 366 | "autocfg 0.1.7", 367 | "cfg-if", 368 | "lazy_static", 369 | ] 370 | 371 | [[package]] 372 | name = "crypto-mac" 373 | version = "0.7.0" 374 | source = "registry+https://github.com/rust-lang/crates.io-index" 375 | checksum = "4434400df11d95d556bac068ddfedd482915eb18fe8bea89bc80b6e4b1c179e5" 376 | dependencies = [ 377 | "generic-array", 378 | "subtle", 379 | ] 380 | 381 | [[package]] 382 | name = "deflate" 383 | version = "0.7.20" 384 | source = "registry+https://github.com/rust-lang/crates.io-index" 385 | checksum = "707b6a7b384888a70c8d2e8650b3e60170dfc6a67bb4aa67b6dfca57af4bedb4" 386 | dependencies = [ 387 | "adler32", 388 | "byteorder", 389 | ] 390 | 391 | [[package]] 392 | name = "derivative" 393 | version = "1.0.3" 394 | source = "registry+https://github.com/rust-lang/crates.io-index" 395 | checksum = "942ca430eef7a3806595a6737bc388bf51adb888d3fc0dd1b50f1c170167ee3a" 396 | dependencies = [ 397 | "proc-macro2 0.4.30", 398 | "quote 0.6.13", 399 | "syn 0.15.44", 400 | ] 401 | 402 | [[package]] 403 | name = "digest" 404 | version = "0.8.1" 405 | source = "registry+https://github.com/rust-lang/crates.io-index" 406 | checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" 407 | dependencies = [ 408 | "generic-array", 409 | ] 410 | 411 | [[package]] 412 | name = "dirs" 413 | version = "2.0.2" 414 | source = "registry+https://github.com/rust-lang/crates.io-index" 415 | checksum = "13aea89a5c93364a98e9b37b2fa237effbb694d5cfe01c5b70941f7eb087d5e3" 416 | dependencies = [ 417 | "cfg-if", 418 | "dirs-sys", 419 | ] 420 | 421 | [[package]] 422 | name = "dirs-sys" 423 | version = "0.3.4" 424 | source = "registry+https://github.com/rust-lang/crates.io-index" 425 | checksum = "afa0b23de8fd801745c471deffa6e12d248f962c9fd4b4c33787b055599bde7b" 426 | dependencies = [ 427 | "cfg-if", 428 | "libc", 429 | "redox_users", 430 | "winapi 0.3.8", 431 | ] 432 | 433 | [[package]] 434 | name = "downloader" 435 | version = "0.1.0" 436 | dependencies = [ 437 | "bytes 0.5.4", 438 | "futures 0.3.1", 439 | "futures-util", 440 | "image", 441 | "log", 442 | "rdkafka", 443 | "reqwest 0.10.1", 444 | "rust-s3", 445 | "serde", 446 | "serde_json", 447 | "simple_logger", 448 | "structopt", 449 | "tokio 0.2.11", 450 | ] 451 | 452 | [[package]] 453 | name = "dtoa" 454 | version = "0.4.5" 455 | source = "registry+https://github.com/rust-lang/crates.io-index" 456 | checksum = "4358a9e11b9a09cf52383b451b49a169e8d797b68aa02301ff586d70d9661ea3" 457 | 458 | [[package]] 459 | name = "either" 460 | version = "1.5.3" 461 | source = "registry+https://github.com/rust-lang/crates.io-index" 462 | checksum = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" 463 | 464 | [[package]] 465 | name = "encoding_rs" 466 | version = "0.8.22" 467 | source = "registry+https://github.com/rust-lang/crates.io-index" 468 | checksum = "cd8d03faa7fe0c1431609dfad7bbe827af30f82e1e2ae6f7ee4fca6bd764bc28" 469 | dependencies = [ 470 | "cfg-if", 471 | ] 472 | 473 | [[package]] 474 | name = "error-chain" 475 | version = "0.10.0" 476 | source = "registry+https://github.com/rust-lang/crates.io-index" 477 | checksum = "d9435d864e017c3c6afeac1654189b06cdb491cf2ff73dbf0d73b0f292f42ff8" 478 | dependencies = [ 479 | "backtrace", 480 | ] 481 | 482 | [[package]] 483 | name = "error-chain" 484 | version = "0.12.1" 485 | source = "registry+https://github.com/rust-lang/crates.io-index" 486 | checksum = "3ab49e9dcb602294bc42f9a7dfc9bc6e936fca4418ea300dbfb84fe16de0b7d9" 487 | dependencies = [ 488 | "version_check 0.1.5", 489 | ] 490 | 491 | [[package]] 492 | name = "failure" 493 | version = "0.1.6" 494 | source = "registry+https://github.com/rust-lang/crates.io-index" 495 | checksum = "f8273f13c977665c5db7eb2b99ae520952fe5ac831ae4cd09d80c4c7042b5ed9" 496 | dependencies = [ 497 | "backtrace", 498 | "failure_derive", 499 | ] 500 | 501 | [[package]] 502 | name = "failure_derive" 503 | version = "0.1.6" 504 | source = "registry+https://github.com/rust-lang/crates.io-index" 505 | checksum = "0bc225b78e0391e4b8683440bf2e63c2deeeb2ce5189eab46e2b68c6d3725d08" 506 | dependencies = [ 507 | "proc-macro2 1.0.8", 508 | "quote 1.0.2", 509 | "syn 1.0.14", 510 | "synstructure", 511 | ] 512 | 513 | [[package]] 514 | name = "fake-simd" 515 | version = "0.1.2" 516 | source = "registry+https://github.com/rust-lang/crates.io-index" 517 | checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" 518 | 519 | [[package]] 520 | name = "flate2" 521 | version = "1.0.13" 522 | source = "registry+https://github.com/rust-lang/crates.io-index" 523 | checksum = "6bd6d6f4752952feb71363cffc9ebac9411b75b87c6ab6058c40c8900cf43c0f" 524 | dependencies = [ 525 | "cfg-if", 526 | "crc32fast", 527 | "libc", 528 | "miniz_oxide", 529 | ] 530 | 531 | [[package]] 532 | name = "fnv" 533 | version = "1.0.6" 534 | source = "registry+https://github.com/rust-lang/crates.io-index" 535 | checksum = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" 536 | 537 | [[package]] 538 | name = "foreign-types" 539 | version = "0.3.2" 540 | source = "registry+https://github.com/rust-lang/crates.io-index" 541 | checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" 542 | dependencies = [ 543 | "foreign-types-shared", 544 | ] 545 | 546 | [[package]] 547 | name = "foreign-types-shared" 548 | version = "0.1.1" 549 | source = "registry+https://github.com/rust-lang/crates.io-index" 550 | checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" 551 | 552 | [[package]] 553 | name = "fuchsia-cprng" 554 | version = "0.1.1" 555 | source = "registry+https://github.com/rust-lang/crates.io-index" 556 | checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" 557 | 558 | [[package]] 559 | name = "fuchsia-zircon" 560 | version = "0.3.3" 561 | source = "registry+https://github.com/rust-lang/crates.io-index" 562 | checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" 563 | dependencies = [ 564 | "bitflags", 565 | "fuchsia-zircon-sys", 566 | ] 567 | 568 | [[package]] 569 | name = "fuchsia-zircon-sys" 570 | version = "0.3.3" 571 | source = "registry+https://github.com/rust-lang/crates.io-index" 572 | checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" 573 | 574 | [[package]] 575 | name = "futures" 576 | version = "0.1.29" 577 | source = "registry+https://github.com/rust-lang/crates.io-index" 578 | checksum = "1b980f2816d6ee8673b6517b52cb0e808a180efc92e5c19d02cdda79066703ef" 579 | 580 | [[package]] 581 | name = "futures" 582 | version = "0.3.1" 583 | source = "registry+https://github.com/rust-lang/crates.io-index" 584 | checksum = "b6f16056ecbb57525ff698bb955162d0cd03bee84e6241c27ff75c08d8ca5987" 585 | dependencies = [ 586 | "futures-channel", 587 | "futures-core", 588 | "futures-executor", 589 | "futures-io", 590 | "futures-sink", 591 | "futures-task", 592 | "futures-util", 593 | ] 594 | 595 | [[package]] 596 | name = "futures-channel" 597 | version = "0.3.1" 598 | source = "registry+https://github.com/rust-lang/crates.io-index" 599 | checksum = "fcae98ca17d102fd8a3603727b9259fcf7fa4239b603d2142926189bc8999b86" 600 | dependencies = [ 601 | "futures-core", 602 | "futures-sink", 603 | ] 604 | 605 | [[package]] 606 | name = "futures-core" 607 | version = "0.3.1" 608 | source = "registry+https://github.com/rust-lang/crates.io-index" 609 | checksum = "79564c427afefab1dfb3298535b21eda083ef7935b4f0ecbfcb121f0aec10866" 610 | 611 | [[package]] 612 | name = "futures-cpupool" 613 | version = "0.1.8" 614 | source = "registry+https://github.com/rust-lang/crates.io-index" 615 | checksum = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4" 616 | dependencies = [ 617 | "futures 0.1.29", 618 | "num_cpus", 619 | ] 620 | 621 | [[package]] 622 | name = "futures-executor" 623 | version = "0.3.1" 624 | source = "registry+https://github.com/rust-lang/crates.io-index" 625 | checksum = "1e274736563f686a837a0568b478bdabfeaec2dca794b5649b04e2fe1627c231" 626 | dependencies = [ 627 | "futures-core", 628 | "futures-task", 629 | "futures-util", 630 | ] 631 | 632 | [[package]] 633 | name = "futures-io" 634 | version = "0.3.1" 635 | source = "registry+https://github.com/rust-lang/crates.io-index" 636 | checksum = "e676577d229e70952ab25f3945795ba5b16d63ca794ca9d2c860e5595d20b5ff" 637 | 638 | [[package]] 639 | name = "futures-macro" 640 | version = "0.3.1" 641 | source = "registry+https://github.com/rust-lang/crates.io-index" 642 | checksum = "52e7c56c15537adb4f76d0b7a76ad131cb4d2f4f32d3b0bcabcbe1c7c5e87764" 643 | dependencies = [ 644 | "proc-macro-hack", 645 | "proc-macro2 1.0.8", 646 | "quote 1.0.2", 647 | "syn 1.0.14", 648 | ] 649 | 650 | [[package]] 651 | name = "futures-sink" 652 | version = "0.3.1" 653 | source = "registry+https://github.com/rust-lang/crates.io-index" 654 | checksum = "171be33efae63c2d59e6dbba34186fe0d6394fb378069a76dfd80fdcffd43c16" 655 | 656 | [[package]] 657 | name = "futures-task" 658 | version = "0.3.1" 659 | source = "registry+https://github.com/rust-lang/crates.io-index" 660 | checksum = "0bae52d6b29cf440e298856fec3965ee6fa71b06aa7495178615953fd669e5f9" 661 | 662 | [[package]] 663 | name = "futures-util" 664 | version = "0.3.1" 665 | source = "registry+https://github.com/rust-lang/crates.io-index" 666 | checksum = "c0d66274fb76985d3c62c886d1da7ac4c0903a8c9f754e8fe0f35a6a6cc39e76" 667 | dependencies = [ 668 | "futures-channel", 669 | "futures-core", 670 | "futures-io", 671 | "futures-macro", 672 | "futures-sink", 673 | "futures-task", 674 | "memchr", 675 | "pin-utils", 676 | "proc-macro-hack", 677 | "proc-macro-nested", 678 | "slab", 679 | ] 680 | 681 | [[package]] 682 | name = "generic-array" 683 | version = "0.12.3" 684 | source = "registry+https://github.com/rust-lang/crates.io-index" 685 | checksum = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec" 686 | dependencies = [ 687 | "typenum", 688 | ] 689 | 690 | [[package]] 691 | name = "getrandom" 692 | version = "0.1.14" 693 | source = "registry+https://github.com/rust-lang/crates.io-index" 694 | checksum = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" 695 | dependencies = [ 696 | "cfg-if", 697 | "libc", 698 | "wasi", 699 | ] 700 | 701 | [[package]] 702 | name = "gif" 703 | version = "0.10.3" 704 | source = "registry+https://github.com/rust-lang/crates.io-index" 705 | checksum = "471d90201b3b223f3451cd4ad53e34295f16a1df17b1edf3736d47761c3981af" 706 | dependencies = [ 707 | "color_quant", 708 | "lzw", 709 | ] 710 | 711 | [[package]] 712 | name = "h2" 713 | version = "0.1.26" 714 | source = "registry+https://github.com/rust-lang/crates.io-index" 715 | checksum = "a5b34c246847f938a410a03c5458c7fee2274436675e76d8b903c08efc29c462" 716 | dependencies = [ 717 | "byteorder", 718 | "bytes 0.4.12", 719 | "fnv", 720 | "futures 0.1.29", 721 | "http 0.1.21", 722 | "indexmap", 723 | "log", 724 | "slab", 725 | "string", 726 | "tokio-io", 727 | ] 728 | 729 | [[package]] 730 | name = "h2" 731 | version = "0.2.1" 732 | source = "registry+https://github.com/rust-lang/crates.io-index" 733 | checksum = "b9433d71e471c1736fd5a61b671fc0b148d7a2992f666c958d03cd8feb3b88d1" 734 | dependencies = [ 735 | "bytes 0.5.4", 736 | "fnv", 737 | "futures-core", 738 | "futures-sink", 739 | "futures-util", 740 | "http 0.2.0", 741 | "indexmap", 742 | "log", 743 | "slab", 744 | "tokio 0.2.11", 745 | "tokio-util", 746 | ] 747 | 748 | [[package]] 749 | name = "heck" 750 | version = "0.3.1" 751 | source = "registry+https://github.com/rust-lang/crates.io-index" 752 | checksum = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" 753 | dependencies = [ 754 | "unicode-segmentation", 755 | ] 756 | 757 | [[package]] 758 | name = "hermit-abi" 759 | version = "0.1.6" 760 | source = "registry+https://github.com/rust-lang/crates.io-index" 761 | checksum = "eff2656d88f158ce120947499e971d743c05dbcbed62e5bd2f38f1698bbc3772" 762 | dependencies = [ 763 | "libc", 764 | ] 765 | 766 | [[package]] 767 | name = "hex" 768 | version = "0.4.0" 769 | source = "registry+https://github.com/rust-lang/crates.io-index" 770 | checksum = "023b39be39e3a2da62a94feb433e91e8bcd37676fbc8bea371daf52b7a769a3e" 771 | 772 | [[package]] 773 | name = "hmac" 774 | version = "0.7.1" 775 | source = "registry+https://github.com/rust-lang/crates.io-index" 776 | checksum = "5dcb5e64cda4c23119ab41ba960d1e170a774c8e4b9d9e6a9bc18aabf5e59695" 777 | dependencies = [ 778 | "crypto-mac", 779 | "digest", 780 | ] 781 | 782 | [[package]] 783 | name = "http" 784 | version = "0.1.21" 785 | source = "registry+https://github.com/rust-lang/crates.io-index" 786 | checksum = "d6ccf5ede3a895d8856620237b2f02972c1bbc78d2965ad7fe8838d4a0ed41f0" 787 | dependencies = [ 788 | "bytes 0.4.12", 789 | "fnv", 790 | "itoa", 791 | ] 792 | 793 | [[package]] 794 | name = "http" 795 | version = "0.2.0" 796 | source = "registry+https://github.com/rust-lang/crates.io-index" 797 | checksum = "b708cc7f06493459026f53b9a61a7a121a5d1ec6238dee58ea4941132b30156b" 798 | dependencies = [ 799 | "bytes 0.5.4", 800 | "fnv", 801 | "itoa", 802 | ] 803 | 804 | [[package]] 805 | name = "http-body" 806 | version = "0.1.0" 807 | source = "registry+https://github.com/rust-lang/crates.io-index" 808 | checksum = "6741c859c1b2463a423a1dbce98d418e6c3c3fc720fb0d45528657320920292d" 809 | dependencies = [ 810 | "bytes 0.4.12", 811 | "futures 0.1.29", 812 | "http 0.1.21", 813 | "tokio-buf", 814 | ] 815 | 816 | [[package]] 817 | name = "http-body" 818 | version = "0.3.1" 819 | source = "registry+https://github.com/rust-lang/crates.io-index" 820 | checksum = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b" 821 | dependencies = [ 822 | "bytes 0.5.4", 823 | "http 0.2.0", 824 | ] 825 | 826 | [[package]] 827 | name = "httparse" 828 | version = "1.3.4" 829 | source = "registry+https://github.com/rust-lang/crates.io-index" 830 | checksum = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" 831 | 832 | [[package]] 833 | name = "hyper" 834 | version = "0.12.35" 835 | source = "registry+https://github.com/rust-lang/crates.io-index" 836 | checksum = "9dbe6ed1438e1f8ad955a4701e9a944938e9519f6888d12d8558b645e247d5f6" 837 | dependencies = [ 838 | "bytes 0.4.12", 839 | "futures 0.1.29", 840 | "futures-cpupool", 841 | "h2 0.1.26", 842 | "http 0.1.21", 843 | "http-body 0.1.0", 844 | "httparse", 845 | "iovec", 846 | "itoa", 847 | "log", 848 | "net2", 849 | "rustc_version", 850 | "time", 851 | "tokio 0.1.22", 852 | "tokio-buf", 853 | "tokio-executor", 854 | "tokio-io", 855 | "tokio-reactor", 856 | "tokio-tcp", 857 | "tokio-threadpool", 858 | "tokio-timer", 859 | "want 0.2.0", 860 | ] 861 | 862 | [[package]] 863 | name = "hyper" 864 | version = "0.13.2" 865 | source = "registry+https://github.com/rust-lang/crates.io-index" 866 | checksum = "fa1c527bbc634be72aa7ba31e4e4def9bbb020f5416916279b7c705cd838893e" 867 | dependencies = [ 868 | "bytes 0.5.4", 869 | "futures-channel", 870 | "futures-core", 871 | "futures-util", 872 | "h2 0.2.1", 873 | "http 0.2.0", 874 | "http-body 0.3.1", 875 | "httparse", 876 | "itoa", 877 | "log", 878 | "net2", 879 | "pin-project", 880 | "time", 881 | "tokio 0.2.11", 882 | "tower-service", 883 | "want 0.3.0", 884 | ] 885 | 886 | [[package]] 887 | name = "hyper-tls" 888 | version = "0.3.2" 889 | source = "registry+https://github.com/rust-lang/crates.io-index" 890 | checksum = "3a800d6aa50af4b5850b2b0f659625ce9504df908e9733b635720483be26174f" 891 | dependencies = [ 892 | "bytes 0.4.12", 893 | "futures 0.1.29", 894 | "hyper 0.12.35", 895 | "native-tls", 896 | "tokio-io", 897 | ] 898 | 899 | [[package]] 900 | name = "hyper-tls" 901 | version = "0.4.1" 902 | source = "registry+https://github.com/rust-lang/crates.io-index" 903 | checksum = "3adcd308402b9553630734e9c36b77a7e48b3821251ca2493e8cd596763aafaa" 904 | dependencies = [ 905 | "bytes 0.5.4", 906 | "hyper 0.13.2", 907 | "native-tls", 908 | "tokio 0.2.11", 909 | "tokio-tls", 910 | ] 911 | 912 | [[package]] 913 | name = "idna" 914 | version = "0.1.5" 915 | source = "registry+https://github.com/rust-lang/crates.io-index" 916 | checksum = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" 917 | dependencies = [ 918 | "matches", 919 | "unicode-bidi", 920 | "unicode-normalization", 921 | ] 922 | 923 | [[package]] 924 | name = "idna" 925 | version = "0.2.0" 926 | source = "registry+https://github.com/rust-lang/crates.io-index" 927 | checksum = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" 928 | dependencies = [ 929 | "matches", 930 | "unicode-bidi", 931 | "unicode-normalization", 932 | ] 933 | 934 | [[package]] 935 | name = "image" 936 | version = "0.22.4" 937 | source = "registry+https://github.com/rust-lang/crates.io-index" 938 | checksum = "53cb19c4e35102e5c6fb9ade5e0e236c5588424dc171a849af3141bf0b47768a" 939 | dependencies = [ 940 | "byteorder", 941 | "gif", 942 | "jpeg-decoder", 943 | "num-iter", 944 | "num-rational", 945 | "num-traits", 946 | "png", 947 | "scoped_threadpool", 948 | "tiff", 949 | ] 950 | 951 | [[package]] 952 | name = "indexmap" 953 | version = "1.3.1" 954 | source = "registry+https://github.com/rust-lang/crates.io-index" 955 | checksum = "0b54058f0a6ff80b6803da8faf8997cde53872b38f4023728f6830b06cd3c0dc" 956 | dependencies = [ 957 | "autocfg 1.0.0", 958 | ] 959 | 960 | [[package]] 961 | name = "inflate" 962 | version = "0.4.5" 963 | source = "registry+https://github.com/rust-lang/crates.io-index" 964 | checksum = "1cdb29978cc5797bd8dcc8e5bf7de604891df2a8dc576973d71a281e916db2ff" 965 | dependencies = [ 966 | "adler32", 967 | ] 968 | 969 | [[package]] 970 | name = "iovec" 971 | version = "0.1.4" 972 | source = "registry+https://github.com/rust-lang/crates.io-index" 973 | checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" 974 | dependencies = [ 975 | "libc", 976 | ] 977 | 978 | [[package]] 979 | name = "itoa" 980 | version = "0.4.5" 981 | source = "registry+https://github.com/rust-lang/crates.io-index" 982 | checksum = "b8b7a7c0c47db5545ed3fef7468ee7bb5b74691498139e4b3f6a20685dc6dd8e" 983 | 984 | [[package]] 985 | name = "jpeg-decoder" 986 | version = "0.1.18" 987 | source = "registry+https://github.com/rust-lang/crates.io-index" 988 | checksum = "0256f0aec7352539102a9efbcb75543227b7ab1117e0f95450023af730128451" 989 | dependencies = [ 990 | "byteorder", 991 | "rayon", 992 | ] 993 | 994 | [[package]] 995 | name = "js-sys" 996 | version = "0.3.35" 997 | source = "registry+https://github.com/rust-lang/crates.io-index" 998 | checksum = "7889c7c36282151f6bf465be4700359318aef36baa951462382eae49e9577cf9" 999 | dependencies = [ 1000 | "wasm-bindgen", 1001 | ] 1002 | 1003 | [[package]] 1004 | name = "kernel32-sys" 1005 | version = "0.2.2" 1006 | source = "registry+https://github.com/rust-lang/crates.io-index" 1007 | checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" 1008 | dependencies = [ 1009 | "winapi 0.2.8", 1010 | "winapi-build", 1011 | ] 1012 | 1013 | [[package]] 1014 | name = "lazy_static" 1015 | version = "1.4.0" 1016 | source = "registry+https://github.com/rust-lang/crates.io-index" 1017 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 1018 | 1019 | [[package]] 1020 | name = "libc" 1021 | version = "0.2.66" 1022 | source = "registry+https://github.com/rust-lang/crates.io-index" 1023 | checksum = "d515b1f41455adea1313a4a2ac8a8a477634fbae63cc6100e3aebb207ce61558" 1024 | 1025 | [[package]] 1026 | name = "libz-sys" 1027 | version = "1.0.25" 1028 | source = "registry+https://github.com/rust-lang/crates.io-index" 1029 | checksum = "2eb5e43362e38e2bca2fd5f5134c4d4564a23a5c28e9b95411652021a8675ebe" 1030 | dependencies = [ 1031 | "cc", 1032 | "libc", 1033 | "pkg-config", 1034 | "vcpkg", 1035 | ] 1036 | 1037 | [[package]] 1038 | name = "lock_api" 1039 | version = "0.3.3" 1040 | source = "registry+https://github.com/rust-lang/crates.io-index" 1041 | checksum = "79b2de95ecb4691949fea4716ca53cdbcfccb2c612e19644a8bad05edcf9f47b" 1042 | dependencies = [ 1043 | "scopeguard", 1044 | ] 1045 | 1046 | [[package]] 1047 | name = "log" 1048 | version = "0.4.8" 1049 | source = "registry+https://github.com/rust-lang/crates.io-index" 1050 | checksum = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" 1051 | dependencies = [ 1052 | "cfg-if", 1053 | ] 1054 | 1055 | [[package]] 1056 | name = "lzw" 1057 | version = "0.10.0" 1058 | source = "registry+https://github.com/rust-lang/crates.io-index" 1059 | checksum = "7d947cbb889ed21c2a84be6ffbaebf5b4e0f4340638cba0444907e38b56be084" 1060 | 1061 | [[package]] 1062 | name = "matches" 1063 | version = "0.1.8" 1064 | source = "registry+https://github.com/rust-lang/crates.io-index" 1065 | checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" 1066 | 1067 | [[package]] 1068 | name = "maybe-uninit" 1069 | version = "2.0.0" 1070 | source = "registry+https://github.com/rust-lang/crates.io-index" 1071 | checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" 1072 | 1073 | [[package]] 1074 | name = "md5" 1075 | version = "0.6.1" 1076 | source = "registry+https://github.com/rust-lang/crates.io-index" 1077 | checksum = "7e6bcd6433cff03a4bfc3d9834d504467db1f1cf6d0ea765d37d330249ed629d" 1078 | 1079 | [[package]] 1080 | name = "memchr" 1081 | version = "2.3.0" 1082 | source = "registry+https://github.com/rust-lang/crates.io-index" 1083 | checksum = "3197e20c7edb283f87c071ddfc7a2cca8f8e0b888c242959846a6fce03c72223" 1084 | 1085 | [[package]] 1086 | name = "memoffset" 1087 | version = "0.5.3" 1088 | source = "registry+https://github.com/rust-lang/crates.io-index" 1089 | checksum = "75189eb85871ea5c2e2c15abbdd541185f63b408415e5051f5cac122d8c774b9" 1090 | dependencies = [ 1091 | "rustc_version", 1092 | ] 1093 | 1094 | [[package]] 1095 | name = "mime" 1096 | version = "0.3.16" 1097 | source = "registry+https://github.com/rust-lang/crates.io-index" 1098 | checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" 1099 | 1100 | [[package]] 1101 | name = "mime_guess" 1102 | version = "2.0.1" 1103 | source = "registry+https://github.com/rust-lang/crates.io-index" 1104 | checksum = "1a0ed03949aef72dbdf3116a383d7b38b4768e6f960528cd6a6044aa9ed68599" 1105 | dependencies = [ 1106 | "mime", 1107 | "unicase", 1108 | ] 1109 | 1110 | [[package]] 1111 | name = "miniz_oxide" 1112 | version = "0.3.6" 1113 | source = "registry+https://github.com/rust-lang/crates.io-index" 1114 | checksum = "aa679ff6578b1cddee93d7e82e263b94a575e0bfced07284eb0c037c1d2416a5" 1115 | dependencies = [ 1116 | "adler32", 1117 | ] 1118 | 1119 | [[package]] 1120 | name = "mio" 1121 | version = "0.6.21" 1122 | source = "registry+https://github.com/rust-lang/crates.io-index" 1123 | checksum = "302dec22bcf6bae6dfb69c647187f4b4d0fb6f535521f7bc022430ce8e12008f" 1124 | dependencies = [ 1125 | "cfg-if", 1126 | "fuchsia-zircon", 1127 | "fuchsia-zircon-sys", 1128 | "iovec", 1129 | "kernel32-sys", 1130 | "libc", 1131 | "log", 1132 | "miow 0.2.1", 1133 | "net2", 1134 | "slab", 1135 | "winapi 0.2.8", 1136 | ] 1137 | 1138 | [[package]] 1139 | name = "mio-named-pipes" 1140 | version = "0.1.6" 1141 | source = "registry+https://github.com/rust-lang/crates.io-index" 1142 | checksum = "f5e374eff525ce1c5b7687c4cef63943e7686524a387933ad27ca7ec43779cb3" 1143 | dependencies = [ 1144 | "log", 1145 | "mio", 1146 | "miow 0.3.3", 1147 | "winapi 0.3.8", 1148 | ] 1149 | 1150 | [[package]] 1151 | name = "mio-uds" 1152 | version = "0.6.7" 1153 | source = "registry+https://github.com/rust-lang/crates.io-index" 1154 | checksum = "966257a94e196b11bb43aca423754d87429960a768de9414f3691d6957abf125" 1155 | dependencies = [ 1156 | "iovec", 1157 | "libc", 1158 | "mio", 1159 | ] 1160 | 1161 | [[package]] 1162 | name = "miow" 1163 | version = "0.2.1" 1164 | source = "registry+https://github.com/rust-lang/crates.io-index" 1165 | checksum = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" 1166 | dependencies = [ 1167 | "kernel32-sys", 1168 | "net2", 1169 | "winapi 0.2.8", 1170 | "ws2_32-sys", 1171 | ] 1172 | 1173 | [[package]] 1174 | name = "miow" 1175 | version = "0.3.3" 1176 | source = "registry+https://github.com/rust-lang/crates.io-index" 1177 | checksum = "396aa0f2003d7df8395cb93e09871561ccc3e785f0acb369170e8cc74ddf9226" 1178 | dependencies = [ 1179 | "socket2", 1180 | "winapi 0.3.8", 1181 | ] 1182 | 1183 | [[package]] 1184 | name = "native-tls" 1185 | version = "0.2.3" 1186 | source = "registry+https://github.com/rust-lang/crates.io-index" 1187 | checksum = "4b2df1a4c22fd44a62147fd8f13dd0f95c9d8ca7b2610299b2a2f9cf8964274e" 1188 | dependencies = [ 1189 | "lazy_static", 1190 | "libc", 1191 | "log", 1192 | "openssl", 1193 | "openssl-probe", 1194 | "openssl-sys", 1195 | "schannel", 1196 | "security-framework", 1197 | "security-framework-sys", 1198 | "tempfile", 1199 | ] 1200 | 1201 | [[package]] 1202 | name = "net2" 1203 | version = "0.2.33" 1204 | source = "registry+https://github.com/rust-lang/crates.io-index" 1205 | checksum = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" 1206 | dependencies = [ 1207 | "cfg-if", 1208 | "libc", 1209 | "winapi 0.3.8", 1210 | ] 1211 | 1212 | [[package]] 1213 | name = "nom" 1214 | version = "4.2.3" 1215 | source = "registry+https://github.com/rust-lang/crates.io-index" 1216 | checksum = "2ad2a91a8e869eeb30b9cb3119ae87773a8f4ae617f41b1eb9c154b2905f7bd6" 1217 | dependencies = [ 1218 | "memchr", 1219 | "version_check 0.1.5", 1220 | ] 1221 | 1222 | [[package]] 1223 | name = "num-derive" 1224 | version = "0.2.5" 1225 | source = "registry+https://github.com/rust-lang/crates.io-index" 1226 | checksum = "eafd0b45c5537c3ba526f79d3e75120036502bebacbb3f3220914067ce39dbf2" 1227 | dependencies = [ 1228 | "proc-macro2 0.4.30", 1229 | "quote 0.6.13", 1230 | "syn 0.15.44", 1231 | ] 1232 | 1233 | [[package]] 1234 | name = "num-integer" 1235 | version = "0.1.42" 1236 | source = "registry+https://github.com/rust-lang/crates.io-index" 1237 | checksum = "3f6ea62e9d81a77cd3ee9a2a5b9b609447857f3d358704331e4ef39eb247fcba" 1238 | dependencies = [ 1239 | "autocfg 1.0.0", 1240 | "num-traits", 1241 | ] 1242 | 1243 | [[package]] 1244 | name = "num-iter" 1245 | version = "0.1.40" 1246 | source = "registry+https://github.com/rust-lang/crates.io-index" 1247 | checksum = "dfb0800a0291891dd9f4fe7bd9c19384f98f7fbe0cd0f39a2c6b88b9868bbc00" 1248 | dependencies = [ 1249 | "autocfg 1.0.0", 1250 | "num-integer", 1251 | "num-traits", 1252 | ] 1253 | 1254 | [[package]] 1255 | name = "num-rational" 1256 | version = "0.2.3" 1257 | source = "registry+https://github.com/rust-lang/crates.io-index" 1258 | checksum = "da4dc79f9e6c81bef96148c8f6b8e72ad4541caa4a24373e900a36da07de03a3" 1259 | dependencies = [ 1260 | "autocfg 1.0.0", 1261 | "num-integer", 1262 | "num-traits", 1263 | ] 1264 | 1265 | [[package]] 1266 | name = "num-traits" 1267 | version = "0.2.11" 1268 | source = "registry+https://github.com/rust-lang/crates.io-index" 1269 | checksum = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096" 1270 | dependencies = [ 1271 | "autocfg 1.0.0", 1272 | ] 1273 | 1274 | [[package]] 1275 | name = "num_cpus" 1276 | version = "1.12.0" 1277 | source = "registry+https://github.com/rust-lang/crates.io-index" 1278 | checksum = "46203554f085ff89c235cd12f7075f3233af9b11ed7c9e16dfe2560d03313ce6" 1279 | dependencies = [ 1280 | "hermit-abi", 1281 | "libc", 1282 | ] 1283 | 1284 | [[package]] 1285 | name = "num_enum" 1286 | version = "0.4.2" 1287 | source = "registry+https://github.com/rust-lang/crates.io-index" 1288 | checksum = "be601e38e20a6f3d01049d85801cb9b7a34a8da7a0da70df507bbde7735058c8" 1289 | dependencies = [ 1290 | "derivative", 1291 | "num_enum_derive", 1292 | ] 1293 | 1294 | [[package]] 1295 | name = "num_enum_derive" 1296 | version = "0.4.2" 1297 | source = "registry+https://github.com/rust-lang/crates.io-index" 1298 | checksum = "b59f30f6a043f2606adbd0addbf1eef6f2e28e8c4968918b63b7ff97ac0db2a7" 1299 | dependencies = [ 1300 | "proc-macro-crate", 1301 | "proc-macro2 1.0.8", 1302 | "quote 1.0.2", 1303 | "syn 1.0.14", 1304 | ] 1305 | 1306 | [[package]] 1307 | name = "opaque-debug" 1308 | version = "0.2.3" 1309 | source = "registry+https://github.com/rust-lang/crates.io-index" 1310 | checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" 1311 | 1312 | [[package]] 1313 | name = "openssl" 1314 | version = "0.10.27" 1315 | source = "registry+https://github.com/rust-lang/crates.io-index" 1316 | checksum = "e176a45fedd4c990e26580847a525e39e16ec32ac78957dbf62ded31b3abfd6f" 1317 | dependencies = [ 1318 | "bitflags", 1319 | "cfg-if", 1320 | "foreign-types", 1321 | "lazy_static", 1322 | "libc", 1323 | "openssl-sys", 1324 | ] 1325 | 1326 | [[package]] 1327 | name = "openssl-probe" 1328 | version = "0.1.2" 1329 | source = "registry+https://github.com/rust-lang/crates.io-index" 1330 | checksum = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" 1331 | 1332 | [[package]] 1333 | name = "openssl-sys" 1334 | version = "0.9.54" 1335 | source = "registry+https://github.com/rust-lang/crates.io-index" 1336 | checksum = "1024c0a59774200a555087a6da3f253a9095a5f344e353b212ac4c8b8e450986" 1337 | dependencies = [ 1338 | "autocfg 1.0.0", 1339 | "cc", 1340 | "libc", 1341 | "pkg-config", 1342 | "vcpkg", 1343 | ] 1344 | 1345 | [[package]] 1346 | name = "parking_lot" 1347 | version = "0.9.0" 1348 | source = "registry+https://github.com/rust-lang/crates.io-index" 1349 | checksum = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252" 1350 | dependencies = [ 1351 | "lock_api", 1352 | "parking_lot_core", 1353 | "rustc_version", 1354 | ] 1355 | 1356 | [[package]] 1357 | name = "parking_lot_core" 1358 | version = "0.6.2" 1359 | source = "registry+https://github.com/rust-lang/crates.io-index" 1360 | checksum = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b" 1361 | dependencies = [ 1362 | "cfg-if", 1363 | "cloudabi", 1364 | "libc", 1365 | "redox_syscall", 1366 | "rustc_version", 1367 | "smallvec 0.6.13", 1368 | "winapi 0.3.8", 1369 | ] 1370 | 1371 | [[package]] 1372 | name = "percent-encoding" 1373 | version = "1.0.1" 1374 | source = "registry+https://github.com/rust-lang/crates.io-index" 1375 | checksum = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" 1376 | 1377 | [[package]] 1378 | name = "percent-encoding" 1379 | version = "2.1.0" 1380 | source = "registry+https://github.com/rust-lang/crates.io-index" 1381 | checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" 1382 | 1383 | [[package]] 1384 | name = "pin-project" 1385 | version = "0.4.8" 1386 | source = "registry+https://github.com/rust-lang/crates.io-index" 1387 | checksum = "7804a463a8d9572f13453c516a5faea534a2403d7ced2f0c7e100eeff072772c" 1388 | dependencies = [ 1389 | "pin-project-internal", 1390 | ] 1391 | 1392 | [[package]] 1393 | name = "pin-project-internal" 1394 | version = "0.4.8" 1395 | source = "registry+https://github.com/rust-lang/crates.io-index" 1396 | checksum = "385322a45f2ecf3410c68d2a549a4a2685e8051d0f278e39743ff4e451cb9b3f" 1397 | dependencies = [ 1398 | "proc-macro2 1.0.8", 1399 | "quote 1.0.2", 1400 | "syn 1.0.14", 1401 | ] 1402 | 1403 | [[package]] 1404 | name = "pin-project-lite" 1405 | version = "0.1.4" 1406 | source = "registry+https://github.com/rust-lang/crates.io-index" 1407 | checksum = "237844750cfbb86f67afe27eee600dfbbcb6188d734139b534cbfbf4f96792ae" 1408 | 1409 | [[package]] 1410 | name = "pin-utils" 1411 | version = "0.1.0-alpha.4" 1412 | source = "registry+https://github.com/rust-lang/crates.io-index" 1413 | checksum = "5894c618ce612a3fa23881b152b608bafb8c56cfc22f434a3ba3120b40f7b587" 1414 | 1415 | [[package]] 1416 | name = "pkg-config" 1417 | version = "0.3.17" 1418 | source = "registry+https://github.com/rust-lang/crates.io-index" 1419 | checksum = "05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677" 1420 | 1421 | [[package]] 1422 | name = "png" 1423 | version = "0.15.3" 1424 | source = "registry+https://github.com/rust-lang/crates.io-index" 1425 | checksum = "ef859a23054bbfee7811284275ae522f0434a3c8e7f4b74bd4a35ae7e1c4a283" 1426 | dependencies = [ 1427 | "bitflags", 1428 | "crc32fast", 1429 | "deflate", 1430 | "inflate", 1431 | ] 1432 | 1433 | [[package]] 1434 | name = "ppv-lite86" 1435 | version = "0.2.6" 1436 | source = "registry+https://github.com/rust-lang/crates.io-index" 1437 | checksum = "74490b50b9fbe561ac330df47c08f3f33073d2d00c150f719147d7c54522fa1b" 1438 | 1439 | [[package]] 1440 | name = "proc-macro-crate" 1441 | version = "0.1.4" 1442 | source = "registry+https://github.com/rust-lang/crates.io-index" 1443 | checksum = "e10d4b51f154c8a7fb96fd6dad097cb74b863943ec010ac94b9fd1be8861fe1e" 1444 | dependencies = [ 1445 | "toml", 1446 | ] 1447 | 1448 | [[package]] 1449 | name = "proc-macro-error" 1450 | version = "0.4.8" 1451 | source = "registry+https://github.com/rust-lang/crates.io-index" 1452 | checksum = "875077759af22fa20b610ad4471d8155b321c89c3f2785526c9839b099be4e0a" 1453 | dependencies = [ 1454 | "proc-macro-error-attr", 1455 | "proc-macro2 1.0.8", 1456 | "quote 1.0.2", 1457 | "rustversion", 1458 | "syn 1.0.14", 1459 | ] 1460 | 1461 | [[package]] 1462 | name = "proc-macro-error-attr" 1463 | version = "0.4.8" 1464 | source = "registry+https://github.com/rust-lang/crates.io-index" 1465 | checksum = "c5717d9fa2664351a01ed73ba5ef6df09c01a521cb42cb65a061432a826f3c7a" 1466 | dependencies = [ 1467 | "proc-macro2 1.0.8", 1468 | "quote 1.0.2", 1469 | "rustversion", 1470 | "syn 1.0.14", 1471 | "syn-mid", 1472 | ] 1473 | 1474 | [[package]] 1475 | name = "proc-macro-hack" 1476 | version = "0.5.11" 1477 | source = "registry+https://github.com/rust-lang/crates.io-index" 1478 | checksum = "ecd45702f76d6d3c75a80564378ae228a85f0b59d2f3ed43c91b4a69eb2ebfc5" 1479 | dependencies = [ 1480 | "proc-macro2 1.0.8", 1481 | "quote 1.0.2", 1482 | "syn 1.0.14", 1483 | ] 1484 | 1485 | [[package]] 1486 | name = "proc-macro-nested" 1487 | version = "0.1.3" 1488 | source = "registry+https://github.com/rust-lang/crates.io-index" 1489 | checksum = "369a6ed065f249a159e06c45752c780bda2fb53c995718f9e484d08daa9eb42e" 1490 | 1491 | [[package]] 1492 | name = "proc-macro2" 1493 | version = "0.4.30" 1494 | source = "registry+https://github.com/rust-lang/crates.io-index" 1495 | checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" 1496 | dependencies = [ 1497 | "unicode-xid 0.1.0", 1498 | ] 1499 | 1500 | [[package]] 1501 | name = "proc-macro2" 1502 | version = "1.0.8" 1503 | source = "registry+https://github.com/rust-lang/crates.io-index" 1504 | checksum = "3acb317c6ff86a4e579dfa00fc5e6cca91ecbb4e7eb2df0468805b674eb88548" 1505 | dependencies = [ 1506 | "unicode-xid 0.2.0", 1507 | ] 1508 | 1509 | [[package]] 1510 | name = "publicsuffix" 1511 | version = "1.5.4" 1512 | source = "registry+https://github.com/rust-lang/crates.io-index" 1513 | checksum = "3bbaa49075179162b49acac1c6aa45fb4dafb5f13cf6794276d77bc7fd95757b" 1514 | dependencies = [ 1515 | "error-chain 0.12.1", 1516 | "idna 0.2.0", 1517 | "lazy_static", 1518 | "regex", 1519 | "url 2.1.1", 1520 | ] 1521 | 1522 | [[package]] 1523 | name = "quote" 1524 | version = "0.6.13" 1525 | source = "registry+https://github.com/rust-lang/crates.io-index" 1526 | checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" 1527 | dependencies = [ 1528 | "proc-macro2 0.4.30", 1529 | ] 1530 | 1531 | [[package]] 1532 | name = "quote" 1533 | version = "1.0.2" 1534 | source = "registry+https://github.com/rust-lang/crates.io-index" 1535 | checksum = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" 1536 | dependencies = [ 1537 | "proc-macro2 1.0.8", 1538 | ] 1539 | 1540 | [[package]] 1541 | name = "rand" 1542 | version = "0.6.5" 1543 | source = "registry+https://github.com/rust-lang/crates.io-index" 1544 | checksum = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" 1545 | dependencies = [ 1546 | "autocfg 0.1.7", 1547 | "libc", 1548 | "rand_chacha 0.1.1", 1549 | "rand_core 0.4.2", 1550 | "rand_hc 0.1.0", 1551 | "rand_isaac", 1552 | "rand_jitter", 1553 | "rand_os", 1554 | "rand_pcg", 1555 | "rand_xorshift", 1556 | "winapi 0.3.8", 1557 | ] 1558 | 1559 | [[package]] 1560 | name = "rand" 1561 | version = "0.7.3" 1562 | source = "registry+https://github.com/rust-lang/crates.io-index" 1563 | checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" 1564 | dependencies = [ 1565 | "getrandom", 1566 | "libc", 1567 | "rand_chacha 0.2.1", 1568 | "rand_core 0.5.1", 1569 | "rand_hc 0.2.0", 1570 | ] 1571 | 1572 | [[package]] 1573 | name = "rand_chacha" 1574 | version = "0.1.1" 1575 | source = "registry+https://github.com/rust-lang/crates.io-index" 1576 | checksum = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" 1577 | dependencies = [ 1578 | "autocfg 0.1.7", 1579 | "rand_core 0.3.1", 1580 | ] 1581 | 1582 | [[package]] 1583 | name = "rand_chacha" 1584 | version = "0.2.1" 1585 | source = "registry+https://github.com/rust-lang/crates.io-index" 1586 | checksum = "03a2a90da8c7523f554344f921aa97283eadf6ac484a6d2a7d0212fa7f8d6853" 1587 | dependencies = [ 1588 | "c2-chacha", 1589 | "rand_core 0.5.1", 1590 | ] 1591 | 1592 | [[package]] 1593 | name = "rand_core" 1594 | version = "0.3.1" 1595 | source = "registry+https://github.com/rust-lang/crates.io-index" 1596 | checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" 1597 | dependencies = [ 1598 | "rand_core 0.4.2", 1599 | ] 1600 | 1601 | [[package]] 1602 | name = "rand_core" 1603 | version = "0.4.2" 1604 | source = "registry+https://github.com/rust-lang/crates.io-index" 1605 | checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" 1606 | 1607 | [[package]] 1608 | name = "rand_core" 1609 | version = "0.5.1" 1610 | source = "registry+https://github.com/rust-lang/crates.io-index" 1611 | checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" 1612 | dependencies = [ 1613 | "getrandom", 1614 | ] 1615 | 1616 | [[package]] 1617 | name = "rand_hc" 1618 | version = "0.1.0" 1619 | source = "registry+https://github.com/rust-lang/crates.io-index" 1620 | checksum = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" 1621 | dependencies = [ 1622 | "rand_core 0.3.1", 1623 | ] 1624 | 1625 | [[package]] 1626 | name = "rand_hc" 1627 | version = "0.2.0" 1628 | source = "registry+https://github.com/rust-lang/crates.io-index" 1629 | checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" 1630 | dependencies = [ 1631 | "rand_core 0.5.1", 1632 | ] 1633 | 1634 | [[package]] 1635 | name = "rand_isaac" 1636 | version = "0.1.1" 1637 | source = "registry+https://github.com/rust-lang/crates.io-index" 1638 | checksum = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" 1639 | dependencies = [ 1640 | "rand_core 0.3.1", 1641 | ] 1642 | 1643 | [[package]] 1644 | name = "rand_jitter" 1645 | version = "0.1.4" 1646 | source = "registry+https://github.com/rust-lang/crates.io-index" 1647 | checksum = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" 1648 | dependencies = [ 1649 | "libc", 1650 | "rand_core 0.4.2", 1651 | "winapi 0.3.8", 1652 | ] 1653 | 1654 | [[package]] 1655 | name = "rand_os" 1656 | version = "0.1.3" 1657 | source = "registry+https://github.com/rust-lang/crates.io-index" 1658 | checksum = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" 1659 | dependencies = [ 1660 | "cloudabi", 1661 | "fuchsia-cprng", 1662 | "libc", 1663 | "rand_core 0.4.2", 1664 | "rdrand", 1665 | "winapi 0.3.8", 1666 | ] 1667 | 1668 | [[package]] 1669 | name = "rand_pcg" 1670 | version = "0.1.2" 1671 | source = "registry+https://github.com/rust-lang/crates.io-index" 1672 | checksum = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" 1673 | dependencies = [ 1674 | "autocfg 0.1.7", 1675 | "rand_core 0.4.2", 1676 | ] 1677 | 1678 | [[package]] 1679 | name = "rand_xorshift" 1680 | version = "0.1.1" 1681 | source = "registry+https://github.com/rust-lang/crates.io-index" 1682 | checksum = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" 1683 | dependencies = [ 1684 | "rand_core 0.3.1", 1685 | ] 1686 | 1687 | [[package]] 1688 | name = "rayon" 1689 | version = "1.3.0" 1690 | source = "registry+https://github.com/rust-lang/crates.io-index" 1691 | checksum = "db6ce3297f9c85e16621bb8cca38a06779ffc31bb8184e1be4bed2be4678a098" 1692 | dependencies = [ 1693 | "crossbeam-deque", 1694 | "either", 1695 | "rayon-core", 1696 | ] 1697 | 1698 | [[package]] 1699 | name = "rayon-core" 1700 | version = "1.7.0" 1701 | source = "registry+https://github.com/rust-lang/crates.io-index" 1702 | checksum = "08a89b46efaf957e52b18062fb2f4660f8b8a4dde1807ca002690868ef2c85a9" 1703 | dependencies = [ 1704 | "crossbeam-deque", 1705 | "crossbeam-queue 0.2.1", 1706 | "crossbeam-utils 0.7.0", 1707 | "lazy_static", 1708 | "num_cpus", 1709 | ] 1710 | 1711 | [[package]] 1712 | name = "rdkafka" 1713 | version = "0.23.1" 1714 | source = "registry+https://github.com/rust-lang/crates.io-index" 1715 | checksum = "d455ac2a07a27d87b4f0e321dfd8d9a5b574bd96f55e42e6c594712a08051222" 1716 | dependencies = [ 1717 | "futures 0.3.1", 1718 | "libc", 1719 | "log", 1720 | "rdkafka-sys", 1721 | "serde", 1722 | "serde_derive", 1723 | "serde_json", 1724 | ] 1725 | 1726 | [[package]] 1727 | name = "rdkafka-sys" 1728 | version = "1.3.1" 1729 | source = "registry+https://github.com/rust-lang/crates.io-index" 1730 | checksum = "7d770343fbbc6089c750000711a17a906e8b3f7831afcd752d9667d38833e578" 1731 | dependencies = [ 1732 | "libc", 1733 | "libz-sys", 1734 | "num_enum", 1735 | "pkg-config", 1736 | ] 1737 | 1738 | [[package]] 1739 | name = "rdrand" 1740 | version = "0.4.0" 1741 | source = "registry+https://github.com/rust-lang/crates.io-index" 1742 | checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" 1743 | dependencies = [ 1744 | "rand_core 0.3.1", 1745 | ] 1746 | 1747 | [[package]] 1748 | name = "redox_syscall" 1749 | version = "0.1.56" 1750 | source = "registry+https://github.com/rust-lang/crates.io-index" 1751 | checksum = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" 1752 | 1753 | [[package]] 1754 | name = "redox_users" 1755 | version = "0.3.4" 1756 | source = "registry+https://github.com/rust-lang/crates.io-index" 1757 | checksum = "09b23093265f8d200fa7b4c2c76297f47e681c655f6f1285a8780d6a022f7431" 1758 | dependencies = [ 1759 | "getrandom", 1760 | "redox_syscall", 1761 | "rust-argon2", 1762 | ] 1763 | 1764 | [[package]] 1765 | name = "regex" 1766 | version = "1.3.5" 1767 | source = "registry+https://github.com/rust-lang/crates.io-index" 1768 | checksum = "8900ebc1363efa7ea1c399ccc32daed870b4002651e0bed86e72d501ebbe0048" 1769 | dependencies = [ 1770 | "regex-syntax", 1771 | ] 1772 | 1773 | [[package]] 1774 | name = "regex-syntax" 1775 | version = "0.6.17" 1776 | source = "registry+https://github.com/rust-lang/crates.io-index" 1777 | checksum = "7fe5bd57d1d7414c6b5ed48563a2c855d995ff777729dcd91c369ec7fea395ae" 1778 | 1779 | [[package]] 1780 | name = "remove_dir_all" 1781 | version = "0.5.2" 1782 | source = "registry+https://github.com/rust-lang/crates.io-index" 1783 | checksum = "4a83fa3702a688b9359eccba92d153ac33fd2e8462f9e0e3fdf155239ea7792e" 1784 | dependencies = [ 1785 | "winapi 0.3.8", 1786 | ] 1787 | 1788 | [[package]] 1789 | name = "reqwest" 1790 | version = "0.9.24" 1791 | source = "registry+https://github.com/rust-lang/crates.io-index" 1792 | checksum = "f88643aea3c1343c804950d7bf983bd2067f5ab59db6d613a08e05572f2714ab" 1793 | dependencies = [ 1794 | "base64 0.10.1", 1795 | "bytes 0.4.12", 1796 | "cookie", 1797 | "cookie_store", 1798 | "encoding_rs", 1799 | "flate2", 1800 | "futures 0.1.29", 1801 | "http 0.1.21", 1802 | "hyper 0.12.35", 1803 | "hyper-tls 0.3.2", 1804 | "log", 1805 | "mime", 1806 | "mime_guess", 1807 | "native-tls", 1808 | "serde", 1809 | "serde_json", 1810 | "serde_urlencoded 0.5.5", 1811 | "time", 1812 | "tokio 0.1.22", 1813 | "tokio-executor", 1814 | "tokio-io", 1815 | "tokio-threadpool", 1816 | "tokio-timer", 1817 | "url 1.7.2", 1818 | "uuid", 1819 | "winreg", 1820 | ] 1821 | 1822 | [[package]] 1823 | name = "reqwest" 1824 | version = "0.10.1" 1825 | source = "registry+https://github.com/rust-lang/crates.io-index" 1826 | checksum = "c0e798e19e258bf6c30a304622e3e9ac820e483b06a1857a026e1f109b113fe4" 1827 | dependencies = [ 1828 | "base64 0.11.0", 1829 | "bytes 0.5.4", 1830 | "encoding_rs", 1831 | "futures-core", 1832 | "futures-util", 1833 | "http 0.2.0", 1834 | "http-body 0.3.1", 1835 | "hyper 0.13.2", 1836 | "hyper-tls 0.4.1", 1837 | "js-sys", 1838 | "lazy_static", 1839 | "log", 1840 | "mime", 1841 | "mime_guess", 1842 | "native-tls", 1843 | "percent-encoding 2.1.0", 1844 | "pin-project-lite", 1845 | "serde", 1846 | "serde_json", 1847 | "serde_urlencoded 0.6.1", 1848 | "time", 1849 | "tokio 0.2.11", 1850 | "tokio-tls", 1851 | "url 2.1.1", 1852 | "wasm-bindgen", 1853 | "wasm-bindgen-futures", 1854 | "web-sys", 1855 | "winreg", 1856 | ] 1857 | 1858 | [[package]] 1859 | name = "rust-argon2" 1860 | version = "0.7.0" 1861 | source = "registry+https://github.com/rust-lang/crates.io-index" 1862 | checksum = "2bc8af4bda8e1ff4932523b94d3dd20ee30a87232323eda55903ffd71d2fb017" 1863 | dependencies = [ 1864 | "base64 0.11.0", 1865 | "blake2b_simd", 1866 | "constant_time_eq", 1867 | "crossbeam-utils 0.7.0", 1868 | ] 1869 | 1870 | [[package]] 1871 | name = "rust-ini" 1872 | version = "0.13.0" 1873 | source = "registry+https://github.com/rust-lang/crates.io-index" 1874 | checksum = "3e52c148ef37f8c375d49d5a73aa70713125b7f19095948a923f80afdeb22ec2" 1875 | 1876 | [[package]] 1877 | name = "rust-s3" 1878 | version = "0.18.11" 1879 | source = "registry+https://github.com/rust-lang/crates.io-index" 1880 | checksum = "c23a6b0f2f0b4759053df79bfbad36010754bb68dcf75da8699f325a7b9abf6e" 1881 | dependencies = [ 1882 | "base64 0.10.1", 1883 | "chrono", 1884 | "dirs", 1885 | "futures 0.1.29", 1886 | "hex", 1887 | "hmac", 1888 | "md5", 1889 | "rand 0.7.3", 1890 | "reqwest 0.9.24", 1891 | "rust-ini", 1892 | "serde", 1893 | "serde-xml-rs", 1894 | "serde_derive", 1895 | "sha2", 1896 | "tokio 0.1.22", 1897 | "url 2.1.1", 1898 | ] 1899 | 1900 | [[package]] 1901 | name = "rustc-demangle" 1902 | version = "0.1.16" 1903 | source = "registry+https://github.com/rust-lang/crates.io-index" 1904 | checksum = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" 1905 | 1906 | [[package]] 1907 | name = "rustc_version" 1908 | version = "0.2.3" 1909 | source = "registry+https://github.com/rust-lang/crates.io-index" 1910 | checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" 1911 | dependencies = [ 1912 | "semver", 1913 | ] 1914 | 1915 | [[package]] 1916 | name = "rustversion" 1917 | version = "1.0.2" 1918 | source = "registry+https://github.com/rust-lang/crates.io-index" 1919 | checksum = "b3bba175698996010c4f6dce5e7f173b6eb781fce25d2cfc45e27091ce0b79f6" 1920 | dependencies = [ 1921 | "proc-macro2 1.0.8", 1922 | "quote 1.0.2", 1923 | "syn 1.0.14", 1924 | ] 1925 | 1926 | [[package]] 1927 | name = "ryu" 1928 | version = "1.0.2" 1929 | source = "registry+https://github.com/rust-lang/crates.io-index" 1930 | checksum = "bfa8506c1de11c9c4e4c38863ccbe02a305c8188e85a05a784c9e11e1c3910c8" 1931 | 1932 | [[package]] 1933 | name = "schannel" 1934 | version = "0.1.16" 1935 | source = "registry+https://github.com/rust-lang/crates.io-index" 1936 | checksum = "87f550b06b6cba9c8b8be3ee73f391990116bf527450d2556e9b9ce263b9a021" 1937 | dependencies = [ 1938 | "lazy_static", 1939 | "winapi 0.3.8", 1940 | ] 1941 | 1942 | [[package]] 1943 | name = "scoped_threadpool" 1944 | version = "0.1.9" 1945 | source = "registry+https://github.com/rust-lang/crates.io-index" 1946 | checksum = "1d51f5df5af43ab3f1360b429fa5e0152ac5ce8c0bd6485cae490332e96846a8" 1947 | 1948 | [[package]] 1949 | name = "scopeguard" 1950 | version = "1.0.0" 1951 | source = "registry+https://github.com/rust-lang/crates.io-index" 1952 | checksum = "b42e15e59b18a828bbf5c58ea01debb36b9b096346de35d941dcb89009f24a0d" 1953 | 1954 | [[package]] 1955 | name = "security-framework" 1956 | version = "0.3.4" 1957 | source = "registry+https://github.com/rust-lang/crates.io-index" 1958 | checksum = "8ef2429d7cefe5fd28bd1d2ed41c944547d4ff84776f5935b456da44593a16df" 1959 | dependencies = [ 1960 | "core-foundation", 1961 | "core-foundation-sys", 1962 | "libc", 1963 | "security-framework-sys", 1964 | ] 1965 | 1966 | [[package]] 1967 | name = "security-framework-sys" 1968 | version = "0.3.3" 1969 | source = "registry+https://github.com/rust-lang/crates.io-index" 1970 | checksum = "e31493fc37615debb8c5090a7aeb4a9730bc61e77ab10b9af59f1a202284f895" 1971 | dependencies = [ 1972 | "core-foundation-sys", 1973 | ] 1974 | 1975 | [[package]] 1976 | name = "semver" 1977 | version = "0.9.0" 1978 | source = "registry+https://github.com/rust-lang/crates.io-index" 1979 | checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" 1980 | dependencies = [ 1981 | "semver-parser", 1982 | ] 1983 | 1984 | [[package]] 1985 | name = "semver-parser" 1986 | version = "0.7.0" 1987 | source = "registry+https://github.com/rust-lang/crates.io-index" 1988 | checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" 1989 | 1990 | [[package]] 1991 | name = "serde" 1992 | version = "1.0.104" 1993 | source = "registry+https://github.com/rust-lang/crates.io-index" 1994 | checksum = "414115f25f818d7dfccec8ee535d76949ae78584fc4f79a6f45a904bf8ab4449" 1995 | dependencies = [ 1996 | "serde_derive", 1997 | ] 1998 | 1999 | [[package]] 2000 | name = "serde-xml-rs" 2001 | version = "0.3.1" 2002 | source = "registry+https://github.com/rust-lang/crates.io-index" 2003 | checksum = "27d98dfc234faa8532d66c837de56bf4276a259a43dd10ef96feb2fb7ab333b1" 2004 | dependencies = [ 2005 | "error-chain 0.10.0", 2006 | "log", 2007 | "serde", 2008 | "xml-rs", 2009 | ] 2010 | 2011 | [[package]] 2012 | name = "serde_derive" 2013 | version = "1.0.104" 2014 | source = "registry+https://github.com/rust-lang/crates.io-index" 2015 | checksum = "128f9e303a5a29922045a830221b8f78ec74a5f544944f3d5984f8ec3895ef64" 2016 | dependencies = [ 2017 | "proc-macro2 1.0.8", 2018 | "quote 1.0.2", 2019 | "syn 1.0.14", 2020 | ] 2021 | 2022 | [[package]] 2023 | name = "serde_json" 2024 | version = "1.0.48" 2025 | source = "registry+https://github.com/rust-lang/crates.io-index" 2026 | checksum = "9371ade75d4c2d6cb154141b9752cf3781ec9c05e0e5cf35060e1e70ee7b9c25" 2027 | dependencies = [ 2028 | "itoa", 2029 | "ryu", 2030 | "serde", 2031 | ] 2032 | 2033 | [[package]] 2034 | name = "serde_urlencoded" 2035 | version = "0.5.5" 2036 | source = "registry+https://github.com/rust-lang/crates.io-index" 2037 | checksum = "642dd69105886af2efd227f75a520ec9b44a820d65bc133a9131f7d229fd165a" 2038 | dependencies = [ 2039 | "dtoa", 2040 | "itoa", 2041 | "serde", 2042 | "url 1.7.2", 2043 | ] 2044 | 2045 | [[package]] 2046 | name = "serde_urlencoded" 2047 | version = "0.6.1" 2048 | source = "registry+https://github.com/rust-lang/crates.io-index" 2049 | checksum = "9ec5d77e2d4c73717816afac02670d5c4f534ea95ed430442cad02e7a6e32c97" 2050 | dependencies = [ 2051 | "dtoa", 2052 | "itoa", 2053 | "serde", 2054 | "url 2.1.1", 2055 | ] 2056 | 2057 | [[package]] 2058 | name = "sha2" 2059 | version = "0.8.1" 2060 | source = "registry+https://github.com/rust-lang/crates.io-index" 2061 | checksum = "27044adfd2e1f077f649f59deb9490d3941d674002f7d062870a60ebe9bd47a0" 2062 | dependencies = [ 2063 | "block-buffer", 2064 | "digest", 2065 | "fake-simd", 2066 | "opaque-debug", 2067 | ] 2068 | 2069 | [[package]] 2070 | name = "signal-hook-registry" 2071 | version = "1.2.0" 2072 | source = "registry+https://github.com/rust-lang/crates.io-index" 2073 | checksum = "94f478ede9f64724c5d173d7bb56099ec3e2d9fc2774aac65d34b8b890405f41" 2074 | dependencies = [ 2075 | "arc-swap", 2076 | "libc", 2077 | ] 2078 | 2079 | [[package]] 2080 | name = "simple_logger" 2081 | version = "1.5.0" 2082 | source = "registry+https://github.com/rust-lang/crates.io-index" 2083 | checksum = "ea8a5d6557565318b2bbf1d349512b7e4b4b43fd1e759dec8acd7bc0e9b1256b" 2084 | dependencies = [ 2085 | "atty", 2086 | "chrono", 2087 | "colored", 2088 | "log", 2089 | "winapi 0.3.8", 2090 | ] 2091 | 2092 | [[package]] 2093 | name = "slab" 2094 | version = "0.4.2" 2095 | source = "registry+https://github.com/rust-lang/crates.io-index" 2096 | checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" 2097 | 2098 | [[package]] 2099 | name = "smallvec" 2100 | version = "0.6.13" 2101 | source = "registry+https://github.com/rust-lang/crates.io-index" 2102 | checksum = "f7b0758c52e15a8b5e3691eae6cc559f08eee9406e548a4477ba4e67770a82b6" 2103 | dependencies = [ 2104 | "maybe-uninit", 2105 | ] 2106 | 2107 | [[package]] 2108 | name = "smallvec" 2109 | version = "1.2.0" 2110 | source = "registry+https://github.com/rust-lang/crates.io-index" 2111 | checksum = "5c2fb2ec9bcd216a5b0d0ccf31ab17b5ed1d627960edff65bbe95d3ce221cefc" 2112 | 2113 | [[package]] 2114 | name = "socket2" 2115 | version = "0.3.11" 2116 | source = "registry+https://github.com/rust-lang/crates.io-index" 2117 | checksum = "e8b74de517221a2cb01a53349cf54182acdc31a074727d3079068448c0676d85" 2118 | dependencies = [ 2119 | "cfg-if", 2120 | "libc", 2121 | "redox_syscall", 2122 | "winapi 0.3.8", 2123 | ] 2124 | 2125 | [[package]] 2126 | name = "sourcefile" 2127 | version = "0.1.4" 2128 | source = "registry+https://github.com/rust-lang/crates.io-index" 2129 | checksum = "4bf77cb82ba8453b42b6ae1d692e4cdc92f9a47beaf89a847c8be83f4e328ad3" 2130 | 2131 | [[package]] 2132 | name = "string" 2133 | version = "0.2.1" 2134 | source = "registry+https://github.com/rust-lang/crates.io-index" 2135 | checksum = "d24114bfcceb867ca7f71a0d3fe45d45619ec47a6fbfa98cb14e14250bfa5d6d" 2136 | dependencies = [ 2137 | "bytes 0.4.12", 2138 | ] 2139 | 2140 | [[package]] 2141 | name = "strsim" 2142 | version = "0.8.0" 2143 | source = "registry+https://github.com/rust-lang/crates.io-index" 2144 | checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" 2145 | 2146 | [[package]] 2147 | name = "structopt" 2148 | version = "0.3.9" 2149 | source = "registry+https://github.com/rust-lang/crates.io-index" 2150 | checksum = "a1bcbed7d48956fcbb5d80c6b95aedb553513de0a1b451ea92679d999c010e98" 2151 | dependencies = [ 2152 | "clap", 2153 | "lazy_static", 2154 | "structopt-derive", 2155 | ] 2156 | 2157 | [[package]] 2158 | name = "structopt-derive" 2159 | version = "0.4.2" 2160 | source = "registry+https://github.com/rust-lang/crates.io-index" 2161 | checksum = "095064aa1f5b94d14e635d0a5684cf140c43ae40a0fd990708d38f5d669e5f64" 2162 | dependencies = [ 2163 | "heck", 2164 | "proc-macro-error", 2165 | "proc-macro2 1.0.8", 2166 | "quote 1.0.2", 2167 | "syn 1.0.14", 2168 | ] 2169 | 2170 | [[package]] 2171 | name = "subtle" 2172 | version = "1.0.0" 2173 | source = "registry+https://github.com/rust-lang/crates.io-index" 2174 | checksum = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" 2175 | 2176 | [[package]] 2177 | name = "syn" 2178 | version = "0.15.44" 2179 | source = "registry+https://github.com/rust-lang/crates.io-index" 2180 | checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" 2181 | dependencies = [ 2182 | "proc-macro2 0.4.30", 2183 | "quote 0.6.13", 2184 | "unicode-xid 0.1.0", 2185 | ] 2186 | 2187 | [[package]] 2188 | name = "syn" 2189 | version = "1.0.14" 2190 | source = "registry+https://github.com/rust-lang/crates.io-index" 2191 | checksum = "af6f3550d8dff9ef7dc34d384ac6f107e5d31c8f57d9f28e0081503f547ac8f5" 2192 | dependencies = [ 2193 | "proc-macro2 1.0.8", 2194 | "quote 1.0.2", 2195 | "unicode-xid 0.2.0", 2196 | ] 2197 | 2198 | [[package]] 2199 | name = "syn-mid" 2200 | version = "0.5.0" 2201 | source = "registry+https://github.com/rust-lang/crates.io-index" 2202 | checksum = "7be3539f6c128a931cf19dcee741c1af532c7fd387baa739c03dd2e96479338a" 2203 | dependencies = [ 2204 | "proc-macro2 1.0.8", 2205 | "quote 1.0.2", 2206 | "syn 1.0.14", 2207 | ] 2208 | 2209 | [[package]] 2210 | name = "synstructure" 2211 | version = "0.12.3" 2212 | source = "registry+https://github.com/rust-lang/crates.io-index" 2213 | checksum = "67656ea1dc1b41b1451851562ea232ec2e5a80242139f7e679ceccfb5d61f545" 2214 | dependencies = [ 2215 | "proc-macro2 1.0.8", 2216 | "quote 1.0.2", 2217 | "syn 1.0.14", 2218 | "unicode-xid 0.2.0", 2219 | ] 2220 | 2221 | [[package]] 2222 | name = "tempfile" 2223 | version = "3.1.0" 2224 | source = "registry+https://github.com/rust-lang/crates.io-index" 2225 | checksum = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" 2226 | dependencies = [ 2227 | "cfg-if", 2228 | "libc", 2229 | "rand 0.7.3", 2230 | "redox_syscall", 2231 | "remove_dir_all", 2232 | "winapi 0.3.8", 2233 | ] 2234 | 2235 | [[package]] 2236 | name = "textwrap" 2237 | version = "0.11.0" 2238 | source = "registry+https://github.com/rust-lang/crates.io-index" 2239 | checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" 2240 | dependencies = [ 2241 | "unicode-width", 2242 | ] 2243 | 2244 | [[package]] 2245 | name = "tiff" 2246 | version = "0.3.1" 2247 | source = "registry+https://github.com/rust-lang/crates.io-index" 2248 | checksum = "d7b7c2cfc4742bd8a32f2e614339dd8ce30dbcf676bb262bd63a2327bc5df57d" 2249 | dependencies = [ 2250 | "byteorder", 2251 | "lzw", 2252 | "num-derive", 2253 | "num-traits", 2254 | ] 2255 | 2256 | [[package]] 2257 | name = "time" 2258 | version = "0.1.42" 2259 | source = "registry+https://github.com/rust-lang/crates.io-index" 2260 | checksum = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" 2261 | dependencies = [ 2262 | "libc", 2263 | "redox_syscall", 2264 | "winapi 0.3.8", 2265 | ] 2266 | 2267 | [[package]] 2268 | name = "tokio" 2269 | version = "0.1.22" 2270 | source = "registry+https://github.com/rust-lang/crates.io-index" 2271 | checksum = "5a09c0b5bb588872ab2f09afa13ee6e9dac11e10a0ec9e8e3ba39a5a5d530af6" 2272 | dependencies = [ 2273 | "bytes 0.4.12", 2274 | "futures 0.1.29", 2275 | "mio", 2276 | "num_cpus", 2277 | "tokio-codec", 2278 | "tokio-current-thread", 2279 | "tokio-executor", 2280 | "tokio-fs", 2281 | "tokio-io", 2282 | "tokio-reactor", 2283 | "tokio-sync", 2284 | "tokio-tcp", 2285 | "tokio-threadpool", 2286 | "tokio-timer", 2287 | "tokio-udp", 2288 | "tokio-uds", 2289 | ] 2290 | 2291 | [[package]] 2292 | name = "tokio" 2293 | version = "0.2.11" 2294 | source = "registry+https://github.com/rust-lang/crates.io-index" 2295 | checksum = "8fdd17989496f49cdc57978c96f0c9fe5e4a58a8bddc6813c449a4624f6a030b" 2296 | dependencies = [ 2297 | "bytes 0.5.4", 2298 | "fnv", 2299 | "futures-core", 2300 | "iovec", 2301 | "lazy_static", 2302 | "libc", 2303 | "memchr", 2304 | "mio", 2305 | "mio-named-pipes", 2306 | "mio-uds", 2307 | "num_cpus", 2308 | "pin-project-lite", 2309 | "signal-hook-registry", 2310 | "slab", 2311 | "tokio-macros", 2312 | "winapi 0.3.8", 2313 | ] 2314 | 2315 | [[package]] 2316 | name = "tokio-buf" 2317 | version = "0.1.1" 2318 | source = "registry+https://github.com/rust-lang/crates.io-index" 2319 | checksum = "8fb220f46c53859a4b7ec083e41dec9778ff0b1851c0942b211edb89e0ccdc46" 2320 | dependencies = [ 2321 | "bytes 0.4.12", 2322 | "either", 2323 | "futures 0.1.29", 2324 | ] 2325 | 2326 | [[package]] 2327 | name = "tokio-codec" 2328 | version = "0.1.1" 2329 | source = "registry+https://github.com/rust-lang/crates.io-index" 2330 | checksum = "5c501eceaf96f0e1793cf26beb63da3d11c738c4a943fdf3746d81d64684c39f" 2331 | dependencies = [ 2332 | "bytes 0.4.12", 2333 | "futures 0.1.29", 2334 | "tokio-io", 2335 | ] 2336 | 2337 | [[package]] 2338 | name = "tokio-current-thread" 2339 | version = "0.1.6" 2340 | source = "registry+https://github.com/rust-lang/crates.io-index" 2341 | checksum = "d16217cad7f1b840c5a97dfb3c43b0c871fef423a6e8d2118c604e843662a443" 2342 | dependencies = [ 2343 | "futures 0.1.29", 2344 | "tokio-executor", 2345 | ] 2346 | 2347 | [[package]] 2348 | name = "tokio-executor" 2349 | version = "0.1.9" 2350 | source = "registry+https://github.com/rust-lang/crates.io-index" 2351 | checksum = "ca6df436c42b0c3330a82d855d2ef017cd793090ad550a6bc2184f4b933532ab" 2352 | dependencies = [ 2353 | "crossbeam-utils 0.6.6", 2354 | "futures 0.1.29", 2355 | ] 2356 | 2357 | [[package]] 2358 | name = "tokio-fs" 2359 | version = "0.1.6" 2360 | source = "registry+https://github.com/rust-lang/crates.io-index" 2361 | checksum = "3fe6dc22b08d6993916647d108a1a7d15b9cd29c4f4496c62b92c45b5041b7af" 2362 | dependencies = [ 2363 | "futures 0.1.29", 2364 | "tokio-io", 2365 | "tokio-threadpool", 2366 | ] 2367 | 2368 | [[package]] 2369 | name = "tokio-io" 2370 | version = "0.1.12" 2371 | source = "registry+https://github.com/rust-lang/crates.io-index" 2372 | checksum = "5090db468dad16e1a7a54c8c67280c5e4b544f3d3e018f0b913b400261f85926" 2373 | dependencies = [ 2374 | "bytes 0.4.12", 2375 | "futures 0.1.29", 2376 | "log", 2377 | ] 2378 | 2379 | [[package]] 2380 | name = "tokio-macros" 2381 | version = "0.2.4" 2382 | source = "registry+https://github.com/rust-lang/crates.io-index" 2383 | checksum = "f4b1e7ed7d5d4c2af3d999904b0eebe76544897cdbfb2b9684bed2174ab20f7c" 2384 | dependencies = [ 2385 | "proc-macro2 1.0.8", 2386 | "quote 1.0.2", 2387 | "syn 1.0.14", 2388 | ] 2389 | 2390 | [[package]] 2391 | name = "tokio-reactor" 2392 | version = "0.1.11" 2393 | source = "registry+https://github.com/rust-lang/crates.io-index" 2394 | checksum = "6732fe6b53c8d11178dcb77ac6d9682af27fc6d4cb87789449152e5377377146" 2395 | dependencies = [ 2396 | "crossbeam-utils 0.6.6", 2397 | "futures 0.1.29", 2398 | "lazy_static", 2399 | "log", 2400 | "mio", 2401 | "num_cpus", 2402 | "parking_lot", 2403 | "slab", 2404 | "tokio-executor", 2405 | "tokio-io", 2406 | "tokio-sync", 2407 | ] 2408 | 2409 | [[package]] 2410 | name = "tokio-sync" 2411 | version = "0.1.7" 2412 | source = "registry+https://github.com/rust-lang/crates.io-index" 2413 | checksum = "d06554cce1ae4a50f42fba8023918afa931413aded705b560e29600ccf7c6d76" 2414 | dependencies = [ 2415 | "fnv", 2416 | "futures 0.1.29", 2417 | ] 2418 | 2419 | [[package]] 2420 | name = "tokio-tcp" 2421 | version = "0.1.3" 2422 | source = "registry+https://github.com/rust-lang/crates.io-index" 2423 | checksum = "1d14b10654be682ac43efee27401d792507e30fd8d26389e1da3b185de2e4119" 2424 | dependencies = [ 2425 | "bytes 0.4.12", 2426 | "futures 0.1.29", 2427 | "iovec", 2428 | "mio", 2429 | "tokio-io", 2430 | "tokio-reactor", 2431 | ] 2432 | 2433 | [[package]] 2434 | name = "tokio-threadpool" 2435 | version = "0.1.17" 2436 | source = "registry+https://github.com/rust-lang/crates.io-index" 2437 | checksum = "f0c32ffea4827978e9aa392d2f743d973c1dfa3730a2ed3f22ce1e6984da848c" 2438 | dependencies = [ 2439 | "crossbeam-deque", 2440 | "crossbeam-queue 0.1.2", 2441 | "crossbeam-utils 0.6.6", 2442 | "futures 0.1.29", 2443 | "lazy_static", 2444 | "log", 2445 | "num_cpus", 2446 | "slab", 2447 | "tokio-executor", 2448 | ] 2449 | 2450 | [[package]] 2451 | name = "tokio-timer" 2452 | version = "0.2.12" 2453 | source = "registry+https://github.com/rust-lang/crates.io-index" 2454 | checksum = "1739638e364e558128461fc1ad84d997702c8e31c2e6b18fb99842268199e827" 2455 | dependencies = [ 2456 | "crossbeam-utils 0.6.6", 2457 | "futures 0.1.29", 2458 | "slab", 2459 | "tokio-executor", 2460 | ] 2461 | 2462 | [[package]] 2463 | name = "tokio-tls" 2464 | version = "0.3.0" 2465 | source = "registry+https://github.com/rust-lang/crates.io-index" 2466 | checksum = "7bde02a3a5291395f59b06ec6945a3077602fac2b07eeeaf0dee2122f3619828" 2467 | dependencies = [ 2468 | "native-tls", 2469 | "tokio 0.2.11", 2470 | ] 2471 | 2472 | [[package]] 2473 | name = "tokio-udp" 2474 | version = "0.1.5" 2475 | source = "registry+https://github.com/rust-lang/crates.io-index" 2476 | checksum = "f02298505547f73e60f568359ef0d016d5acd6e830ab9bc7c4a5b3403440121b" 2477 | dependencies = [ 2478 | "bytes 0.4.12", 2479 | "futures 0.1.29", 2480 | "log", 2481 | "mio", 2482 | "tokio-codec", 2483 | "tokio-io", 2484 | "tokio-reactor", 2485 | ] 2486 | 2487 | [[package]] 2488 | name = "tokio-uds" 2489 | version = "0.2.5" 2490 | source = "registry+https://github.com/rust-lang/crates.io-index" 2491 | checksum = "037ffc3ba0e12a0ab4aca92e5234e0dedeb48fddf6ccd260f1f150a36a9f2445" 2492 | dependencies = [ 2493 | "bytes 0.4.12", 2494 | "futures 0.1.29", 2495 | "iovec", 2496 | "libc", 2497 | "log", 2498 | "mio", 2499 | "mio-uds", 2500 | "tokio-codec", 2501 | "tokio-io", 2502 | "tokio-reactor", 2503 | ] 2504 | 2505 | [[package]] 2506 | name = "tokio-util" 2507 | version = "0.2.0" 2508 | source = "registry+https://github.com/rust-lang/crates.io-index" 2509 | checksum = "571da51182ec208780505a32528fc5512a8fe1443ab960b3f2f3ef093cd16930" 2510 | dependencies = [ 2511 | "bytes 0.5.4", 2512 | "futures-core", 2513 | "futures-sink", 2514 | "log", 2515 | "pin-project-lite", 2516 | "tokio 0.2.11", 2517 | ] 2518 | 2519 | [[package]] 2520 | name = "toml" 2521 | version = "0.5.6" 2522 | source = "registry+https://github.com/rust-lang/crates.io-index" 2523 | checksum = "ffc92d160b1eef40665be3a05630d003936a3bc7da7421277846c2613e92c71a" 2524 | dependencies = [ 2525 | "serde", 2526 | ] 2527 | 2528 | [[package]] 2529 | name = "tower-service" 2530 | version = "0.3.0" 2531 | source = "registry+https://github.com/rust-lang/crates.io-index" 2532 | checksum = "e987b6bf443f4b5b3b6f38704195592cca41c5bb7aedd3c3693c7081f8289860" 2533 | 2534 | [[package]] 2535 | name = "try-lock" 2536 | version = "0.2.2" 2537 | source = "registry+https://github.com/rust-lang/crates.io-index" 2538 | checksum = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" 2539 | 2540 | [[package]] 2541 | name = "try_from" 2542 | version = "0.3.2" 2543 | source = "registry+https://github.com/rust-lang/crates.io-index" 2544 | checksum = "283d3b89e1368717881a9d51dad843cc435380d8109c9e47d38780a324698d8b" 2545 | dependencies = [ 2546 | "cfg-if", 2547 | ] 2548 | 2549 | [[package]] 2550 | name = "typenum" 2551 | version = "1.11.2" 2552 | source = "registry+https://github.com/rust-lang/crates.io-index" 2553 | checksum = "6d2783fe2d6b8c1101136184eb41be8b1ad379e4657050b8aaff0c79ee7575f9" 2554 | 2555 | [[package]] 2556 | name = "unicase" 2557 | version = "2.6.0" 2558 | source = "registry+https://github.com/rust-lang/crates.io-index" 2559 | checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" 2560 | dependencies = [ 2561 | "version_check 0.9.1", 2562 | ] 2563 | 2564 | [[package]] 2565 | name = "unicode-bidi" 2566 | version = "0.3.4" 2567 | source = "registry+https://github.com/rust-lang/crates.io-index" 2568 | checksum = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" 2569 | dependencies = [ 2570 | "matches", 2571 | ] 2572 | 2573 | [[package]] 2574 | name = "unicode-normalization" 2575 | version = "0.1.12" 2576 | source = "registry+https://github.com/rust-lang/crates.io-index" 2577 | checksum = "5479532badd04e128284890390c1e876ef7a993d0570b3597ae43dfa1d59afa4" 2578 | dependencies = [ 2579 | "smallvec 1.2.0", 2580 | ] 2581 | 2582 | [[package]] 2583 | name = "unicode-segmentation" 2584 | version = "1.6.0" 2585 | source = "registry+https://github.com/rust-lang/crates.io-index" 2586 | checksum = "e83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0" 2587 | 2588 | [[package]] 2589 | name = "unicode-width" 2590 | version = "0.1.7" 2591 | source = "registry+https://github.com/rust-lang/crates.io-index" 2592 | checksum = "caaa9d531767d1ff2150b9332433f32a24622147e5ebb1f26409d5da67afd479" 2593 | 2594 | [[package]] 2595 | name = "unicode-xid" 2596 | version = "0.1.0" 2597 | source = "registry+https://github.com/rust-lang/crates.io-index" 2598 | checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" 2599 | 2600 | [[package]] 2601 | name = "unicode-xid" 2602 | version = "0.2.0" 2603 | source = "registry+https://github.com/rust-lang/crates.io-index" 2604 | checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" 2605 | 2606 | [[package]] 2607 | name = "url" 2608 | version = "1.7.2" 2609 | source = "registry+https://github.com/rust-lang/crates.io-index" 2610 | checksum = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" 2611 | dependencies = [ 2612 | "idna 0.1.5", 2613 | "matches", 2614 | "percent-encoding 1.0.1", 2615 | ] 2616 | 2617 | [[package]] 2618 | name = "url" 2619 | version = "2.1.1" 2620 | source = "registry+https://github.com/rust-lang/crates.io-index" 2621 | checksum = "829d4a8476c35c9bf0bbce5a3b23f4106f79728039b726d292bb93bc106787cb" 2622 | dependencies = [ 2623 | "idna 0.2.0", 2624 | "matches", 2625 | "percent-encoding 2.1.0", 2626 | ] 2627 | 2628 | [[package]] 2629 | name = "uuid" 2630 | version = "0.7.4" 2631 | source = "registry+https://github.com/rust-lang/crates.io-index" 2632 | checksum = "90dbc611eb48397705a6b0f6e917da23ae517e4d127123d2cf7674206627d32a" 2633 | dependencies = [ 2634 | "rand 0.6.5", 2635 | ] 2636 | 2637 | [[package]] 2638 | name = "vcpkg" 2639 | version = "0.2.8" 2640 | source = "registry+https://github.com/rust-lang/crates.io-index" 2641 | checksum = "3fc439f2794e98976c88a2a2dafce96b930fe8010b0a256b3c2199a773933168" 2642 | 2643 | [[package]] 2644 | name = "vec_map" 2645 | version = "0.8.1" 2646 | source = "registry+https://github.com/rust-lang/crates.io-index" 2647 | checksum = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a" 2648 | 2649 | [[package]] 2650 | name = "version_check" 2651 | version = "0.1.5" 2652 | source = "registry+https://github.com/rust-lang/crates.io-index" 2653 | checksum = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" 2654 | 2655 | [[package]] 2656 | name = "version_check" 2657 | version = "0.9.1" 2658 | source = "registry+https://github.com/rust-lang/crates.io-index" 2659 | checksum = "078775d0255232fb988e6fccf26ddc9d1ac274299aaedcedce21c6f72cc533ce" 2660 | 2661 | [[package]] 2662 | name = "want" 2663 | version = "0.2.0" 2664 | source = "registry+https://github.com/rust-lang/crates.io-index" 2665 | checksum = "b6395efa4784b027708f7451087e647ec73cc74f5d9bc2e418404248d679a230" 2666 | dependencies = [ 2667 | "futures 0.1.29", 2668 | "log", 2669 | "try-lock", 2670 | ] 2671 | 2672 | [[package]] 2673 | name = "want" 2674 | version = "0.3.0" 2675 | source = "registry+https://github.com/rust-lang/crates.io-index" 2676 | checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" 2677 | dependencies = [ 2678 | "log", 2679 | "try-lock", 2680 | ] 2681 | 2682 | [[package]] 2683 | name = "wasi" 2684 | version = "0.9.0+wasi-snapshot-preview1" 2685 | source = "registry+https://github.com/rust-lang/crates.io-index" 2686 | checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" 2687 | 2688 | [[package]] 2689 | name = "wasm-bindgen" 2690 | version = "0.2.58" 2691 | source = "registry+https://github.com/rust-lang/crates.io-index" 2692 | checksum = "5205e9afdf42282b192e2310a5b463a6d1c1d774e30dc3c791ac37ab42d2616c" 2693 | dependencies = [ 2694 | "cfg-if", 2695 | "serde", 2696 | "serde_json", 2697 | "wasm-bindgen-macro", 2698 | ] 2699 | 2700 | [[package]] 2701 | name = "wasm-bindgen-backend" 2702 | version = "0.2.58" 2703 | source = "registry+https://github.com/rust-lang/crates.io-index" 2704 | checksum = "11cdb95816290b525b32587d76419facd99662a07e59d3cdb560488a819d9a45" 2705 | dependencies = [ 2706 | "bumpalo", 2707 | "lazy_static", 2708 | "log", 2709 | "proc-macro2 1.0.8", 2710 | "quote 1.0.2", 2711 | "syn 1.0.14", 2712 | "wasm-bindgen-shared", 2713 | ] 2714 | 2715 | [[package]] 2716 | name = "wasm-bindgen-futures" 2717 | version = "0.4.8" 2718 | source = "registry+https://github.com/rust-lang/crates.io-index" 2719 | checksum = "8bbdd49e3e28b40dec6a9ba8d17798245ce32b019513a845369c641b275135d9" 2720 | dependencies = [ 2721 | "cfg-if", 2722 | "js-sys", 2723 | "wasm-bindgen", 2724 | "web-sys", 2725 | ] 2726 | 2727 | [[package]] 2728 | name = "wasm-bindgen-macro" 2729 | version = "0.2.58" 2730 | source = "registry+https://github.com/rust-lang/crates.io-index" 2731 | checksum = "574094772ce6921576fb6f2e3f7497b8a76273b6db092be18fc48a082de09dc3" 2732 | dependencies = [ 2733 | "quote 1.0.2", 2734 | "wasm-bindgen-macro-support", 2735 | ] 2736 | 2737 | [[package]] 2738 | name = "wasm-bindgen-macro-support" 2739 | version = "0.2.58" 2740 | source = "registry+https://github.com/rust-lang/crates.io-index" 2741 | checksum = "e85031354f25eaebe78bb7db1c3d86140312a911a106b2e29f9cc440ce3e7668" 2742 | dependencies = [ 2743 | "proc-macro2 1.0.8", 2744 | "quote 1.0.2", 2745 | "syn 1.0.14", 2746 | "wasm-bindgen-backend", 2747 | "wasm-bindgen-shared", 2748 | ] 2749 | 2750 | [[package]] 2751 | name = "wasm-bindgen-shared" 2752 | version = "0.2.58" 2753 | source = "registry+https://github.com/rust-lang/crates.io-index" 2754 | checksum = "f5e7e61fc929f4c0dddb748b102ebf9f632e2b8d739f2016542b4de2965a9601" 2755 | 2756 | [[package]] 2757 | name = "wasm-bindgen-webidl" 2758 | version = "0.2.58" 2759 | source = "registry+https://github.com/rust-lang/crates.io-index" 2760 | checksum = "ef012a0d93fc0432df126a8eaf547b2dce25a8ce9212e1d3cbeef5c11157975d" 2761 | dependencies = [ 2762 | "anyhow", 2763 | "heck", 2764 | "log", 2765 | "proc-macro2 1.0.8", 2766 | "quote 1.0.2", 2767 | "syn 1.0.14", 2768 | "wasm-bindgen-backend", 2769 | "weedle", 2770 | ] 2771 | 2772 | [[package]] 2773 | name = "web-sys" 2774 | version = "0.3.35" 2775 | source = "registry+https://github.com/rust-lang/crates.io-index" 2776 | checksum = "aaf97caf6aa8c2b1dac90faf0db529d9d63c93846cca4911856f78a83cebf53b" 2777 | dependencies = [ 2778 | "anyhow", 2779 | "js-sys", 2780 | "sourcefile", 2781 | "wasm-bindgen", 2782 | "wasm-bindgen-webidl", 2783 | ] 2784 | 2785 | [[package]] 2786 | name = "weedle" 2787 | version = "0.10.0" 2788 | source = "registry+https://github.com/rust-lang/crates.io-index" 2789 | checksum = "3bb43f70885151e629e2a19ce9e50bd730fd436cfd4b666894c9ce4de9141164" 2790 | dependencies = [ 2791 | "nom", 2792 | ] 2793 | 2794 | [[package]] 2795 | name = "winapi" 2796 | version = "0.2.8" 2797 | source = "registry+https://github.com/rust-lang/crates.io-index" 2798 | checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" 2799 | 2800 | [[package]] 2801 | name = "winapi" 2802 | version = "0.3.8" 2803 | source = "registry+https://github.com/rust-lang/crates.io-index" 2804 | checksum = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" 2805 | dependencies = [ 2806 | "winapi-i686-pc-windows-gnu", 2807 | "winapi-x86_64-pc-windows-gnu", 2808 | ] 2809 | 2810 | [[package]] 2811 | name = "winapi-build" 2812 | version = "0.1.1" 2813 | source = "registry+https://github.com/rust-lang/crates.io-index" 2814 | checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" 2815 | 2816 | [[package]] 2817 | name = "winapi-i686-pc-windows-gnu" 2818 | version = "0.4.0" 2819 | source = "registry+https://github.com/rust-lang/crates.io-index" 2820 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 2821 | 2822 | [[package]] 2823 | name = "winapi-x86_64-pc-windows-gnu" 2824 | version = "0.4.0" 2825 | source = "registry+https://github.com/rust-lang/crates.io-index" 2826 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 2827 | 2828 | [[package]] 2829 | name = "winreg" 2830 | version = "0.6.2" 2831 | source = "registry+https://github.com/rust-lang/crates.io-index" 2832 | checksum = "b2986deb581c4fe11b621998a5e53361efe6b48a151178d0cd9eeffa4dc6acc9" 2833 | dependencies = [ 2834 | "winapi 0.3.8", 2835 | ] 2836 | 2837 | [[package]] 2838 | name = "ws2_32-sys" 2839 | version = "0.2.1" 2840 | source = "registry+https://github.com/rust-lang/crates.io-index" 2841 | checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" 2842 | dependencies = [ 2843 | "winapi 0.2.8", 2844 | "winapi-build", 2845 | ] 2846 | 2847 | [[package]] 2848 | name = "xml-rs" 2849 | version = "0.8.0" 2850 | source = "registry+https://github.com/rust-lang/crates.io-index" 2851 | checksum = "541b12c998c5b56aa2b4e6f18f03664eef9a4fd0a246a55594efae6cc2d964b5" 2852 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "downloader" 3 | version = "0.1.0" 4 | authors = ["Marco Amann "] 5 | edition = "2018" 6 | 7 | [dependencies] 8 | # tokio runtime and utilities 9 | tokio = { version = "0.2.0", features = ["full"] } 10 | futures = "0.3" 11 | futures-util = "0.3.1" 12 | bytes = "0.5.4" 13 | 14 | # communication with kafka 15 | rdkafka = "0.23.1" 16 | 17 | # for downloading images 18 | reqwest = { version = "0.10", features = ["json"] } 19 | 20 | # image processing 21 | image = "0.22.4" 22 | 23 | # allows for uploading stuff to s3 24 | rust-s3 = "0.18.11" 25 | 26 | # what could this be for... 27 | log = "0.4.8" 28 | simple_logger = "1.4.0" 29 | 30 | # config from parameters/env 31 | structopt = "0.3" 32 | 33 | # parsing and deparsing messages received via kafka 34 | serde = "1.0.104" 35 | serde_json = "1.0.48" 36 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # rust-microservice-kafka 2 | 3 | This is the source code for our [Blog Post](https://medium.com/digitalfrontiers/microservices-in-rust-with-kafka-2b671295b24e). 4 | 5 | Although the service is rather incomplete, you might find some of the implemented patterns useful. 6 | 7 | To run it yourself, you need to have a Kafka and S3-compatible object storgae available. These can be configured via commandline parameters. 8 | To test image processing, the management service can be connected to kafka to create download tasks. 9 | -------------------------------------------------------------------------------- /src/config.rs: -------------------------------------------------------------------------------- 1 | use structopt::StructOpt; 2 | use log::Level; 3 | 4 | /** 5 | Obviously defaults are not the best idea here, so please remove them if you copy paste this code. 6 | */ 7 | #[derive(StructOpt, Debug, Clone)] 8 | #[structopt(name = "downloader")] 9 | pub struct ConverterConfig{ 10 | #[structopt(short="r", long, default_value = "eu-east2", env = "S3_REGION_NAME")] 11 | pub s3_region_name: String, 12 | 13 | #[structopt(short, long, default_value = "http://127.0.0.1:9099")] 14 | pub s3_endpoint: String, 15 | 16 | #[structopt(short, long, default_value = "minioadmin")] 17 | pub s3_access: String, 18 | 19 | #[structopt(short, long, default_value = "minioadmin")] 20 | pub s3_secret: String, 21 | 22 | #[structopt(short, long, default_value = "foobar")] 23 | pub s3_bucket_name: String, 24 | 25 | #[structopt(short, long, default_value = "converter_tasks")] 26 | pub kafka_input_topic: String, 27 | 28 | #[structopt(short, long, default_value = "converter_results")] 29 | pub kafka_output_topic: String, 30 | 31 | #[structopt(short, long, default_value = "127.0.0.1:9092")] 32 | pub kafka_brokers: String, 33 | 34 | #[structopt(short, long, default_value = "converter_group")] 35 | pub kafka_consumer_group: String, 36 | 37 | #[structopt(short, long, default_value = "info")] 38 | pub log_level: Level, 39 | 40 | #[structopt(short, long, default_value = "5")] 41 | pub parallel_operations: usize, 42 | } -------------------------------------------------------------------------------- /src/downloader.rs: -------------------------------------------------------------------------------- 1 | use bytes::{BytesMut, Bytes}; 2 | use std::error::Error; 3 | use log::debug; 4 | use crate::model::NetworkError; 5 | 6 | pub async fn download_url(url: String) -> Result >{ 7 | 8 | let mut body = reqwest::get(&url).await?; 9 | 10 | let code = body.status(); 11 | 12 | match code.as_u16() { 13 | 200 => { 14 | let mut res = BytesMut::new(); 15 | let mut total_len = 0; 16 | while let Some(chunk) = body.chunk().await? { 17 | total_len+=chunk.len(); 18 | if total_len > 20*1024*1024{ 19 | return Err(Box::new(NetworkError::DownloadSizeLimitReached(total_len as u16))); 20 | } 21 | res.extend_from_slice(&chunk); 22 | } 23 | debug!("Downloaded data of size: {} bytes",total_len); 24 | let body = res.freeze(); 25 | Ok(body) 26 | } 27 | _ => { 28 | Err(NetworkError::DownloadError(code.canonical_reason().unwrap_or("Unknown HTTP error").into()).into()) 29 | } 30 | } 31 | 32 | 33 | } -------------------------------------------------------------------------------- /src/image_processing.rs: -------------------------------------------------------------------------------- 1 | use bytes::{Bytes}; 2 | use std::error::Error; 3 | use std::io::Cursor; 4 | use image::jpeg::JPEGDecoder; 5 | use image::DynamicImage; 6 | use image::ImageFormat::JPEG; 7 | 8 | /** 9 | Process the image, generate a thumbnail and return both, the original and the thumbnail 10 | */ 11 | pub fn process_image(input_bytes: Bytes) -> Result<(Bytes,Bytes), Box >{ 12 | 13 | let full_size_image = input_bytes.clone(); 14 | let cursor = Cursor::new(input_bytes); 15 | 16 | let dec = JPEGDecoder::new(cursor)?; 17 | let di = DynamicImage::from_decoder(dec)?; 18 | 19 | let processed = di.thumbnail(128,128); 20 | 21 | let mut v = Vec::new(); 22 | processed.write_to(&mut v,JPEG)?; 23 | 24 | Ok((full_size_image,Bytes::copy_from_slice(&v))) 25 | } 26 | -------------------------------------------------------------------------------- /src/kafka.rs: -------------------------------------------------------------------------------- 1 | use std::error::Error; 2 | use std::convert::TryFrom; 3 | 4 | use rdkafka::consumer::{StreamConsumer}; 5 | use rdkafka::{ClientConfig, Message}; 6 | use rdkafka::config::RDKafkaLogLevel; 7 | use rdkafka::consumer::Consumer; 8 | use rdkafka::producer::{FutureProducer, FutureRecord}; 9 | 10 | 11 | 12 | use tokio::stream::StreamExt; 13 | use log::{debug,info,error}; 14 | 15 | use crate::downloader::download_url; 16 | use crate::image_processing::process_image; 17 | use crate::config::ConverterConfig; 18 | use crate::s3_publisher::push_to_s3; 19 | use crate::model::{DownloadTask, DownloadResult, ProcessingResult}; 20 | 21 | 22 | 23 | 24 | /** 25 | Handling each and every message 26 | Note the stacked matches: We need to commit the message whenever processing finished (Ok or err) 27 | */ 28 | pub async fn receive_messages(cfg: ConverterConfig){ 29 | 30 | let consumer = create_consumer( 31 | &cfg.kafka_brokers, 32 | &cfg.kafka_consumer_group, 33 | &cfg.kafka_input_topic); 34 | 35 | let producer = create_producer(&cfg.kafka_brokers); 36 | let output_topic = cfg.kafka_output_topic.to_owned(); 37 | 38 | let mut msg_stream = consumer.start(); 39 | 40 | // iterate over all messages blocking 41 | while let Some(msg) = msg_stream.next().await{ 42 | // we cant borrow cfg to the async function, since that would require static a lifetime 43 | // therefore, we copy it (meh...) 44 | let cfg = cfg.clone(); 45 | 46 | 47 | // the message itself can be broken 48 | match msg { 49 | Ok(msg) => { 50 | 51 | // tha payload can be empty 52 | match msg.payload() { 53 | Some(payload) => { 54 | let request = DownloadTask::try_from(payload); 55 | 56 | // only process valid messages 57 | match request { 58 | Ok(request) => { 59 | handle_received_message(cfg, &producer, &output_topic, request).await; 60 | } 61 | Err(e) => { 62 | error!("Error parsing payload: {}",e); 63 | } 64 | } 65 | }, 66 | None => { 67 | error!("Message with empty payload"); 68 | } 69 | } 70 | 71 | // now we can store the offset to be committed in the next auto-commit so this 72 | // message will never be processed again 73 | let res = consumer.store_offset(&msg); 74 | match res{ 75 | Ok(()) => {} 76 | Err(e) => error!("Could not commit message: {} ", e) 77 | } 78 | } 79 | Err(e)=>{ 80 | error!("Could not receive and will not process message: {}",e) 81 | } 82 | }; 83 | } 84 | } 85 | 86 | async fn handle_received_message(cfg: ConverterConfig, producer: &FutureProducer, output_topic: &String, request: DownloadTask) { 87 | 88 | let correlation_id = request.correlation_id; 89 | let handle_result = process(request, cfg).await; 90 | 91 | let (res, description) = match handle_result { 92 | Ok(_) => (ProcessingResult::Ok, String::from("")), 93 | Err(e) => (ProcessingResult::Error, format!("{}", e)), 94 | }; 95 | 96 | let dr = DownloadResult { 97 | correlation_id: correlation_id, 98 | res, 99 | description 100 | }; 101 | 102 | // if the result can not be serialized, we rather send an empty string than to crash 103 | let dr_str_rep = serde_json::to_string(&dr).unwrap_or("".into()); 104 | 105 | info!("Answer: {}", dr_str_rep); 106 | 107 | // this sends the "reply" to the other topic 108 | let res = 109 | send_ready_notification(&producer, output_topic.clone(), dr_str_rep).await; 110 | if res.is_err(){error!("Error sending ack: {}", res.err().expect("Fatal: could not send ack"))} 111 | } 112 | 113 | 114 | pub async fn process(request: DownloadTask, cfg: ConverterConfig) 115 | -> Result<(), Box >{ 116 | 117 | let bytes = download_url(request.url.into()).await?; 118 | 119 | let both_bytes = tokio::task::spawn_blocking(|| process_image(bytes)).await??; 120 | 121 | push_to_s3(both_bytes.0,cfg.clone(), request.target_path.clone()).await?; 122 | push_to_s3(both_bytes.1,cfg.clone(), request.target_thumbnail_path.clone()).await?; 123 | 124 | info!("Finished Download for {}",request.target_path); 125 | 126 | Ok(()) 127 | } 128 | 129 | 130 | pub async fn send_ready_notification(producer: &FutureProducer, topic: String, record: String) 131 | -> Result<(), Box >{ 132 | 133 | let record = FutureRecord::to(&topic) 134 | .key("some key".into()) 135 | .payload(&record); 136 | 137 | let produce_future = producer.send(record,0); 138 | match produce_future.await { 139 | Ok(Ok(delivery)) => debug!("Sent: {:?}", delivery), 140 | Ok(Err((e, _))) => error!("Error: {:?}", e), 141 | Err(_) => error!("Future cancelled"), 142 | } 143 | Ok(()) 144 | } 145 | 146 | 147 | 148 | pub fn create_producer(brokers: &str, ) -> FutureProducer { 149 | let producer: FutureProducer = ClientConfig::new() 150 | .set("bootstrap.servers", &brokers) 151 | .set("message.timeout.ms", "5000") 152 | .create() 153 | .expect("Producer creation error"); 154 | producer 155 | } 156 | 157 | 158 | pub fn create_consumer(brokers: &str, group_id: &str, topic: &str) -> StreamConsumer { 159 | 160 | let consumer: StreamConsumer = ClientConfig::new() 161 | .set("group.id", group_id) 162 | .set("bootstrap.servers", brokers) 163 | .set("enable.partition.eof", "false") 164 | .set("session.timeout.ms", "6000") 165 | .set("enable.auto.commit", "true") 166 | .set("auto.commit.interval.ms", "1000") 167 | .set("enable.auto.offset.store", "false") 168 | .set_log_level(RDKafkaLogLevel::Debug) 169 | .create() 170 | .expect("Consumer creation failed"); 171 | 172 | consumer 173 | .subscribe(&[topic]) 174 | .expect("Can't subscribe to specified topic"); 175 | 176 | consumer 177 | } 178 | 179 | -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | use tokio::runtime::Runtime; 2 | 3 | use structopt::StructOpt; 4 | use log::info; 5 | 6 | mod config; 7 | mod kafka; 8 | mod downloader; 9 | mod image_processing; 10 | mod s3_publisher; 11 | mod model; 12 | 13 | use config::ConverterConfig; 14 | 15 | use futures::future::join_all; 16 | 17 | 18 | fn main() { 19 | 20 | let cfg = ConverterConfig::from_args(); 21 | 22 | simple_logger::init_with_level(cfg.log_level).expect("Could not init logger"); 23 | info!("Logging initialized with level {}", cfg.log_level); 24 | 25 | // Spawn a set of workers. 26 | // This has to be in an async task to have access to the `tokio::spawn` primitive 27 | Runtime::new().unwrap().block_on(async { 28 | let futures = 29 | (0..cfg.parallel_operations) 30 | .map(|_| { 31 | tokio::spawn( 32 | kafka::receive_messages(cfg.clone()) 33 | ) 34 | }); 35 | 36 | // wait for all workers to finish 37 | join_all(futures).await; 38 | }); 39 | } 40 | -------------------------------------------------------------------------------- /src/model.rs: -------------------------------------------------------------------------------- 1 | use serde::{Serialize, Deserialize}; 2 | use std::convert::TryFrom; 3 | use std::error::Error; 4 | use std::fmt::Display; 5 | use std::fmt; 6 | 7 | /** 8 | A download task as used with the management application 9 | We need to keep the field names (or at least what they will be serialized to), in sync with 10 | the version in the management service. 11 | */ 12 | #[derive(Serialize, Deserialize, Debug)] 13 | pub struct DownloadTask{ 14 | pub correlation_id: u32, 15 | pub url: String, 16 | pub target_path: String, 17 | pub target_thumbnail_path: String 18 | } 19 | 20 | impl TryFrom<&[u8]> for DownloadTask{ 21 | type Error = Box ; 22 | fn try_from(bytes: &[u8]) -> Result { 23 | serde_json::from_slice(bytes) 24 | // we allow rust to loose the type, so the next line is equivalent to this: 25 | //.map_err(|e|Box::new(e ) as Box) 26 | .map_err(|e|e.into()) 27 | } 28 | } 29 | #[derive(Serialize, Deserialize, Debug)] 30 | pub struct DownloadResult{ 31 | pub correlation_id: u32, 32 | pub res: ProcessingResult, 33 | pub description: String 34 | } 35 | 36 | #[derive(Debug)] 37 | pub enum NetworkError { 38 | DownloadSizeLimitReached(u16), 39 | DownloadError(String), 40 | UploadBucketAccessError(String), 41 | UploadPutError(String) 42 | } 43 | 44 | 45 | impl Display for NetworkError { 46 | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { 47 | match self{ 48 | NetworkError::DownloadSizeLimitReached(size) => write!(f, "DownloadSizeLimitReached: {}",size), 49 | NetworkError::DownloadError(msg) => write!(f, "DownloadError: {}",msg), 50 | NetworkError::UploadBucketAccessError(msg) => {write!(f, "UploadBucketAccessError: {}",msg)}, 51 | NetworkError::UploadPutError(msg) => {write!(f, "UploadPutError: {}",msg)} 52 | } 53 | } 54 | } 55 | impl Error for NetworkError {} 56 | 57 | 58 | #[derive(Serialize, Deserialize, Debug)] 59 | pub enum ProcessingResult { 60 | Ok, 61 | Error 62 | } -------------------------------------------------------------------------------- /src/s3_publisher.rs: -------------------------------------------------------------------------------- 1 | 2 | 3 | use s3::bucket::Bucket; 4 | use s3::credentials::Credentials; 5 | 6 | use s3::region::Region; 7 | use bytes::Bytes; 8 | use crate::config::ConverterConfig; 9 | use std::error::Error; 10 | use crate::model::NetworkError; 11 | 12 | /** 13 | Push a bunch of bytes (from an image) to s3 14 | We use a fresh HTTP client for every image, since the URLs might change for every received message 15 | Since the S3 library is a bit broken, we botch the error handling here 16 | */ 17 | pub async fn push_to_s3(bytes: Bytes, config: ConverterConfig, target_path: String) 18 | ->Result<(), Box > { 19 | 20 | // since the S3 library does not support uploading in a future out of the box, we wrap it in one 21 | // this is blocking and therefore spawned in the blocking thread pool of tokio 22 | tokio::task::spawn_blocking(move || { 23 | get_bucket_accessor(&config) 24 | .and_then(|bucket| 25 | bucket 26 | .put_object(&target_path, &bytes, "image/jpg") 27 | .map(|_| ()) // we don't need the result since it is broken anyway 28 | .map_err(|e| 29 | Box::new(NetworkError::UploadPutError( 30 | e.description.unwrap_or("Generic upload error".into()).into()) 31 | ).into() 32 | ) 33 | ) 34 | }).await? 35 | } 36 | 37 | 38 | fn get_bucket_accessor(config: &ConverterConfig) -> Result > { 39 | let bucket_name = &config.s3_bucket_name.clone(); 40 | let aws_access = config.s3_access.clone(); 41 | let aws_secret = config.s3_secret.clone(); 42 | 43 | let region_name = config.s3_bucket_name.clone(); 44 | let endpoint = config.s3_endpoint.clone(); 45 | let region = Region::Custom { region: region_name, endpoint }; 46 | 47 | let credentials: Credentials = Credentials::new( 48 | Some(aws_access), 49 | Some(aws_secret), 50 | None, 51 | None); 52 | 53 | // create the struct for the bucket 54 | Bucket::new(bucket_name, region, credentials) 55 | .map_err(|d| 56 | Box::new(NetworkError::UploadBucketAccessError( 57 | d.description.unwrap_or("Generic upload error".into()).into()) 58 | ).into() 59 | ) 60 | } --------------------------------------------------------------------------------