├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── README.md ├── data └── books.json └── src └── main.rs /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "adler" 7 | version = "1.0.2" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" 10 | 11 | [[package]] 12 | name = "aes" 13 | version = "0.7.5" 14 | source = "registry+https://github.com/rust-lang/crates.io-index" 15 | checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" 16 | dependencies = [ 17 | "cfg-if", 18 | "cipher", 19 | "cpufeatures", 20 | "opaque-debug", 21 | ] 22 | 23 | [[package]] 24 | name = "ahash" 25 | version = "0.7.6" 26 | source = "registry+https://github.com/rust-lang/crates.io-index" 27 | checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" 28 | dependencies = [ 29 | "getrandom", 30 | "once_cell", 31 | "version_check", 32 | ] 33 | 34 | [[package]] 35 | name = "aho-corasick" 36 | version = "0.7.19" 37 | source = "registry+https://github.com/rust-lang/crates.io-index" 38 | checksum = "b4f55bd91a0978cbfd91c457a164bab8b4001c833b7f323132c0a4e1922dd44e" 39 | dependencies = [ 40 | "memchr", 41 | ] 42 | 43 | [[package]] 44 | name = "anyhow" 45 | version = "1.0.66" 46 | source = "registry+https://github.com/rust-lang/crates.io-index" 47 | checksum = "216261ddc8289130e551ddcd5ce8a064710c0d064a4d2895c67151c92b5443f6" 48 | 49 | [[package]] 50 | name = "autocfg" 51 | version = "1.1.0" 52 | source = "registry+https://github.com/rust-lang/crates.io-index" 53 | checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" 54 | 55 | [[package]] 56 | name = "base64" 57 | version = "0.13.1" 58 | source = "registry+https://github.com/rust-lang/crates.io-index" 59 | checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" 60 | 61 | [[package]] 62 | name = "base64ct" 63 | version = "1.5.3" 64 | source = "registry+https://github.com/rust-lang/crates.io-index" 65 | checksum = "b645a089122eccb6111b4f81cbc1a49f5900ac4666bb93ac027feaecf15607bf" 66 | 67 | [[package]] 68 | name = "bitflags" 69 | version = "1.3.2" 70 | source = "registry+https://github.com/rust-lang/crates.io-index" 71 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 72 | 73 | [[package]] 74 | name = "block-buffer" 75 | version = "0.10.3" 76 | source = "registry+https://github.com/rust-lang/crates.io-index" 77 | checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" 78 | dependencies = [ 79 | "generic-array", 80 | ] 81 | 82 | [[package]] 83 | name = "bstr" 84 | version = "0.2.17" 85 | source = "registry+https://github.com/rust-lang/crates.io-index" 86 | checksum = "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223" 87 | dependencies = [ 88 | "lazy_static", 89 | "memchr", 90 | "regex-automata", 91 | "serde", 92 | ] 93 | 94 | [[package]] 95 | name = "bumpalo" 96 | version = "3.11.1" 97 | source = "registry+https://github.com/rust-lang/crates.io-index" 98 | checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" 99 | 100 | [[package]] 101 | name = "byteorder" 102 | version = "1.4.3" 103 | source = "registry+https://github.com/rust-lang/crates.io-index" 104 | checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" 105 | 106 | [[package]] 107 | name = "bytes" 108 | version = "1.2.1" 109 | source = "registry+https://github.com/rust-lang/crates.io-index" 110 | checksum = "ec8a7b6a70fde80372154c65702f00a0f56f3e1c36abbc6c440484be248856db" 111 | 112 | [[package]] 113 | name = "bzip2" 114 | version = "0.4.3" 115 | source = "registry+https://github.com/rust-lang/crates.io-index" 116 | checksum = "6afcd980b5f3a45017c57e57a2fcccbb351cc43a356ce117ef760ef8052b89b0" 117 | dependencies = [ 118 | "bzip2-sys", 119 | "libc", 120 | ] 121 | 122 | [[package]] 123 | name = "bzip2-sys" 124 | version = "0.1.11+1.0.8" 125 | source = "registry+https://github.com/rust-lang/crates.io-index" 126 | checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" 127 | dependencies = [ 128 | "cc", 129 | "libc", 130 | "pkg-config", 131 | ] 132 | 133 | [[package]] 134 | name = "cached-path" 135 | version = "0.5.3" 136 | source = "registry+https://github.com/rust-lang/crates.io-index" 137 | checksum = "5f1c56d30236522ab3393a08746b138d4e16372001f42d29c88d513aeb8ab7ef" 138 | dependencies = [ 139 | "flate2", 140 | "fs2", 141 | "glob", 142 | "indicatif", 143 | "log", 144 | "rand", 145 | "reqwest", 146 | "serde", 147 | "serde_json", 148 | "sha2", 149 | "tar", 150 | "tempfile", 151 | "thiserror", 152 | "zip 0.5.13", 153 | "zip-extensions", 154 | ] 155 | 156 | [[package]] 157 | name = "cc" 158 | version = "1.0.74" 159 | source = "registry+https://github.com/rust-lang/crates.io-index" 160 | checksum = "581f5dba903aac52ea3feb5ec4810848460ee833876f1f9b0fdeab1f19091574" 161 | dependencies = [ 162 | "jobserver", 163 | ] 164 | 165 | [[package]] 166 | name = "cfg-if" 167 | version = "1.0.0" 168 | source = "registry+https://github.com/rust-lang/crates.io-index" 169 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 170 | 171 | [[package]] 172 | name = "cipher" 173 | version = "0.3.0" 174 | source = "registry+https://github.com/rust-lang/crates.io-index" 175 | checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" 176 | dependencies = [ 177 | "generic-array", 178 | ] 179 | 180 | [[package]] 181 | name = "console" 182 | version = "0.15.2" 183 | source = "registry+https://github.com/rust-lang/crates.io-index" 184 | checksum = "c050367d967ced717c04b65d8c619d863ef9292ce0c5760028655a2fb298718c" 185 | dependencies = [ 186 | "encode_unicode", 187 | "lazy_static", 188 | "libc", 189 | "terminal_size", 190 | "winapi", 191 | ] 192 | 193 | [[package]] 194 | name = "constant_time_eq" 195 | version = "0.1.5" 196 | source = "registry+https://github.com/rust-lang/crates.io-index" 197 | checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" 198 | 199 | [[package]] 200 | name = "core-foundation" 201 | version = "0.9.3" 202 | source = "registry+https://github.com/rust-lang/crates.io-index" 203 | checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" 204 | dependencies = [ 205 | "core-foundation-sys", 206 | "libc", 207 | ] 208 | 209 | [[package]] 210 | name = "core-foundation-sys" 211 | version = "0.8.3" 212 | source = "registry+https://github.com/rust-lang/crates.io-index" 213 | checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" 214 | 215 | [[package]] 216 | name = "cpufeatures" 217 | version = "0.2.5" 218 | source = "registry+https://github.com/rust-lang/crates.io-index" 219 | checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" 220 | dependencies = [ 221 | "libc", 222 | ] 223 | 224 | [[package]] 225 | name = "crc32fast" 226 | version = "1.3.2" 227 | source = "registry+https://github.com/rust-lang/crates.io-index" 228 | checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" 229 | dependencies = [ 230 | "cfg-if", 231 | ] 232 | 233 | [[package]] 234 | name = "crossbeam-channel" 235 | version = "0.5.6" 236 | source = "registry+https://github.com/rust-lang/crates.io-index" 237 | checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" 238 | dependencies = [ 239 | "cfg-if", 240 | "crossbeam-utils", 241 | ] 242 | 243 | [[package]] 244 | name = "crossbeam-deque" 245 | version = "0.8.2" 246 | source = "registry+https://github.com/rust-lang/crates.io-index" 247 | checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc" 248 | dependencies = [ 249 | "cfg-if", 250 | "crossbeam-epoch", 251 | "crossbeam-utils", 252 | ] 253 | 254 | [[package]] 255 | name = "crossbeam-epoch" 256 | version = "0.9.11" 257 | source = "registry+https://github.com/rust-lang/crates.io-index" 258 | checksum = "f916dfc5d356b0ed9dae65f1db9fc9770aa2851d2662b988ccf4fe3516e86348" 259 | dependencies = [ 260 | "autocfg", 261 | "cfg-if", 262 | "crossbeam-utils", 263 | "memoffset", 264 | "scopeguard", 265 | ] 266 | 267 | [[package]] 268 | name = "crossbeam-utils" 269 | version = "0.8.12" 270 | source = "registry+https://github.com/rust-lang/crates.io-index" 271 | checksum = "edbafec5fa1f196ca66527c1b12c2ec4745ca14b50f1ad8f9f6f720b55d11fac" 272 | dependencies = [ 273 | "cfg-if", 274 | ] 275 | 276 | [[package]] 277 | name = "crunchy" 278 | version = "0.2.2" 279 | source = "registry+https://github.com/rust-lang/crates.io-index" 280 | checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" 281 | 282 | [[package]] 283 | name = "crypto-common" 284 | version = "0.1.6" 285 | source = "registry+https://github.com/rust-lang/crates.io-index" 286 | checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" 287 | dependencies = [ 288 | "generic-array", 289 | "typenum", 290 | ] 291 | 292 | [[package]] 293 | name = "csv" 294 | version = "1.1.6" 295 | source = "registry+https://github.com/rust-lang/crates.io-index" 296 | checksum = "22813a6dc45b335f9bade10bf7271dc477e81113e89eb251a0bc2a8a81c536e1" 297 | dependencies = [ 298 | "bstr", 299 | "csv-core", 300 | "itoa 0.4.8", 301 | "ryu", 302 | "serde", 303 | ] 304 | 305 | [[package]] 306 | name = "csv-core" 307 | version = "0.1.10" 308 | source = "registry+https://github.com/rust-lang/crates.io-index" 309 | checksum = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90" 310 | dependencies = [ 311 | "memchr", 312 | ] 313 | 314 | [[package]] 315 | name = "curl" 316 | version = "0.4.44" 317 | source = "registry+https://github.com/rust-lang/crates.io-index" 318 | checksum = "509bd11746c7ac09ebd19f0b17782eae80aadee26237658a6b4808afb5c11a22" 319 | dependencies = [ 320 | "curl-sys", 321 | "libc", 322 | "openssl-probe", 323 | "openssl-sys", 324 | "schannel", 325 | "socket2", 326 | "winapi", 327 | ] 328 | 329 | [[package]] 330 | name = "curl-sys" 331 | version = "0.4.59+curl-7.86.0" 332 | source = "registry+https://github.com/rust-lang/crates.io-index" 333 | checksum = "6cfce34829f448b08f55b7db6d0009e23e2e86a34e8c2b366269bf5799b4a407" 334 | dependencies = [ 335 | "cc", 336 | "libc", 337 | "libz-sys", 338 | "openssl-sys", 339 | "pkg-config", 340 | "vcpkg", 341 | "winapi", 342 | ] 343 | 344 | [[package]] 345 | name = "digest" 346 | version = "0.10.5" 347 | source = "registry+https://github.com/rust-lang/crates.io-index" 348 | checksum = "adfbc57365a37acbd2ebf2b64d7e69bb766e2fea813521ed536f5d0520dcf86c" 349 | dependencies = [ 350 | "block-buffer", 351 | "crypto-common", 352 | "subtle", 353 | ] 354 | 355 | [[package]] 356 | name = "dirs" 357 | version = "4.0.0" 358 | source = "registry+https://github.com/rust-lang/crates.io-index" 359 | checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" 360 | dependencies = [ 361 | "dirs-sys", 362 | ] 363 | 364 | [[package]] 365 | name = "dirs-sys" 366 | version = "0.3.7" 367 | source = "registry+https://github.com/rust-lang/crates.io-index" 368 | checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" 369 | dependencies = [ 370 | "libc", 371 | "redox_users", 372 | "winapi", 373 | ] 374 | 375 | [[package]] 376 | name = "either" 377 | version = "1.8.0" 378 | source = "registry+https://github.com/rust-lang/crates.io-index" 379 | checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" 380 | 381 | [[package]] 382 | name = "encode_unicode" 383 | version = "0.3.6" 384 | source = "registry+https://github.com/rust-lang/crates.io-index" 385 | checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" 386 | 387 | [[package]] 388 | name = "encoding_rs" 389 | version = "0.8.31" 390 | source = "registry+https://github.com/rust-lang/crates.io-index" 391 | checksum = "9852635589dc9f9ea1b6fe9f05b50ef208c85c834a562f0c6abb1c475736ec2b" 392 | dependencies = [ 393 | "cfg-if", 394 | ] 395 | 396 | [[package]] 397 | name = "fastrand" 398 | version = "1.8.0" 399 | source = "registry+https://github.com/rust-lang/crates.io-index" 400 | checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" 401 | dependencies = [ 402 | "instant", 403 | ] 404 | 405 | [[package]] 406 | name = "filetime" 407 | version = "0.2.18" 408 | source = "registry+https://github.com/rust-lang/crates.io-index" 409 | checksum = "4b9663d381d07ae25dc88dbdf27df458faa83a9b25336bcac83d5e452b5fc9d3" 410 | dependencies = [ 411 | "cfg-if", 412 | "libc", 413 | "redox_syscall", 414 | "windows-sys 0.42.0", 415 | ] 416 | 417 | [[package]] 418 | name = "flate2" 419 | version = "1.0.24" 420 | source = "registry+https://github.com/rust-lang/crates.io-index" 421 | checksum = "f82b0f4c27ad9f8bfd1f3208d882da2b09c301bc1c828fd3a00d0216d2fbbff6" 422 | dependencies = [ 423 | "crc32fast", 424 | "miniz_oxide", 425 | ] 426 | 427 | [[package]] 428 | name = "fnv" 429 | version = "1.0.7" 430 | source = "registry+https://github.com/rust-lang/crates.io-index" 431 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 432 | 433 | [[package]] 434 | name = "foreign-types" 435 | version = "0.3.2" 436 | source = "registry+https://github.com/rust-lang/crates.io-index" 437 | checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" 438 | dependencies = [ 439 | "foreign-types-shared", 440 | ] 441 | 442 | [[package]] 443 | name = "foreign-types-shared" 444 | version = "0.1.1" 445 | source = "registry+https://github.com/rust-lang/crates.io-index" 446 | checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" 447 | 448 | [[package]] 449 | name = "form_urlencoded" 450 | version = "1.1.0" 451 | source = "registry+https://github.com/rust-lang/crates.io-index" 452 | checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" 453 | dependencies = [ 454 | "percent-encoding", 455 | ] 456 | 457 | [[package]] 458 | name = "fs2" 459 | version = "0.4.3" 460 | source = "registry+https://github.com/rust-lang/crates.io-index" 461 | checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" 462 | dependencies = [ 463 | "libc", 464 | "winapi", 465 | ] 466 | 467 | [[package]] 468 | name = "futures-channel" 469 | version = "0.3.25" 470 | source = "registry+https://github.com/rust-lang/crates.io-index" 471 | checksum = "52ba265a92256105f45b719605a571ffe2d1f0fea3807304b522c1d778f79eed" 472 | dependencies = [ 473 | "futures-core", 474 | ] 475 | 476 | [[package]] 477 | name = "futures-core" 478 | version = "0.3.25" 479 | source = "registry+https://github.com/rust-lang/crates.io-index" 480 | checksum = "04909a7a7e4633ae6c4a9ab280aeb86da1236243a77b694a49eacd659a4bd3ac" 481 | 482 | [[package]] 483 | name = "futures-io" 484 | version = "0.3.25" 485 | source = "registry+https://github.com/rust-lang/crates.io-index" 486 | checksum = "00f5fb52a06bdcadeb54e8d3671f8888a39697dcb0b81b23b55174030427f4eb" 487 | 488 | [[package]] 489 | name = "futures-sink" 490 | version = "0.3.25" 491 | source = "registry+https://github.com/rust-lang/crates.io-index" 492 | checksum = "39c15cf1a4aa79df40f1bb462fb39676d0ad9e366c2a33b590d7c66f4f81fcf9" 493 | 494 | [[package]] 495 | name = "futures-task" 496 | version = "0.3.25" 497 | source = "registry+https://github.com/rust-lang/crates.io-index" 498 | checksum = "2ffb393ac5d9a6eaa9d3fdf37ae2776656b706e200c8e16b1bdb227f5198e6ea" 499 | 500 | [[package]] 501 | name = "futures-util" 502 | version = "0.3.25" 503 | source = "registry+https://github.com/rust-lang/crates.io-index" 504 | checksum = "197676987abd2f9cadff84926f410af1c183608d36641465df73ae8211dc65d6" 505 | dependencies = [ 506 | "futures-core", 507 | "futures-io", 508 | "futures-task", 509 | "memchr", 510 | "pin-project-lite", 511 | "pin-utils", 512 | "slab", 513 | ] 514 | 515 | [[package]] 516 | name = "generic-array" 517 | version = "0.14.6" 518 | source = "registry+https://github.com/rust-lang/crates.io-index" 519 | checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" 520 | dependencies = [ 521 | "typenum", 522 | "version_check", 523 | ] 524 | 525 | [[package]] 526 | name = "getrandom" 527 | version = "0.2.8" 528 | source = "registry+https://github.com/rust-lang/crates.io-index" 529 | checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" 530 | dependencies = [ 531 | "cfg-if", 532 | "libc", 533 | "wasi 0.11.0+wasi-snapshot-preview1", 534 | ] 535 | 536 | [[package]] 537 | name = "glob" 538 | version = "0.3.0" 539 | source = "registry+https://github.com/rust-lang/crates.io-index" 540 | checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" 541 | 542 | [[package]] 543 | name = "h2" 544 | version = "0.3.15" 545 | source = "registry+https://github.com/rust-lang/crates.io-index" 546 | checksum = "5f9f29bc9dda355256b2916cf526ab02ce0aeaaaf2bad60d65ef3f12f11dd0f4" 547 | dependencies = [ 548 | "bytes", 549 | "fnv", 550 | "futures-core", 551 | "futures-sink", 552 | "futures-util", 553 | "http", 554 | "indexmap", 555 | "slab", 556 | "tokio", 557 | "tokio-util", 558 | "tracing", 559 | ] 560 | 561 | [[package]] 562 | name = "half" 563 | version = "1.8.2" 564 | source = "registry+https://github.com/rust-lang/crates.io-index" 565 | checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" 566 | 567 | [[package]] 568 | name = "half" 569 | version = "2.1.0" 570 | source = "registry+https://github.com/rust-lang/crates.io-index" 571 | checksum = "ad6a9459c9c30b177b925162351f97e7d967c7ea8bab3b8352805327daf45554" 572 | dependencies = [ 573 | "crunchy", 574 | ] 575 | 576 | [[package]] 577 | name = "hashbrown" 578 | version = "0.12.3" 579 | source = "registry+https://github.com/rust-lang/crates.io-index" 580 | checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" 581 | dependencies = [ 582 | "ahash", 583 | ] 584 | 585 | [[package]] 586 | name = "hermit-abi" 587 | version = "0.1.19" 588 | source = "registry+https://github.com/rust-lang/crates.io-index" 589 | checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" 590 | dependencies = [ 591 | "libc", 592 | ] 593 | 594 | [[package]] 595 | name = "hmac" 596 | version = "0.12.1" 597 | source = "registry+https://github.com/rust-lang/crates.io-index" 598 | checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" 599 | dependencies = [ 600 | "digest", 601 | ] 602 | 603 | [[package]] 604 | name = "http" 605 | version = "0.2.8" 606 | source = "registry+https://github.com/rust-lang/crates.io-index" 607 | checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" 608 | dependencies = [ 609 | "bytes", 610 | "fnv", 611 | "itoa 1.0.4", 612 | ] 613 | 614 | [[package]] 615 | name = "http-body" 616 | version = "0.4.5" 617 | source = "registry+https://github.com/rust-lang/crates.io-index" 618 | checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" 619 | dependencies = [ 620 | "bytes", 621 | "http", 622 | "pin-project-lite", 623 | ] 624 | 625 | [[package]] 626 | name = "httparse" 627 | version = "1.8.0" 628 | source = "registry+https://github.com/rust-lang/crates.io-index" 629 | checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" 630 | 631 | [[package]] 632 | name = "httpdate" 633 | version = "1.0.2" 634 | source = "registry+https://github.com/rust-lang/crates.io-index" 635 | checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" 636 | 637 | [[package]] 638 | name = "hyper" 639 | version = "0.14.22" 640 | source = "registry+https://github.com/rust-lang/crates.io-index" 641 | checksum = "abfba89e19b959ca163c7752ba59d737c1ceea53a5d31a149c805446fc958064" 642 | dependencies = [ 643 | "bytes", 644 | "futures-channel", 645 | "futures-core", 646 | "futures-util", 647 | "h2", 648 | "http", 649 | "http-body", 650 | "httparse", 651 | "httpdate", 652 | "itoa 1.0.4", 653 | "pin-project-lite", 654 | "socket2", 655 | "tokio", 656 | "tower-service", 657 | "tracing", 658 | "want", 659 | ] 660 | 661 | [[package]] 662 | name = "hyper-tls" 663 | version = "0.5.0" 664 | source = "registry+https://github.com/rust-lang/crates.io-index" 665 | checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" 666 | dependencies = [ 667 | "bytes", 668 | "hyper", 669 | "native-tls", 670 | "tokio", 671 | "tokio-native-tls", 672 | ] 673 | 674 | [[package]] 675 | name = "idna" 676 | version = "0.3.0" 677 | source = "registry+https://github.com/rust-lang/crates.io-index" 678 | checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" 679 | dependencies = [ 680 | "unicode-bidi", 681 | "unicode-normalization", 682 | ] 683 | 684 | [[package]] 685 | name = "indexmap" 686 | version = "1.9.1" 687 | source = "registry+https://github.com/rust-lang/crates.io-index" 688 | checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" 689 | dependencies = [ 690 | "autocfg", 691 | "hashbrown", 692 | ] 693 | 694 | [[package]] 695 | name = "indicatif" 696 | version = "0.16.2" 697 | source = "registry+https://github.com/rust-lang/crates.io-index" 698 | checksum = "2d207dc617c7a380ab07ff572a6e52fa202a2a8f355860ac9c38e23f8196be1b" 699 | dependencies = [ 700 | "console", 701 | "lazy_static", 702 | "number_prefix", 703 | "regex", 704 | ] 705 | 706 | [[package]] 707 | name = "instant" 708 | version = "0.1.12" 709 | source = "registry+https://github.com/rust-lang/crates.io-index" 710 | checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" 711 | dependencies = [ 712 | "cfg-if", 713 | ] 714 | 715 | [[package]] 716 | name = "ipnet" 717 | version = "2.5.0" 718 | source = "registry+https://github.com/rust-lang/crates.io-index" 719 | checksum = "879d54834c8c76457ef4293a689b2a8c59b076067ad77b15efafbb05f92a592b" 720 | 721 | [[package]] 722 | name = "itertools" 723 | version = "0.10.5" 724 | source = "registry+https://github.com/rust-lang/crates.io-index" 725 | checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" 726 | dependencies = [ 727 | "either", 728 | ] 729 | 730 | [[package]] 731 | name = "itoa" 732 | version = "0.4.8" 733 | source = "registry+https://github.com/rust-lang/crates.io-index" 734 | checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" 735 | 736 | [[package]] 737 | name = "itoa" 738 | version = "1.0.4" 739 | source = "registry+https://github.com/rust-lang/crates.io-index" 740 | checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc" 741 | 742 | [[package]] 743 | name = "jobserver" 744 | version = "0.1.25" 745 | source = "registry+https://github.com/rust-lang/crates.io-index" 746 | checksum = "068b1ee6743e4d11fb9c6a1e6064b3693a1b600e7f5f5988047d98b3dc9fb90b" 747 | dependencies = [ 748 | "libc", 749 | ] 750 | 751 | [[package]] 752 | name = "js-sys" 753 | version = "0.3.60" 754 | source = "registry+https://github.com/rust-lang/crates.io-index" 755 | checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" 756 | dependencies = [ 757 | "wasm-bindgen", 758 | ] 759 | 760 | [[package]] 761 | name = "kd-tree" 762 | version = "0.4.2" 763 | source = "registry+https://github.com/rust-lang/crates.io-index" 764 | checksum = "9188b383af4f1e1131b0d7065060b0ab808995c5bd18b8bbcff73c7c6af61afc" 765 | dependencies = [ 766 | "num-traits", 767 | "ordered-float", 768 | "paste", 769 | "pdqselect", 770 | "typenum", 771 | ] 772 | 773 | [[package]] 774 | name = "lazy_static" 775 | version = "1.4.0" 776 | source = "registry+https://github.com/rust-lang/crates.io-index" 777 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 778 | 779 | [[package]] 780 | name = "libc" 781 | version = "0.2.137" 782 | source = "registry+https://github.com/rust-lang/crates.io-index" 783 | checksum = "fc7fcc620a3bff7cdd7a365be3376c97191aeaccc2a603e600951e452615bf89" 784 | 785 | [[package]] 786 | name = "libz-sys" 787 | version = "1.1.8" 788 | source = "registry+https://github.com/rust-lang/crates.io-index" 789 | checksum = "9702761c3935f8cc2f101793272e202c72b99da8f4224a19ddcf1279a6450bbf" 790 | dependencies = [ 791 | "cc", 792 | "libc", 793 | "pkg-config", 794 | "vcpkg", 795 | ] 796 | 797 | [[package]] 798 | name = "log" 799 | version = "0.4.17" 800 | source = "registry+https://github.com/rust-lang/crates.io-index" 801 | checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" 802 | dependencies = [ 803 | "cfg-if", 804 | ] 805 | 806 | [[package]] 807 | name = "matrixmultiply" 808 | version = "0.3.2" 809 | source = "registry+https://github.com/rust-lang/crates.io-index" 810 | checksum = "add85d4dd35074e6fedc608f8c8f513a3548619a9024b751949ef0e8e45a4d84" 811 | dependencies = [ 812 | "rawpointer", 813 | ] 814 | 815 | [[package]] 816 | name = "memchr" 817 | version = "2.5.0" 818 | source = "registry+https://github.com/rust-lang/crates.io-index" 819 | checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" 820 | 821 | [[package]] 822 | name = "memoffset" 823 | version = "0.6.5" 824 | source = "registry+https://github.com/rust-lang/crates.io-index" 825 | checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" 826 | dependencies = [ 827 | "autocfg", 828 | ] 829 | 830 | [[package]] 831 | name = "mime" 832 | version = "0.3.16" 833 | source = "registry+https://github.com/rust-lang/crates.io-index" 834 | checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" 835 | 836 | [[package]] 837 | name = "miniz_oxide" 838 | version = "0.5.4" 839 | source = "registry+https://github.com/rust-lang/crates.io-index" 840 | checksum = "96590ba8f175222643a85693f33d26e9c8a015f599c216509b1a6894af675d34" 841 | dependencies = [ 842 | "adler", 843 | ] 844 | 845 | [[package]] 846 | name = "mio" 847 | version = "0.8.5" 848 | source = "registry+https://github.com/rust-lang/crates.io-index" 849 | checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" 850 | dependencies = [ 851 | "libc", 852 | "log", 853 | "wasi 0.11.0+wasi-snapshot-preview1", 854 | "windows-sys 0.42.0", 855 | ] 856 | 857 | [[package]] 858 | name = "native-tls" 859 | version = "0.2.11" 860 | source = "registry+https://github.com/rust-lang/crates.io-index" 861 | checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" 862 | dependencies = [ 863 | "lazy_static", 864 | "libc", 865 | "log", 866 | "openssl", 867 | "openssl-probe", 868 | "openssl-sys", 869 | "schannel", 870 | "security-framework", 871 | "security-framework-sys", 872 | "tempfile", 873 | ] 874 | 875 | [[package]] 876 | name = "ndarray" 877 | version = "0.15.6" 878 | source = "registry+https://github.com/rust-lang/crates.io-index" 879 | checksum = "adb12d4e967ec485a5f71c6311fe28158e9d6f4bc4a447b474184d0f91a8fa32" 880 | dependencies = [ 881 | "matrixmultiply", 882 | "num-complex", 883 | "num-integer", 884 | "num-traits", 885 | "rawpointer", 886 | ] 887 | 888 | [[package]] 889 | name = "num-complex" 890 | version = "0.4.2" 891 | source = "registry+https://github.com/rust-lang/crates.io-index" 892 | checksum = "7ae39348c8bc5fbd7f40c727a9925f03517afd2ab27d46702108b6a7e5414c19" 893 | dependencies = [ 894 | "num-traits", 895 | ] 896 | 897 | [[package]] 898 | name = "num-integer" 899 | version = "0.1.45" 900 | source = "registry+https://github.com/rust-lang/crates.io-index" 901 | checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" 902 | dependencies = [ 903 | "autocfg", 904 | "num-traits", 905 | ] 906 | 907 | [[package]] 908 | name = "num-traits" 909 | version = "0.2.15" 910 | source = "registry+https://github.com/rust-lang/crates.io-index" 911 | checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" 912 | dependencies = [ 913 | "autocfg", 914 | ] 915 | 916 | [[package]] 917 | name = "num_cpus" 918 | version = "1.14.0" 919 | source = "registry+https://github.com/rust-lang/crates.io-index" 920 | checksum = "f6058e64324c71e02bc2b150e4f3bc8286db6c83092132ffa3f6b1eab0f9def5" 921 | dependencies = [ 922 | "hermit-abi", 923 | "libc", 924 | ] 925 | 926 | [[package]] 927 | name = "num_threads" 928 | version = "0.1.6" 929 | source = "registry+https://github.com/rust-lang/crates.io-index" 930 | checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" 931 | dependencies = [ 932 | "libc", 933 | ] 934 | 935 | [[package]] 936 | name = "number_prefix" 937 | version = "0.4.0" 938 | source = "registry+https://github.com/rust-lang/crates.io-index" 939 | checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" 940 | 941 | [[package]] 942 | name = "once_cell" 943 | version = "1.16.0" 944 | source = "registry+https://github.com/rust-lang/crates.io-index" 945 | checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" 946 | 947 | [[package]] 948 | name = "opaque-debug" 949 | version = "0.3.0" 950 | source = "registry+https://github.com/rust-lang/crates.io-index" 951 | checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" 952 | 953 | [[package]] 954 | name = "openssl" 955 | version = "0.10.42" 956 | source = "registry+https://github.com/rust-lang/crates.io-index" 957 | checksum = "12fc0523e3bd51a692c8850d075d74dc062ccf251c0110668cbd921917118a13" 958 | dependencies = [ 959 | "bitflags", 960 | "cfg-if", 961 | "foreign-types", 962 | "libc", 963 | "once_cell", 964 | "openssl-macros", 965 | "openssl-sys", 966 | ] 967 | 968 | [[package]] 969 | name = "openssl-macros" 970 | version = "0.1.0" 971 | source = "registry+https://github.com/rust-lang/crates.io-index" 972 | checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" 973 | dependencies = [ 974 | "proc-macro2", 975 | "quote", 976 | "syn", 977 | ] 978 | 979 | [[package]] 980 | name = "openssl-probe" 981 | version = "0.1.5" 982 | source = "registry+https://github.com/rust-lang/crates.io-index" 983 | checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" 984 | 985 | [[package]] 986 | name = "openssl-sys" 987 | version = "0.9.77" 988 | source = "registry+https://github.com/rust-lang/crates.io-index" 989 | checksum = "b03b84c3b2d099b81f0953422b4d4ad58761589d0229b5506356afca05a3670a" 990 | dependencies = [ 991 | "autocfg", 992 | "cc", 993 | "libc", 994 | "pkg-config", 995 | "vcpkg", 996 | ] 997 | 998 | [[package]] 999 | name = "ordered-float" 1000 | version = "3.3.0" 1001 | source = "registry+https://github.com/rust-lang/crates.io-index" 1002 | checksum = "1f74e330193f90ec45e2b257fa3ef6df087784157ac1ad2c1e71c62837b03aa7" 1003 | dependencies = [ 1004 | "num-traits", 1005 | ] 1006 | 1007 | [[package]] 1008 | name = "password-hash" 1009 | version = "0.4.2" 1010 | source = "registry+https://github.com/rust-lang/crates.io-index" 1011 | checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" 1012 | dependencies = [ 1013 | "base64ct", 1014 | "rand_core", 1015 | "subtle", 1016 | ] 1017 | 1018 | [[package]] 1019 | name = "paste" 1020 | version = "1.0.9" 1021 | source = "registry+https://github.com/rust-lang/crates.io-index" 1022 | checksum = "b1de2e551fb905ac83f73f7aedf2f0cb4a0da7e35efa24a202a936269f1f18e1" 1023 | 1024 | [[package]] 1025 | name = "pbkdf2" 1026 | version = "0.11.0" 1027 | source = "registry+https://github.com/rust-lang/crates.io-index" 1028 | checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" 1029 | dependencies = [ 1030 | "digest", 1031 | "hmac", 1032 | "password-hash", 1033 | "sha2", 1034 | ] 1035 | 1036 | [[package]] 1037 | name = "pdqselect" 1038 | version = "0.1.1" 1039 | source = "registry+https://github.com/rust-lang/crates.io-index" 1040 | checksum = "7778906d9321dd56cde1d1ffa69a73e59dcf5fda6d366f62727adf2bd4193aee" 1041 | 1042 | [[package]] 1043 | name = "percent-encoding" 1044 | version = "2.2.0" 1045 | source = "registry+https://github.com/rust-lang/crates.io-index" 1046 | checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" 1047 | 1048 | [[package]] 1049 | name = "pin-project-lite" 1050 | version = "0.2.9" 1051 | source = "registry+https://github.com/rust-lang/crates.io-index" 1052 | checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" 1053 | 1054 | [[package]] 1055 | name = "pin-utils" 1056 | version = "0.1.0" 1057 | source = "registry+https://github.com/rust-lang/crates.io-index" 1058 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 1059 | 1060 | [[package]] 1061 | name = "pkg-config" 1062 | version = "0.3.26" 1063 | source = "registry+https://github.com/rust-lang/crates.io-index" 1064 | checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" 1065 | 1066 | [[package]] 1067 | name = "ppv-lite86" 1068 | version = "0.2.16" 1069 | source = "registry+https://github.com/rust-lang/crates.io-index" 1070 | checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" 1071 | 1072 | [[package]] 1073 | name = "proc-macro2" 1074 | version = "1.0.47" 1075 | source = "registry+https://github.com/rust-lang/crates.io-index" 1076 | checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" 1077 | dependencies = [ 1078 | "unicode-ident", 1079 | ] 1080 | 1081 | [[package]] 1082 | name = "protobuf" 1083 | version = "2.27.1" 1084 | source = "registry+https://github.com/rust-lang/crates.io-index" 1085 | checksum = "cf7e6d18738ecd0902d30d1ad232c9125985a3422929b16c65517b38adc14f96" 1086 | 1087 | [[package]] 1088 | name = "quote" 1089 | version = "1.0.21" 1090 | source = "registry+https://github.com/rust-lang/crates.io-index" 1091 | checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" 1092 | dependencies = [ 1093 | "proc-macro2", 1094 | ] 1095 | 1096 | [[package]] 1097 | name = "rand" 1098 | version = "0.8.5" 1099 | source = "registry+https://github.com/rust-lang/crates.io-index" 1100 | checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 1101 | dependencies = [ 1102 | "libc", 1103 | "rand_chacha", 1104 | "rand_core", 1105 | ] 1106 | 1107 | [[package]] 1108 | name = "rand_chacha" 1109 | version = "0.3.1" 1110 | source = "registry+https://github.com/rust-lang/crates.io-index" 1111 | checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 1112 | dependencies = [ 1113 | "ppv-lite86", 1114 | "rand_core", 1115 | ] 1116 | 1117 | [[package]] 1118 | name = "rand_core" 1119 | version = "0.6.4" 1120 | source = "registry+https://github.com/rust-lang/crates.io-index" 1121 | checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" 1122 | dependencies = [ 1123 | "getrandom", 1124 | ] 1125 | 1126 | [[package]] 1127 | name = "rawpointer" 1128 | version = "0.2.1" 1129 | source = "registry+https://github.com/rust-lang/crates.io-index" 1130 | checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" 1131 | 1132 | [[package]] 1133 | name = "rayon" 1134 | version = "1.5.3" 1135 | source = "registry+https://github.com/rust-lang/crates.io-index" 1136 | checksum = "bd99e5772ead8baa5215278c9b15bf92087709e9c1b2d1f97cdb5a183c933a7d" 1137 | dependencies = [ 1138 | "autocfg", 1139 | "crossbeam-deque", 1140 | "either", 1141 | "rayon-core", 1142 | ] 1143 | 1144 | [[package]] 1145 | name = "rayon-core" 1146 | version = "1.9.3" 1147 | source = "registry+https://github.com/rust-lang/crates.io-index" 1148 | checksum = "258bcdb5ac6dad48491bb2992db6b7cf74878b0384908af124823d118c99683f" 1149 | dependencies = [ 1150 | "crossbeam-channel", 1151 | "crossbeam-deque", 1152 | "crossbeam-utils", 1153 | "num_cpus", 1154 | ] 1155 | 1156 | [[package]] 1157 | name = "redox_syscall" 1158 | version = "0.2.16" 1159 | source = "registry+https://github.com/rust-lang/crates.io-index" 1160 | checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" 1161 | dependencies = [ 1162 | "bitflags", 1163 | ] 1164 | 1165 | [[package]] 1166 | name = "redox_users" 1167 | version = "0.4.3" 1168 | source = "registry+https://github.com/rust-lang/crates.io-index" 1169 | checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" 1170 | dependencies = [ 1171 | "getrandom", 1172 | "redox_syscall", 1173 | "thiserror", 1174 | ] 1175 | 1176 | [[package]] 1177 | name = "regex" 1178 | version = "1.6.0" 1179 | source = "registry+https://github.com/rust-lang/crates.io-index" 1180 | checksum = "4c4eb3267174b8c6c2f654116623910a0fef09c4753f8dd83db29c48a0df988b" 1181 | dependencies = [ 1182 | "aho-corasick", 1183 | "memchr", 1184 | "regex-syntax", 1185 | ] 1186 | 1187 | [[package]] 1188 | name = "regex-automata" 1189 | version = "0.1.10" 1190 | source = "registry+https://github.com/rust-lang/crates.io-index" 1191 | checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" 1192 | 1193 | [[package]] 1194 | name = "regex-syntax" 1195 | version = "0.6.27" 1196 | source = "registry+https://github.com/rust-lang/crates.io-index" 1197 | checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244" 1198 | 1199 | [[package]] 1200 | name = "remove_dir_all" 1201 | version = "0.5.3" 1202 | source = "registry+https://github.com/rust-lang/crates.io-index" 1203 | checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" 1204 | dependencies = [ 1205 | "winapi", 1206 | ] 1207 | 1208 | [[package]] 1209 | name = "reqwest" 1210 | version = "0.11.12" 1211 | source = "registry+https://github.com/rust-lang/crates.io-index" 1212 | checksum = "431949c384f4e2ae07605ccaa56d1d9d2ecdb5cadd4f9577ccfab29f2e5149fc" 1213 | dependencies = [ 1214 | "base64", 1215 | "bytes", 1216 | "encoding_rs", 1217 | "futures-core", 1218 | "futures-util", 1219 | "h2", 1220 | "http", 1221 | "http-body", 1222 | "hyper", 1223 | "hyper-tls", 1224 | "ipnet", 1225 | "js-sys", 1226 | "log", 1227 | "mime", 1228 | "native-tls", 1229 | "once_cell", 1230 | "percent-encoding", 1231 | "pin-project-lite", 1232 | "serde", 1233 | "serde_json", 1234 | "serde_urlencoded", 1235 | "tokio", 1236 | "tokio-native-tls", 1237 | "tower-service", 1238 | "url", 1239 | "wasm-bindgen", 1240 | "wasm-bindgen-futures", 1241 | "web-sys", 1242 | "winreg", 1243 | ] 1244 | 1245 | [[package]] 1246 | name = "rust-bert" 1247 | version = "0.19.0" 1248 | source = "registry+https://github.com/rust-lang/crates.io-index" 1249 | checksum = "9ea4119688c0406c009d6b40cc239d85166318887e1353733606348ada04a84d" 1250 | dependencies = [ 1251 | "cached-path", 1252 | "dirs", 1253 | "half 2.1.0", 1254 | "lazy_static", 1255 | "ordered-float", 1256 | "rust_tokenizers", 1257 | "serde", 1258 | "serde_json", 1259 | "tch", 1260 | "thiserror", 1261 | "uuid", 1262 | ] 1263 | 1264 | [[package]] 1265 | name = "rust_tokenizers" 1266 | version = "7.0.2" 1267 | source = "registry+https://github.com/rust-lang/crates.io-index" 1268 | checksum = "196e3b77b07fd5bfcbc8187ecaef5d5931820d9abd6c3fe0a9dc6d3ddb035d72" 1269 | dependencies = [ 1270 | "csv", 1271 | "hashbrown", 1272 | "itertools", 1273 | "lazy_static", 1274 | "protobuf", 1275 | "rayon", 1276 | "regex", 1277 | "serde", 1278 | "serde_json", 1279 | "thiserror", 1280 | "unicode-normalization", 1281 | "unicode-normalization-alignments", 1282 | ] 1283 | 1284 | [[package]] 1285 | name = "ryu" 1286 | version = "1.0.11" 1287 | source = "registry+https://github.com/rust-lang/crates.io-index" 1288 | checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" 1289 | 1290 | [[package]] 1291 | name = "schannel" 1292 | version = "0.1.20" 1293 | source = "registry+https://github.com/rust-lang/crates.io-index" 1294 | checksum = "88d6731146462ea25d9244b2ed5fd1d716d25c52e4d54aa4fb0f3c4e9854dbe2" 1295 | dependencies = [ 1296 | "lazy_static", 1297 | "windows-sys 0.36.1", 1298 | ] 1299 | 1300 | [[package]] 1301 | name = "scopeguard" 1302 | version = "1.1.0" 1303 | source = "registry+https://github.com/rust-lang/crates.io-index" 1304 | checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" 1305 | 1306 | [[package]] 1307 | name = "security-framework" 1308 | version = "2.7.0" 1309 | source = "registry+https://github.com/rust-lang/crates.io-index" 1310 | checksum = "2bc1bb97804af6631813c55739f771071e0f2ed33ee20b68c86ec505d906356c" 1311 | dependencies = [ 1312 | "bitflags", 1313 | "core-foundation", 1314 | "core-foundation-sys", 1315 | "libc", 1316 | "security-framework-sys", 1317 | ] 1318 | 1319 | [[package]] 1320 | name = "security-framework-sys" 1321 | version = "2.6.1" 1322 | source = "registry+https://github.com/rust-lang/crates.io-index" 1323 | checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556" 1324 | dependencies = [ 1325 | "core-foundation-sys", 1326 | "libc", 1327 | ] 1328 | 1329 | [[package]] 1330 | name = "semantic-search" 1331 | version = "0.1.0" 1332 | dependencies = [ 1333 | "anyhow", 1334 | "kd-tree", 1335 | "rust-bert", 1336 | "serde", 1337 | "serde_json", 1338 | "typenum", 1339 | ] 1340 | 1341 | [[package]] 1342 | name = "serde" 1343 | version = "1.0.147" 1344 | source = "registry+https://github.com/rust-lang/crates.io-index" 1345 | checksum = "d193d69bae983fc11a79df82342761dfbf28a99fc8d203dca4c3c1b590948965" 1346 | dependencies = [ 1347 | "serde_derive", 1348 | ] 1349 | 1350 | [[package]] 1351 | name = "serde_derive" 1352 | version = "1.0.147" 1353 | source = "registry+https://github.com/rust-lang/crates.io-index" 1354 | checksum = "4f1d362ca8fc9c3e3a7484440752472d68a6caa98f1ab81d99b5dfe517cec852" 1355 | dependencies = [ 1356 | "proc-macro2", 1357 | "quote", 1358 | "syn", 1359 | ] 1360 | 1361 | [[package]] 1362 | name = "serde_json" 1363 | version = "1.0.87" 1364 | source = "registry+https://github.com/rust-lang/crates.io-index" 1365 | checksum = "6ce777b7b150d76b9cf60d28b55f5847135a003f7d7350c6be7a773508ce7d45" 1366 | dependencies = [ 1367 | "itoa 1.0.4", 1368 | "ryu", 1369 | "serde", 1370 | ] 1371 | 1372 | [[package]] 1373 | name = "serde_urlencoded" 1374 | version = "0.7.1" 1375 | source = "registry+https://github.com/rust-lang/crates.io-index" 1376 | checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" 1377 | dependencies = [ 1378 | "form_urlencoded", 1379 | "itoa 1.0.4", 1380 | "ryu", 1381 | "serde", 1382 | ] 1383 | 1384 | [[package]] 1385 | name = "sha1" 1386 | version = "0.10.5" 1387 | source = "registry+https://github.com/rust-lang/crates.io-index" 1388 | checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" 1389 | dependencies = [ 1390 | "cfg-if", 1391 | "cpufeatures", 1392 | "digest", 1393 | ] 1394 | 1395 | [[package]] 1396 | name = "sha2" 1397 | version = "0.10.6" 1398 | source = "registry+https://github.com/rust-lang/crates.io-index" 1399 | checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" 1400 | dependencies = [ 1401 | "cfg-if", 1402 | "cpufeatures", 1403 | "digest", 1404 | ] 1405 | 1406 | [[package]] 1407 | name = "slab" 1408 | version = "0.4.7" 1409 | source = "registry+https://github.com/rust-lang/crates.io-index" 1410 | checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" 1411 | dependencies = [ 1412 | "autocfg", 1413 | ] 1414 | 1415 | [[package]] 1416 | name = "smallvec" 1417 | version = "1.10.0" 1418 | source = "registry+https://github.com/rust-lang/crates.io-index" 1419 | checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" 1420 | 1421 | [[package]] 1422 | name = "socket2" 1423 | version = "0.4.7" 1424 | source = "registry+https://github.com/rust-lang/crates.io-index" 1425 | checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" 1426 | dependencies = [ 1427 | "libc", 1428 | "winapi", 1429 | ] 1430 | 1431 | [[package]] 1432 | name = "subtle" 1433 | version = "2.4.1" 1434 | source = "registry+https://github.com/rust-lang/crates.io-index" 1435 | checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" 1436 | 1437 | [[package]] 1438 | name = "syn" 1439 | version = "1.0.103" 1440 | source = "registry+https://github.com/rust-lang/crates.io-index" 1441 | checksum = "a864042229133ada95abf3b54fdc62ef5ccabe9515b64717bcb9a1919e59445d" 1442 | dependencies = [ 1443 | "proc-macro2", 1444 | "quote", 1445 | "unicode-ident", 1446 | ] 1447 | 1448 | [[package]] 1449 | name = "tar" 1450 | version = "0.4.38" 1451 | source = "registry+https://github.com/rust-lang/crates.io-index" 1452 | checksum = "4b55807c0344e1e6c04d7c965f5289c39a8d94ae23ed5c0b57aabac549f871c6" 1453 | dependencies = [ 1454 | "filetime", 1455 | "libc", 1456 | "xattr", 1457 | ] 1458 | 1459 | [[package]] 1460 | name = "tch" 1461 | version = "0.8.0" 1462 | source = "registry+https://github.com/rust-lang/crates.io-index" 1463 | checksum = "584cc6a09b0a28a9ebd85b64a74cfe0643d54a724ab649379c4ff5edd59b2356" 1464 | dependencies = [ 1465 | "half 1.8.2", 1466 | "lazy_static", 1467 | "libc", 1468 | "ndarray", 1469 | "rand", 1470 | "thiserror", 1471 | "torch-sys", 1472 | "zip 0.6.3", 1473 | ] 1474 | 1475 | [[package]] 1476 | name = "tempfile" 1477 | version = "3.3.0" 1478 | source = "registry+https://github.com/rust-lang/crates.io-index" 1479 | checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" 1480 | dependencies = [ 1481 | "cfg-if", 1482 | "fastrand", 1483 | "libc", 1484 | "redox_syscall", 1485 | "remove_dir_all", 1486 | "winapi", 1487 | ] 1488 | 1489 | [[package]] 1490 | name = "terminal_size" 1491 | version = "0.1.17" 1492 | source = "registry+https://github.com/rust-lang/crates.io-index" 1493 | checksum = "633c1a546cee861a1a6d0dc69ebeca693bf4296661ba7852b9d21d159e0506df" 1494 | dependencies = [ 1495 | "libc", 1496 | "winapi", 1497 | ] 1498 | 1499 | [[package]] 1500 | name = "thiserror" 1501 | version = "1.0.37" 1502 | source = "registry+https://github.com/rust-lang/crates.io-index" 1503 | checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e" 1504 | dependencies = [ 1505 | "thiserror-impl", 1506 | ] 1507 | 1508 | [[package]] 1509 | name = "thiserror-impl" 1510 | version = "1.0.37" 1511 | source = "registry+https://github.com/rust-lang/crates.io-index" 1512 | checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb" 1513 | dependencies = [ 1514 | "proc-macro2", 1515 | "quote", 1516 | "syn", 1517 | ] 1518 | 1519 | [[package]] 1520 | name = "time" 1521 | version = "0.1.44" 1522 | source = "registry+https://github.com/rust-lang/crates.io-index" 1523 | checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" 1524 | dependencies = [ 1525 | "libc", 1526 | "wasi 0.10.0+wasi-snapshot-preview1", 1527 | "winapi", 1528 | ] 1529 | 1530 | [[package]] 1531 | name = "time" 1532 | version = "0.3.16" 1533 | source = "registry+https://github.com/rust-lang/crates.io-index" 1534 | checksum = "0fab5c8b9980850e06d92ddbe3ab839c062c801f3927c0fb8abd6fc8e918fbca" 1535 | dependencies = [ 1536 | "itoa 1.0.4", 1537 | "libc", 1538 | "num_threads", 1539 | "serde", 1540 | "time-core", 1541 | "time-macros", 1542 | ] 1543 | 1544 | [[package]] 1545 | name = "time-core" 1546 | version = "0.1.0" 1547 | source = "registry+https://github.com/rust-lang/crates.io-index" 1548 | checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd" 1549 | 1550 | [[package]] 1551 | name = "time-macros" 1552 | version = "0.2.5" 1553 | source = "registry+https://github.com/rust-lang/crates.io-index" 1554 | checksum = "65bb801831d812c562ae7d2bfb531f26e66e4e1f6b17307ba4149c5064710e5b" 1555 | dependencies = [ 1556 | "time-core", 1557 | ] 1558 | 1559 | [[package]] 1560 | name = "tinyvec" 1561 | version = "1.6.0" 1562 | source = "registry+https://github.com/rust-lang/crates.io-index" 1563 | checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" 1564 | dependencies = [ 1565 | "tinyvec_macros", 1566 | ] 1567 | 1568 | [[package]] 1569 | name = "tinyvec_macros" 1570 | version = "0.1.0" 1571 | source = "registry+https://github.com/rust-lang/crates.io-index" 1572 | checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" 1573 | 1574 | [[package]] 1575 | name = "tokio" 1576 | version = "1.21.2" 1577 | source = "registry+https://github.com/rust-lang/crates.io-index" 1578 | checksum = "a9e03c497dc955702ba729190dc4aac6f2a0ce97f913e5b1b5912fc5039d9099" 1579 | dependencies = [ 1580 | "autocfg", 1581 | "bytes", 1582 | "libc", 1583 | "memchr", 1584 | "mio", 1585 | "num_cpus", 1586 | "pin-project-lite", 1587 | "socket2", 1588 | "winapi", 1589 | ] 1590 | 1591 | [[package]] 1592 | name = "tokio-native-tls" 1593 | version = "0.3.0" 1594 | source = "registry+https://github.com/rust-lang/crates.io-index" 1595 | checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b" 1596 | dependencies = [ 1597 | "native-tls", 1598 | "tokio", 1599 | ] 1600 | 1601 | [[package]] 1602 | name = "tokio-util" 1603 | version = "0.7.4" 1604 | source = "registry+https://github.com/rust-lang/crates.io-index" 1605 | checksum = "0bb2e075f03b3d66d8d8785356224ba688d2906a371015e225beeb65ca92c740" 1606 | dependencies = [ 1607 | "bytes", 1608 | "futures-core", 1609 | "futures-sink", 1610 | "pin-project-lite", 1611 | "tokio", 1612 | "tracing", 1613 | ] 1614 | 1615 | [[package]] 1616 | name = "torch-sys" 1617 | version = "0.8.0" 1618 | source = "registry+https://github.com/rust-lang/crates.io-index" 1619 | checksum = "6a097a0fe5fda9773f6515d4eaf692caa77818c8628f1be42b79c31de9473300" 1620 | dependencies = [ 1621 | "anyhow", 1622 | "cc", 1623 | "curl", 1624 | "libc", 1625 | "zip 0.6.3", 1626 | ] 1627 | 1628 | [[package]] 1629 | name = "tower-service" 1630 | version = "0.3.2" 1631 | source = "registry+https://github.com/rust-lang/crates.io-index" 1632 | checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" 1633 | 1634 | [[package]] 1635 | name = "tracing" 1636 | version = "0.1.37" 1637 | source = "registry+https://github.com/rust-lang/crates.io-index" 1638 | checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" 1639 | dependencies = [ 1640 | "cfg-if", 1641 | "pin-project-lite", 1642 | "tracing-core", 1643 | ] 1644 | 1645 | [[package]] 1646 | name = "tracing-core" 1647 | version = "0.1.30" 1648 | source = "registry+https://github.com/rust-lang/crates.io-index" 1649 | checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" 1650 | dependencies = [ 1651 | "once_cell", 1652 | ] 1653 | 1654 | [[package]] 1655 | name = "try-lock" 1656 | version = "0.2.3" 1657 | source = "registry+https://github.com/rust-lang/crates.io-index" 1658 | checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" 1659 | 1660 | [[package]] 1661 | name = "typenum" 1662 | version = "1.15.0" 1663 | source = "registry+https://github.com/rust-lang/crates.io-index" 1664 | checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" 1665 | 1666 | [[package]] 1667 | name = "unicode-bidi" 1668 | version = "0.3.8" 1669 | source = "registry+https://github.com/rust-lang/crates.io-index" 1670 | checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" 1671 | 1672 | [[package]] 1673 | name = "unicode-ident" 1674 | version = "1.0.5" 1675 | source = "registry+https://github.com/rust-lang/crates.io-index" 1676 | checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" 1677 | 1678 | [[package]] 1679 | name = "unicode-normalization" 1680 | version = "0.1.22" 1681 | source = "registry+https://github.com/rust-lang/crates.io-index" 1682 | checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" 1683 | dependencies = [ 1684 | "tinyvec", 1685 | ] 1686 | 1687 | [[package]] 1688 | name = "unicode-normalization-alignments" 1689 | version = "0.1.12" 1690 | source = "registry+https://github.com/rust-lang/crates.io-index" 1691 | checksum = "43f613e4fa046e69818dd287fdc4bc78175ff20331479dab6e1b0f98d57062de" 1692 | dependencies = [ 1693 | "smallvec", 1694 | ] 1695 | 1696 | [[package]] 1697 | name = "url" 1698 | version = "2.3.1" 1699 | source = "registry+https://github.com/rust-lang/crates.io-index" 1700 | checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" 1701 | dependencies = [ 1702 | "form_urlencoded", 1703 | "idna", 1704 | "percent-encoding", 1705 | ] 1706 | 1707 | [[package]] 1708 | name = "uuid" 1709 | version = "1.2.1" 1710 | source = "registry+https://github.com/rust-lang/crates.io-index" 1711 | checksum = "feb41e78f93363bb2df8b0e86a2ca30eed7806ea16ea0c790d757cf93f79be83" 1712 | dependencies = [ 1713 | "getrandom", 1714 | ] 1715 | 1716 | [[package]] 1717 | name = "vcpkg" 1718 | version = "0.2.15" 1719 | source = "registry+https://github.com/rust-lang/crates.io-index" 1720 | checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" 1721 | 1722 | [[package]] 1723 | name = "version_check" 1724 | version = "0.9.4" 1725 | source = "registry+https://github.com/rust-lang/crates.io-index" 1726 | checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" 1727 | 1728 | [[package]] 1729 | name = "want" 1730 | version = "0.3.0" 1731 | source = "registry+https://github.com/rust-lang/crates.io-index" 1732 | checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" 1733 | dependencies = [ 1734 | "log", 1735 | "try-lock", 1736 | ] 1737 | 1738 | [[package]] 1739 | name = "wasi" 1740 | version = "0.10.0+wasi-snapshot-preview1" 1741 | source = "registry+https://github.com/rust-lang/crates.io-index" 1742 | checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" 1743 | 1744 | [[package]] 1745 | name = "wasi" 1746 | version = "0.11.0+wasi-snapshot-preview1" 1747 | source = "registry+https://github.com/rust-lang/crates.io-index" 1748 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 1749 | 1750 | [[package]] 1751 | name = "wasm-bindgen" 1752 | version = "0.2.83" 1753 | source = "registry+https://github.com/rust-lang/crates.io-index" 1754 | checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" 1755 | dependencies = [ 1756 | "cfg-if", 1757 | "wasm-bindgen-macro", 1758 | ] 1759 | 1760 | [[package]] 1761 | name = "wasm-bindgen-backend" 1762 | version = "0.2.83" 1763 | source = "registry+https://github.com/rust-lang/crates.io-index" 1764 | checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" 1765 | dependencies = [ 1766 | "bumpalo", 1767 | "log", 1768 | "once_cell", 1769 | "proc-macro2", 1770 | "quote", 1771 | "syn", 1772 | "wasm-bindgen-shared", 1773 | ] 1774 | 1775 | [[package]] 1776 | name = "wasm-bindgen-futures" 1777 | version = "0.4.33" 1778 | source = "registry+https://github.com/rust-lang/crates.io-index" 1779 | checksum = "23639446165ca5a5de86ae1d8896b737ae80319560fbaa4c2887b7da6e7ebd7d" 1780 | dependencies = [ 1781 | "cfg-if", 1782 | "js-sys", 1783 | "wasm-bindgen", 1784 | "web-sys", 1785 | ] 1786 | 1787 | [[package]] 1788 | name = "wasm-bindgen-macro" 1789 | version = "0.2.83" 1790 | source = "registry+https://github.com/rust-lang/crates.io-index" 1791 | checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" 1792 | dependencies = [ 1793 | "quote", 1794 | "wasm-bindgen-macro-support", 1795 | ] 1796 | 1797 | [[package]] 1798 | name = "wasm-bindgen-macro-support" 1799 | version = "0.2.83" 1800 | source = "registry+https://github.com/rust-lang/crates.io-index" 1801 | checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" 1802 | dependencies = [ 1803 | "proc-macro2", 1804 | "quote", 1805 | "syn", 1806 | "wasm-bindgen-backend", 1807 | "wasm-bindgen-shared", 1808 | ] 1809 | 1810 | [[package]] 1811 | name = "wasm-bindgen-shared" 1812 | version = "0.2.83" 1813 | source = "registry+https://github.com/rust-lang/crates.io-index" 1814 | checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" 1815 | 1816 | [[package]] 1817 | name = "web-sys" 1818 | version = "0.3.60" 1819 | source = "registry+https://github.com/rust-lang/crates.io-index" 1820 | checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f" 1821 | dependencies = [ 1822 | "js-sys", 1823 | "wasm-bindgen", 1824 | ] 1825 | 1826 | [[package]] 1827 | name = "winapi" 1828 | version = "0.3.9" 1829 | source = "registry+https://github.com/rust-lang/crates.io-index" 1830 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 1831 | dependencies = [ 1832 | "winapi-i686-pc-windows-gnu", 1833 | "winapi-x86_64-pc-windows-gnu", 1834 | ] 1835 | 1836 | [[package]] 1837 | name = "winapi-i686-pc-windows-gnu" 1838 | version = "0.4.0" 1839 | source = "registry+https://github.com/rust-lang/crates.io-index" 1840 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 1841 | 1842 | [[package]] 1843 | name = "winapi-x86_64-pc-windows-gnu" 1844 | version = "0.4.0" 1845 | source = "registry+https://github.com/rust-lang/crates.io-index" 1846 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 1847 | 1848 | [[package]] 1849 | name = "windows-sys" 1850 | version = "0.36.1" 1851 | source = "registry+https://github.com/rust-lang/crates.io-index" 1852 | checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" 1853 | dependencies = [ 1854 | "windows_aarch64_msvc 0.36.1", 1855 | "windows_i686_gnu 0.36.1", 1856 | "windows_i686_msvc 0.36.1", 1857 | "windows_x86_64_gnu 0.36.1", 1858 | "windows_x86_64_msvc 0.36.1", 1859 | ] 1860 | 1861 | [[package]] 1862 | name = "windows-sys" 1863 | version = "0.42.0" 1864 | source = "registry+https://github.com/rust-lang/crates.io-index" 1865 | checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" 1866 | dependencies = [ 1867 | "windows_aarch64_gnullvm", 1868 | "windows_aarch64_msvc 0.42.0", 1869 | "windows_i686_gnu 0.42.0", 1870 | "windows_i686_msvc 0.42.0", 1871 | "windows_x86_64_gnu 0.42.0", 1872 | "windows_x86_64_gnullvm", 1873 | "windows_x86_64_msvc 0.42.0", 1874 | ] 1875 | 1876 | [[package]] 1877 | name = "windows_aarch64_gnullvm" 1878 | version = "0.42.0" 1879 | source = "registry+https://github.com/rust-lang/crates.io-index" 1880 | checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e" 1881 | 1882 | [[package]] 1883 | name = "windows_aarch64_msvc" 1884 | version = "0.36.1" 1885 | source = "registry+https://github.com/rust-lang/crates.io-index" 1886 | checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" 1887 | 1888 | [[package]] 1889 | name = "windows_aarch64_msvc" 1890 | version = "0.42.0" 1891 | source = "registry+https://github.com/rust-lang/crates.io-index" 1892 | checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4" 1893 | 1894 | [[package]] 1895 | name = "windows_i686_gnu" 1896 | version = "0.36.1" 1897 | source = "registry+https://github.com/rust-lang/crates.io-index" 1898 | checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" 1899 | 1900 | [[package]] 1901 | name = "windows_i686_gnu" 1902 | version = "0.42.0" 1903 | source = "registry+https://github.com/rust-lang/crates.io-index" 1904 | checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7" 1905 | 1906 | [[package]] 1907 | name = "windows_i686_msvc" 1908 | version = "0.36.1" 1909 | source = "registry+https://github.com/rust-lang/crates.io-index" 1910 | checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" 1911 | 1912 | [[package]] 1913 | name = "windows_i686_msvc" 1914 | version = "0.42.0" 1915 | source = "registry+https://github.com/rust-lang/crates.io-index" 1916 | checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246" 1917 | 1918 | [[package]] 1919 | name = "windows_x86_64_gnu" 1920 | version = "0.36.1" 1921 | source = "registry+https://github.com/rust-lang/crates.io-index" 1922 | checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" 1923 | 1924 | [[package]] 1925 | name = "windows_x86_64_gnu" 1926 | version = "0.42.0" 1927 | source = "registry+https://github.com/rust-lang/crates.io-index" 1928 | checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed" 1929 | 1930 | [[package]] 1931 | name = "windows_x86_64_gnullvm" 1932 | version = "0.42.0" 1933 | source = "registry+https://github.com/rust-lang/crates.io-index" 1934 | checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028" 1935 | 1936 | [[package]] 1937 | name = "windows_x86_64_msvc" 1938 | version = "0.36.1" 1939 | source = "registry+https://github.com/rust-lang/crates.io-index" 1940 | checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" 1941 | 1942 | [[package]] 1943 | name = "windows_x86_64_msvc" 1944 | version = "0.42.0" 1945 | source = "registry+https://github.com/rust-lang/crates.io-index" 1946 | checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5" 1947 | 1948 | [[package]] 1949 | name = "winreg" 1950 | version = "0.10.1" 1951 | source = "registry+https://github.com/rust-lang/crates.io-index" 1952 | checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" 1953 | dependencies = [ 1954 | "winapi", 1955 | ] 1956 | 1957 | [[package]] 1958 | name = "xattr" 1959 | version = "0.2.3" 1960 | source = "registry+https://github.com/rust-lang/crates.io-index" 1961 | checksum = "6d1526bbe5aaeb5eb06885f4d987bcdfa5e23187055de9b83fe00156a821fabc" 1962 | dependencies = [ 1963 | "libc", 1964 | ] 1965 | 1966 | [[package]] 1967 | name = "zip" 1968 | version = "0.5.13" 1969 | source = "registry+https://github.com/rust-lang/crates.io-index" 1970 | checksum = "93ab48844d61251bb3835145c521d88aa4031d7139e8485990f60ca911fa0815" 1971 | dependencies = [ 1972 | "byteorder", 1973 | "bzip2", 1974 | "crc32fast", 1975 | "flate2", 1976 | "thiserror", 1977 | "time 0.1.44", 1978 | ] 1979 | 1980 | [[package]] 1981 | name = "zip" 1982 | version = "0.6.3" 1983 | source = "registry+https://github.com/rust-lang/crates.io-index" 1984 | checksum = "537ce7411d25e54e8ae21a7ce0b15840e7bfcff15b51d697ec3266cc76bdf080" 1985 | dependencies = [ 1986 | "aes", 1987 | "byteorder", 1988 | "bzip2", 1989 | "constant_time_eq", 1990 | "crc32fast", 1991 | "crossbeam-utils", 1992 | "flate2", 1993 | "hmac", 1994 | "pbkdf2", 1995 | "sha1", 1996 | "time 0.3.16", 1997 | "zstd", 1998 | ] 1999 | 2000 | [[package]] 2001 | name = "zip-extensions" 2002 | version = "0.6.1" 2003 | source = "registry+https://github.com/rust-lang/crates.io-index" 2004 | checksum = "a64c3c977bc3434ce2d4bcea8ad3c644672de0f2c402b72b9171ca80a8885d14" 2005 | dependencies = [ 2006 | "zip 0.5.13", 2007 | ] 2008 | 2009 | [[package]] 2010 | name = "zstd" 2011 | version = "0.11.2+zstd.1.5.2" 2012 | source = "registry+https://github.com/rust-lang/crates.io-index" 2013 | checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" 2014 | dependencies = [ 2015 | "zstd-safe", 2016 | ] 2017 | 2018 | [[package]] 2019 | name = "zstd-safe" 2020 | version = "5.0.2+zstd.1.5.2" 2021 | source = "registry+https://github.com/rust-lang/crates.io-index" 2022 | checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" 2023 | dependencies = [ 2024 | "libc", 2025 | "zstd-sys", 2026 | ] 2027 | 2028 | [[package]] 2029 | name = "zstd-sys" 2030 | version = "2.0.1+zstd.1.5.2" 2031 | source = "registry+https://github.com/rust-lang/crates.io-index" 2032 | checksum = "9fd07cbbc53846d9145dbffdf6dd09a7a0aa52be46741825f5c97bdd4f73f12b" 2033 | dependencies = [ 2034 | "cc", 2035 | "libc", 2036 | ] 2037 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "semantic-search" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | serde_json = "1.0.87" 10 | serde = { version = "1.0", features = ["derive"] } 11 | rust-bert = "0.19.0" 12 | anyhow = "1.0.66" 13 | kd-tree = "0.4.2" 14 | typenum = "1.15.0" 15 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # How to build a Semantic Search Engine in Rust 2 | 3 | Accompanying source code for the article https://sachaarbonel.medium.com/how-to-build-a-semantic-search-engine-in-rust-e96e6378cfd9 4 | 5 | ## Getting Started 6 | 7 | ### M1 8 | `cargo run --target x86_64-apple-darwin` 9 | 10 | ### Intel 11 | `cargo run` 12 | -------------------------------------------------------------------------------- /data/books.json: -------------------------------------------------------------------------------- 1 | { 2 | "books": [ 3 | { 4 | "title": "The Great Gatsby", 5 | "author": "F. Scott Fitzgerald", 6 | "summary": "The story primarily concerns the young and mysterious millionaire Jay Gatsby and his quixotic passion and obsession with the beautiful former debutante Daisy Buchanan." 7 | }, 8 | { 9 | "title": "The Catcher in the Rye", 10 | "author": "J. D. Salinger", 11 | "summary": "The story is told in the first person by Holden Caulfield, a cynical teenager who recently has been expelled from prep school." 12 | }, 13 | { 14 | "title": "The Grapes of Wrath", 15 | "author": "John Steinbeck", 16 | "summary": "The novel tells the story of the Joad family, who are driven from their Oklahoma homestead and forced to travel west to the promised land of California." 17 | } 18 | ] 19 | } -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | use std::fs; 2 | 3 | use kd_tree::KdPoint; 4 | use rust_bert::pipelines::sentence_embeddings::{ 5 | SentenceEmbeddingsBuilder, SentenceEmbeddingsModelType, 6 | }; 7 | use serde::Deserialize; 8 | 9 | #[derive(Debug, Deserialize)] 10 | pub struct Library { 11 | pub books: Vec, 12 | } 13 | 14 | #[derive(Debug, Deserialize, Clone)] 15 | pub struct Book { 16 | pub title: String, 17 | 18 | pub author: String, 19 | 20 | pub summary: String, 21 | } 22 | 23 | impl Book { 24 | fn to_embedded(self, embeddings: [f32; 384]) -> EmbeddedBook { 25 | EmbeddedBook { 26 | title: Some(self.title), 27 | author: Some(self.author), 28 | summary: Some(self.summary), 29 | embeddings: embeddings, 30 | } 31 | } 32 | } 33 | #[derive(Debug)] 34 | pub struct EmbeddedBook { 35 | pub title: Option, 36 | 37 | pub author: Option, 38 | 39 | pub summary: Option, 40 | 41 | pub embeddings: [f32; 384], 42 | } 43 | 44 | impl EmbeddedBook { 45 | fn topic(embeddings: [f32; 384]) -> Self { 46 | Self { 47 | title: None, 48 | author: None, 49 | summary: None, 50 | embeddings: embeddings, 51 | } 52 | } 53 | } 54 | 55 | impl KdPoint for EmbeddedBook { 56 | type Scalar = f32; 57 | type Dim = typenum::U2; // 2 dimensional tree. 58 | fn at(&self, k: usize) -> f32 { 59 | self.embeddings[k] 60 | } 61 | } 62 | 63 | fn main() -> anyhow::Result<()> { 64 | // Set-up sentence embeddings model 65 | let model = SentenceEmbeddingsBuilder::remote(SentenceEmbeddingsModelType::AllMiniLmL12V2) 66 | .create_model()?; 67 | 68 | let json = fs::read_to_string("data/books.json")?; 69 | let library: Library = serde_json::from_str(&json)?; 70 | let mut embeddedbooks = Vec::new(); 71 | for book in library.books.clone() { 72 | let embeddings = model.encode(&[book.clone().summary])?; 73 | 74 | embeddedbooks.push(book.to_embedded(to_array(embeddings[0].as_slice()))); 75 | } 76 | let query = "rich"; 77 | println!("Querying: {}", query); 78 | let rich_embeddings = model.encode(&[query])?; 79 | let rich_embedding = to_array(rich_embeddings[0].as_slice()); 80 | let rich_topic = EmbeddedBook::topic(rich_embedding); 81 | 82 | let kdtree = kd_tree::KdSlice::sort_by(&mut embeddedbooks, |item1, item2, k| { 83 | item1.embeddings[k] 84 | .partial_cmp(&item2.embeddings[k]) 85 | .unwrap() 86 | }); 87 | 88 | let nearests = kdtree.nearests(&rich_topic, 10); 89 | for nearest in nearests { 90 | println!("nearest: {:?}", nearest.item.title); 91 | println!("distance: {:?}", nearest.squared_distance); 92 | } 93 | 94 | Ok(()) 95 | } 96 | 97 | // convenient to convert a slice to a fixed size array 98 | fn to_array(barry: &[f32]) -> [f32; 384] { 99 | barry.try_into().expect("slice with incorrect length") 100 | } 101 | --------------------------------------------------------------------------------