├── .gitignore ├── .gitmodules ├── Cargo.lock ├── Cargo.toml ├── README.md ├── rust-toolchin └── src ├── auth.rs ├── backend.rs ├── cache.rs ├── copilot.rs ├── debounce.rs ├── lib.rs ├── main.rs ├── parse.rs └── request.rs /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | notes 3 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zbirenbaum/copilot-rs/182826a02843d88ba24cd7301c71a83bd26ca02e/.gitmodules -------------------------------------------------------------------------------- /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 = "addr2line" 7 | version = "0.20.0" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3" 10 | dependencies = [ 11 | "gimli", 12 | ] 13 | 14 | [[package]] 15 | name = "adler" 16 | version = "1.0.2" 17 | source = "registry+https://github.com/rust-lang/crates.io-index" 18 | checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" 19 | 20 | [[package]] 21 | name = "ahash" 22 | version = "0.7.6" 23 | source = "registry+https://github.com/rust-lang/crates.io-index" 24 | checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" 25 | dependencies = [ 26 | "getrandom", 27 | "once_cell", 28 | "version_check", 29 | ] 30 | 31 | [[package]] 32 | name = "android-tzdata" 33 | version = "0.1.1" 34 | source = "registry+https://github.com/rust-lang/crates.io-index" 35 | checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" 36 | 37 | [[package]] 38 | name = "android_system_properties" 39 | version = "0.1.5" 40 | source = "registry+https://github.com/rust-lang/crates.io-index" 41 | checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" 42 | dependencies = [ 43 | "libc", 44 | ] 45 | 46 | [[package]] 47 | name = "anyhow" 48 | version = "1.0.72" 49 | source = "registry+https://github.com/rust-lang/crates.io-index" 50 | checksum = "3b13c32d80ecc7ab747b80c3784bce54ee8a7a0cc4fbda9bf4cda2cf6fe90854" 51 | 52 | [[package]] 53 | name = "async-channel" 54 | version = "1.9.0" 55 | source = "registry+https://github.com/rust-lang/crates.io-index" 56 | checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" 57 | dependencies = [ 58 | "concurrent-queue", 59 | "event-listener", 60 | "futures-core", 61 | ] 62 | 63 | [[package]] 64 | name = "async-codec-lite" 65 | version = "0.0.2" 66 | source = "registry+https://github.com/rust-lang/crates.io-index" 67 | checksum = "2527c30e3972d8ff366b353125dae828c4252a154dbe6063684f6c5e014760a3" 68 | dependencies = [ 69 | "anyhow", 70 | "bytes", 71 | "futures-core", 72 | "futures-io", 73 | "futures-sink", 74 | "log", 75 | "pin-project-lite", 76 | "thiserror", 77 | ] 78 | 79 | [[package]] 80 | name = "async-executor" 81 | version = "1.5.1" 82 | source = "registry+https://github.com/rust-lang/crates.io-index" 83 | checksum = "6fa3dc5f2a8564f07759c008b9109dc0d39de92a88d5588b8a5036d286383afb" 84 | dependencies = [ 85 | "async-lock", 86 | "async-task", 87 | "concurrent-queue", 88 | "fastrand 1.9.0", 89 | "futures-lite", 90 | "slab", 91 | ] 92 | 93 | [[package]] 94 | name = "async-global-executor" 95 | version = "2.3.1" 96 | source = "registry+https://github.com/rust-lang/crates.io-index" 97 | checksum = "f1b6f5d7df27bd294849f8eec66ecfc63d11814df7a4f5d74168a2394467b776" 98 | dependencies = [ 99 | "async-channel", 100 | "async-executor", 101 | "async-io", 102 | "async-lock", 103 | "blocking", 104 | "futures-lite", 105 | "once_cell", 106 | ] 107 | 108 | [[package]] 109 | name = "async-io" 110 | version = "1.13.0" 111 | source = "registry+https://github.com/rust-lang/crates.io-index" 112 | checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" 113 | dependencies = [ 114 | "async-lock", 115 | "autocfg", 116 | "cfg-if", 117 | "concurrent-queue", 118 | "futures-lite", 119 | "log", 120 | "parking", 121 | "polling", 122 | "rustix 0.37.23", 123 | "slab", 124 | "socket2", 125 | "waker-fn", 126 | ] 127 | 128 | [[package]] 129 | name = "async-lock" 130 | version = "2.8.0" 131 | source = "registry+https://github.com/rust-lang/crates.io-index" 132 | checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" 133 | dependencies = [ 134 | "event-listener", 135 | ] 136 | 137 | [[package]] 138 | name = "async-process" 139 | version = "1.7.0" 140 | source = "registry+https://github.com/rust-lang/crates.io-index" 141 | checksum = "7a9d28b1d97e08915212e2e45310d47854eafa69600756fc735fb788f75199c9" 142 | dependencies = [ 143 | "async-io", 144 | "async-lock", 145 | "autocfg", 146 | "blocking", 147 | "cfg-if", 148 | "event-listener", 149 | "futures-lite", 150 | "rustix 0.37.23", 151 | "signal-hook", 152 | "windows-sys", 153 | ] 154 | 155 | [[package]] 156 | name = "async-std" 157 | version = "1.12.0" 158 | source = "registry+https://github.com/rust-lang/crates.io-index" 159 | checksum = "62565bb4402e926b29953c785397c6dc0391b7b446e45008b0049eb43cec6f5d" 160 | dependencies = [ 161 | "async-channel", 162 | "async-global-executor", 163 | "async-io", 164 | "async-lock", 165 | "async-process", 166 | "crossbeam-utils", 167 | "futures-channel", 168 | "futures-core", 169 | "futures-io", 170 | "futures-lite", 171 | "gloo-timers", 172 | "kv-log-macro", 173 | "log", 174 | "memchr", 175 | "once_cell", 176 | "pin-project-lite", 177 | "pin-utils", 178 | "slab", 179 | "wasm-bindgen-futures", 180 | ] 181 | 182 | [[package]] 183 | name = "async-task" 184 | version = "4.4.0" 185 | source = "registry+https://github.com/rust-lang/crates.io-index" 186 | checksum = "ecc7ab41815b3c653ccd2978ec3255c81349336702dfdf62ee6f7069b12a3aae" 187 | 188 | [[package]] 189 | name = "async-trait" 190 | version = "0.1.69" 191 | source = "registry+https://github.com/rust-lang/crates.io-index" 192 | checksum = "7b2d0f03b3640e3a630367e40c468cb7f309529c708ed1d88597047b0e7c6ef7" 193 | dependencies = [ 194 | "proc-macro2", 195 | "quote", 196 | "syn 2.0.25", 197 | ] 198 | 199 | [[package]] 200 | name = "async-tungstenite" 201 | version = "0.18.0" 202 | source = "registry+https://github.com/rust-lang/crates.io-index" 203 | checksum = "4b750efd83b7e716a015eed5ebb583cda83c52d9b24a8f0125e5c48c3313c9f8" 204 | dependencies = [ 205 | "futures-io", 206 | "futures-util", 207 | "log", 208 | "pin-project-lite", 209 | "tokio", 210 | "tungstenite", 211 | ] 212 | 213 | [[package]] 214 | name = "async-weighted-semaphore" 215 | version = "0.2.1" 216 | source = "registry+https://github.com/rust-lang/crates.io-index" 217 | checksum = "e0c3c4e4764855498d3ee6554748ff2d9376bc4c937692e266a56dd4ac098cfb" 218 | 219 | [[package]] 220 | name = "async_io_stream" 221 | version = "0.3.3" 222 | source = "registry+https://github.com/rust-lang/crates.io-index" 223 | checksum = "b6d7b9decdf35d8908a7e3ef02f64c5e9b1695e230154c0e8de3969142d9b94c" 224 | dependencies = [ 225 | "futures", 226 | "pharos", 227 | "rustc_version", 228 | "tokio", 229 | ] 230 | 231 | [[package]] 232 | name = "atomic-waker" 233 | version = "1.1.1" 234 | source = "registry+https://github.com/rust-lang/crates.io-index" 235 | checksum = "1181e1e0d1fce796a03db1ae795d67167da795f9cf4a39c37589e85ef57f26d3" 236 | 237 | [[package]] 238 | name = "atty" 239 | version = "0.2.14" 240 | source = "registry+https://github.com/rust-lang/crates.io-index" 241 | checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" 242 | dependencies = [ 243 | "hermit-abi 0.1.19", 244 | "libc", 245 | "winapi", 246 | ] 247 | 248 | [[package]] 249 | name = "auto_impl" 250 | version = "1.1.0" 251 | source = "registry+https://github.com/rust-lang/crates.io-index" 252 | checksum = "fee3da8ef1276b0bee5dd1c7258010d8fffd31801447323115a25560e1327b89" 253 | dependencies = [ 254 | "proc-macro-error", 255 | "proc-macro2", 256 | "quote", 257 | "syn 1.0.109", 258 | ] 259 | 260 | [[package]] 261 | name = "autocfg" 262 | version = "1.1.0" 263 | source = "registry+https://github.com/rust-lang/crates.io-index" 264 | checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" 265 | 266 | [[package]] 267 | name = "backtrace" 268 | version = "0.3.68" 269 | source = "registry+https://github.com/rust-lang/crates.io-index" 270 | checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12" 271 | dependencies = [ 272 | "addr2line", 273 | "cc", 274 | "cfg-if", 275 | "libc", 276 | "miniz_oxide", 277 | "object", 278 | "rustc-demangle", 279 | ] 280 | 281 | [[package]] 282 | name = "base64" 283 | version = "0.13.1" 284 | source = "registry+https://github.com/rust-lang/crates.io-index" 285 | checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" 286 | 287 | [[package]] 288 | name = "base64" 289 | version = "0.21.2" 290 | source = "registry+https://github.com/rust-lang/crates.io-index" 291 | checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" 292 | 293 | [[package]] 294 | name = "bitflags" 295 | version = "1.3.2" 296 | source = "registry+https://github.com/rust-lang/crates.io-index" 297 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 298 | 299 | [[package]] 300 | name = "bitflags" 301 | version = "2.4.0" 302 | source = "registry+https://github.com/rust-lang/crates.io-index" 303 | checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" 304 | 305 | [[package]] 306 | name = "block-buffer" 307 | version = "0.10.4" 308 | source = "registry+https://github.com/rust-lang/crates.io-index" 309 | checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" 310 | dependencies = [ 311 | "generic-array", 312 | ] 313 | 314 | [[package]] 315 | name = "blocking" 316 | version = "1.3.1" 317 | source = "registry+https://github.com/rust-lang/crates.io-index" 318 | checksum = "77231a1c8f801696fc0123ec6150ce92cffb8e164a02afb9c8ddee0e9b65ad65" 319 | dependencies = [ 320 | "async-channel", 321 | "async-lock", 322 | "async-task", 323 | "atomic-waker", 324 | "fastrand 1.9.0", 325 | "futures-lite", 326 | "log", 327 | ] 328 | 329 | [[package]] 330 | name = "bumpalo" 331 | version = "3.13.0" 332 | source = "registry+https://github.com/rust-lang/crates.io-index" 333 | checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" 334 | 335 | [[package]] 336 | name = "byteorder" 337 | version = "1.4.3" 338 | source = "registry+https://github.com/rust-lang/crates.io-index" 339 | checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" 340 | 341 | [[package]] 342 | name = "bytes" 343 | version = "1.4.0" 344 | source = "registry+https://github.com/rust-lang/crates.io-index" 345 | checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" 346 | 347 | [[package]] 348 | name = "cancellation" 349 | version = "0.1.0" 350 | source = "registry+https://github.com/rust-lang/crates.io-index" 351 | checksum = "f7a879c84c21f354f13535f87ad119ac3be22ebb9097b552a0af6a78f86628c4" 352 | 353 | [[package]] 354 | name = "cc" 355 | version = "1.0.79" 356 | source = "registry+https://github.com/rust-lang/crates.io-index" 357 | checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" 358 | 359 | [[package]] 360 | name = "cfg-if" 361 | version = "1.0.0" 362 | source = "registry+https://github.com/rust-lang/crates.io-index" 363 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 364 | 365 | [[package]] 366 | name = "chrono" 367 | version = "0.4.26" 368 | source = "registry+https://github.com/rust-lang/crates.io-index" 369 | checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" 370 | dependencies = [ 371 | "android-tzdata", 372 | "iana-time-zone", 373 | "js-sys", 374 | "num-traits", 375 | "time", 376 | "wasm-bindgen", 377 | "winapi", 378 | ] 379 | 380 | [[package]] 381 | name = "clap" 382 | version = "3.2.25" 383 | source = "registry+https://github.com/rust-lang/crates.io-index" 384 | checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" 385 | dependencies = [ 386 | "atty", 387 | "bitflags 1.3.2", 388 | "clap_derive", 389 | "clap_lex", 390 | "indexmap", 391 | "once_cell", 392 | "strsim", 393 | "termcolor", 394 | "textwrap", 395 | ] 396 | 397 | [[package]] 398 | name = "clap_derive" 399 | version = "3.2.25" 400 | source = "registry+https://github.com/rust-lang/crates.io-index" 401 | checksum = "ae6371b8bdc8b7d3959e9cf7b22d4435ef3e79e138688421ec654acf8c81b008" 402 | dependencies = [ 403 | "heck", 404 | "proc-macro-error", 405 | "proc-macro2", 406 | "quote", 407 | "syn 1.0.109", 408 | ] 409 | 410 | [[package]] 411 | name = "clap_lex" 412 | version = "0.2.4" 413 | source = "registry+https://github.com/rust-lang/crates.io-index" 414 | checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" 415 | dependencies = [ 416 | "os_str_bytes", 417 | ] 418 | 419 | [[package]] 420 | name = "concurrent-queue" 421 | version = "2.2.0" 422 | source = "registry+https://github.com/rust-lang/crates.io-index" 423 | checksum = "62ec6771ecfa0762d24683ee5a32ad78487a3d3afdc0fb8cae19d2c5deb50b7c" 424 | dependencies = [ 425 | "crossbeam-utils", 426 | ] 427 | 428 | [[package]] 429 | name = "copilot-rs" 430 | version = "0.19.0" 431 | dependencies = [ 432 | "async-codec-lite", 433 | "async-std", 434 | "async-trait", 435 | "async-tungstenite", 436 | "async-weighted-semaphore", 437 | "auto_impl", 438 | "bytes", 439 | "cancellation", 440 | "chrono", 441 | "dashmap", 442 | "eventsource-stream", 443 | "futures", 444 | "futures-util", 445 | "github-device-flow", 446 | "httparse", 447 | "interfaces", 448 | "lsp-types", 449 | "memchr", 450 | "reqwest", 451 | "reqwest-eventsource", 452 | "ropey", 453 | "serde", 454 | "serde_derive", 455 | "serde_json", 456 | "sha256", 457 | "tokio", 458 | "tokio-util", 459 | "tower", 460 | "tower-lsp", 461 | "tracing", 462 | "tracing-subscriber", 463 | "uuid", 464 | "ws_stream_tungstenite", 465 | ] 466 | 467 | [[package]] 468 | name = "core-foundation" 469 | version = "0.9.3" 470 | source = "registry+https://github.com/rust-lang/crates.io-index" 471 | checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" 472 | dependencies = [ 473 | "core-foundation-sys", 474 | "libc", 475 | ] 476 | 477 | [[package]] 478 | name = "core-foundation-sys" 479 | version = "0.8.4" 480 | source = "registry+https://github.com/rust-lang/crates.io-index" 481 | checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" 482 | 483 | [[package]] 484 | name = "cpufeatures" 485 | version = "0.2.8" 486 | source = "registry+https://github.com/rust-lang/crates.io-index" 487 | checksum = "03e69e28e9f7f77debdedbaafa2866e1de9ba56df55a8bd7cfc724c25a09987c" 488 | dependencies = [ 489 | "libc", 490 | ] 491 | 492 | [[package]] 493 | name = "crossbeam-utils" 494 | version = "0.8.16" 495 | source = "registry+https://github.com/rust-lang/crates.io-index" 496 | checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" 497 | dependencies = [ 498 | "cfg-if", 499 | ] 500 | 501 | [[package]] 502 | name = "crypto-common" 503 | version = "0.1.6" 504 | source = "registry+https://github.com/rust-lang/crates.io-index" 505 | checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" 506 | dependencies = [ 507 | "generic-array", 508 | "typenum", 509 | ] 510 | 511 | [[package]] 512 | name = "dashmap" 513 | version = "5.5.0" 514 | source = "registry+https://github.com/rust-lang/crates.io-index" 515 | checksum = "6943ae99c34386c84a470c499d3414f66502a41340aa895406e0d2e4a207b91d" 516 | dependencies = [ 517 | "cfg-if", 518 | "hashbrown 0.14.0", 519 | "lock_api", 520 | "once_cell", 521 | "parking_lot_core", 522 | ] 523 | 524 | [[package]] 525 | name = "digest" 526 | version = "0.10.7" 527 | source = "registry+https://github.com/rust-lang/crates.io-index" 528 | checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" 529 | dependencies = [ 530 | "block-buffer", 531 | "crypto-common", 532 | ] 533 | 534 | [[package]] 535 | name = "encoding_rs" 536 | version = "0.8.32" 537 | source = "registry+https://github.com/rust-lang/crates.io-index" 538 | checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" 539 | dependencies = [ 540 | "cfg-if", 541 | ] 542 | 543 | [[package]] 544 | name = "errno" 545 | version = "0.3.2" 546 | source = "registry+https://github.com/rust-lang/crates.io-index" 547 | checksum = "6b30f669a7961ef1631673d2766cc92f52d64f7ef354d4fe0ddfd30ed52f0f4f" 548 | dependencies = [ 549 | "errno-dragonfly", 550 | "libc", 551 | "windows-sys", 552 | ] 553 | 554 | [[package]] 555 | name = "errno-dragonfly" 556 | version = "0.1.2" 557 | source = "registry+https://github.com/rust-lang/crates.io-index" 558 | checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" 559 | dependencies = [ 560 | "cc", 561 | "libc", 562 | ] 563 | 564 | [[package]] 565 | name = "event-listener" 566 | version = "2.5.3" 567 | source = "registry+https://github.com/rust-lang/crates.io-index" 568 | checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" 569 | 570 | [[package]] 571 | name = "eventsource-stream" 572 | version = "0.2.3" 573 | source = "registry+https://github.com/rust-lang/crates.io-index" 574 | checksum = "74fef4569247a5f429d9156b9d0a2599914385dd189c539334c625d8099d90ab" 575 | dependencies = [ 576 | "futures-core", 577 | "nom", 578 | "pin-project-lite", 579 | ] 580 | 581 | [[package]] 582 | name = "fastrand" 583 | version = "1.9.0" 584 | source = "registry+https://github.com/rust-lang/crates.io-index" 585 | checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" 586 | dependencies = [ 587 | "instant", 588 | ] 589 | 590 | [[package]] 591 | name = "fastrand" 592 | version = "2.0.0" 593 | source = "registry+https://github.com/rust-lang/crates.io-index" 594 | checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" 595 | 596 | [[package]] 597 | name = "fnv" 598 | version = "1.0.7" 599 | source = "registry+https://github.com/rust-lang/crates.io-index" 600 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 601 | 602 | [[package]] 603 | name = "foreign-types" 604 | version = "0.3.2" 605 | source = "registry+https://github.com/rust-lang/crates.io-index" 606 | checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" 607 | dependencies = [ 608 | "foreign-types-shared", 609 | ] 610 | 611 | [[package]] 612 | name = "foreign-types-shared" 613 | version = "0.1.1" 614 | source = "registry+https://github.com/rust-lang/crates.io-index" 615 | checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" 616 | 617 | [[package]] 618 | name = "form_urlencoded" 619 | version = "1.2.0" 620 | source = "registry+https://github.com/rust-lang/crates.io-index" 621 | checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" 622 | dependencies = [ 623 | "percent-encoding", 624 | ] 625 | 626 | [[package]] 627 | name = "futures" 628 | version = "0.3.28" 629 | source = "registry+https://github.com/rust-lang/crates.io-index" 630 | checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" 631 | dependencies = [ 632 | "futures-channel", 633 | "futures-core", 634 | "futures-executor", 635 | "futures-io", 636 | "futures-sink", 637 | "futures-task", 638 | "futures-util", 639 | ] 640 | 641 | [[package]] 642 | name = "futures-channel" 643 | version = "0.3.28" 644 | source = "registry+https://github.com/rust-lang/crates.io-index" 645 | checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" 646 | dependencies = [ 647 | "futures-core", 648 | "futures-sink", 649 | ] 650 | 651 | [[package]] 652 | name = "futures-core" 653 | version = "0.3.28" 654 | source = "registry+https://github.com/rust-lang/crates.io-index" 655 | checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" 656 | 657 | [[package]] 658 | name = "futures-executor" 659 | version = "0.3.28" 660 | source = "registry+https://github.com/rust-lang/crates.io-index" 661 | checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" 662 | dependencies = [ 663 | "futures-core", 664 | "futures-task", 665 | "futures-util", 666 | ] 667 | 668 | [[package]] 669 | name = "futures-io" 670 | version = "0.3.28" 671 | source = "registry+https://github.com/rust-lang/crates.io-index" 672 | checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" 673 | 674 | [[package]] 675 | name = "futures-lite" 676 | version = "1.13.0" 677 | source = "registry+https://github.com/rust-lang/crates.io-index" 678 | checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" 679 | dependencies = [ 680 | "fastrand 1.9.0", 681 | "futures-core", 682 | "futures-io", 683 | "memchr", 684 | "parking", 685 | "pin-project-lite", 686 | "waker-fn", 687 | ] 688 | 689 | [[package]] 690 | name = "futures-macro" 691 | version = "0.3.28" 692 | source = "registry+https://github.com/rust-lang/crates.io-index" 693 | checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" 694 | dependencies = [ 695 | "proc-macro2", 696 | "quote", 697 | "syn 2.0.25", 698 | ] 699 | 700 | [[package]] 701 | name = "futures-sink" 702 | version = "0.3.28" 703 | source = "registry+https://github.com/rust-lang/crates.io-index" 704 | checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" 705 | 706 | [[package]] 707 | name = "futures-task" 708 | version = "0.3.28" 709 | source = "registry+https://github.com/rust-lang/crates.io-index" 710 | checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" 711 | 712 | [[package]] 713 | name = "futures-timer" 714 | version = "3.0.2" 715 | source = "registry+https://github.com/rust-lang/crates.io-index" 716 | checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" 717 | 718 | [[package]] 719 | name = "futures-util" 720 | version = "0.3.28" 721 | source = "registry+https://github.com/rust-lang/crates.io-index" 722 | checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" 723 | dependencies = [ 724 | "futures-channel", 725 | "futures-core", 726 | "futures-io", 727 | "futures-macro", 728 | "futures-sink", 729 | "futures-task", 730 | "memchr", 731 | "pin-project-lite", 732 | "pin-utils", 733 | "slab", 734 | ] 735 | 736 | [[package]] 737 | name = "generic-array" 738 | version = "0.14.7" 739 | source = "registry+https://github.com/rust-lang/crates.io-index" 740 | checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" 741 | dependencies = [ 742 | "typenum", 743 | "version_check", 744 | ] 745 | 746 | [[package]] 747 | name = "getrandom" 748 | version = "0.2.10" 749 | source = "registry+https://github.com/rust-lang/crates.io-index" 750 | checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" 751 | dependencies = [ 752 | "cfg-if", 753 | "libc", 754 | "wasi 0.11.0+wasi-snapshot-preview1", 755 | ] 756 | 757 | [[package]] 758 | name = "gimli" 759 | version = "0.27.3" 760 | source = "registry+https://github.com/rust-lang/crates.io-index" 761 | checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" 762 | 763 | [[package]] 764 | name = "github-device-flow" 765 | version = "0.1.4" 766 | source = "registry+https://github.com/rust-lang/crates.io-index" 767 | checksum = "e02e0f5a39e95d2a65c75974033930a4336e3cfe844f594fa71f3872a93f450a" 768 | dependencies = [ 769 | "chrono", 770 | "clap", 771 | "openssl", 772 | "reqwest", 773 | "serde", 774 | "serde_derive", 775 | "serde_json", 776 | ] 777 | 778 | [[package]] 779 | name = "gloo-timers" 780 | version = "0.2.6" 781 | source = "registry+https://github.com/rust-lang/crates.io-index" 782 | checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" 783 | dependencies = [ 784 | "futures-channel", 785 | "futures-core", 786 | "js-sys", 787 | "wasm-bindgen", 788 | ] 789 | 790 | [[package]] 791 | name = "h2" 792 | version = "0.3.20" 793 | source = "registry+https://github.com/rust-lang/crates.io-index" 794 | checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049" 795 | dependencies = [ 796 | "bytes", 797 | "fnv", 798 | "futures-core", 799 | "futures-sink", 800 | "futures-util", 801 | "http", 802 | "indexmap", 803 | "slab", 804 | "tokio", 805 | "tokio-util", 806 | "tracing", 807 | ] 808 | 809 | [[package]] 810 | name = "handlebars" 811 | version = "3.5.5" 812 | source = "registry+https://github.com/rust-lang/crates.io-index" 813 | checksum = "4498fc115fa7d34de968184e473529abb40eeb6be8bc5f7faba3d08c316cb3e3" 814 | dependencies = [ 815 | "log", 816 | "pest", 817 | "pest_derive", 818 | "quick-error", 819 | "serde", 820 | "serde_json", 821 | ] 822 | 823 | [[package]] 824 | name = "hashbrown" 825 | version = "0.12.3" 826 | source = "registry+https://github.com/rust-lang/crates.io-index" 827 | checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" 828 | dependencies = [ 829 | "ahash", 830 | ] 831 | 832 | [[package]] 833 | name = "hashbrown" 834 | version = "0.14.0" 835 | source = "registry+https://github.com/rust-lang/crates.io-index" 836 | checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" 837 | 838 | [[package]] 839 | name = "heck" 840 | version = "0.4.1" 841 | source = "registry+https://github.com/rust-lang/crates.io-index" 842 | checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" 843 | 844 | [[package]] 845 | name = "hermit-abi" 846 | version = "0.1.19" 847 | source = "registry+https://github.com/rust-lang/crates.io-index" 848 | checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" 849 | dependencies = [ 850 | "libc", 851 | ] 852 | 853 | [[package]] 854 | name = "hermit-abi" 855 | version = "0.2.6" 856 | source = "registry+https://github.com/rust-lang/crates.io-index" 857 | checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" 858 | dependencies = [ 859 | "libc", 860 | ] 861 | 862 | [[package]] 863 | name = "hermit-abi" 864 | version = "0.3.2" 865 | source = "registry+https://github.com/rust-lang/crates.io-index" 866 | checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" 867 | 868 | [[package]] 869 | name = "hex" 870 | version = "0.4.3" 871 | source = "registry+https://github.com/rust-lang/crates.io-index" 872 | checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" 873 | 874 | [[package]] 875 | name = "http" 876 | version = "0.2.9" 877 | source = "registry+https://github.com/rust-lang/crates.io-index" 878 | checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" 879 | dependencies = [ 880 | "bytes", 881 | "fnv", 882 | "itoa", 883 | ] 884 | 885 | [[package]] 886 | name = "http-body" 887 | version = "0.4.5" 888 | source = "registry+https://github.com/rust-lang/crates.io-index" 889 | checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" 890 | dependencies = [ 891 | "bytes", 892 | "http", 893 | "pin-project-lite", 894 | ] 895 | 896 | [[package]] 897 | name = "httparse" 898 | version = "1.8.0" 899 | source = "registry+https://github.com/rust-lang/crates.io-index" 900 | checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" 901 | 902 | [[package]] 903 | name = "httpdate" 904 | version = "1.0.3" 905 | source = "registry+https://github.com/rust-lang/crates.io-index" 906 | checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" 907 | 908 | [[package]] 909 | name = "hyper" 910 | version = "0.14.27" 911 | source = "registry+https://github.com/rust-lang/crates.io-index" 912 | checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" 913 | dependencies = [ 914 | "bytes", 915 | "futures-channel", 916 | "futures-core", 917 | "futures-util", 918 | "h2", 919 | "http", 920 | "http-body", 921 | "httparse", 922 | "httpdate", 923 | "itoa", 924 | "pin-project-lite", 925 | "socket2", 926 | "tokio", 927 | "tower-service", 928 | "tracing", 929 | "want", 930 | ] 931 | 932 | [[package]] 933 | name = "hyper-tls" 934 | version = "0.5.0" 935 | source = "registry+https://github.com/rust-lang/crates.io-index" 936 | checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" 937 | dependencies = [ 938 | "bytes", 939 | "hyper", 940 | "native-tls", 941 | "tokio", 942 | "tokio-native-tls", 943 | ] 944 | 945 | [[package]] 946 | name = "iana-time-zone" 947 | version = "0.1.57" 948 | source = "registry+https://github.com/rust-lang/crates.io-index" 949 | checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" 950 | dependencies = [ 951 | "android_system_properties", 952 | "core-foundation-sys", 953 | "iana-time-zone-haiku", 954 | "js-sys", 955 | "wasm-bindgen", 956 | "windows", 957 | ] 958 | 959 | [[package]] 960 | name = "iana-time-zone-haiku" 961 | version = "0.1.2" 962 | source = "registry+https://github.com/rust-lang/crates.io-index" 963 | checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" 964 | dependencies = [ 965 | "cc", 966 | ] 967 | 968 | [[package]] 969 | name = "idna" 970 | version = "0.4.0" 971 | source = "registry+https://github.com/rust-lang/crates.io-index" 972 | checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" 973 | dependencies = [ 974 | "unicode-bidi", 975 | "unicode-normalization", 976 | ] 977 | 978 | [[package]] 979 | name = "indexmap" 980 | version = "1.9.3" 981 | source = "registry+https://github.com/rust-lang/crates.io-index" 982 | checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" 983 | dependencies = [ 984 | "autocfg", 985 | "hashbrown 0.12.3", 986 | ] 987 | 988 | [[package]] 989 | name = "instant" 990 | version = "0.1.12" 991 | source = "registry+https://github.com/rust-lang/crates.io-index" 992 | checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" 993 | dependencies = [ 994 | "cfg-if", 995 | ] 996 | 997 | [[package]] 998 | name = "interfaces" 999 | version = "0.0.9" 1000 | source = "registry+https://github.com/rust-lang/crates.io-index" 1001 | checksum = "bb6250a98af259a26fd5a4a6081fccea9ac116e4c3178acf4aeb86d32d2b7715" 1002 | dependencies = [ 1003 | "bitflags 2.4.0", 1004 | "cc", 1005 | "handlebars", 1006 | "lazy_static", 1007 | "libc", 1008 | "nix", 1009 | "serde", 1010 | "serde_derive", 1011 | ] 1012 | 1013 | [[package]] 1014 | name = "io-lifetimes" 1015 | version = "1.0.11" 1016 | source = "registry+https://github.com/rust-lang/crates.io-index" 1017 | checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" 1018 | dependencies = [ 1019 | "hermit-abi 0.3.2", 1020 | "libc", 1021 | "windows-sys", 1022 | ] 1023 | 1024 | [[package]] 1025 | name = "ipnet" 1026 | version = "2.8.0" 1027 | source = "registry+https://github.com/rust-lang/crates.io-index" 1028 | checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" 1029 | 1030 | [[package]] 1031 | name = "itoa" 1032 | version = "1.0.6" 1033 | source = "registry+https://github.com/rust-lang/crates.io-index" 1034 | checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" 1035 | 1036 | [[package]] 1037 | name = "js-sys" 1038 | version = "0.3.64" 1039 | source = "registry+https://github.com/rust-lang/crates.io-index" 1040 | checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" 1041 | dependencies = [ 1042 | "wasm-bindgen", 1043 | ] 1044 | 1045 | [[package]] 1046 | name = "kv-log-macro" 1047 | version = "1.0.7" 1048 | source = "registry+https://github.com/rust-lang/crates.io-index" 1049 | checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f" 1050 | dependencies = [ 1051 | "log", 1052 | ] 1053 | 1054 | [[package]] 1055 | name = "lazy_static" 1056 | version = "1.4.0" 1057 | source = "registry+https://github.com/rust-lang/crates.io-index" 1058 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 1059 | 1060 | [[package]] 1061 | name = "libc" 1062 | version = "0.2.147" 1063 | source = "registry+https://github.com/rust-lang/crates.io-index" 1064 | checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" 1065 | 1066 | [[package]] 1067 | name = "linux-raw-sys" 1068 | version = "0.3.8" 1069 | source = "registry+https://github.com/rust-lang/crates.io-index" 1070 | checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" 1071 | 1072 | [[package]] 1073 | name = "linux-raw-sys" 1074 | version = "0.4.5" 1075 | source = "registry+https://github.com/rust-lang/crates.io-index" 1076 | checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503" 1077 | 1078 | [[package]] 1079 | name = "lock_api" 1080 | version = "0.4.10" 1081 | source = "registry+https://github.com/rust-lang/crates.io-index" 1082 | checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" 1083 | dependencies = [ 1084 | "autocfg", 1085 | "scopeguard", 1086 | ] 1087 | 1088 | [[package]] 1089 | name = "log" 1090 | version = "0.4.19" 1091 | source = "registry+https://github.com/rust-lang/crates.io-index" 1092 | checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" 1093 | dependencies = [ 1094 | "value-bag", 1095 | ] 1096 | 1097 | [[package]] 1098 | name = "lsp-types" 1099 | version = "0.94.1" 1100 | source = "registry+https://github.com/rust-lang/crates.io-index" 1101 | checksum = "c66bfd44a06ae10647fe3f8214762e9369fd4248df1350924b4ef9e770a85ea1" 1102 | dependencies = [ 1103 | "bitflags 1.3.2", 1104 | "serde", 1105 | "serde_json", 1106 | "serde_repr", 1107 | "url", 1108 | ] 1109 | 1110 | [[package]] 1111 | name = "memchr" 1112 | version = "2.5.0" 1113 | source = "registry+https://github.com/rust-lang/crates.io-index" 1114 | checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" 1115 | 1116 | [[package]] 1117 | name = "memoffset" 1118 | version = "0.7.1" 1119 | source = "registry+https://github.com/rust-lang/crates.io-index" 1120 | checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" 1121 | dependencies = [ 1122 | "autocfg", 1123 | ] 1124 | 1125 | [[package]] 1126 | name = "mime" 1127 | version = "0.3.17" 1128 | source = "registry+https://github.com/rust-lang/crates.io-index" 1129 | checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" 1130 | 1131 | [[package]] 1132 | name = "minimal-lexical" 1133 | version = "0.2.1" 1134 | source = "registry+https://github.com/rust-lang/crates.io-index" 1135 | checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" 1136 | 1137 | [[package]] 1138 | name = "miniz_oxide" 1139 | version = "0.7.1" 1140 | source = "registry+https://github.com/rust-lang/crates.io-index" 1141 | checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" 1142 | dependencies = [ 1143 | "adler", 1144 | ] 1145 | 1146 | [[package]] 1147 | name = "mio" 1148 | version = "0.8.8" 1149 | source = "registry+https://github.com/rust-lang/crates.io-index" 1150 | checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" 1151 | dependencies = [ 1152 | "libc", 1153 | "wasi 0.11.0+wasi-snapshot-preview1", 1154 | "windows-sys", 1155 | ] 1156 | 1157 | [[package]] 1158 | name = "native-tls" 1159 | version = "0.2.11" 1160 | source = "registry+https://github.com/rust-lang/crates.io-index" 1161 | checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" 1162 | dependencies = [ 1163 | "lazy_static", 1164 | "libc", 1165 | "log", 1166 | "openssl", 1167 | "openssl-probe", 1168 | "openssl-sys", 1169 | "schannel", 1170 | "security-framework", 1171 | "security-framework-sys", 1172 | "tempfile", 1173 | ] 1174 | 1175 | [[package]] 1176 | name = "nix" 1177 | version = "0.26.2" 1178 | source = "registry+https://github.com/rust-lang/crates.io-index" 1179 | checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a" 1180 | dependencies = [ 1181 | "bitflags 1.3.2", 1182 | "cfg-if", 1183 | "libc", 1184 | "memoffset", 1185 | "pin-utils", 1186 | "static_assertions", 1187 | ] 1188 | 1189 | [[package]] 1190 | name = "nom" 1191 | version = "7.1.3" 1192 | source = "registry+https://github.com/rust-lang/crates.io-index" 1193 | checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" 1194 | dependencies = [ 1195 | "memchr", 1196 | "minimal-lexical", 1197 | ] 1198 | 1199 | [[package]] 1200 | name = "nu-ansi-term" 1201 | version = "0.46.0" 1202 | source = "registry+https://github.com/rust-lang/crates.io-index" 1203 | checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" 1204 | dependencies = [ 1205 | "overload", 1206 | "winapi", 1207 | ] 1208 | 1209 | [[package]] 1210 | name = "num-traits" 1211 | version = "0.2.16" 1212 | source = "registry+https://github.com/rust-lang/crates.io-index" 1213 | checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" 1214 | dependencies = [ 1215 | "autocfg", 1216 | ] 1217 | 1218 | [[package]] 1219 | name = "num_cpus" 1220 | version = "1.15.0" 1221 | source = "registry+https://github.com/rust-lang/crates.io-index" 1222 | checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" 1223 | dependencies = [ 1224 | "hermit-abi 0.2.6", 1225 | "libc", 1226 | ] 1227 | 1228 | [[package]] 1229 | name = "object" 1230 | version = "0.31.1" 1231 | source = "registry+https://github.com/rust-lang/crates.io-index" 1232 | checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1" 1233 | dependencies = [ 1234 | "memchr", 1235 | ] 1236 | 1237 | [[package]] 1238 | name = "once_cell" 1239 | version = "1.18.0" 1240 | source = "registry+https://github.com/rust-lang/crates.io-index" 1241 | checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" 1242 | 1243 | [[package]] 1244 | name = "openssl" 1245 | version = "0.10.56" 1246 | source = "registry+https://github.com/rust-lang/crates.io-index" 1247 | checksum = "729b745ad4a5575dd06a3e1af1414bd330ee561c01b3899eb584baeaa8def17e" 1248 | dependencies = [ 1249 | "bitflags 1.3.2", 1250 | "cfg-if", 1251 | "foreign-types", 1252 | "libc", 1253 | "once_cell", 1254 | "openssl-macros", 1255 | "openssl-sys", 1256 | ] 1257 | 1258 | [[package]] 1259 | name = "openssl-macros" 1260 | version = "0.1.1" 1261 | source = "registry+https://github.com/rust-lang/crates.io-index" 1262 | checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" 1263 | dependencies = [ 1264 | "proc-macro2", 1265 | "quote", 1266 | "syn 2.0.25", 1267 | ] 1268 | 1269 | [[package]] 1270 | name = "openssl-probe" 1271 | version = "0.1.5" 1272 | source = "registry+https://github.com/rust-lang/crates.io-index" 1273 | checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" 1274 | 1275 | [[package]] 1276 | name = "openssl-src" 1277 | version = "111.27.0+1.1.1v" 1278 | source = "registry+https://github.com/rust-lang/crates.io-index" 1279 | checksum = "06e8f197c82d7511c5b014030c9b1efeda40d7d5f99d23b4ceed3524a5e63f02" 1280 | dependencies = [ 1281 | "cc", 1282 | ] 1283 | 1284 | [[package]] 1285 | name = "openssl-sys" 1286 | version = "0.9.91" 1287 | source = "registry+https://github.com/rust-lang/crates.io-index" 1288 | checksum = "866b5f16f90776b9bb8dc1e1802ac6f0513de3a7a7465867bfbc563dc737faac" 1289 | dependencies = [ 1290 | "cc", 1291 | "libc", 1292 | "openssl-src", 1293 | "pkg-config", 1294 | "vcpkg", 1295 | ] 1296 | 1297 | [[package]] 1298 | name = "os_str_bytes" 1299 | version = "6.5.1" 1300 | source = "registry+https://github.com/rust-lang/crates.io-index" 1301 | checksum = "4d5d9eb14b174ee9aa2ef96dc2b94637a2d4b6e7cb873c7e171f0c20c6cf3eac" 1302 | 1303 | [[package]] 1304 | name = "overload" 1305 | version = "0.1.1" 1306 | source = "registry+https://github.com/rust-lang/crates.io-index" 1307 | checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" 1308 | 1309 | [[package]] 1310 | name = "parking" 1311 | version = "2.1.0" 1312 | source = "registry+https://github.com/rust-lang/crates.io-index" 1313 | checksum = "14f2252c834a40ed9bb5422029649578e63aa341ac401f74e719dd1afda8394e" 1314 | 1315 | [[package]] 1316 | name = "parking_lot" 1317 | version = "0.12.1" 1318 | source = "registry+https://github.com/rust-lang/crates.io-index" 1319 | checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" 1320 | dependencies = [ 1321 | "lock_api", 1322 | "parking_lot_core", 1323 | ] 1324 | 1325 | [[package]] 1326 | name = "parking_lot_core" 1327 | version = "0.9.8" 1328 | source = "registry+https://github.com/rust-lang/crates.io-index" 1329 | checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" 1330 | dependencies = [ 1331 | "cfg-if", 1332 | "libc", 1333 | "redox_syscall", 1334 | "smallvec", 1335 | "windows-targets", 1336 | ] 1337 | 1338 | [[package]] 1339 | name = "percent-encoding" 1340 | version = "2.3.0" 1341 | source = "registry+https://github.com/rust-lang/crates.io-index" 1342 | checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" 1343 | 1344 | [[package]] 1345 | name = "pest" 1346 | version = "2.7.2" 1347 | source = "registry+https://github.com/rust-lang/crates.io-index" 1348 | checksum = "1acb4a4365a13f749a93f1a094a7805e5cfa0955373a9de860d962eaa3a5fe5a" 1349 | dependencies = [ 1350 | "thiserror", 1351 | "ucd-trie", 1352 | ] 1353 | 1354 | [[package]] 1355 | name = "pest_derive" 1356 | version = "2.7.2" 1357 | source = "registry+https://github.com/rust-lang/crates.io-index" 1358 | checksum = "666d00490d4ac815001da55838c500eafb0320019bbaa44444137c48b443a853" 1359 | dependencies = [ 1360 | "pest", 1361 | "pest_generator", 1362 | ] 1363 | 1364 | [[package]] 1365 | name = "pest_generator" 1366 | version = "2.7.2" 1367 | source = "registry+https://github.com/rust-lang/crates.io-index" 1368 | checksum = "68ca01446f50dbda87c1786af8770d535423fa8a53aec03b8f4e3d7eb10e0929" 1369 | dependencies = [ 1370 | "pest", 1371 | "pest_meta", 1372 | "proc-macro2", 1373 | "quote", 1374 | "syn 2.0.25", 1375 | ] 1376 | 1377 | [[package]] 1378 | name = "pest_meta" 1379 | version = "2.7.2" 1380 | source = "registry+https://github.com/rust-lang/crates.io-index" 1381 | checksum = "56af0a30af74d0445c0bf6d9d051c979b516a1a5af790d251daee76005420a48" 1382 | dependencies = [ 1383 | "once_cell", 1384 | "pest", 1385 | "sha2", 1386 | ] 1387 | 1388 | [[package]] 1389 | name = "pharos" 1390 | version = "0.5.3" 1391 | source = "registry+https://github.com/rust-lang/crates.io-index" 1392 | checksum = "e9567389417feee6ce15dd6527a8a1ecac205ef62c2932bcf3d9f6fc5b78b414" 1393 | dependencies = [ 1394 | "futures", 1395 | "rustc_version", 1396 | ] 1397 | 1398 | [[package]] 1399 | name = "pin-project" 1400 | version = "1.1.2" 1401 | source = "registry+https://github.com/rust-lang/crates.io-index" 1402 | checksum = "030ad2bc4db10a8944cb0d837f158bdfec4d4a4873ab701a95046770d11f8842" 1403 | dependencies = [ 1404 | "pin-project-internal", 1405 | ] 1406 | 1407 | [[package]] 1408 | name = "pin-project-internal" 1409 | version = "1.1.2" 1410 | source = "registry+https://github.com/rust-lang/crates.io-index" 1411 | checksum = "ec2e072ecce94ec471b13398d5402c188e76ac03cf74dd1a975161b23a3f6d9c" 1412 | dependencies = [ 1413 | "proc-macro2", 1414 | "quote", 1415 | "syn 2.0.25", 1416 | ] 1417 | 1418 | [[package]] 1419 | name = "pin-project-lite" 1420 | version = "0.2.9" 1421 | source = "registry+https://github.com/rust-lang/crates.io-index" 1422 | checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" 1423 | 1424 | [[package]] 1425 | name = "pin-utils" 1426 | version = "0.1.0" 1427 | source = "registry+https://github.com/rust-lang/crates.io-index" 1428 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 1429 | 1430 | [[package]] 1431 | name = "pkg-config" 1432 | version = "0.3.27" 1433 | source = "registry+https://github.com/rust-lang/crates.io-index" 1434 | checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" 1435 | 1436 | [[package]] 1437 | name = "polling" 1438 | version = "2.8.0" 1439 | source = "registry+https://github.com/rust-lang/crates.io-index" 1440 | checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" 1441 | dependencies = [ 1442 | "autocfg", 1443 | "bitflags 1.3.2", 1444 | "cfg-if", 1445 | "concurrent-queue", 1446 | "libc", 1447 | "log", 1448 | "pin-project-lite", 1449 | "windows-sys", 1450 | ] 1451 | 1452 | [[package]] 1453 | name = "ppv-lite86" 1454 | version = "0.2.17" 1455 | source = "registry+https://github.com/rust-lang/crates.io-index" 1456 | checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" 1457 | 1458 | [[package]] 1459 | name = "proc-macro-error" 1460 | version = "1.0.4" 1461 | source = "registry+https://github.com/rust-lang/crates.io-index" 1462 | checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" 1463 | dependencies = [ 1464 | "proc-macro-error-attr", 1465 | "proc-macro2", 1466 | "quote", 1467 | "syn 1.0.109", 1468 | "version_check", 1469 | ] 1470 | 1471 | [[package]] 1472 | name = "proc-macro-error-attr" 1473 | version = "1.0.4" 1474 | source = "registry+https://github.com/rust-lang/crates.io-index" 1475 | checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" 1476 | dependencies = [ 1477 | "proc-macro2", 1478 | "quote", 1479 | "version_check", 1480 | ] 1481 | 1482 | [[package]] 1483 | name = "proc-macro2" 1484 | version = "1.0.64" 1485 | source = "registry+https://github.com/rust-lang/crates.io-index" 1486 | checksum = "78803b62cbf1f46fde80d7c0e803111524b9877184cfe7c3033659490ac7a7da" 1487 | dependencies = [ 1488 | "unicode-ident", 1489 | ] 1490 | 1491 | [[package]] 1492 | name = "quick-error" 1493 | version = "2.0.1" 1494 | source = "registry+https://github.com/rust-lang/crates.io-index" 1495 | checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" 1496 | 1497 | [[package]] 1498 | name = "quote" 1499 | version = "1.0.28" 1500 | source = "registry+https://github.com/rust-lang/crates.io-index" 1501 | checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488" 1502 | dependencies = [ 1503 | "proc-macro2", 1504 | ] 1505 | 1506 | [[package]] 1507 | name = "rand" 1508 | version = "0.8.5" 1509 | source = "registry+https://github.com/rust-lang/crates.io-index" 1510 | checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 1511 | dependencies = [ 1512 | "libc", 1513 | "rand_chacha", 1514 | "rand_core", 1515 | ] 1516 | 1517 | [[package]] 1518 | name = "rand_chacha" 1519 | version = "0.3.1" 1520 | source = "registry+https://github.com/rust-lang/crates.io-index" 1521 | checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 1522 | dependencies = [ 1523 | "ppv-lite86", 1524 | "rand_core", 1525 | ] 1526 | 1527 | [[package]] 1528 | name = "rand_core" 1529 | version = "0.6.4" 1530 | source = "registry+https://github.com/rust-lang/crates.io-index" 1531 | checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" 1532 | dependencies = [ 1533 | "getrandom", 1534 | ] 1535 | 1536 | [[package]] 1537 | name = "redox_syscall" 1538 | version = "0.3.5" 1539 | source = "registry+https://github.com/rust-lang/crates.io-index" 1540 | checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" 1541 | dependencies = [ 1542 | "bitflags 1.3.2", 1543 | ] 1544 | 1545 | [[package]] 1546 | name = "reqwest" 1547 | version = "0.11.18" 1548 | source = "registry+https://github.com/rust-lang/crates.io-index" 1549 | checksum = "cde824a14b7c14f85caff81225f411faacc04a2013f41670f41443742b1c1c55" 1550 | dependencies = [ 1551 | "base64 0.21.2", 1552 | "bytes", 1553 | "encoding_rs", 1554 | "futures-core", 1555 | "futures-util", 1556 | "h2", 1557 | "http", 1558 | "http-body", 1559 | "hyper", 1560 | "hyper-tls", 1561 | "ipnet", 1562 | "js-sys", 1563 | "log", 1564 | "mime", 1565 | "native-tls", 1566 | "once_cell", 1567 | "percent-encoding", 1568 | "pin-project-lite", 1569 | "serde", 1570 | "serde_json", 1571 | "serde_urlencoded", 1572 | "tokio", 1573 | "tokio-native-tls", 1574 | "tokio-util", 1575 | "tower-service", 1576 | "url", 1577 | "wasm-bindgen", 1578 | "wasm-bindgen-futures", 1579 | "wasm-streams", 1580 | "web-sys", 1581 | "winreg", 1582 | ] 1583 | 1584 | [[package]] 1585 | name = "reqwest-eventsource" 1586 | version = "0.4.0" 1587 | source = "registry+https://github.com/rust-lang/crates.io-index" 1588 | checksum = "8f03f570355882dd8d15acc3a313841e6e90eddbc76a93c748fd82cc13ba9f51" 1589 | dependencies = [ 1590 | "eventsource-stream", 1591 | "futures-core", 1592 | "futures-timer", 1593 | "mime", 1594 | "nom", 1595 | "pin-project-lite", 1596 | "reqwest", 1597 | "thiserror", 1598 | ] 1599 | 1600 | [[package]] 1601 | name = "ropey" 1602 | version = "1.6.0" 1603 | source = "registry+https://github.com/rust-lang/crates.io-index" 1604 | checksum = "53ce7a2c43a32e50d666e33c5a80251b31147bb4b49024bcab11fb6f20c671ed" 1605 | dependencies = [ 1606 | "smallvec", 1607 | "str_indices", 1608 | ] 1609 | 1610 | [[package]] 1611 | name = "rustc-demangle" 1612 | version = "0.1.23" 1613 | source = "registry+https://github.com/rust-lang/crates.io-index" 1614 | checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" 1615 | 1616 | [[package]] 1617 | name = "rustc_version" 1618 | version = "0.4.0" 1619 | source = "registry+https://github.com/rust-lang/crates.io-index" 1620 | checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" 1621 | dependencies = [ 1622 | "semver", 1623 | ] 1624 | 1625 | [[package]] 1626 | name = "rustix" 1627 | version = "0.37.23" 1628 | source = "registry+https://github.com/rust-lang/crates.io-index" 1629 | checksum = "4d69718bf81c6127a49dc64e44a742e8bb9213c0ff8869a22c308f84c1d4ab06" 1630 | dependencies = [ 1631 | "bitflags 1.3.2", 1632 | "errno", 1633 | "io-lifetimes", 1634 | "libc", 1635 | "linux-raw-sys 0.3.8", 1636 | "windows-sys", 1637 | ] 1638 | 1639 | [[package]] 1640 | name = "rustix" 1641 | version = "0.38.8" 1642 | source = "registry+https://github.com/rust-lang/crates.io-index" 1643 | checksum = "19ed4fa021d81c8392ce04db050a3da9a60299050b7ae1cf482d862b54a7218f" 1644 | dependencies = [ 1645 | "bitflags 2.4.0", 1646 | "errno", 1647 | "libc", 1648 | "linux-raw-sys 0.4.5", 1649 | "windows-sys", 1650 | ] 1651 | 1652 | [[package]] 1653 | name = "ryu" 1654 | version = "1.0.13" 1655 | source = "registry+https://github.com/rust-lang/crates.io-index" 1656 | checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" 1657 | 1658 | [[package]] 1659 | name = "schannel" 1660 | version = "0.1.22" 1661 | source = "registry+https://github.com/rust-lang/crates.io-index" 1662 | checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" 1663 | dependencies = [ 1664 | "windows-sys", 1665 | ] 1666 | 1667 | [[package]] 1668 | name = "scopeguard" 1669 | version = "1.1.0" 1670 | source = "registry+https://github.com/rust-lang/crates.io-index" 1671 | checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" 1672 | 1673 | [[package]] 1674 | name = "security-framework" 1675 | version = "2.9.2" 1676 | source = "registry+https://github.com/rust-lang/crates.io-index" 1677 | checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" 1678 | dependencies = [ 1679 | "bitflags 1.3.2", 1680 | "core-foundation", 1681 | "core-foundation-sys", 1682 | "libc", 1683 | "security-framework-sys", 1684 | ] 1685 | 1686 | [[package]] 1687 | name = "security-framework-sys" 1688 | version = "2.9.1" 1689 | source = "registry+https://github.com/rust-lang/crates.io-index" 1690 | checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" 1691 | dependencies = [ 1692 | "core-foundation-sys", 1693 | "libc", 1694 | ] 1695 | 1696 | [[package]] 1697 | name = "semver" 1698 | version = "1.0.18" 1699 | source = "registry+https://github.com/rust-lang/crates.io-index" 1700 | checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" 1701 | 1702 | [[package]] 1703 | name = "serde" 1704 | version = "1.0.171" 1705 | source = "registry+https://github.com/rust-lang/crates.io-index" 1706 | checksum = "30e27d1e4fd7659406c492fd6cfaf2066ba8773de45ca75e855590f856dc34a9" 1707 | dependencies = [ 1708 | "serde_derive", 1709 | ] 1710 | 1711 | [[package]] 1712 | name = "serde_derive" 1713 | version = "1.0.171" 1714 | source = "registry+https://github.com/rust-lang/crates.io-index" 1715 | checksum = "389894603bd18c46fa56231694f8d827779c0951a667087194cf9de94ed24682" 1716 | dependencies = [ 1717 | "proc-macro2", 1718 | "quote", 1719 | "syn 2.0.25", 1720 | ] 1721 | 1722 | [[package]] 1723 | name = "serde_json" 1724 | version = "1.0.102" 1725 | source = "registry+https://github.com/rust-lang/crates.io-index" 1726 | checksum = "b5062a995d481b2308b6064e9af76011f2921c35f97b0468811ed9f6cd91dfed" 1727 | dependencies = [ 1728 | "itoa", 1729 | "ryu", 1730 | "serde", 1731 | ] 1732 | 1733 | [[package]] 1734 | name = "serde_repr" 1735 | version = "0.1.13" 1736 | source = "registry+https://github.com/rust-lang/crates.io-index" 1737 | checksum = "6f0a21fba416426ac927b1691996e82079f8b6156e920c85345f135b2e9ba2de" 1738 | dependencies = [ 1739 | "proc-macro2", 1740 | "quote", 1741 | "syn 2.0.25", 1742 | ] 1743 | 1744 | [[package]] 1745 | name = "serde_urlencoded" 1746 | version = "0.7.1" 1747 | source = "registry+https://github.com/rust-lang/crates.io-index" 1748 | checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" 1749 | dependencies = [ 1750 | "form_urlencoded", 1751 | "itoa", 1752 | "ryu", 1753 | "serde", 1754 | ] 1755 | 1756 | [[package]] 1757 | name = "sha-1" 1758 | version = "0.10.1" 1759 | source = "registry+https://github.com/rust-lang/crates.io-index" 1760 | checksum = "f5058ada175748e33390e40e872bd0fe59a19f265d0158daa551c5a88a76009c" 1761 | dependencies = [ 1762 | "cfg-if", 1763 | "cpufeatures", 1764 | "digest", 1765 | ] 1766 | 1767 | [[package]] 1768 | name = "sha2" 1769 | version = "0.10.7" 1770 | source = "registry+https://github.com/rust-lang/crates.io-index" 1771 | checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" 1772 | dependencies = [ 1773 | "cfg-if", 1774 | "cpufeatures", 1775 | "digest", 1776 | ] 1777 | 1778 | [[package]] 1779 | name = "sha256" 1780 | version = "1.3.0" 1781 | source = "registry+https://github.com/rust-lang/crates.io-index" 1782 | checksum = "7f5ed5ebbe2d9fb5c5e67be64aa462053d707941e02ffb5e65b6200c00b6161c" 1783 | dependencies = [ 1784 | "async-trait", 1785 | "bytes", 1786 | "hex", 1787 | "sha2", 1788 | "tokio", 1789 | ] 1790 | 1791 | [[package]] 1792 | name = "sharded-slab" 1793 | version = "0.1.4" 1794 | source = "registry+https://github.com/rust-lang/crates.io-index" 1795 | checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" 1796 | dependencies = [ 1797 | "lazy_static", 1798 | ] 1799 | 1800 | [[package]] 1801 | name = "signal-hook" 1802 | version = "0.3.17" 1803 | source = "registry+https://github.com/rust-lang/crates.io-index" 1804 | checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" 1805 | dependencies = [ 1806 | "libc", 1807 | "signal-hook-registry", 1808 | ] 1809 | 1810 | [[package]] 1811 | name = "signal-hook-registry" 1812 | version = "1.4.1" 1813 | source = "registry+https://github.com/rust-lang/crates.io-index" 1814 | checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" 1815 | dependencies = [ 1816 | "libc", 1817 | ] 1818 | 1819 | [[package]] 1820 | name = "slab" 1821 | version = "0.4.8" 1822 | source = "registry+https://github.com/rust-lang/crates.io-index" 1823 | checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" 1824 | dependencies = [ 1825 | "autocfg", 1826 | ] 1827 | 1828 | [[package]] 1829 | name = "smallvec" 1830 | version = "1.10.0" 1831 | source = "registry+https://github.com/rust-lang/crates.io-index" 1832 | checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" 1833 | 1834 | [[package]] 1835 | name = "socket2" 1836 | version = "0.4.9" 1837 | source = "registry+https://github.com/rust-lang/crates.io-index" 1838 | checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" 1839 | dependencies = [ 1840 | "libc", 1841 | "winapi", 1842 | ] 1843 | 1844 | [[package]] 1845 | name = "static_assertions" 1846 | version = "1.1.0" 1847 | source = "registry+https://github.com/rust-lang/crates.io-index" 1848 | checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" 1849 | 1850 | [[package]] 1851 | name = "str_indices" 1852 | version = "0.4.1" 1853 | source = "registry+https://github.com/rust-lang/crates.io-index" 1854 | checksum = "5f026164926842ec52deb1938fae44f83dfdb82d0a5b0270c5bd5935ab74d6dd" 1855 | 1856 | [[package]] 1857 | name = "strsim" 1858 | version = "0.10.0" 1859 | source = "registry+https://github.com/rust-lang/crates.io-index" 1860 | checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" 1861 | 1862 | [[package]] 1863 | name = "syn" 1864 | version = "1.0.109" 1865 | source = "registry+https://github.com/rust-lang/crates.io-index" 1866 | checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" 1867 | dependencies = [ 1868 | "proc-macro2", 1869 | "quote", 1870 | "unicode-ident", 1871 | ] 1872 | 1873 | [[package]] 1874 | name = "syn" 1875 | version = "2.0.25" 1876 | source = "registry+https://github.com/rust-lang/crates.io-index" 1877 | checksum = "15e3fc8c0c74267e2df136e5e5fb656a464158aa57624053375eb9c8c6e25ae2" 1878 | dependencies = [ 1879 | "proc-macro2", 1880 | "quote", 1881 | "unicode-ident", 1882 | ] 1883 | 1884 | [[package]] 1885 | name = "tempfile" 1886 | version = "3.7.1" 1887 | source = "registry+https://github.com/rust-lang/crates.io-index" 1888 | checksum = "dc02fddf48964c42031a0b3fe0428320ecf3a73c401040fc0096f97794310651" 1889 | dependencies = [ 1890 | "cfg-if", 1891 | "fastrand 2.0.0", 1892 | "redox_syscall", 1893 | "rustix 0.38.8", 1894 | "windows-sys", 1895 | ] 1896 | 1897 | [[package]] 1898 | name = "termcolor" 1899 | version = "1.2.0" 1900 | source = "registry+https://github.com/rust-lang/crates.io-index" 1901 | checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" 1902 | dependencies = [ 1903 | "winapi-util", 1904 | ] 1905 | 1906 | [[package]] 1907 | name = "textwrap" 1908 | version = "0.16.0" 1909 | source = "registry+https://github.com/rust-lang/crates.io-index" 1910 | checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" 1911 | 1912 | [[package]] 1913 | name = "thiserror" 1914 | version = "1.0.40" 1915 | source = "registry+https://github.com/rust-lang/crates.io-index" 1916 | checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" 1917 | dependencies = [ 1918 | "thiserror-impl", 1919 | ] 1920 | 1921 | [[package]] 1922 | name = "thiserror-impl" 1923 | version = "1.0.40" 1924 | source = "registry+https://github.com/rust-lang/crates.io-index" 1925 | checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" 1926 | dependencies = [ 1927 | "proc-macro2", 1928 | "quote", 1929 | "syn 2.0.25", 1930 | ] 1931 | 1932 | [[package]] 1933 | name = "thread_local" 1934 | version = "1.1.7" 1935 | source = "registry+https://github.com/rust-lang/crates.io-index" 1936 | checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" 1937 | dependencies = [ 1938 | "cfg-if", 1939 | "once_cell", 1940 | ] 1941 | 1942 | [[package]] 1943 | name = "time" 1944 | version = "0.1.45" 1945 | source = "registry+https://github.com/rust-lang/crates.io-index" 1946 | checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" 1947 | dependencies = [ 1948 | "libc", 1949 | "wasi 0.10.0+wasi-snapshot-preview1", 1950 | "winapi", 1951 | ] 1952 | 1953 | [[package]] 1954 | name = "tinyvec" 1955 | version = "1.6.0" 1956 | source = "registry+https://github.com/rust-lang/crates.io-index" 1957 | checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" 1958 | dependencies = [ 1959 | "tinyvec_macros", 1960 | ] 1961 | 1962 | [[package]] 1963 | name = "tinyvec_macros" 1964 | version = "0.1.1" 1965 | source = "registry+https://github.com/rust-lang/crates.io-index" 1966 | checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" 1967 | 1968 | [[package]] 1969 | name = "tokio" 1970 | version = "1.29.1" 1971 | source = "registry+https://github.com/rust-lang/crates.io-index" 1972 | checksum = "532826ff75199d5833b9d2c5fe410f29235e25704ee5f0ef599fb51c21f4a4da" 1973 | dependencies = [ 1974 | "autocfg", 1975 | "backtrace", 1976 | "bytes", 1977 | "libc", 1978 | "mio", 1979 | "num_cpus", 1980 | "parking_lot", 1981 | "pin-project-lite", 1982 | "signal-hook-registry", 1983 | "socket2", 1984 | "tokio-macros", 1985 | "windows-sys", 1986 | ] 1987 | 1988 | [[package]] 1989 | name = "tokio-macros" 1990 | version = "2.1.0" 1991 | source = "registry+https://github.com/rust-lang/crates.io-index" 1992 | checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" 1993 | dependencies = [ 1994 | "proc-macro2", 1995 | "quote", 1996 | "syn 2.0.25", 1997 | ] 1998 | 1999 | [[package]] 2000 | name = "tokio-native-tls" 2001 | version = "0.3.1" 2002 | source = "registry+https://github.com/rust-lang/crates.io-index" 2003 | checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" 2004 | dependencies = [ 2005 | "native-tls", 2006 | "tokio", 2007 | ] 2008 | 2009 | [[package]] 2010 | name = "tokio-util" 2011 | version = "0.7.8" 2012 | source = "registry+https://github.com/rust-lang/crates.io-index" 2013 | checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" 2014 | dependencies = [ 2015 | "bytes", 2016 | "futures-core", 2017 | "futures-io", 2018 | "futures-sink", 2019 | "futures-util", 2020 | "hashbrown 0.12.3", 2021 | "pin-project-lite", 2022 | "slab", 2023 | "tokio", 2024 | "tracing", 2025 | ] 2026 | 2027 | [[package]] 2028 | name = "tower" 2029 | version = "0.4.13" 2030 | source = "registry+https://github.com/rust-lang/crates.io-index" 2031 | checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" 2032 | dependencies = [ 2033 | "futures-core", 2034 | "futures-util", 2035 | "pin-project", 2036 | "pin-project-lite", 2037 | "tower-layer", 2038 | "tower-service", 2039 | ] 2040 | 2041 | [[package]] 2042 | name = "tower-layer" 2043 | version = "0.3.2" 2044 | source = "registry+https://github.com/rust-lang/crates.io-index" 2045 | checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" 2046 | 2047 | [[package]] 2048 | name = "tower-lsp" 2049 | version = "0.20.0" 2050 | source = "registry+https://github.com/rust-lang/crates.io-index" 2051 | checksum = "d4ba052b54a6627628d9b3c34c176e7eda8359b7da9acd497b9f20998d118508" 2052 | dependencies = [ 2053 | "async-trait", 2054 | "auto_impl", 2055 | "bytes", 2056 | "dashmap", 2057 | "futures", 2058 | "httparse", 2059 | "lsp-types", 2060 | "memchr", 2061 | "serde", 2062 | "serde_json", 2063 | "tokio", 2064 | "tokio-util", 2065 | "tower", 2066 | "tower-lsp-macros", 2067 | "tracing", 2068 | ] 2069 | 2070 | [[package]] 2071 | name = "tower-lsp-macros" 2072 | version = "0.9.0" 2073 | source = "registry+https://github.com/rust-lang/crates.io-index" 2074 | checksum = "84fd902d4e0b9a4b27f2f440108dc034e1758628a9b702f8ec61ad66355422fa" 2075 | dependencies = [ 2076 | "proc-macro2", 2077 | "quote", 2078 | "syn 2.0.25", 2079 | ] 2080 | 2081 | [[package]] 2082 | name = "tower-service" 2083 | version = "0.3.2" 2084 | source = "registry+https://github.com/rust-lang/crates.io-index" 2085 | checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" 2086 | 2087 | [[package]] 2088 | name = "tracing" 2089 | version = "0.1.37" 2090 | source = "registry+https://github.com/rust-lang/crates.io-index" 2091 | checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" 2092 | dependencies = [ 2093 | "cfg-if", 2094 | "pin-project-lite", 2095 | "tracing-attributes", 2096 | "tracing-core", 2097 | ] 2098 | 2099 | [[package]] 2100 | name = "tracing-attributes" 2101 | version = "0.1.26" 2102 | source = "registry+https://github.com/rust-lang/crates.io-index" 2103 | checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" 2104 | dependencies = [ 2105 | "proc-macro2", 2106 | "quote", 2107 | "syn 2.0.25", 2108 | ] 2109 | 2110 | [[package]] 2111 | name = "tracing-core" 2112 | version = "0.1.31" 2113 | source = "registry+https://github.com/rust-lang/crates.io-index" 2114 | checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" 2115 | dependencies = [ 2116 | "once_cell", 2117 | "valuable", 2118 | ] 2119 | 2120 | [[package]] 2121 | name = "tracing-log" 2122 | version = "0.1.3" 2123 | source = "registry+https://github.com/rust-lang/crates.io-index" 2124 | checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" 2125 | dependencies = [ 2126 | "lazy_static", 2127 | "log", 2128 | "tracing-core", 2129 | ] 2130 | 2131 | [[package]] 2132 | name = "tracing-subscriber" 2133 | version = "0.3.17" 2134 | source = "registry+https://github.com/rust-lang/crates.io-index" 2135 | checksum = "30a651bc37f915e81f087d86e62a18eec5f79550c7faff886f7090b4ea757c77" 2136 | dependencies = [ 2137 | "nu-ansi-term", 2138 | "sharded-slab", 2139 | "smallvec", 2140 | "thread_local", 2141 | "tracing-core", 2142 | "tracing-log", 2143 | ] 2144 | 2145 | [[package]] 2146 | name = "try-lock" 2147 | version = "0.2.4" 2148 | source = "registry+https://github.com/rust-lang/crates.io-index" 2149 | checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" 2150 | 2151 | [[package]] 2152 | name = "tungstenite" 2153 | version = "0.17.3" 2154 | source = "registry+https://github.com/rust-lang/crates.io-index" 2155 | checksum = "e27992fd6a8c29ee7eef28fc78349aa244134e10ad447ce3b9f0ac0ed0fa4ce0" 2156 | dependencies = [ 2157 | "base64 0.13.1", 2158 | "byteorder", 2159 | "bytes", 2160 | "http", 2161 | "httparse", 2162 | "log", 2163 | "rand", 2164 | "sha-1", 2165 | "thiserror", 2166 | "url", 2167 | "utf-8", 2168 | ] 2169 | 2170 | [[package]] 2171 | name = "typenum" 2172 | version = "1.16.0" 2173 | source = "registry+https://github.com/rust-lang/crates.io-index" 2174 | checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" 2175 | 2176 | [[package]] 2177 | name = "ucd-trie" 2178 | version = "0.1.6" 2179 | source = "registry+https://github.com/rust-lang/crates.io-index" 2180 | checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" 2181 | 2182 | [[package]] 2183 | name = "unicode-bidi" 2184 | version = "0.3.13" 2185 | source = "registry+https://github.com/rust-lang/crates.io-index" 2186 | checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" 2187 | 2188 | [[package]] 2189 | name = "unicode-ident" 2190 | version = "1.0.9" 2191 | source = "registry+https://github.com/rust-lang/crates.io-index" 2192 | checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" 2193 | 2194 | [[package]] 2195 | name = "unicode-normalization" 2196 | version = "0.1.22" 2197 | source = "registry+https://github.com/rust-lang/crates.io-index" 2198 | checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" 2199 | dependencies = [ 2200 | "tinyvec", 2201 | ] 2202 | 2203 | [[package]] 2204 | name = "url" 2205 | version = "2.4.0" 2206 | source = "registry+https://github.com/rust-lang/crates.io-index" 2207 | checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" 2208 | dependencies = [ 2209 | "form_urlencoded", 2210 | "idna", 2211 | "percent-encoding", 2212 | "serde", 2213 | ] 2214 | 2215 | [[package]] 2216 | name = "utf-8" 2217 | version = "0.7.6" 2218 | source = "registry+https://github.com/rust-lang/crates.io-index" 2219 | checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" 2220 | 2221 | [[package]] 2222 | name = "uuid" 2223 | version = "1.4.1" 2224 | source = "registry+https://github.com/rust-lang/crates.io-index" 2225 | checksum = "79daa5ed5740825c40b389c5e50312b9c86df53fccd33f281df655642b43869d" 2226 | dependencies = [ 2227 | "getrandom", 2228 | "rand", 2229 | "uuid-macro-internal", 2230 | ] 2231 | 2232 | [[package]] 2233 | name = "uuid-macro-internal" 2234 | version = "1.4.1" 2235 | source = "registry+https://github.com/rust-lang/crates.io-index" 2236 | checksum = "f7e1ba1f333bd65ce3c9f27de592fcbc256dafe3af2717f56d7c87761fbaccf4" 2237 | dependencies = [ 2238 | "proc-macro2", 2239 | "quote", 2240 | "syn 2.0.25", 2241 | ] 2242 | 2243 | [[package]] 2244 | name = "valuable" 2245 | version = "0.1.0" 2246 | source = "registry+https://github.com/rust-lang/crates.io-index" 2247 | checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" 2248 | 2249 | [[package]] 2250 | name = "value-bag" 2251 | version = "1.4.1" 2252 | source = "registry+https://github.com/rust-lang/crates.io-index" 2253 | checksum = "d92ccd67fb88503048c01b59152a04effd0782d035a83a6d256ce6085f08f4a3" 2254 | 2255 | [[package]] 2256 | name = "vcpkg" 2257 | version = "0.2.15" 2258 | source = "registry+https://github.com/rust-lang/crates.io-index" 2259 | checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" 2260 | 2261 | [[package]] 2262 | name = "version_check" 2263 | version = "0.9.4" 2264 | source = "registry+https://github.com/rust-lang/crates.io-index" 2265 | checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" 2266 | 2267 | [[package]] 2268 | name = "waker-fn" 2269 | version = "1.1.0" 2270 | source = "registry+https://github.com/rust-lang/crates.io-index" 2271 | checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" 2272 | 2273 | [[package]] 2274 | name = "want" 2275 | version = "0.3.1" 2276 | source = "registry+https://github.com/rust-lang/crates.io-index" 2277 | checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" 2278 | dependencies = [ 2279 | "try-lock", 2280 | ] 2281 | 2282 | [[package]] 2283 | name = "wasi" 2284 | version = "0.10.0+wasi-snapshot-preview1" 2285 | source = "registry+https://github.com/rust-lang/crates.io-index" 2286 | checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" 2287 | 2288 | [[package]] 2289 | name = "wasi" 2290 | version = "0.11.0+wasi-snapshot-preview1" 2291 | source = "registry+https://github.com/rust-lang/crates.io-index" 2292 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 2293 | 2294 | [[package]] 2295 | name = "wasm-bindgen" 2296 | version = "0.2.87" 2297 | source = "registry+https://github.com/rust-lang/crates.io-index" 2298 | checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" 2299 | dependencies = [ 2300 | "cfg-if", 2301 | "wasm-bindgen-macro", 2302 | ] 2303 | 2304 | [[package]] 2305 | name = "wasm-bindgen-backend" 2306 | version = "0.2.87" 2307 | source = "registry+https://github.com/rust-lang/crates.io-index" 2308 | checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" 2309 | dependencies = [ 2310 | "bumpalo", 2311 | "log", 2312 | "once_cell", 2313 | "proc-macro2", 2314 | "quote", 2315 | "syn 2.0.25", 2316 | "wasm-bindgen-shared", 2317 | ] 2318 | 2319 | [[package]] 2320 | name = "wasm-bindgen-futures" 2321 | version = "0.4.37" 2322 | source = "registry+https://github.com/rust-lang/crates.io-index" 2323 | checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" 2324 | dependencies = [ 2325 | "cfg-if", 2326 | "js-sys", 2327 | "wasm-bindgen", 2328 | "web-sys", 2329 | ] 2330 | 2331 | [[package]] 2332 | name = "wasm-bindgen-macro" 2333 | version = "0.2.87" 2334 | source = "registry+https://github.com/rust-lang/crates.io-index" 2335 | checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" 2336 | dependencies = [ 2337 | "quote", 2338 | "wasm-bindgen-macro-support", 2339 | ] 2340 | 2341 | [[package]] 2342 | name = "wasm-bindgen-macro-support" 2343 | version = "0.2.87" 2344 | source = "registry+https://github.com/rust-lang/crates.io-index" 2345 | checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" 2346 | dependencies = [ 2347 | "proc-macro2", 2348 | "quote", 2349 | "syn 2.0.25", 2350 | "wasm-bindgen-backend", 2351 | "wasm-bindgen-shared", 2352 | ] 2353 | 2354 | [[package]] 2355 | name = "wasm-bindgen-shared" 2356 | version = "0.2.87" 2357 | source = "registry+https://github.com/rust-lang/crates.io-index" 2358 | checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" 2359 | 2360 | [[package]] 2361 | name = "wasm-streams" 2362 | version = "0.2.3" 2363 | source = "registry+https://github.com/rust-lang/crates.io-index" 2364 | checksum = "6bbae3363c08332cadccd13b67db371814cd214c2524020932f0804b8cf7c078" 2365 | dependencies = [ 2366 | "futures-util", 2367 | "js-sys", 2368 | "wasm-bindgen", 2369 | "wasm-bindgen-futures", 2370 | "web-sys", 2371 | ] 2372 | 2373 | [[package]] 2374 | name = "web-sys" 2375 | version = "0.3.64" 2376 | source = "registry+https://github.com/rust-lang/crates.io-index" 2377 | checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" 2378 | dependencies = [ 2379 | "js-sys", 2380 | "wasm-bindgen", 2381 | ] 2382 | 2383 | [[package]] 2384 | name = "winapi" 2385 | version = "0.3.9" 2386 | source = "registry+https://github.com/rust-lang/crates.io-index" 2387 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 2388 | dependencies = [ 2389 | "winapi-i686-pc-windows-gnu", 2390 | "winapi-x86_64-pc-windows-gnu", 2391 | ] 2392 | 2393 | [[package]] 2394 | name = "winapi-i686-pc-windows-gnu" 2395 | version = "0.4.0" 2396 | source = "registry+https://github.com/rust-lang/crates.io-index" 2397 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 2398 | 2399 | [[package]] 2400 | name = "winapi-util" 2401 | version = "0.1.5" 2402 | source = "registry+https://github.com/rust-lang/crates.io-index" 2403 | checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" 2404 | dependencies = [ 2405 | "winapi", 2406 | ] 2407 | 2408 | [[package]] 2409 | name = "winapi-x86_64-pc-windows-gnu" 2410 | version = "0.4.0" 2411 | source = "registry+https://github.com/rust-lang/crates.io-index" 2412 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 2413 | 2414 | [[package]] 2415 | name = "windows" 2416 | version = "0.48.0" 2417 | source = "registry+https://github.com/rust-lang/crates.io-index" 2418 | checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" 2419 | dependencies = [ 2420 | "windows-targets", 2421 | ] 2422 | 2423 | [[package]] 2424 | name = "windows-sys" 2425 | version = "0.48.0" 2426 | source = "registry+https://github.com/rust-lang/crates.io-index" 2427 | checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" 2428 | dependencies = [ 2429 | "windows-targets", 2430 | ] 2431 | 2432 | [[package]] 2433 | name = "windows-targets" 2434 | version = "0.48.0" 2435 | source = "registry+https://github.com/rust-lang/crates.io-index" 2436 | checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" 2437 | dependencies = [ 2438 | "windows_aarch64_gnullvm", 2439 | "windows_aarch64_msvc", 2440 | "windows_i686_gnu", 2441 | "windows_i686_msvc", 2442 | "windows_x86_64_gnu", 2443 | "windows_x86_64_gnullvm", 2444 | "windows_x86_64_msvc", 2445 | ] 2446 | 2447 | [[package]] 2448 | name = "windows_aarch64_gnullvm" 2449 | version = "0.48.0" 2450 | source = "registry+https://github.com/rust-lang/crates.io-index" 2451 | checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" 2452 | 2453 | [[package]] 2454 | name = "windows_aarch64_msvc" 2455 | version = "0.48.0" 2456 | source = "registry+https://github.com/rust-lang/crates.io-index" 2457 | checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" 2458 | 2459 | [[package]] 2460 | name = "windows_i686_gnu" 2461 | version = "0.48.0" 2462 | source = "registry+https://github.com/rust-lang/crates.io-index" 2463 | checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" 2464 | 2465 | [[package]] 2466 | name = "windows_i686_msvc" 2467 | version = "0.48.0" 2468 | source = "registry+https://github.com/rust-lang/crates.io-index" 2469 | checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" 2470 | 2471 | [[package]] 2472 | name = "windows_x86_64_gnu" 2473 | version = "0.48.0" 2474 | source = "registry+https://github.com/rust-lang/crates.io-index" 2475 | checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" 2476 | 2477 | [[package]] 2478 | name = "windows_x86_64_gnullvm" 2479 | version = "0.48.0" 2480 | source = "registry+https://github.com/rust-lang/crates.io-index" 2481 | checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" 2482 | 2483 | [[package]] 2484 | name = "windows_x86_64_msvc" 2485 | version = "0.48.0" 2486 | source = "registry+https://github.com/rust-lang/crates.io-index" 2487 | checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" 2488 | 2489 | [[package]] 2490 | name = "winreg" 2491 | version = "0.10.1" 2492 | source = "registry+https://github.com/rust-lang/crates.io-index" 2493 | checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" 2494 | dependencies = [ 2495 | "winapi", 2496 | ] 2497 | 2498 | [[package]] 2499 | name = "ws_stream_tungstenite" 2500 | version = "0.9.0" 2501 | source = "registry+https://github.com/rust-lang/crates.io-index" 2502 | checksum = "ec0a636afca48c5e2623aa229cfad7117ab6e23f26f1146e019b9a355744c02b" 2503 | dependencies = [ 2504 | "async-tungstenite", 2505 | "async_io_stream", 2506 | "bitflags 1.3.2", 2507 | "futures-core", 2508 | "futures-io", 2509 | "futures-sink", 2510 | "futures-util", 2511 | "log", 2512 | "pharos", 2513 | "rustc_version", 2514 | "tokio", 2515 | "tungstenite", 2516 | ] 2517 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "copilot-rs" 3 | version = "0.19.0" 4 | edition = "2021" 5 | rust-version = "1.73.0" 6 | readme = "README.md" 7 | keywords = ["language-server", "lsp", "tower"] 8 | [profile.dev] 9 | # Disabling debug info speeds up builds a bunch, 10 | # and we don't rely on it for debugging that much. 11 | debug = 2 12 | 13 | [profile.release] 14 | incremental = true 15 | # Set this to 1 or 2 to get more useful backtraces in debugger. 16 | debug = 0 17 | 18 | [dependencies] 19 | async-codec-lite = { version = "0.0", optional = true } 20 | async-trait = "0.1" 21 | async-weighted-semaphore = "0.2.1" 22 | auto_impl = "1.0" 23 | bytes = "1.0" 24 | dashmap = "5.1" 25 | futures = { version = "0.3", default-features = false, features = ["std", "async-await"] } 26 | httparse = "1.8" 27 | lsp-types = "0.94" 28 | memchr = "2.5" 29 | # tokio = { version = "1.17", features = ["full"] } 30 | # tokio-util = { version = "0.7", optional = true, features = ["codec", "compat"] } 31 | tower = { version = "0.4", default-features = false, features = ["util"] } 32 | tracing = "0.1" 33 | async-tungstenite = { version = "0.18", features = ["tokio-runtime"] } 34 | # tracing-subscriber = "0.3" 35 | ws_stream_tungstenite = { version = "0.9", features = ["tokio_io"] } 36 | eventsource-stream = "0.2.3" 37 | reqwest-eventsource = "0.4.0" 38 | github-device-flow = "0.1.4" 39 | ropey = "1.6.0" 40 | serde = {version = "1.0.171", features = ["derive"]} 41 | serde_derive = "1.0.171" 42 | serde_json = "1.0.102" 43 | reqwest = "0.11.18" 44 | tokio = { version = "1.29.1", features = ["full"] } 45 | tokio-util = { version = "0.7.8", features = ["full"] } 46 | tracing-subscriber = "0.3.17" 47 | futures-util = "0.3.28" 48 | chrono = "0.4.26" 49 | uuid = {version = "1.3.4", features = ["v4", "fast-rng", "macro-diagnostics"]} 50 | interfaces = "0.0.9" 51 | sha256 = "1.3.0" 52 | cancellation = "0.1.0" 53 | async-std = {version="1.12.0", features=["unstable"]} 54 | tower-lsp = "0.20.0" 55 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Early WIP 2 | Currently authentication, document sync, completion requests/responses are functional. Editor context is forwarded to github copilot servers and completions are provided to the editor in response. 3 | 4 | These results can be retrieved by requesting `textDocument/getCompletionsCycling` 5 | 6 | You can use this language server by by checking out the `copilot-rs` branch on both `copilot.lua` and `copilot-cmp`. Please note that this is an early stage project, and bugs which break functionality are to be expected. 7 | -------------------------------------------------------------------------------- /rust-toolchin: -------------------------------------------------------------------------------- 1 | nightly 2 | -------------------------------------------------------------------------------- /src/auth.rs: -------------------------------------------------------------------------------- 1 | use serde_derive::{Deserialize, Serialize}; 2 | use interfaces::Interface; 3 | use std::process; 4 | use sha256::digest; 5 | use github_device_flow::authorize; 6 | use std::fs; 7 | 8 | #[derive(Serialize, Deserialize, Debug)] 9 | pub struct CopilotTokenGrant { 10 | pub chat_enabled: bool, 11 | pub code_quote_enabled: bool, 12 | pub copilotignore_enabled: bool, 13 | pub expires_at: i128, 14 | pub public_suggestions: String, 15 | pub refresh_in: i128, 16 | pub sku: String, 17 | pub telemetry: String, 18 | pub token: String, 19 | pub tracking_id: String 20 | } 21 | 22 | #[derive(Deserialize, Serialize, Debug)] 23 | struct HostsFile { 24 | github_com: UserCredentials, 25 | } 26 | 27 | #[derive(Deserialize, Serialize, Debug)] 28 | struct UserCredentials { 29 | user: String, 30 | oauth_token: String, 31 | } 32 | 33 | pub fn create_hosts_file(path: &String) { 34 | let auth_data = authorize("Iv1.b507a08c87ecfe98".to_string(), None); 35 | println!("Creating hosts file at {}", path); 36 | println!("Auth data: {:?}", auth_data); 37 | } 38 | 39 | pub fn read_config() -> String { 40 | let fp = format!("{}/.config/github-copilot/hosts.json", std::env::var("HOME").unwrap()); 41 | let exists = std::path::Path::new(&fp).exists(); 42 | if !exists { create_hosts_file(&fp); } 43 | println!("Exists: {}", exists); 44 | 45 | // if !exists { create_hosts_file(&fp); } 46 | serde_json::from_str::( 47 | &fs::read_to_string(fp) 48 | .unwrap() 49 | .replace('.', "_") 50 | ).unwrap().github_com.oauth_token 51 | } 52 | 53 | pub async fn get_copilot_token() -> Result { 54 | let user_token = read_config(); 55 | let url = "https://api.github.com/copilot_internal/v2/token".to_string(); 56 | let client: reqwest::Client = reqwest::Client::new(); 57 | let res = client.get(url) 58 | .bearer_auth(user_token) 59 | .header("editor-plugin-version", "copilot-intellij/1.2.8.2631") 60 | .header("editor-version", "JetBrains-IC/231.9011.34") 61 | .header("User-Agent", "Rust") 62 | .send().await?; 63 | let token_grant = res.json::().await.unwrap(); 64 | Ok(token_grant) 65 | } 66 | 67 | pub fn get_machine_id() -> String { 68 | fn try_get_mac_addr() -> Result { 69 | fn validate_interface(itf: &Interface) -> bool { 70 | let exclude = ["00:00:00:00:00:00", "ff:ff:ff:ff:ff:ff", "ac:de:48:00:11:22"]; 71 | return itf.is_running() && 72 | !exclude.iter().any(|&s| s == itf.hardware_addr() 73 | .unwrap() 74 | .as_string() 75 | ); 76 | } 77 | let ifaces = Interface::get_all().unwrap(); 78 | let itf = ifaces.iter().find(|&itf| validate_interface(itf)); 79 | match itf { 80 | Some(x) => Ok( 81 | x.hardware_addr() 82 | .unwrap() 83 | .to_string()), 84 | None => Err(()) 85 | } 86 | } 87 | let mac_addr = try_get_mac_addr(); 88 | if mac_addr.is_err() { 89 | eprintln!("Problem finding hardware address"); 90 | process::exit(1); 91 | } 92 | digest(mac_addr.unwrap()) 93 | } 94 | 95 | -------------------------------------------------------------------------------- /src/backend.rs: -------------------------------------------------------------------------------- 1 | use crate::{parse, debounce, cache, request::build_request}; 2 | use crate::copilot::{CopilotCompletionResponse, CopilotResponse, CopilotCyclingCompletion, CopilotEditorInfo, DocParams}; 3 | use futures_util::stream::PollNext; 4 | use ropey::Rope; 5 | use reqwest::RequestBuilder; 6 | use serde::{Deserialize, Serialize}; 7 | use serde_json::Value; 8 | use tower_lsp::{jsonrpc::{Error, Result}, lsp_types::*, Client, LanguageServer, LspService, Server}; 9 | use dashmap::DashMap; 10 | use std::{ 11 | borrow::Cow, 12 | str::FromStr, 13 | fmt::Debug, 14 | collections::HashMap, 15 | time::{Duration, Instant}, 16 | sync::{ 17 | mpsc::channel, RwLock, Arc, Mutex 18 | } 19 | }; 20 | use tower_lsp::{}; 21 | use reqwest::header::{HeaderMap, HeaderValue}; 22 | use futures::future::{Abortable, AbortHandle, Aborted}; 23 | use tokio::time; 24 | use futures_util::{StreamExt, FutureExt}; 25 | use eventsource_stream::Eventsource; 26 | use futures::{future, task::Poll}; 27 | 28 | #[derive(Deserialize, Serialize, Debug)] 29 | pub struct Success { 30 | success: bool 31 | } 32 | impl Success { 33 | pub fn new(success: bool) -> Self { Self { success } } 34 | } 35 | 36 | #[derive(Deserialize, Serialize, Debug, Clone)] 37 | #[serde(rename_all = "camelCase")] 38 | pub struct TextDocumentItem { 39 | pub uri: String, 40 | pub text: String, 41 | pub version: i32, 42 | pub language_id: String 43 | } 44 | 45 | type SafeMap = Arc>>>; 46 | 47 | #[derive(Debug)] 48 | pub struct Backend { 49 | pub client: Client, 50 | pub documents: SafeMap, 51 | pub http_client: Arc, 52 | pub current_dispatch: Option, 53 | pub runner: debounce::Runner, 54 | pub editor_info: Arc>, 55 | pub cache: cache::CopilotCache 56 | } 57 | 58 | fn handle_event( 59 | event: eventsource_stream::Event 60 | ) -> CopilotResponse { 61 | if event.data == "[DONE]" { 62 | return CopilotResponse::Done; 63 | } 64 | match serde_json::from_str(&event.data) { 65 | Ok(data) => { CopilotResponse::Answer(data) } 66 | Err(e) => { CopilotResponse::Error(e.to_string()) } 67 | } 68 | } 69 | 70 | pub async fn await_stream(req: RequestBuilder, line_before: String, pos: Position) -> Vec { 71 | let resp = req.send().await.unwrap(); 72 | let mut stream = resp.bytes_stream().eventsource(); 73 | let mut completion_list = Vec::::with_capacity(4); 74 | let mut s = "".to_string(); 75 | let mut cancellation_reason = None; 76 | 77 | while let Some(event) = stream.next().await { 78 | match handle_event(event.unwrap()) { 79 | CopilotResponse::Answer(ans) => { 80 | ans.choices.iter().for_each(|x| { 81 | s.push_str(&x.text); 82 | if x.finish_reason.is_some() { 83 | completion_list.push(s.to_string()); 84 | s = "".to_string(); 85 | } 86 | }); 87 | }, 88 | CopilotResponse::Done => { 89 | return completion_list; 90 | }, 91 | CopilotResponse::Error(e) => { 92 | cancellation_reason = Some(e); 93 | } 94 | } 95 | }; 96 | return completion_list; 97 | } 98 | 99 | struct CompletionStreamingParams { 100 | req: RequestBuilder, 101 | line_before: String, 102 | position: Position 103 | } 104 | 105 | impl Backend { 106 | fn get_doc_info(&self, uri: &String) -> Result> { 107 | let data = Arc::clone(&self.documents); 108 | let map = data.read().unwrap(); 109 | match map.get(uri) { 110 | Some(e) => { 111 | let element = e.lock().expect("RwLock poisoned"); 112 | Ok(Box::new(element.clone())) 113 | }, 114 | None => { 115 | Err(Error { 116 | code: tower_lsp::jsonrpc::ErrorCode::from(69), 117 | data: None, 118 | message: Cow::from(format!("Failed to get doc info")) 119 | }) 120 | } 121 | } 122 | } 123 | 124 | pub async fn set_editor_info(&self, params: CopilotEditorInfo) -> Result { 125 | self.client.log_message(MessageType::INFO, "setEditorInfo").await; 126 | let copy = Arc::clone(&self.editor_info); 127 | let mut lock = copy.write().unwrap(); 128 | *lock = params; 129 | return Ok(Success::new(true)); 130 | } 131 | pub fn get_doc_params(&self, params: &CompletionParams) -> DocParams { 132 | let pos = params.text_document_position.position.clone(); 133 | let uri = params.text_document_position.text_document.uri.to_string(); 134 | let doc = self.get_doc_info(&uri).unwrap(); 135 | let rope = ropey::Rope::from_str(&doc.text); 136 | let offset = parse::position_to_offset(pos, &rope).unwrap(); 137 | 138 | DocParams { 139 | uri: uri.to_string(), 140 | pos: pos.clone(), 141 | language: doc.language_id.to_string(), 142 | prefix: parse::get_text_before(offset, &rope).unwrap(), 143 | suffix: parse::get_text_after(offset, &rope).unwrap(), 144 | line_before: parse::get_line_before(pos, &rope).unwrap().to_string(), 145 | rope, 146 | } 147 | } 148 | 149 | pub async fn get_completions_cycling(&self, params: CompletionParams) -> Result { 150 | let doc_params = self.get_doc_params(¶ms); 151 | let cached_result = self.cache.get_cached_result(&doc_params.uri, doc_params.pos.line); 152 | if cached_result.is_some() { 153 | return Ok(cached_result.unwrap()); 154 | } 155 | 156 | let valid = self.runner.increment_and_do_stuff().await; 157 | if !valid { 158 | return Ok(CopilotCompletionResponse { 159 | cancellation_reason: Some("More Recent".to_string()), 160 | completions: vec![] 161 | }); 162 | } 163 | 164 | let doc_params = self.get_doc_params(¶ms); 165 | let line_before = doc_params.line_before.to_string(); 166 | let http_client = Arc::clone(&self.http_client); 167 | let _prompt = format!( 168 | "// Path: {}\n{}", 169 | doc_params.uri, 170 | doc_params.prefix.to_string() 171 | ); 172 | 173 | let req = build_request(http_client, doc_params.language, doc_params.prefix, doc_params.suffix); 174 | 175 | let completion_list = await_stream( 176 | req, 177 | line_before.to_string(), 178 | params.text_document_position.position.clone() 179 | ); 180 | let response = CopilotCompletionResponse::from_str_vec( 181 | completion_list.await, 182 | line_before, 183 | doc_params.pos 184 | ); 185 | self.cache.set_cached_result(&doc_params.uri, &doc_params.pos.line, &response); 186 | Ok(response) 187 | } 188 | } 189 | 190 | #[tower_lsp::async_trait] 191 | impl LanguageServer for Backend { 192 | async fn initialize(&self, _: InitializeParams) -> Result { 193 | Ok(InitializeResult { 194 | server_info: None, 195 | offset_encoding: None, 196 | capabilities: ServerCapabilities { 197 | inlay_hint_provider: None, 198 | text_document_sync: Some(TextDocumentSyncCapability::Kind(TextDocumentSyncKind::FULL)), 199 | completion_provider: Some(CompletionOptions { 200 | resolve_provider: Some(false), 201 | trigger_characters: Some(vec![".".to_string()]), 202 | work_done_progress_options: Default::default(), 203 | all_commit_characters: None, 204 | completion_item: None, 205 | }), 206 | execute_command_provider: Some(ExecuteCommandOptions { 207 | commands: vec!["dummy.do_something".to_string()], 208 | work_done_progress_options: Default::default(), 209 | }), 210 | workspace: Some(WorkspaceServerCapabilities { 211 | workspace_folders: Some(WorkspaceFoldersServerCapabilities { 212 | supported: Some(true), 213 | change_notifications: Some(OneOf::Left(true)), 214 | }), 215 | file_operations: None, 216 | }), 217 | semantic_tokens_provider: None, 218 | ..ServerCapabilities::default() 219 | }, 220 | }) 221 | } 222 | async fn initialized(&self, _: InitializedParams) { 223 | self.client 224 | .log_message(MessageType::INFO, "initialized!") 225 | .await; 226 | } 227 | 228 | async fn shutdown(&self) -> Result<()> { 229 | Ok(()) 230 | } 231 | 232 | async fn did_open(&self, params: DidOpenTextDocumentParams) { 233 | self.client.log_message(MessageType::INFO, "file opened!").await; 234 | let id = params.text_document.uri.to_string(); 235 | let doc = Mutex::new(TextDocumentItem { 236 | uri: params.text_document.uri.to_string(), 237 | text: params.text_document.text, 238 | version: params.text_document.version, 239 | language_id: params.text_document.language_id 240 | }); 241 | let mut map = self.documents.write().expect("RwLock poisoned"); 242 | map.entry(id).or_insert_with(|| doc); 243 | } 244 | 245 | async fn did_change(&self, mut params: DidChangeTextDocumentParams) { 246 | let data = Arc::clone(&self.documents); 247 | let mut map = data.write().expect("RwLock poisoned"); 248 | if let Some(element) = map.get(¶ms.text_document.uri.to_string()) { 249 | let mut element = element.lock().expect("Mutex poisoned"); 250 | let doc = TextDocumentItem { 251 | uri: element.uri.to_string(), 252 | text: std::mem::take(&mut params.content_changes[0].text), 253 | version: params.text_document.version, 254 | language_id: element.language_id.to_string() 255 | }; 256 | *element = doc 257 | } 258 | } 259 | 260 | async fn did_save(&self, _: DidSaveTextDocumentParams) { 261 | self.client 262 | .log_message(MessageType::ERROR, "file saved!") 263 | .await; 264 | } 265 | async fn did_close(&self, _: DidCloseTextDocumentParams) { 266 | self.client 267 | .log_message(MessageType::ERROR, "file closed!") 268 | .await; 269 | } 270 | 271 | async fn did_change_configuration(&self, _: DidChangeConfigurationParams) { 272 | self.client 273 | .log_message(MessageType::ERROR, "configuration changed!") 274 | .await; 275 | } 276 | 277 | async fn did_change_workspace_folders(&self, _: DidChangeWorkspaceFoldersParams) { 278 | self.client 279 | .log_message(MessageType::ERROR, "workspace folders changed!") 280 | .await; 281 | } 282 | 283 | async fn did_change_watched_files(&self, _: DidChangeWatchedFilesParams) { 284 | self.client 285 | .log_message(MessageType::ERROR, "watched files have changed!") 286 | .await; 287 | } 288 | 289 | async fn execute_command(&self, _: ExecuteCommandParams) -> Result> { 290 | self.client 291 | .log_message(MessageType::ERROR, "command executed!") 292 | .await; 293 | 294 | match self.client.apply_edit(WorkspaceEdit::default()).await { 295 | Ok(res) if res.applied => self.client.log_message(MessageType::INFO, "applied").await, 296 | Ok(_) => self.client.log_message(MessageType::INFO, "rejected").await, 297 | Err(err) => self.client.log_message(MessageType::ERROR, err).await, 298 | } 299 | 300 | Ok(None) 301 | } 302 | } 303 | 304 | 305 | -------------------------------------------------------------------------------- /src/cache.rs: -------------------------------------------------------------------------------- 1 | use std::{ 2 | borrow::Cow, 3 | str::FromStr, 4 | fmt::Debug, 5 | collections::HashMap, 6 | time::{Duration, Instant}, 7 | sync::{ 8 | mpsc::channel, RwLock, Arc, Mutex 9 | } 10 | }; 11 | use crate::copilot::{DocParams, CopilotCompletionResponse}; 12 | use tower_lsp::lsp_types::TextDocumentItem; 13 | 14 | // if file changes, keep the cache 15 | // if line number is different for an existing file, clean 16 | #[derive(Debug)] 17 | pub struct CopilotCache { 18 | inner: RwLock>>, 19 | last_line: RwLock>>, 20 | pending: RwLock> 21 | } 22 | 23 | impl CopilotCache { 24 | pub fn new() -> Self { 25 | Self { 26 | inner: RwLock::new(HashMap::new()), 27 | last_line: RwLock::new(HashMap::new()), 28 | pending: RwLock::new(Mutex::new(false)), 29 | } 30 | } 31 | 32 | 33 | fn get_last_line(&self, uri: &String) -> Option { 34 | let inner = self.last_line.read().unwrap(); 35 | let last_line = inner.get(uri); 36 | match last_line { 37 | Some(last_line) => { 38 | let last_line = last_line.lock().unwrap(); 39 | return Some(last_line.clone()); 40 | }, 41 | None => None 42 | } 43 | } 44 | 45 | fn get_cached_response(&self, uri: &String, lnum: u32) -> Option { 46 | let inner = self.inner.read().unwrap(); 47 | let cache = inner.get(uri); 48 | match cache { 49 | Some(completion_response) => { 50 | let completion_response = completion_response.lock().unwrap(); 51 | return Some(completion_response.clone()); 52 | }, 53 | None => None 54 | } 55 | } 56 | 57 | fn set_file_cache(&self, uri: &String, completion_response: CopilotCompletionResponse) { 58 | let mut inner = self.inner.write().unwrap(); 59 | inner.insert(uri.clone(), Mutex::new(completion_response)); 60 | } 61 | 62 | fn set_last_line(&self, uri: &String, last_line: u32) { 63 | let mut inner = self.last_line.write().unwrap(); 64 | inner.insert(uri.clone(), Mutex::new(last_line)); 65 | } 66 | 67 | pub fn get_cached_result(&self, uri: &String, last_line: u32) -> Option { 68 | let cached_line = self.get_last_line(uri); 69 | if cached_line.is_none() || cached_line.unwrap() != last_line { 70 | return None; 71 | } 72 | self.get_cached_response(uri, last_line) 73 | } 74 | 75 | pub fn set_cached_result(&self, uri: &String, lnum: &u32, completion_response: &CopilotCompletionResponse) -> Option { 76 | self.set_file_cache(uri, completion_response.clone()); 77 | self.set_last_line(uri, lnum.clone()); 78 | let inner = self.inner.write().unwrap(); 79 | let cache = inner.get(uri); 80 | match cache { 81 | Some(completion_response) => { 82 | let completion_response = completion_response.lock().unwrap(); 83 | return Some(completion_response.clone()); 84 | }, 85 | None => None 86 | } 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /src/copilot.rs: -------------------------------------------------------------------------------- 1 | use futures_util::{StreamExt, FutureExt}; 2 | use ropey::Rope; 3 | use eventsource_stream::Eventsource; 4 | use tower_lsp::lsp_types::*; 5 | use serde_derive::{Deserialize, Serialize}; 6 | 7 | #[derive(Debug, Serialize, Deserialize, Clone)] 8 | #[serde(rename_all = "camelCase")] 9 | pub struct CopilotCyclingCompletion { 10 | pub display_text: String, // partial text 11 | pub text: String, // fulltext 12 | pub range: Range, // start char always 0 13 | pub position: Position, 14 | } 15 | 16 | #[derive(Debug, Serialize, Deserialize)] 17 | pub struct CopilotAnswer { 18 | pub id: Option, 19 | pub model: String, 20 | pub created: u128, 21 | pub choices: Vec 22 | } 23 | 24 | #[derive(Debug, Serialize, Deserialize)] 25 | pub enum CopilotResponse { 26 | Answer(CopilotAnswer), 27 | Done, 28 | Error(String) 29 | } 30 | 31 | #[derive(Debug, Serialize, Deserialize)] 32 | pub struct Choices { 33 | pub text: String, 34 | pub index: i16, 35 | pub finish_reason: Option, 36 | pub logprobs: Option, 37 | } 38 | 39 | pub async fn on_cancel() -> CopilotCompletionResponse { 40 | CopilotCompletionResponse { 41 | cancellation_reason: Some("RequestCancelled".to_string()), 42 | completions: vec![] 43 | } 44 | } 45 | 46 | #[derive(Debug, Serialize, Deserialize, Clone)] 47 | pub struct CopilotCompletionResponse { 48 | pub completions: Vec, 49 | pub cancellation_reason: Option, 50 | } 51 | 52 | impl CopilotCompletionResponse { 53 | pub fn from_str_vec(str_vec: Vec, line_before: String, pos: Position) -> Self { 54 | let completions = str_vec.iter().map(|x| { 55 | return CopilotCyclingCompletion::new(x.to_string(), line_before.to_string(), pos.clone()); 56 | }).collect(); 57 | Self { completions, cancellation_reason: None } 58 | } 59 | } 60 | 61 | fn handle_event( 62 | event: eventsource_stream::Event 63 | ) -> CopilotResponse { 64 | if event.data == "[DONE]" { 65 | return CopilotResponse::Done; 66 | } 67 | match serde_json::from_str(&event.data) { 68 | Ok(data) => { CopilotResponse::Answer(data) } 69 | Err(e) => { CopilotResponse::Error(e.to_string()) } 70 | } 71 | } 72 | 73 | impl CopilotCyclingCompletion { 74 | pub fn new(text: String, line_before: String, position: Position) -> Self { 75 | let display_text = text.clone(); 76 | let text = format!("{}{}", line_before, text); 77 | let end_char = text.find('\n').unwrap_or(text.len()) as u32; 78 | Self { 79 | display_text, // partial text 80 | text, // fulltext 81 | range: Range { 82 | start: Position { character: 0, line: position.line }, 83 | end: Position { character: end_char, line: position.line } 84 | }, // start char always 0 85 | position, 86 | } 87 | } 88 | } 89 | 90 | fn create_item( 91 | text: String, 92 | line_before: &String, 93 | position: Position 94 | ) -> CopilotCyclingCompletion { 95 | let display_text = text.clone(); 96 | let text = format!("{}{}", line_before, text); 97 | let end_char = text.find('\n').unwrap_or(text.len()) as u32; 98 | CopilotCyclingCompletion { 99 | display_text, // partial text 100 | text, // fulltext 101 | range: Range { 102 | start: Position { 103 | character: 0, 104 | line: position.line, 105 | }, 106 | end: Position { 107 | character: end_char, 108 | line: position.line, 109 | } 110 | }, // start char always 0 111 | position, 112 | } 113 | } 114 | 115 | pub async fn fetch_completions( 116 | resp: reqwest::Response, 117 | line_before: String, 118 | position: Position, 119 | ) -> Result { 120 | let mut stream = resp.bytes_stream().eventsource(); 121 | let mut completion_list = Vec::::with_capacity(4); 122 | let mut s = "".to_string(); 123 | let mut cancellation_reason = None; 124 | while let Some(event) = stream.next().await { 125 | match handle_event(event.unwrap()) { 126 | CopilotResponse::Answer(ans) => { 127 | ans.choices.iter().for_each(|x| { 128 | s.push_str(&x.text); 129 | if x.finish_reason.is_some() { 130 | let item = create_item(s.clone(), &line_before, position); 131 | completion_list.push(item); 132 | s = "".to_string(); 133 | } 134 | }); 135 | }, 136 | CopilotResponse::Done => { break; }, 137 | CopilotResponse::Error(e) => { cancellation_reason = Some(e) } 138 | } 139 | } 140 | Ok( 141 | CopilotCompletionResponse { 142 | cancellation_reason, 143 | completions: completion_list 144 | } 145 | ) 146 | } 147 | 148 | #[derive(Debug, Serialize, Deserialize, Clone)] 149 | #[serde(rename_all = "camelCase")] 150 | struct LanguageEntry { 151 | language_id: String 152 | } 153 | 154 | #[derive(Debug, Serialize, Deserialize, Clone)] 155 | #[serde(rename_all = "camelCase")] 156 | struct EditorConfiguration { 157 | disabled_languages: Vec, 158 | enable_auto_completions: bool, 159 | } 160 | 161 | impl EditorConfiguration { 162 | pub fn default() -> Self { 163 | Self { 164 | disabled_languages: vec![], 165 | enable_auto_completions: true, 166 | } 167 | } 168 | } 169 | #[derive(Debug, Serialize, Deserialize, Clone)] 170 | #[serde(rename_all = "camelCase")] 171 | struct EditorInfo { 172 | name: String, 173 | version: String 174 | } 175 | 176 | impl EditorInfo { 177 | pub fn default() -> Self { 178 | Self { name: "".to_string(), version: "".to_string() } 179 | } 180 | } 181 | 182 | #[derive(Debug, Serialize, Deserialize, Clone)] 183 | #[serde(rename_all = "camelCase")] 184 | pub struct CopilotEditorInfo { 185 | editor_configuration: EditorConfiguration, 186 | editor_info: EditorInfo, 187 | editor_plugin_info: EditorInfo, 188 | } 189 | 190 | impl CopilotEditorInfo { 191 | pub fn default() -> Self { 192 | Self { 193 | editor_configuration: EditorConfiguration::default(), 194 | editor_info: EditorInfo::default(), 195 | editor_plugin_info: EditorInfo::default() 196 | } 197 | } 198 | } 199 | 200 | pub struct DocParams { 201 | pub rope: Rope, 202 | pub uri: String, 203 | pub pos: Position, 204 | pub language: String, 205 | pub line_before: String, 206 | pub prefix: String, 207 | pub suffix: String 208 | } 209 | -------------------------------------------------------------------------------- /src/debounce.rs: -------------------------------------------------------------------------------- 1 | use std::sync::{Mutex, MutexGuard}; 2 | use std::marker::PhantomData; 3 | use tokio::runtime; 4 | use std::sync::RwLock; 5 | 6 | #[derive(Debug)] 7 | pub struct Runner 8 | { 9 | inc: CanIncrement, 10 | id: RwLock, 11 | delay: tokio::time::Duration 12 | } 13 | 14 | impl Runner { 15 | pub fn new(delay: tokio::time::Duration) -> Self { 16 | Self { 17 | id: RwLock::new(0), 18 | inc: CanIncrement::new(), 19 | delay 20 | } 21 | } 22 | fn set_id(&self, new_id: i32) -> i32 { 23 | let mut lock = self.id.write().unwrap(); 24 | *lock = new_id; 25 | *lock 26 | } 27 | 28 | pub async fn increment_and_do_stuff(&self) -> bool { 29 | let id = self.inc.increment(); 30 | self.foo(id).await 31 | } 32 | 33 | async fn foo(&self, id: i32) -> bool { 34 | tokio::time::sleep(self.delay).await; 35 | let current_id = self.inc.read(); 36 | id == current_id 37 | } 38 | } 39 | 40 | #[derive(Debug)] 41 | struct CanIncrement { 42 | mutex: RwLock, 43 | } 44 | 45 | impl CanIncrement { 46 | fn new() -> Self { 47 | Self { mutex: RwLock::new(0) } 48 | } 49 | // This function is not marked async. 50 | fn increment(&self) -> i32 { 51 | let mut lock = self.mutex.write().unwrap(); 52 | *lock += 1; 53 | *lock 54 | } 55 | fn read(&self) -> i32 { 56 | let lock = self.mutex.read().unwrap(); 57 | *lock 58 | } 59 | } 60 | 61 | // #[tokio::main] 62 | // async fn main() { 63 | // let can_inc = CanIncrement::new(); 64 | // let runner = Runner { 65 | // id: RwLock::new(0), 66 | // inc: can_inc, 67 | // delay: tokio::time::Duration::from_millis(100), 68 | // }; 69 | // let a = runner.increment_and_do_stuff(); 70 | // let b = runner.increment_and_do_stuff(); 71 | // let res = tokio::join!(a, b); 72 | // println!("{:?}", res); 73 | // } 74 | -------------------------------------------------------------------------------- /src/lib.rs: -------------------------------------------------------------------------------- 1 | #![feature(allocator_api)] 2 | #![allow(warnings)] 3 | #![feature(let_chains)] 4 | pub mod copilot; 5 | pub mod auth; 6 | pub mod parse; 7 | pub mod request; 8 | pub mod backend; 9 | pub mod debounce; 10 | pub mod cache; 11 | -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | use std::{sync::{Arc, RwLock}, collections::HashMap}; 2 | use copilot_rs::{backend::Backend, auth, copilot::CopilotEditorInfo, cache::CopilotCache}; 3 | use tower_lsp::{LspService, Server}; 4 | use reqwest::header::{HeaderMap, HeaderValue}; 5 | 6 | #[tokio::main] 7 | async fn main() { 8 | #[cfg(feature = "runtime-agnostic")] 9 | use tokio_util::compat::{TokioAsyncReadCompatExt, TokioAsyncWriteCompatExt}; 10 | 11 | tracing_subscriber::fmt().init(); 12 | 13 | let (stdin, stdout) = (tokio::io::stdin(), tokio::io::stdout()); 14 | #[cfg(feature = "runtime-agnostic")] 15 | let (stdin, stdout) = (stdin.compat(), stdout.compat_write()); 16 | // let copilot_handler = CopilotHandler::new(); 17 | 18 | let auth_grant = auth::get_copilot_token().await.unwrap(); 19 | let auth_token = auth_grant.token.to_string(); 20 | let auth_string = format!("Bearer {}", &auth_token.as_str()); 21 | let mut auth_value = HeaderValue::from_str(&auth_string).unwrap(); 22 | auth_value.set_sensitive(true); 23 | let machine_id = auth::get_machine_id(); 24 | let mut header_map = HeaderMap::new(); 25 | header_map.insert("Authorization", auth_value); 26 | header_map.insert("Openai-Organization", HeaderValue::from_static("github-copilot")); 27 | header_map.insert("VScode-MachineId", HeaderValue::from_str(&machine_id).unwrap()); 28 | header_map.insert("Editor-Version", HeaderValue::from_static("JetBrains-IC/231.9011.34")); 29 | header_map.insert("Editor-Plugin-Version", HeaderValue::from_static("copilot-intellij/1.2.8.2631")); 30 | header_map.insert("OpenAI-Intent", HeaderValue::from_static("copilot-ghost")); 31 | header_map.insert("Connection", HeaderValue::from_static("Keep-Alive")); 32 | let client_builder = reqwest::Client::builder() 33 | .default_headers(header_map); 34 | let http_client = client_builder.build().unwrap(); 35 | let (service, socket) = LspService::build( 36 | |client| 37 | Backend { 38 | client: client.clone(), 39 | documents: Arc::new(RwLock::new(HashMap::new())), 40 | http_client: Arc::new(http_client), 41 | current_dispatch: None, 42 | runner: copilot_rs::debounce::Runner::new(tokio::time::Duration::from_millis(100)), 43 | editor_info: Arc::new(RwLock::new(CopilotEditorInfo::default())), 44 | cache: CopilotCache::new() 45 | } 46 | ).custom_method("getCompletionsCycling", Backend::get_completions_cycling) 47 | .custom_method("setEditorInfo", Backend::set_editor_info) 48 | .finish(); 49 | 50 | Server::new(stdin, stdout, socket) 51 | .serve(service) 52 | .await; 53 | } 54 | -------------------------------------------------------------------------------- /src/parse.rs: -------------------------------------------------------------------------------- 1 | use ropey::Rope; 2 | use tower_lsp::lsp_types::Position; 3 | 4 | pub fn offset_to_position(offset: usize, rope: &Rope) -> Option { 5 | let line = rope.try_char_to_line(offset).ok()?; 6 | let first_char_of_line = rope.try_line_to_char(line).ok()?; 7 | let column = offset - first_char_of_line; 8 | Some(Position::new(line as u32, column as u32)) 9 | } 10 | 11 | pub fn position_to_offset(position: Position, rope: &Rope) -> Option { 12 | Some(rope.try_line_to_char(position.line as usize).ok()? + position.character as usize) 13 | } 14 | 15 | pub fn get_text_before(offset: usize, rope: &Rope) -> Option { 16 | if offset == 0 { 17 | return Some("".to_string()) 18 | } 19 | Some(rope.slice(0..offset).to_string()) 20 | } 21 | 22 | pub fn get_text_after(offset: usize, rope: &Rope) -> Option { 23 | let end_idx = rope.len_chars(); 24 | if offset == end_idx { 25 | return Some("".to_string()); 26 | } 27 | Some(rope.slice(offset..end_idx).to_string()) 28 | } 29 | 30 | pub fn get_line_before(pos: Position, rope: &Rope) -> Option { 31 | let char_offset = pos.character as usize; 32 | let offset = position_to_offset(pos, rope).unwrap(); 33 | if char_offset == 0 { return Some("".to_string()); } 34 | let line_start = offset-char_offset; 35 | Some(rope.slice(line_start..offset).to_string()) 36 | } 37 | 38 | pub struct DocumentCompletionParams { 39 | pub prefix: String, 40 | pub prompt: String, 41 | pub suffix: String, 42 | pub line_before: String, 43 | } 44 | 45 | impl DocumentCompletionParams { 46 | pub fn new(uri:String, position: Position, rope: Rope) -> Self { 47 | let line_before = get_line_before(position, &rope).unwrap_or_default(); 48 | let offset = position_to_offset(position, &rope).unwrap_or_default(); 49 | let prefix = get_text_before(offset, &rope).unwrap_or_default(); 50 | let prompt = format!( 51 | "// Path: {}\n{}", 52 | uri, 53 | prefix 54 | ); 55 | let suffix = get_text_after(offset, &rope).unwrap(); 56 | Self { 57 | prefix, 58 | prompt, 59 | suffix, 60 | line_before 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /src/request.rs: -------------------------------------------------------------------------------- 1 | use serde_derive::{Deserialize, Serialize}; 2 | use uuid::Uuid; 3 | use chrono::Utc; 4 | use std::sync::Arc; 5 | use reqwest::{RequestBuilder, Client}; 6 | 7 | #[derive(Serialize, Deserialize, Debug)] 8 | pub struct CopilotCompletionRequest { 9 | pub prompt: String, 10 | pub suffix: String, 11 | pub max_tokens: i32, 12 | pub temperature: f32, 13 | pub top_p: f32, 14 | pub n: i16, 15 | pub stop: Vec, 16 | pub nwo: String, 17 | pub stream: bool, 18 | pub extra: CopilotCompletionParams 19 | } 20 | 21 | #[derive(Serialize, Deserialize, Debug)] 22 | pub struct CopilotCompletionParams { 23 | pub language: String, 24 | pub next_indent: i8, 25 | pub trim_by_indentation: bool, 26 | pub prompt_tokens: i32, 27 | pub suffix_tokens: i32 28 | } 29 | 30 | pub fn build_request( 31 | http_client: Arc, 32 | language: String, 33 | prompt: String, 34 | suffix: String 35 | ) -> RequestBuilder { 36 | let extra = CopilotCompletionParams { language: language.to_string(), 37 | next_indent: 0, 38 | trim_by_indentation: true, 39 | prompt_tokens: prompt.len() as i32, 40 | suffix_tokens: suffix.len() as i32 41 | }; 42 | let body = Some(CopilotCompletionRequest { 43 | prompt, 44 | suffix, 45 | max_tokens: 500, 46 | temperature: 1.0, 47 | top_p: 1.0, 48 | n: 3, 49 | stop: ["unset".to_string()].to_vec(), 50 | nwo: "my_org/my_repo".to_string(), 51 | stream: true, 52 | extra 53 | }); 54 | let body = serde_json::to_string(&body).unwrap(); 55 | let completions_url = "https://copilot-proxy.githubusercontent.com/v1/engines/copilot-codex/completions"; 56 | http_client.post(completions_url) 57 | .header("X-Request-Id", Uuid::new_v4().to_string()) 58 | .header("VScode-SessionId", Uuid::new_v4().to_string() + &Utc::now().timestamp().to_string()) 59 | .body(body) 60 | } 61 | --------------------------------------------------------------------------------