├── .gitignore ├── README.md └── runtime ├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── example.js └── src ├── main.rs └── minijs.js /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # making a web request from within an isolate 2 | 3 | On the Deno blog, [Roll your own JavaScript runtime](https://deno.com/blog/roll-your-own-javascript-runtime) shows you how to write a JavaScript runtime, based on the V8 JavaScript engine, using parts of Deno. The example code can read and write to files and has a simplified console API. 4 | 5 | This repository builds on that runtime and adds a global object called `request` that lets you make GET/POST web requests from within the runtime. 6 | 7 | The bindings for `request` are set up in `runtime/src/main.rs` and `runtime/src/minijs.js`. 8 | 9 | e.g. 10 | 11 | ```js 12 | const getExample = await request.get("http://healeycodes.com", { 13 | "someHeaderKey": "someHeaderValue", 14 | }); 15 | console.log({ 16 | status: getExample.status, 17 | headers: getExample.headers, 18 | url: getExample.url, 19 | body: getExample.body, 20 | }); 21 | ``` 22 | 23 | I'm not super familiar with the Deno project, so I've only worked on this enough to get it working – I'm not using _Denoisms_ like zero-copy, etc. 24 | 25 | ## HTTP Server 26 | 27 | There's also a HTTP server that accepts user code and evaluates it within the runtime. 28 | 29 | So to play around, you can run the server with `cargo run` and then send some code like `curl -X POST -d 'console.log(await request.get("https://healeycodes.com", {}));' localhost:3000`. `console.log` prints to the server's stdout. 30 | 31 | Errors are returned to the client e.g. `curl -X POST -d 'unknown;' localhost:3000` sends back `ReferenceError: unknown is not defined at at ...` 32 | 33 | For real production example, look at how Deno's `fetch` function is setup: https://github.com/denoland/deno/tree/main/ext/fetch 34 | 35 | ## Run 36 | 37 | Run the server: `cd runtime && cargo run` 38 | 39 | Send some code: `curl -X POST -d 'unknown;' localhost:3000` 40 | -------------------------------------------------------------------------------- /runtime/.gitignore: -------------------------------------------------------------------------------- 1 | /target -------------------------------------------------------------------------------- /runtime/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "adler" 7 | version = "1.0.2" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" 10 | 11 | [[package]] 12 | name = "adler32" 13 | version = "1.2.0" 14 | source = "registry+https://github.com/rust-lang/crates.io-index" 15 | checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234" 16 | 17 | [[package]] 18 | name = "aho-corasick" 19 | version = "0.7.20" 20 | source = "registry+https://github.com/rust-lang/crates.io-index" 21 | checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" 22 | dependencies = [ 23 | "memchr", 24 | ] 25 | 26 | [[package]] 27 | name = "alloc-no-stdlib" 28 | version = "2.0.4" 29 | source = "registry+https://github.com/rust-lang/crates.io-index" 30 | checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" 31 | 32 | [[package]] 33 | name = "alloc-stdlib" 34 | version = "0.2.2" 35 | source = "registry+https://github.com/rust-lang/crates.io-index" 36 | checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" 37 | dependencies = [ 38 | "alloc-no-stdlib", 39 | ] 40 | 41 | [[package]] 42 | name = "android_system_properties" 43 | version = "0.1.5" 44 | source = "registry+https://github.com/rust-lang/crates.io-index" 45 | checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" 46 | dependencies = [ 47 | "libc", 48 | ] 49 | 50 | [[package]] 51 | name = "anyhow" 52 | version = "1.0.69" 53 | source = "registry+https://github.com/rust-lang/crates.io-index" 54 | checksum = "224afbd727c3d6e4b90103ece64b8d1b67fbb1973b1046c2281eed3f3803f800" 55 | 56 | [[package]] 57 | name = "ascii" 58 | version = "1.1.0" 59 | source = "registry+https://github.com/rust-lang/crates.io-index" 60 | checksum = "d92bec98840b8f03a5ff5413de5293bfcd8bf96467cf5452609f939ec6f5de16" 61 | 62 | [[package]] 63 | name = "async-compression" 64 | version = "0.3.15" 65 | source = "registry+https://github.com/rust-lang/crates.io-index" 66 | checksum = "942c7cd7ae39e91bde4820d74132e9862e62c2f386c3aa90ccf55949f5bad63a" 67 | dependencies = [ 68 | "brotli", 69 | "flate2", 70 | "futures-core", 71 | "memchr", 72 | "pin-project-lite", 73 | "tokio", 74 | ] 75 | 76 | [[package]] 77 | name = "autocfg" 78 | version = "1.1.0" 79 | source = "registry+https://github.com/rust-lang/crates.io-index" 80 | checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" 81 | 82 | [[package]] 83 | name = "base64" 84 | version = "0.13.1" 85 | source = "registry+https://github.com/rust-lang/crates.io-index" 86 | checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" 87 | 88 | [[package]] 89 | name = "base64" 90 | version = "0.21.0" 91 | source = "registry+https://github.com/rust-lang/crates.io-index" 92 | checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" 93 | 94 | [[package]] 95 | name = "bitflags" 96 | version = "1.3.2" 97 | source = "registry+https://github.com/rust-lang/crates.io-index" 98 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 99 | 100 | [[package]] 101 | name = "block-buffer" 102 | version = "0.10.3" 103 | source = "registry+https://github.com/rust-lang/crates.io-index" 104 | checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" 105 | dependencies = [ 106 | "generic-array", 107 | ] 108 | 109 | [[package]] 110 | name = "brotli" 111 | version = "3.3.4" 112 | source = "registry+https://github.com/rust-lang/crates.io-index" 113 | checksum = "a1a0b1dbcc8ae29329621f8d4f0d835787c1c38bb1401979b49d13b0b305ff68" 114 | dependencies = [ 115 | "alloc-no-stdlib", 116 | "alloc-stdlib", 117 | "brotli-decompressor", 118 | ] 119 | 120 | [[package]] 121 | name = "brotli-decompressor" 122 | version = "2.3.4" 123 | source = "registry+https://github.com/rust-lang/crates.io-index" 124 | checksum = "4b6561fd3f895a11e8f72af2cb7d22e08366bebc2b6b57f7744c4bda27034744" 125 | dependencies = [ 126 | "alloc-no-stdlib", 127 | "alloc-stdlib", 128 | ] 129 | 130 | [[package]] 131 | name = "buf_redux" 132 | version = "0.8.4" 133 | source = "registry+https://github.com/rust-lang/crates.io-index" 134 | checksum = "b953a6887648bb07a535631f2bc00fbdb2a2216f135552cb3f534ed136b9c07f" 135 | dependencies = [ 136 | "memchr", 137 | "safemem", 138 | ] 139 | 140 | [[package]] 141 | name = "bumpalo" 142 | version = "3.12.0" 143 | source = "registry+https://github.com/rust-lang/crates.io-index" 144 | checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" 145 | 146 | [[package]] 147 | name = "bytes" 148 | version = "1.2.1" 149 | source = "registry+https://github.com/rust-lang/crates.io-index" 150 | checksum = "ec8a7b6a70fde80372154c65702f00a0f56f3e1c36abbc6c440484be248856db" 151 | 152 | [[package]] 153 | name = "cc" 154 | version = "1.0.79" 155 | source = "registry+https://github.com/rust-lang/crates.io-index" 156 | checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" 157 | 158 | [[package]] 159 | name = "cfg-if" 160 | version = "1.0.0" 161 | source = "registry+https://github.com/rust-lang/crates.io-index" 162 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 163 | 164 | [[package]] 165 | name = "chrono" 166 | version = "0.4.23" 167 | source = "registry+https://github.com/rust-lang/crates.io-index" 168 | checksum = "16b0a3d9ed01224b22057780a37bb8c5dbfe1be8ba48678e7bf57ec4b385411f" 169 | dependencies = [ 170 | "iana-time-zone", 171 | "num-integer", 172 | "num-traits", 173 | "winapi", 174 | ] 175 | 176 | [[package]] 177 | name = "chunked_transfer" 178 | version = "1.4.1" 179 | source = "registry+https://github.com/rust-lang/crates.io-index" 180 | checksum = "cca491388666e04d7248af3f60f0c40cfb0991c72205595d7c396e3510207d1a" 181 | 182 | [[package]] 183 | name = "codespan-reporting" 184 | version = "0.11.1" 185 | source = "registry+https://github.com/rust-lang/crates.io-index" 186 | checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" 187 | dependencies = [ 188 | "termcolor", 189 | "unicode-width", 190 | ] 191 | 192 | [[package]] 193 | name = "convert_case" 194 | version = "0.4.0" 195 | source = "registry+https://github.com/rust-lang/crates.io-index" 196 | checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" 197 | 198 | [[package]] 199 | name = "core-foundation" 200 | version = "0.9.3" 201 | source = "registry+https://github.com/rust-lang/crates.io-index" 202 | checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" 203 | dependencies = [ 204 | "core-foundation-sys", 205 | "libc", 206 | ] 207 | 208 | [[package]] 209 | name = "core-foundation-sys" 210 | version = "0.8.3" 211 | source = "registry+https://github.com/rust-lang/crates.io-index" 212 | checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" 213 | 214 | [[package]] 215 | name = "cpufeatures" 216 | version = "0.2.5" 217 | source = "registry+https://github.com/rust-lang/crates.io-index" 218 | checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" 219 | dependencies = [ 220 | "libc", 221 | ] 222 | 223 | [[package]] 224 | name = "crc32fast" 225 | version = "1.3.2" 226 | source = "registry+https://github.com/rust-lang/crates.io-index" 227 | checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" 228 | dependencies = [ 229 | "cfg-if", 230 | ] 231 | 232 | [[package]] 233 | name = "crypto-common" 234 | version = "0.1.6" 235 | source = "registry+https://github.com/rust-lang/crates.io-index" 236 | checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" 237 | dependencies = [ 238 | "generic-array", 239 | "typenum", 240 | ] 241 | 242 | [[package]] 243 | name = "cxx" 244 | version = "1.0.89" 245 | source = "registry+https://github.com/rust-lang/crates.io-index" 246 | checksum = "bc831ee6a32dd495436e317595e639a587aa9907bef96fe6e6abc290ab6204e9" 247 | dependencies = [ 248 | "cc", 249 | "cxxbridge-flags", 250 | "cxxbridge-macro", 251 | "link-cplusplus", 252 | ] 253 | 254 | [[package]] 255 | name = "cxx-build" 256 | version = "1.0.89" 257 | source = "registry+https://github.com/rust-lang/crates.io-index" 258 | checksum = "94331d54f1b1a8895cd81049f7eaaaef9d05a7dcb4d1fd08bf3ff0806246789d" 259 | dependencies = [ 260 | "cc", 261 | "codespan-reporting", 262 | "once_cell", 263 | "proc-macro2", 264 | "quote", 265 | "scratch", 266 | "syn", 267 | ] 268 | 269 | [[package]] 270 | name = "cxxbridge-flags" 271 | version = "1.0.89" 272 | source = "registry+https://github.com/rust-lang/crates.io-index" 273 | checksum = "48dcd35ba14ca9b40d6e4b4b39961f23d835dbb8eed74565ded361d93e1feb8a" 274 | 275 | [[package]] 276 | name = "cxxbridge-macro" 277 | version = "1.0.89" 278 | source = "registry+https://github.com/rust-lang/crates.io-index" 279 | checksum = "81bbeb29798b407ccd82a3324ade1a7286e0d29851475990b612670f6f5124d2" 280 | dependencies = [ 281 | "proc-macro2", 282 | "quote", 283 | "syn", 284 | ] 285 | 286 | [[package]] 287 | name = "data-url" 288 | version = "0.2.0" 289 | source = "registry+https://github.com/rust-lang/crates.io-index" 290 | checksum = "8d7439c3735f405729d52c3fbbe4de140eaf938a1fe47d227c27f8254d4302a5" 291 | 292 | [[package]] 293 | name = "deflate" 294 | version = "1.0.0" 295 | source = "registry+https://github.com/rust-lang/crates.io-index" 296 | checksum = "c86f7e25f518f4b81808a2cf1c50996a61f5c2eb394b2393bd87f2a4780a432f" 297 | dependencies = [ 298 | "adler32", 299 | "gzip-header", 300 | ] 301 | 302 | [[package]] 303 | name = "deno_core" 304 | version = "0.171.0" 305 | source = "registry+https://github.com/rust-lang/crates.io-index" 306 | checksum = "2dc41944f05dfeacfc2610e91f40ddcf246f3aeeac8ae4c26df46bfbf01a3902" 307 | dependencies = [ 308 | "anyhow", 309 | "bytes", 310 | "deno_ops", 311 | "futures", 312 | "indexmap", 313 | "libc", 314 | "log", 315 | "once_cell", 316 | "parking_lot", 317 | "pin-project", 318 | "serde", 319 | "serde_json", 320 | "serde_v8", 321 | "smallvec", 322 | "sourcemap", 323 | "url", 324 | "v8", 325 | ] 326 | 327 | [[package]] 328 | name = "deno_fetch" 329 | version = "0.113.0" 330 | source = "registry+https://github.com/rust-lang/crates.io-index" 331 | checksum = "64c2ec54d6332b454cad9391e8b9c33edce79837ece8ffaca0f08ab957f78590" 332 | dependencies = [ 333 | "bytes", 334 | "data-url", 335 | "deno_core", 336 | "deno_tls", 337 | "dyn-clone", 338 | "http", 339 | "reqwest", 340 | "serde", 341 | "tokio", 342 | "tokio-stream", 343 | "tokio-util", 344 | ] 345 | 346 | [[package]] 347 | name = "deno_ops" 348 | version = "0.49.0" 349 | source = "registry+https://github.com/rust-lang/crates.io-index" 350 | checksum = "4740bc5738ad07dc1f523a232a4079a995fa2ad11efd71e09e8e32bf28f21ee1" 351 | dependencies = [ 352 | "once_cell", 353 | "pmutil", 354 | "proc-macro-crate", 355 | "proc-macro2", 356 | "quote", 357 | "regex", 358 | "syn", 359 | ] 360 | 361 | [[package]] 362 | name = "deno_tls" 363 | version = "0.76.0" 364 | source = "registry+https://github.com/rust-lang/crates.io-index" 365 | checksum = "94b82b9b18941a42be4108f79f14e8b5a29067e27619293d710324e0dd77d5d8" 366 | dependencies = [ 367 | "deno_core", 368 | "once_cell", 369 | "rustls", 370 | "rustls-native-certs", 371 | "rustls-pemfile", 372 | "serde", 373 | "webpki", 374 | "webpki-roots", 375 | ] 376 | 377 | [[package]] 378 | name = "derive_more" 379 | version = "0.99.17" 380 | source = "registry+https://github.com/rust-lang/crates.io-index" 381 | checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" 382 | dependencies = [ 383 | "convert_case", 384 | "proc-macro2", 385 | "quote", 386 | "rustc_version 0.4.0", 387 | "syn", 388 | ] 389 | 390 | [[package]] 391 | name = "digest" 392 | version = "0.10.6" 393 | source = "registry+https://github.com/rust-lang/crates.io-index" 394 | checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" 395 | dependencies = [ 396 | "block-buffer", 397 | "crypto-common", 398 | ] 399 | 400 | [[package]] 401 | name = "dyn-clone" 402 | version = "1.0.10" 403 | source = "registry+https://github.com/rust-lang/crates.io-index" 404 | checksum = "c9b0705efd4599c15a38151f4721f7bc388306f61084d3bfd50bd07fbca5cb60" 405 | 406 | [[package]] 407 | name = "either" 408 | version = "1.8.1" 409 | source = "registry+https://github.com/rust-lang/crates.io-index" 410 | checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" 411 | 412 | [[package]] 413 | name = "encoding_rs" 414 | version = "0.8.32" 415 | source = "registry+https://github.com/rust-lang/crates.io-index" 416 | checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" 417 | dependencies = [ 418 | "cfg-if", 419 | ] 420 | 421 | [[package]] 422 | name = "fastrand" 423 | version = "1.8.0" 424 | source = "registry+https://github.com/rust-lang/crates.io-index" 425 | checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" 426 | dependencies = [ 427 | "instant", 428 | ] 429 | 430 | [[package]] 431 | name = "filetime" 432 | version = "0.2.20" 433 | source = "registry+https://github.com/rust-lang/crates.io-index" 434 | checksum = "8a3de6e8d11b22ff9edc6d916f890800597d60f8b2da1caf2955c274638d6412" 435 | dependencies = [ 436 | "cfg-if", 437 | "libc", 438 | "redox_syscall", 439 | "windows-sys 0.45.0", 440 | ] 441 | 442 | [[package]] 443 | name = "flate2" 444 | version = "1.0.25" 445 | source = "registry+https://github.com/rust-lang/crates.io-index" 446 | checksum = "a8a2db397cb1c8772f31494cb8917e48cd1e64f0fa7efac59fbd741a0a8ce841" 447 | dependencies = [ 448 | "crc32fast", 449 | "miniz_oxide", 450 | ] 451 | 452 | [[package]] 453 | name = "fnv" 454 | version = "1.0.7" 455 | source = "registry+https://github.com/rust-lang/crates.io-index" 456 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 457 | 458 | [[package]] 459 | name = "foreign-types" 460 | version = "0.3.2" 461 | source = "registry+https://github.com/rust-lang/crates.io-index" 462 | checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" 463 | dependencies = [ 464 | "foreign-types-shared", 465 | ] 466 | 467 | [[package]] 468 | name = "foreign-types-shared" 469 | version = "0.1.1" 470 | source = "registry+https://github.com/rust-lang/crates.io-index" 471 | checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" 472 | 473 | [[package]] 474 | name = "form_urlencoded" 475 | version = "1.1.0" 476 | source = "registry+https://github.com/rust-lang/crates.io-index" 477 | checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" 478 | dependencies = [ 479 | "percent-encoding", 480 | ] 481 | 482 | [[package]] 483 | name = "fslock" 484 | version = "0.1.8" 485 | source = "registry+https://github.com/rust-lang/crates.io-index" 486 | checksum = "57eafdd0c16f57161105ae1b98a1238f97645f2f588438b2949c99a2af9616bf" 487 | dependencies = [ 488 | "libc", 489 | "winapi", 490 | ] 491 | 492 | [[package]] 493 | name = "futures" 494 | version = "0.3.26" 495 | source = "registry+https://github.com/rust-lang/crates.io-index" 496 | checksum = "13e2792b0ff0340399d58445b88fd9770e3489eff258a4cbc1523418f12abf84" 497 | dependencies = [ 498 | "futures-channel", 499 | "futures-core", 500 | "futures-executor", 501 | "futures-io", 502 | "futures-sink", 503 | "futures-task", 504 | "futures-util", 505 | ] 506 | 507 | [[package]] 508 | name = "futures-channel" 509 | version = "0.3.26" 510 | source = "registry+https://github.com/rust-lang/crates.io-index" 511 | checksum = "2e5317663a9089767a1ec00a487df42e0ca174b61b4483213ac24448e4664df5" 512 | dependencies = [ 513 | "futures-core", 514 | "futures-sink", 515 | ] 516 | 517 | [[package]] 518 | name = "futures-core" 519 | version = "0.3.26" 520 | source = "registry+https://github.com/rust-lang/crates.io-index" 521 | checksum = "ec90ff4d0fe1f57d600049061dc6bb68ed03c7d2fbd697274c41805dcb3f8608" 522 | 523 | [[package]] 524 | name = "futures-executor" 525 | version = "0.3.26" 526 | source = "registry+https://github.com/rust-lang/crates.io-index" 527 | checksum = "e8de0a35a6ab97ec8869e32a2473f4b1324459e14c29275d14b10cb1fd19b50e" 528 | dependencies = [ 529 | "futures-core", 530 | "futures-task", 531 | "futures-util", 532 | ] 533 | 534 | [[package]] 535 | name = "futures-io" 536 | version = "0.3.26" 537 | source = "registry+https://github.com/rust-lang/crates.io-index" 538 | checksum = "bfb8371b6fb2aeb2d280374607aeabfc99d95c72edfe51692e42d3d7f0d08531" 539 | 540 | [[package]] 541 | name = "futures-macro" 542 | version = "0.3.26" 543 | source = "registry+https://github.com/rust-lang/crates.io-index" 544 | checksum = "95a73af87da33b5acf53acfebdc339fe592ecf5357ac7c0a7734ab9d8c876a70" 545 | dependencies = [ 546 | "proc-macro2", 547 | "quote", 548 | "syn", 549 | ] 550 | 551 | [[package]] 552 | name = "futures-sink" 553 | version = "0.3.26" 554 | source = "registry+https://github.com/rust-lang/crates.io-index" 555 | checksum = "f310820bb3e8cfd46c80db4d7fb8353e15dfff853a127158425f31e0be6c8364" 556 | 557 | [[package]] 558 | name = "futures-task" 559 | version = "0.3.26" 560 | source = "registry+https://github.com/rust-lang/crates.io-index" 561 | checksum = "dcf79a1bf610b10f42aea489289c5a2c478a786509693b80cd39c44ccd936366" 562 | 563 | [[package]] 564 | name = "futures-util" 565 | version = "0.3.26" 566 | source = "registry+https://github.com/rust-lang/crates.io-index" 567 | checksum = "9c1d6de3acfef38d2be4b1f543f553131788603495be83da675e180c8d6b7bd1" 568 | dependencies = [ 569 | "futures-channel", 570 | "futures-core", 571 | "futures-io", 572 | "futures-macro", 573 | "futures-sink", 574 | "futures-task", 575 | "memchr", 576 | "pin-project-lite", 577 | "pin-utils", 578 | "slab", 579 | ] 580 | 581 | [[package]] 582 | name = "generic-array" 583 | version = "0.14.6" 584 | source = "registry+https://github.com/rust-lang/crates.io-index" 585 | checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" 586 | dependencies = [ 587 | "typenum", 588 | "version_check", 589 | ] 590 | 591 | [[package]] 592 | name = "getrandom" 593 | version = "0.2.8" 594 | source = "registry+https://github.com/rust-lang/crates.io-index" 595 | checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" 596 | dependencies = [ 597 | "cfg-if", 598 | "libc", 599 | "wasi", 600 | ] 601 | 602 | [[package]] 603 | name = "gzip-header" 604 | version = "1.0.0" 605 | source = "registry+https://github.com/rust-lang/crates.io-index" 606 | checksum = "95cc527b92e6029a62960ad99aa8a6660faa4555fe5f731aab13aa6a921795a2" 607 | dependencies = [ 608 | "crc32fast", 609 | ] 610 | 611 | [[package]] 612 | name = "h2" 613 | version = "0.3.15" 614 | source = "registry+https://github.com/rust-lang/crates.io-index" 615 | checksum = "5f9f29bc9dda355256b2916cf526ab02ce0aeaaaf2bad60d65ef3f12f11dd0f4" 616 | dependencies = [ 617 | "bytes", 618 | "fnv", 619 | "futures-core", 620 | "futures-sink", 621 | "futures-util", 622 | "http", 623 | "indexmap", 624 | "slab", 625 | "tokio", 626 | "tokio-util", 627 | "tracing", 628 | ] 629 | 630 | [[package]] 631 | name = "hashbrown" 632 | version = "0.12.3" 633 | source = "registry+https://github.com/rust-lang/crates.io-index" 634 | checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" 635 | 636 | [[package]] 637 | name = "hermit-abi" 638 | version = "0.2.6" 639 | source = "registry+https://github.com/rust-lang/crates.io-index" 640 | checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" 641 | dependencies = [ 642 | "libc", 643 | ] 644 | 645 | [[package]] 646 | name = "http" 647 | version = "0.2.8" 648 | source = "registry+https://github.com/rust-lang/crates.io-index" 649 | checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" 650 | dependencies = [ 651 | "bytes", 652 | "fnv", 653 | "itoa", 654 | ] 655 | 656 | [[package]] 657 | name = "http-body" 658 | version = "0.4.5" 659 | source = "registry+https://github.com/rust-lang/crates.io-index" 660 | checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" 661 | dependencies = [ 662 | "bytes", 663 | "http", 664 | "pin-project-lite", 665 | ] 666 | 667 | [[package]] 668 | name = "httparse" 669 | version = "1.8.0" 670 | source = "registry+https://github.com/rust-lang/crates.io-index" 671 | checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" 672 | 673 | [[package]] 674 | name = "httpdate" 675 | version = "1.0.2" 676 | source = "registry+https://github.com/rust-lang/crates.io-index" 677 | checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" 678 | 679 | [[package]] 680 | name = "hyper" 681 | version = "0.14.24" 682 | source = "registry+https://github.com/rust-lang/crates.io-index" 683 | checksum = "5e011372fa0b68db8350aa7a248930ecc7839bf46d8485577d69f117a75f164c" 684 | dependencies = [ 685 | "bytes", 686 | "futures-channel", 687 | "futures-core", 688 | "futures-util", 689 | "h2", 690 | "http", 691 | "http-body", 692 | "httparse", 693 | "httpdate", 694 | "itoa", 695 | "pin-project-lite", 696 | "socket2", 697 | "tokio", 698 | "tower-service", 699 | "tracing", 700 | "want", 701 | ] 702 | 703 | [[package]] 704 | name = "hyper-rustls" 705 | version = "0.23.2" 706 | source = "registry+https://github.com/rust-lang/crates.io-index" 707 | checksum = "1788965e61b367cd03a62950836d5cd41560c3577d90e40e0819373194d1661c" 708 | dependencies = [ 709 | "http", 710 | "hyper", 711 | "rustls", 712 | "tokio", 713 | "tokio-rustls", 714 | ] 715 | 716 | [[package]] 717 | name = "hyper-tls" 718 | version = "0.5.0" 719 | source = "registry+https://github.com/rust-lang/crates.io-index" 720 | checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" 721 | dependencies = [ 722 | "bytes", 723 | "hyper", 724 | "native-tls", 725 | "tokio", 726 | "tokio-native-tls", 727 | ] 728 | 729 | [[package]] 730 | name = "iana-time-zone" 731 | version = "0.1.53" 732 | source = "registry+https://github.com/rust-lang/crates.io-index" 733 | checksum = "64c122667b287044802d6ce17ee2ddf13207ed924c712de9a66a5814d5b64765" 734 | dependencies = [ 735 | "android_system_properties", 736 | "core-foundation-sys", 737 | "iana-time-zone-haiku", 738 | "js-sys", 739 | "wasm-bindgen", 740 | "winapi", 741 | ] 742 | 743 | [[package]] 744 | name = "iana-time-zone-haiku" 745 | version = "0.1.1" 746 | source = "registry+https://github.com/rust-lang/crates.io-index" 747 | checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca" 748 | dependencies = [ 749 | "cxx", 750 | "cxx-build", 751 | ] 752 | 753 | [[package]] 754 | name = "idna" 755 | version = "0.3.0" 756 | source = "registry+https://github.com/rust-lang/crates.io-index" 757 | checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" 758 | dependencies = [ 759 | "unicode-bidi", 760 | "unicode-normalization", 761 | ] 762 | 763 | [[package]] 764 | name = "if_chain" 765 | version = "1.0.2" 766 | source = "registry+https://github.com/rust-lang/crates.io-index" 767 | checksum = "cb56e1aa765b4b4f3aadfab769793b7087bb03a4ea4920644a6d238e2df5b9ed" 768 | 769 | [[package]] 770 | name = "indexmap" 771 | version = "1.9.2" 772 | source = "registry+https://github.com/rust-lang/crates.io-index" 773 | checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" 774 | dependencies = [ 775 | "autocfg", 776 | "hashbrown", 777 | ] 778 | 779 | [[package]] 780 | name = "instant" 781 | version = "0.1.12" 782 | source = "registry+https://github.com/rust-lang/crates.io-index" 783 | checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" 784 | dependencies = [ 785 | "cfg-if", 786 | ] 787 | 788 | [[package]] 789 | name = "ipnet" 790 | version = "2.7.1" 791 | source = "registry+https://github.com/rust-lang/crates.io-index" 792 | checksum = "30e22bd8629359895450b59ea7a776c850561b96a3b1d31321c1949d9e6c9146" 793 | 794 | [[package]] 795 | name = "itoa" 796 | version = "1.0.5" 797 | source = "registry+https://github.com/rust-lang/crates.io-index" 798 | checksum = "fad582f4b9e86b6caa621cabeb0963332d92eea04729ab12892c2533951e6440" 799 | 800 | [[package]] 801 | name = "js-sys" 802 | version = "0.3.61" 803 | source = "registry+https://github.com/rust-lang/crates.io-index" 804 | checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730" 805 | dependencies = [ 806 | "wasm-bindgen", 807 | ] 808 | 809 | [[package]] 810 | name = "lazy_static" 811 | version = "1.4.0" 812 | source = "registry+https://github.com/rust-lang/crates.io-index" 813 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 814 | 815 | [[package]] 816 | name = "libc" 817 | version = "0.2.139" 818 | source = "registry+https://github.com/rust-lang/crates.io-index" 819 | checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" 820 | 821 | [[package]] 822 | name = "link-cplusplus" 823 | version = "1.0.8" 824 | source = "registry+https://github.com/rust-lang/crates.io-index" 825 | checksum = "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5" 826 | dependencies = [ 827 | "cc", 828 | ] 829 | 830 | [[package]] 831 | name = "lock_api" 832 | version = "0.4.9" 833 | source = "registry+https://github.com/rust-lang/crates.io-index" 834 | checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" 835 | dependencies = [ 836 | "autocfg", 837 | "scopeguard", 838 | ] 839 | 840 | [[package]] 841 | name = "log" 842 | version = "0.4.17" 843 | source = "registry+https://github.com/rust-lang/crates.io-index" 844 | checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" 845 | dependencies = [ 846 | "cfg-if", 847 | ] 848 | 849 | [[package]] 850 | name = "memchr" 851 | version = "2.5.0" 852 | source = "registry+https://github.com/rust-lang/crates.io-index" 853 | checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" 854 | 855 | [[package]] 856 | name = "mime" 857 | version = "0.3.16" 858 | source = "registry+https://github.com/rust-lang/crates.io-index" 859 | checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" 860 | 861 | [[package]] 862 | name = "mime_guess" 863 | version = "2.0.4" 864 | source = "registry+https://github.com/rust-lang/crates.io-index" 865 | checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef" 866 | dependencies = [ 867 | "mime", 868 | "unicase", 869 | ] 870 | 871 | [[package]] 872 | name = "miniz_oxide" 873 | version = "0.6.2" 874 | source = "registry+https://github.com/rust-lang/crates.io-index" 875 | checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" 876 | dependencies = [ 877 | "adler", 878 | ] 879 | 880 | [[package]] 881 | name = "mio" 882 | version = "0.8.5" 883 | source = "registry+https://github.com/rust-lang/crates.io-index" 884 | checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" 885 | dependencies = [ 886 | "libc", 887 | "log", 888 | "wasi", 889 | "windows-sys 0.42.0", 890 | ] 891 | 892 | [[package]] 893 | name = "multipart" 894 | version = "0.18.0" 895 | source = "registry+https://github.com/rust-lang/crates.io-index" 896 | checksum = "00dec633863867f29cb39df64a397cdf4a6354708ddd7759f70c7fb51c5f9182" 897 | dependencies = [ 898 | "buf_redux", 899 | "httparse", 900 | "log", 901 | "mime", 902 | "mime_guess", 903 | "quick-error", 904 | "rand", 905 | "safemem", 906 | "tempfile", 907 | "twoway", 908 | ] 909 | 910 | [[package]] 911 | name = "native-tls" 912 | version = "0.2.11" 913 | source = "registry+https://github.com/rust-lang/crates.io-index" 914 | checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" 915 | dependencies = [ 916 | "lazy_static", 917 | "libc", 918 | "log", 919 | "openssl", 920 | "openssl-probe", 921 | "openssl-sys", 922 | "schannel", 923 | "security-framework", 924 | "security-framework-sys", 925 | "tempfile", 926 | ] 927 | 928 | [[package]] 929 | name = "nom8" 930 | version = "0.2.0" 931 | source = "registry+https://github.com/rust-lang/crates.io-index" 932 | checksum = "ae01545c9c7fc4486ab7debaf2aad7003ac19431791868fb2e8066df97fad2f8" 933 | dependencies = [ 934 | "memchr", 935 | ] 936 | 937 | [[package]] 938 | name = "num-integer" 939 | version = "0.1.45" 940 | source = "registry+https://github.com/rust-lang/crates.io-index" 941 | checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" 942 | dependencies = [ 943 | "autocfg", 944 | "num-traits", 945 | ] 946 | 947 | [[package]] 948 | name = "num-traits" 949 | version = "0.2.15" 950 | source = "registry+https://github.com/rust-lang/crates.io-index" 951 | checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" 952 | dependencies = [ 953 | "autocfg", 954 | ] 955 | 956 | [[package]] 957 | name = "num_cpus" 958 | version = "1.15.0" 959 | source = "registry+https://github.com/rust-lang/crates.io-index" 960 | checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" 961 | dependencies = [ 962 | "hermit-abi", 963 | "libc", 964 | ] 965 | 966 | [[package]] 967 | name = "num_threads" 968 | version = "0.1.6" 969 | source = "registry+https://github.com/rust-lang/crates.io-index" 970 | checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" 971 | dependencies = [ 972 | "libc", 973 | ] 974 | 975 | [[package]] 976 | name = "once_cell" 977 | version = "1.16.0" 978 | source = "registry+https://github.com/rust-lang/crates.io-index" 979 | checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" 980 | 981 | [[package]] 982 | name = "openssl" 983 | version = "0.10.45" 984 | source = "registry+https://github.com/rust-lang/crates.io-index" 985 | checksum = "b102428fd03bc5edf97f62620f7298614c45cedf287c271e7ed450bbaf83f2e1" 986 | dependencies = [ 987 | "bitflags", 988 | "cfg-if", 989 | "foreign-types", 990 | "libc", 991 | "once_cell", 992 | "openssl-macros", 993 | "openssl-sys", 994 | ] 995 | 996 | [[package]] 997 | name = "openssl-macros" 998 | version = "0.1.0" 999 | source = "registry+https://github.com/rust-lang/crates.io-index" 1000 | checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" 1001 | dependencies = [ 1002 | "proc-macro2", 1003 | "quote", 1004 | "syn", 1005 | ] 1006 | 1007 | [[package]] 1008 | name = "openssl-probe" 1009 | version = "0.1.5" 1010 | source = "registry+https://github.com/rust-lang/crates.io-index" 1011 | checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" 1012 | 1013 | [[package]] 1014 | name = "openssl-sys" 1015 | version = "0.9.80" 1016 | source = "registry+https://github.com/rust-lang/crates.io-index" 1017 | checksum = "23bbbf7854cd45b83958ebe919f0e8e516793727652e27fda10a8384cfc790b7" 1018 | dependencies = [ 1019 | "autocfg", 1020 | "cc", 1021 | "libc", 1022 | "pkg-config", 1023 | "vcpkg", 1024 | ] 1025 | 1026 | [[package]] 1027 | name = "parking_lot" 1028 | version = "0.12.1" 1029 | source = "registry+https://github.com/rust-lang/crates.io-index" 1030 | checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" 1031 | dependencies = [ 1032 | "lock_api", 1033 | "parking_lot_core", 1034 | ] 1035 | 1036 | [[package]] 1037 | name = "parking_lot_core" 1038 | version = "0.9.7" 1039 | source = "registry+https://github.com/rust-lang/crates.io-index" 1040 | checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" 1041 | dependencies = [ 1042 | "cfg-if", 1043 | "libc", 1044 | "redox_syscall", 1045 | "smallvec", 1046 | "windows-sys 0.45.0", 1047 | ] 1048 | 1049 | [[package]] 1050 | name = "percent-encoding" 1051 | version = "2.2.0" 1052 | source = "registry+https://github.com/rust-lang/crates.io-index" 1053 | checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" 1054 | 1055 | [[package]] 1056 | name = "pin-project" 1057 | version = "1.0.12" 1058 | source = "registry+https://github.com/rust-lang/crates.io-index" 1059 | checksum = "ad29a609b6bcd67fee905812e544992d216af9d755757c05ed2d0e15a74c6ecc" 1060 | dependencies = [ 1061 | "pin-project-internal", 1062 | ] 1063 | 1064 | [[package]] 1065 | name = "pin-project-internal" 1066 | version = "1.0.12" 1067 | source = "registry+https://github.com/rust-lang/crates.io-index" 1068 | checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" 1069 | dependencies = [ 1070 | "proc-macro2", 1071 | "quote", 1072 | "syn", 1073 | ] 1074 | 1075 | [[package]] 1076 | name = "pin-project-lite" 1077 | version = "0.2.9" 1078 | source = "registry+https://github.com/rust-lang/crates.io-index" 1079 | checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" 1080 | 1081 | [[package]] 1082 | name = "pin-utils" 1083 | version = "0.1.0" 1084 | source = "registry+https://github.com/rust-lang/crates.io-index" 1085 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 1086 | 1087 | [[package]] 1088 | name = "pkg-config" 1089 | version = "0.3.26" 1090 | source = "registry+https://github.com/rust-lang/crates.io-index" 1091 | checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" 1092 | 1093 | [[package]] 1094 | name = "pmutil" 1095 | version = "0.5.3" 1096 | source = "registry+https://github.com/rust-lang/crates.io-index" 1097 | checksum = "3894e5d549cccbe44afecf72922f277f603cd4bb0219c8342631ef18fffbe004" 1098 | dependencies = [ 1099 | "proc-macro2", 1100 | "quote", 1101 | "syn", 1102 | ] 1103 | 1104 | [[package]] 1105 | name = "ppv-lite86" 1106 | version = "0.2.17" 1107 | source = "registry+https://github.com/rust-lang/crates.io-index" 1108 | checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" 1109 | 1110 | [[package]] 1111 | name = "proc-macro-crate" 1112 | version = "1.3.0" 1113 | source = "registry+https://github.com/rust-lang/crates.io-index" 1114 | checksum = "66618389e4ec1c7afe67d51a9bf34ff9236480f8d51e7489b7d5ab0303c13f34" 1115 | dependencies = [ 1116 | "once_cell", 1117 | "toml_edit", 1118 | ] 1119 | 1120 | [[package]] 1121 | name = "proc-macro2" 1122 | version = "1.0.51" 1123 | source = "registry+https://github.com/rust-lang/crates.io-index" 1124 | checksum = "5d727cae5b39d21da60fa540906919ad737832fe0b1c165da3a34d6548c849d6" 1125 | dependencies = [ 1126 | "unicode-ident", 1127 | ] 1128 | 1129 | [[package]] 1130 | name = "quick-error" 1131 | version = "1.2.3" 1132 | source = "registry+https://github.com/rust-lang/crates.io-index" 1133 | checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" 1134 | 1135 | [[package]] 1136 | name = "quote" 1137 | version = "1.0.23" 1138 | source = "registry+https://github.com/rust-lang/crates.io-index" 1139 | checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" 1140 | dependencies = [ 1141 | "proc-macro2", 1142 | ] 1143 | 1144 | [[package]] 1145 | name = "rand" 1146 | version = "0.8.5" 1147 | source = "registry+https://github.com/rust-lang/crates.io-index" 1148 | checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 1149 | dependencies = [ 1150 | "libc", 1151 | "rand_chacha", 1152 | "rand_core", 1153 | ] 1154 | 1155 | [[package]] 1156 | name = "rand_chacha" 1157 | version = "0.3.1" 1158 | source = "registry+https://github.com/rust-lang/crates.io-index" 1159 | checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 1160 | dependencies = [ 1161 | "ppv-lite86", 1162 | "rand_core", 1163 | ] 1164 | 1165 | [[package]] 1166 | name = "rand_core" 1167 | version = "0.6.4" 1168 | source = "registry+https://github.com/rust-lang/crates.io-index" 1169 | checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" 1170 | dependencies = [ 1171 | "getrandom", 1172 | ] 1173 | 1174 | [[package]] 1175 | name = "redox_syscall" 1176 | version = "0.2.16" 1177 | source = "registry+https://github.com/rust-lang/crates.io-index" 1178 | checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" 1179 | dependencies = [ 1180 | "bitflags", 1181 | ] 1182 | 1183 | [[package]] 1184 | name = "regex" 1185 | version = "1.6.0" 1186 | source = "registry+https://github.com/rust-lang/crates.io-index" 1187 | checksum = "4c4eb3267174b8c6c2f654116623910a0fef09c4753f8dd83db29c48a0df988b" 1188 | dependencies = [ 1189 | "aho-corasick", 1190 | "memchr", 1191 | "regex-syntax", 1192 | ] 1193 | 1194 | [[package]] 1195 | name = "regex-syntax" 1196 | version = "0.6.28" 1197 | source = "registry+https://github.com/rust-lang/crates.io-index" 1198 | checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" 1199 | 1200 | [[package]] 1201 | name = "remove_dir_all" 1202 | version = "0.5.3" 1203 | source = "registry+https://github.com/rust-lang/crates.io-index" 1204 | checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" 1205 | dependencies = [ 1206 | "winapi", 1207 | ] 1208 | 1209 | [[package]] 1210 | name = "reqwest" 1211 | version = "0.11.14" 1212 | source = "registry+https://github.com/rust-lang/crates.io-index" 1213 | checksum = "21eed90ec8570952d53b772ecf8f206aa1ec9a3d76b2521c56c42973f2d91ee9" 1214 | dependencies = [ 1215 | "async-compression", 1216 | "base64 0.21.0", 1217 | "bytes", 1218 | "encoding_rs", 1219 | "futures-core", 1220 | "futures-util", 1221 | "h2", 1222 | "http", 1223 | "http-body", 1224 | "hyper", 1225 | "hyper-rustls", 1226 | "hyper-tls", 1227 | "ipnet", 1228 | "js-sys", 1229 | "log", 1230 | "mime", 1231 | "native-tls", 1232 | "once_cell", 1233 | "percent-encoding", 1234 | "pin-project-lite", 1235 | "rustls", 1236 | "rustls-pemfile", 1237 | "serde", 1238 | "serde_json", 1239 | "serde_urlencoded", 1240 | "tokio", 1241 | "tokio-native-tls", 1242 | "tokio-rustls", 1243 | "tokio-socks", 1244 | "tokio-util", 1245 | "tower-service", 1246 | "url", 1247 | "wasm-bindgen", 1248 | "wasm-bindgen-futures", 1249 | "wasm-streams", 1250 | "web-sys", 1251 | "webpki-roots", 1252 | "winreg", 1253 | ] 1254 | 1255 | [[package]] 1256 | name = "ring" 1257 | version = "0.16.20" 1258 | source = "registry+https://github.com/rust-lang/crates.io-index" 1259 | checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" 1260 | dependencies = [ 1261 | "cc", 1262 | "libc", 1263 | "once_cell", 1264 | "spin", 1265 | "untrusted", 1266 | "web-sys", 1267 | "winapi", 1268 | ] 1269 | 1270 | [[package]] 1271 | name = "rouille" 1272 | version = "3.6.1" 1273 | source = "registry+https://github.com/rust-lang/crates.io-index" 1274 | checksum = "4f86e4c51a773f953f02bbab5fd049f004bfd384341d62da2a079aff812ab176" 1275 | dependencies = [ 1276 | "base64 0.13.1", 1277 | "brotli", 1278 | "chrono", 1279 | "deflate", 1280 | "filetime", 1281 | "multipart", 1282 | "num_cpus", 1283 | "percent-encoding", 1284 | "rand", 1285 | "serde", 1286 | "serde_derive", 1287 | "serde_json", 1288 | "sha1", 1289 | "threadpool", 1290 | "time", 1291 | "tiny_http", 1292 | "url", 1293 | ] 1294 | 1295 | [[package]] 1296 | name = "runtime" 1297 | version = "0.1.0" 1298 | dependencies = [ 1299 | "deno_core", 1300 | "deno_fetch", 1301 | "rand", 1302 | "reqwest", 1303 | "rouille", 1304 | "serde", 1305 | "tokio", 1306 | ] 1307 | 1308 | [[package]] 1309 | name = "rustc_version" 1310 | version = "0.2.3" 1311 | source = "registry+https://github.com/rust-lang/crates.io-index" 1312 | checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" 1313 | dependencies = [ 1314 | "semver 0.9.0", 1315 | ] 1316 | 1317 | [[package]] 1318 | name = "rustc_version" 1319 | version = "0.4.0" 1320 | source = "registry+https://github.com/rust-lang/crates.io-index" 1321 | checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" 1322 | dependencies = [ 1323 | "semver 1.0.16", 1324 | ] 1325 | 1326 | [[package]] 1327 | name = "rustls" 1328 | version = "0.20.8" 1329 | source = "registry+https://github.com/rust-lang/crates.io-index" 1330 | checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" 1331 | dependencies = [ 1332 | "log", 1333 | "ring", 1334 | "sct", 1335 | "webpki", 1336 | ] 1337 | 1338 | [[package]] 1339 | name = "rustls-native-certs" 1340 | version = "0.6.2" 1341 | source = "registry+https://github.com/rust-lang/crates.io-index" 1342 | checksum = "0167bac7a9f490495f3c33013e7722b53cb087ecbe082fb0c6387c96f634ea50" 1343 | dependencies = [ 1344 | "openssl-probe", 1345 | "rustls-pemfile", 1346 | "schannel", 1347 | "security-framework", 1348 | ] 1349 | 1350 | [[package]] 1351 | name = "rustls-pemfile" 1352 | version = "1.0.2" 1353 | source = "registry+https://github.com/rust-lang/crates.io-index" 1354 | checksum = "d194b56d58803a43635bdc398cd17e383d6f71f9182b9a192c127ca42494a59b" 1355 | dependencies = [ 1356 | "base64 0.21.0", 1357 | ] 1358 | 1359 | [[package]] 1360 | name = "ryu" 1361 | version = "1.0.12" 1362 | source = "registry+https://github.com/rust-lang/crates.io-index" 1363 | checksum = "7b4b9743ed687d4b4bcedf9ff5eaa7398495ae14e61cba0a295704edbc7decde" 1364 | 1365 | [[package]] 1366 | name = "safemem" 1367 | version = "0.3.3" 1368 | source = "registry+https://github.com/rust-lang/crates.io-index" 1369 | checksum = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" 1370 | 1371 | [[package]] 1372 | name = "schannel" 1373 | version = "0.1.21" 1374 | source = "registry+https://github.com/rust-lang/crates.io-index" 1375 | checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3" 1376 | dependencies = [ 1377 | "windows-sys 0.42.0", 1378 | ] 1379 | 1380 | [[package]] 1381 | name = "scopeguard" 1382 | version = "1.1.0" 1383 | source = "registry+https://github.com/rust-lang/crates.io-index" 1384 | checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" 1385 | 1386 | [[package]] 1387 | name = "scratch" 1388 | version = "1.0.3" 1389 | source = "registry+https://github.com/rust-lang/crates.io-index" 1390 | checksum = "ddccb15bcce173023b3fedd9436f882a0739b8dfb45e4f6b6002bee5929f61b2" 1391 | 1392 | [[package]] 1393 | name = "sct" 1394 | version = "0.7.0" 1395 | source = "registry+https://github.com/rust-lang/crates.io-index" 1396 | checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" 1397 | dependencies = [ 1398 | "ring", 1399 | "untrusted", 1400 | ] 1401 | 1402 | [[package]] 1403 | name = "security-framework" 1404 | version = "2.8.2" 1405 | source = "registry+https://github.com/rust-lang/crates.io-index" 1406 | checksum = "a332be01508d814fed64bf28f798a146d73792121129962fdf335bb3c49a4254" 1407 | dependencies = [ 1408 | "bitflags", 1409 | "core-foundation", 1410 | "core-foundation-sys", 1411 | "libc", 1412 | "security-framework-sys", 1413 | ] 1414 | 1415 | [[package]] 1416 | name = "security-framework-sys" 1417 | version = "2.8.0" 1418 | source = "registry+https://github.com/rust-lang/crates.io-index" 1419 | checksum = "31c9bb296072e961fcbd8853511dd39c2d8be2deb1e17c6860b1d30732b323b4" 1420 | dependencies = [ 1421 | "core-foundation-sys", 1422 | "libc", 1423 | ] 1424 | 1425 | [[package]] 1426 | name = "semver" 1427 | version = "0.9.0" 1428 | source = "registry+https://github.com/rust-lang/crates.io-index" 1429 | checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" 1430 | dependencies = [ 1431 | "semver-parser", 1432 | ] 1433 | 1434 | [[package]] 1435 | name = "semver" 1436 | version = "1.0.16" 1437 | source = "registry+https://github.com/rust-lang/crates.io-index" 1438 | checksum = "58bc9567378fc7690d6b2addae4e60ac2eeea07becb2c64b9f218b53865cba2a" 1439 | 1440 | [[package]] 1441 | name = "semver-parser" 1442 | version = "0.7.0" 1443 | source = "registry+https://github.com/rust-lang/crates.io-index" 1444 | checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" 1445 | 1446 | [[package]] 1447 | name = "serde" 1448 | version = "1.0.152" 1449 | source = "registry+https://github.com/rust-lang/crates.io-index" 1450 | checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb" 1451 | dependencies = [ 1452 | "serde_derive", 1453 | ] 1454 | 1455 | [[package]] 1456 | name = "serde_bytes" 1457 | version = "0.11.9" 1458 | source = "registry+https://github.com/rust-lang/crates.io-index" 1459 | checksum = "416bda436f9aab92e02c8e10d49a15ddd339cea90b6e340fe51ed97abb548294" 1460 | dependencies = [ 1461 | "serde", 1462 | ] 1463 | 1464 | [[package]] 1465 | name = "serde_derive" 1466 | version = "1.0.152" 1467 | source = "registry+https://github.com/rust-lang/crates.io-index" 1468 | checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e" 1469 | dependencies = [ 1470 | "proc-macro2", 1471 | "quote", 1472 | "syn", 1473 | ] 1474 | 1475 | [[package]] 1476 | name = "serde_json" 1477 | version = "1.0.93" 1478 | source = "registry+https://github.com/rust-lang/crates.io-index" 1479 | checksum = "cad406b69c91885b5107daf2c29572f6c8cdb3c66826821e286c533490c0bc76" 1480 | dependencies = [ 1481 | "indexmap", 1482 | "itoa", 1483 | "ryu", 1484 | "serde", 1485 | ] 1486 | 1487 | [[package]] 1488 | name = "serde_urlencoded" 1489 | version = "0.7.1" 1490 | source = "registry+https://github.com/rust-lang/crates.io-index" 1491 | checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" 1492 | dependencies = [ 1493 | "form_urlencoded", 1494 | "itoa", 1495 | "ryu", 1496 | "serde", 1497 | ] 1498 | 1499 | [[package]] 1500 | name = "serde_v8" 1501 | version = "0.82.0" 1502 | source = "registry+https://github.com/rust-lang/crates.io-index" 1503 | checksum = "c060fd38f18c420e82ab21592ec1f088b39bccb6897b1dda394d63628e22158d" 1504 | dependencies = [ 1505 | "bytes", 1506 | "derive_more", 1507 | "serde", 1508 | "serde_bytes", 1509 | "smallvec", 1510 | "v8", 1511 | ] 1512 | 1513 | [[package]] 1514 | name = "sha1" 1515 | version = "0.10.5" 1516 | source = "registry+https://github.com/rust-lang/crates.io-index" 1517 | checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" 1518 | dependencies = [ 1519 | "cfg-if", 1520 | "cpufeatures", 1521 | "digest", 1522 | ] 1523 | 1524 | [[package]] 1525 | name = "signal-hook-registry" 1526 | version = "1.4.0" 1527 | source = "registry+https://github.com/rust-lang/crates.io-index" 1528 | checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0" 1529 | dependencies = [ 1530 | "libc", 1531 | ] 1532 | 1533 | [[package]] 1534 | name = "slab" 1535 | version = "0.4.7" 1536 | source = "registry+https://github.com/rust-lang/crates.io-index" 1537 | checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" 1538 | dependencies = [ 1539 | "autocfg", 1540 | ] 1541 | 1542 | [[package]] 1543 | name = "smallvec" 1544 | version = "1.10.0" 1545 | source = "registry+https://github.com/rust-lang/crates.io-index" 1546 | checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" 1547 | 1548 | [[package]] 1549 | name = "socket2" 1550 | version = "0.4.7" 1551 | source = "registry+https://github.com/rust-lang/crates.io-index" 1552 | checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" 1553 | dependencies = [ 1554 | "libc", 1555 | "winapi", 1556 | ] 1557 | 1558 | [[package]] 1559 | name = "sourcemap" 1560 | version = "6.2.1" 1561 | source = "registry+https://github.com/rust-lang/crates.io-index" 1562 | checksum = "aebe057d110ddba043708da3fb010bf562ff6e9d4d60c9ee92860527bcbeccd6" 1563 | dependencies = [ 1564 | "base64 0.13.1", 1565 | "if_chain", 1566 | "rustc_version 0.2.3", 1567 | "serde", 1568 | "serde_json", 1569 | "unicode-id", 1570 | "url", 1571 | ] 1572 | 1573 | [[package]] 1574 | name = "spin" 1575 | version = "0.5.2" 1576 | source = "registry+https://github.com/rust-lang/crates.io-index" 1577 | checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" 1578 | 1579 | [[package]] 1580 | name = "syn" 1581 | version = "1.0.107" 1582 | source = "registry+https://github.com/rust-lang/crates.io-index" 1583 | checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5" 1584 | dependencies = [ 1585 | "proc-macro2", 1586 | "quote", 1587 | "unicode-ident", 1588 | ] 1589 | 1590 | [[package]] 1591 | name = "tempfile" 1592 | version = "3.3.0" 1593 | source = "registry+https://github.com/rust-lang/crates.io-index" 1594 | checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" 1595 | dependencies = [ 1596 | "cfg-if", 1597 | "fastrand", 1598 | "libc", 1599 | "redox_syscall", 1600 | "remove_dir_all", 1601 | "winapi", 1602 | ] 1603 | 1604 | [[package]] 1605 | name = "termcolor" 1606 | version = "1.2.0" 1607 | source = "registry+https://github.com/rust-lang/crates.io-index" 1608 | checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" 1609 | dependencies = [ 1610 | "winapi-util", 1611 | ] 1612 | 1613 | [[package]] 1614 | name = "thiserror" 1615 | version = "1.0.38" 1616 | source = "registry+https://github.com/rust-lang/crates.io-index" 1617 | checksum = "6a9cd18aa97d5c45c6603caea1da6628790b37f7a34b6ca89522331c5180fed0" 1618 | dependencies = [ 1619 | "thiserror-impl", 1620 | ] 1621 | 1622 | [[package]] 1623 | name = "thiserror-impl" 1624 | version = "1.0.38" 1625 | source = "registry+https://github.com/rust-lang/crates.io-index" 1626 | checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f" 1627 | dependencies = [ 1628 | "proc-macro2", 1629 | "quote", 1630 | "syn", 1631 | ] 1632 | 1633 | [[package]] 1634 | name = "threadpool" 1635 | version = "1.8.1" 1636 | source = "registry+https://github.com/rust-lang/crates.io-index" 1637 | checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa" 1638 | dependencies = [ 1639 | "num_cpus", 1640 | ] 1641 | 1642 | [[package]] 1643 | name = "time" 1644 | version = "0.3.17" 1645 | source = "registry+https://github.com/rust-lang/crates.io-index" 1646 | checksum = "a561bf4617eebd33bca6434b988f39ed798e527f51a1e797d0ee4f61c0a38376" 1647 | dependencies = [ 1648 | "libc", 1649 | "num_threads", 1650 | "serde", 1651 | "time-core", 1652 | ] 1653 | 1654 | [[package]] 1655 | name = "time-core" 1656 | version = "0.1.0" 1657 | source = "registry+https://github.com/rust-lang/crates.io-index" 1658 | checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd" 1659 | 1660 | [[package]] 1661 | name = "tiny_http" 1662 | version = "0.12.0" 1663 | source = "registry+https://github.com/rust-lang/crates.io-index" 1664 | checksum = "389915df6413a2e74fb181895f933386023c71110878cd0825588928e64cdc82" 1665 | dependencies = [ 1666 | "ascii", 1667 | "chunked_transfer", 1668 | "httpdate", 1669 | "log", 1670 | ] 1671 | 1672 | [[package]] 1673 | name = "tinyvec" 1674 | version = "1.6.0" 1675 | source = "registry+https://github.com/rust-lang/crates.io-index" 1676 | checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" 1677 | dependencies = [ 1678 | "tinyvec_macros", 1679 | ] 1680 | 1681 | [[package]] 1682 | name = "tinyvec_macros" 1683 | version = "0.1.1" 1684 | source = "registry+https://github.com/rust-lang/crates.io-index" 1685 | checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" 1686 | 1687 | [[package]] 1688 | name = "tokio" 1689 | version = "1.24.2" 1690 | source = "registry+https://github.com/rust-lang/crates.io-index" 1691 | checksum = "597a12a59981d9e3c38d216785b0c37399f6e415e8d0712047620f189371b0bb" 1692 | dependencies = [ 1693 | "autocfg", 1694 | "bytes", 1695 | "libc", 1696 | "memchr", 1697 | "mio", 1698 | "num_cpus", 1699 | "parking_lot", 1700 | "pin-project-lite", 1701 | "signal-hook-registry", 1702 | "socket2", 1703 | "tokio-macros", 1704 | "windows-sys 0.42.0", 1705 | ] 1706 | 1707 | [[package]] 1708 | name = "tokio-macros" 1709 | version = "1.8.2" 1710 | source = "registry+https://github.com/rust-lang/crates.io-index" 1711 | checksum = "d266c00fde287f55d3f1c3e96c500c362a2b8c695076ec180f27918820bc6df8" 1712 | dependencies = [ 1713 | "proc-macro2", 1714 | "quote", 1715 | "syn", 1716 | ] 1717 | 1718 | [[package]] 1719 | name = "tokio-native-tls" 1720 | version = "0.3.1" 1721 | source = "registry+https://github.com/rust-lang/crates.io-index" 1722 | checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" 1723 | dependencies = [ 1724 | "native-tls", 1725 | "tokio", 1726 | ] 1727 | 1728 | [[package]] 1729 | name = "tokio-rustls" 1730 | version = "0.23.4" 1731 | source = "registry+https://github.com/rust-lang/crates.io-index" 1732 | checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" 1733 | dependencies = [ 1734 | "rustls", 1735 | "tokio", 1736 | "webpki", 1737 | ] 1738 | 1739 | [[package]] 1740 | name = "tokio-socks" 1741 | version = "0.5.1" 1742 | source = "registry+https://github.com/rust-lang/crates.io-index" 1743 | checksum = "51165dfa029d2a65969413a6cc96f354b86b464498702f174a4efa13608fd8c0" 1744 | dependencies = [ 1745 | "either", 1746 | "futures-util", 1747 | "thiserror", 1748 | "tokio", 1749 | ] 1750 | 1751 | [[package]] 1752 | name = "tokio-stream" 1753 | version = "0.1.11" 1754 | source = "registry+https://github.com/rust-lang/crates.io-index" 1755 | checksum = "d660770404473ccd7bc9f8b28494a811bc18542b915c0855c51e8f419d5223ce" 1756 | dependencies = [ 1757 | "futures-core", 1758 | "pin-project-lite", 1759 | "tokio", 1760 | ] 1761 | 1762 | [[package]] 1763 | name = "tokio-util" 1764 | version = "0.7.4" 1765 | source = "registry+https://github.com/rust-lang/crates.io-index" 1766 | checksum = "0bb2e075f03b3d66d8d8785356224ba688d2906a371015e225beeb65ca92c740" 1767 | dependencies = [ 1768 | "bytes", 1769 | "futures-core", 1770 | "futures-sink", 1771 | "pin-project-lite", 1772 | "tokio", 1773 | "tracing", 1774 | ] 1775 | 1776 | [[package]] 1777 | name = "toml_datetime" 1778 | version = "0.5.1" 1779 | source = "registry+https://github.com/rust-lang/crates.io-index" 1780 | checksum = "4553f467ac8e3d374bc9a177a26801e5d0f9b211aa1673fb137a403afd1c9cf5" 1781 | 1782 | [[package]] 1783 | name = "toml_edit" 1784 | version = "0.18.1" 1785 | source = "registry+https://github.com/rust-lang/crates.io-index" 1786 | checksum = "56c59d8dd7d0dcbc6428bf7aa2f0e823e26e43b3c9aca15bbc9475d23e5fa12b" 1787 | dependencies = [ 1788 | "indexmap", 1789 | "nom8", 1790 | "toml_datetime", 1791 | ] 1792 | 1793 | [[package]] 1794 | name = "tower-service" 1795 | version = "0.3.2" 1796 | source = "registry+https://github.com/rust-lang/crates.io-index" 1797 | checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" 1798 | 1799 | [[package]] 1800 | name = "tracing" 1801 | version = "0.1.37" 1802 | source = "registry+https://github.com/rust-lang/crates.io-index" 1803 | checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" 1804 | dependencies = [ 1805 | "cfg-if", 1806 | "pin-project-lite", 1807 | "tracing-core", 1808 | ] 1809 | 1810 | [[package]] 1811 | name = "tracing-core" 1812 | version = "0.1.30" 1813 | source = "registry+https://github.com/rust-lang/crates.io-index" 1814 | checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" 1815 | dependencies = [ 1816 | "once_cell", 1817 | ] 1818 | 1819 | [[package]] 1820 | name = "try-lock" 1821 | version = "0.2.4" 1822 | source = "registry+https://github.com/rust-lang/crates.io-index" 1823 | checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" 1824 | 1825 | [[package]] 1826 | name = "twoway" 1827 | version = "0.1.8" 1828 | source = "registry+https://github.com/rust-lang/crates.io-index" 1829 | checksum = "59b11b2b5241ba34be09c3cc85a36e56e48f9888862e19cedf23336d35316ed1" 1830 | dependencies = [ 1831 | "memchr", 1832 | ] 1833 | 1834 | [[package]] 1835 | name = "typenum" 1836 | version = "1.16.0" 1837 | source = "registry+https://github.com/rust-lang/crates.io-index" 1838 | checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" 1839 | 1840 | [[package]] 1841 | name = "unicase" 1842 | version = "2.6.0" 1843 | source = "registry+https://github.com/rust-lang/crates.io-index" 1844 | checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" 1845 | dependencies = [ 1846 | "version_check", 1847 | ] 1848 | 1849 | [[package]] 1850 | name = "unicode-bidi" 1851 | version = "0.3.10" 1852 | source = "registry+https://github.com/rust-lang/crates.io-index" 1853 | checksum = "d54675592c1dbefd78cbd98db9bacd89886e1ca50692a0692baefffdeb92dd58" 1854 | 1855 | [[package]] 1856 | name = "unicode-id" 1857 | version = "0.3.3" 1858 | source = "registry+https://github.com/rust-lang/crates.io-index" 1859 | checksum = "d70b6494226b36008c8366c288d77190b3fad2eb4c10533139c1c1f461127f1a" 1860 | 1861 | [[package]] 1862 | name = "unicode-ident" 1863 | version = "1.0.6" 1864 | source = "registry+https://github.com/rust-lang/crates.io-index" 1865 | checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc" 1866 | 1867 | [[package]] 1868 | name = "unicode-normalization" 1869 | version = "0.1.22" 1870 | source = "registry+https://github.com/rust-lang/crates.io-index" 1871 | checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" 1872 | dependencies = [ 1873 | "tinyvec", 1874 | ] 1875 | 1876 | [[package]] 1877 | name = "unicode-width" 1878 | version = "0.1.10" 1879 | source = "registry+https://github.com/rust-lang/crates.io-index" 1880 | checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" 1881 | 1882 | [[package]] 1883 | name = "untrusted" 1884 | version = "0.7.1" 1885 | source = "registry+https://github.com/rust-lang/crates.io-index" 1886 | checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" 1887 | 1888 | [[package]] 1889 | name = "url" 1890 | version = "2.3.1" 1891 | source = "registry+https://github.com/rust-lang/crates.io-index" 1892 | checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" 1893 | dependencies = [ 1894 | "form_urlencoded", 1895 | "idna", 1896 | "percent-encoding", 1897 | "serde", 1898 | ] 1899 | 1900 | [[package]] 1901 | name = "v8" 1902 | version = "0.60.1" 1903 | source = "registry+https://github.com/rust-lang/crates.io-index" 1904 | checksum = "07fd5b3ed559897ff02c0f62bc0a5f300bfe79bb4c77a50031b8df771701c628" 1905 | dependencies = [ 1906 | "bitflags", 1907 | "fslock", 1908 | "lazy_static", 1909 | "which", 1910 | ] 1911 | 1912 | [[package]] 1913 | name = "vcpkg" 1914 | version = "0.2.15" 1915 | source = "registry+https://github.com/rust-lang/crates.io-index" 1916 | checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" 1917 | 1918 | [[package]] 1919 | name = "version_check" 1920 | version = "0.9.4" 1921 | source = "registry+https://github.com/rust-lang/crates.io-index" 1922 | checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" 1923 | 1924 | [[package]] 1925 | name = "want" 1926 | version = "0.3.0" 1927 | source = "registry+https://github.com/rust-lang/crates.io-index" 1928 | checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" 1929 | dependencies = [ 1930 | "log", 1931 | "try-lock", 1932 | ] 1933 | 1934 | [[package]] 1935 | name = "wasi" 1936 | version = "0.11.0+wasi-snapshot-preview1" 1937 | source = "registry+https://github.com/rust-lang/crates.io-index" 1938 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 1939 | 1940 | [[package]] 1941 | name = "wasm-bindgen" 1942 | version = "0.2.84" 1943 | source = "registry+https://github.com/rust-lang/crates.io-index" 1944 | checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b" 1945 | dependencies = [ 1946 | "cfg-if", 1947 | "wasm-bindgen-macro", 1948 | ] 1949 | 1950 | [[package]] 1951 | name = "wasm-bindgen-backend" 1952 | version = "0.2.84" 1953 | source = "registry+https://github.com/rust-lang/crates.io-index" 1954 | checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9" 1955 | dependencies = [ 1956 | "bumpalo", 1957 | "log", 1958 | "once_cell", 1959 | "proc-macro2", 1960 | "quote", 1961 | "syn", 1962 | "wasm-bindgen-shared", 1963 | ] 1964 | 1965 | [[package]] 1966 | name = "wasm-bindgen-futures" 1967 | version = "0.4.34" 1968 | source = "registry+https://github.com/rust-lang/crates.io-index" 1969 | checksum = "f219e0d211ba40266969f6dbdd90636da12f75bee4fc9d6c23d1260dadb51454" 1970 | dependencies = [ 1971 | "cfg-if", 1972 | "js-sys", 1973 | "wasm-bindgen", 1974 | "web-sys", 1975 | ] 1976 | 1977 | [[package]] 1978 | name = "wasm-bindgen-macro" 1979 | version = "0.2.84" 1980 | source = "registry+https://github.com/rust-lang/crates.io-index" 1981 | checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5" 1982 | dependencies = [ 1983 | "quote", 1984 | "wasm-bindgen-macro-support", 1985 | ] 1986 | 1987 | [[package]] 1988 | name = "wasm-bindgen-macro-support" 1989 | version = "0.2.84" 1990 | source = "registry+https://github.com/rust-lang/crates.io-index" 1991 | checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" 1992 | dependencies = [ 1993 | "proc-macro2", 1994 | "quote", 1995 | "syn", 1996 | "wasm-bindgen-backend", 1997 | "wasm-bindgen-shared", 1998 | ] 1999 | 2000 | [[package]] 2001 | name = "wasm-bindgen-shared" 2002 | version = "0.2.84" 2003 | source = "registry+https://github.com/rust-lang/crates.io-index" 2004 | checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" 2005 | 2006 | [[package]] 2007 | name = "wasm-streams" 2008 | version = "0.2.3" 2009 | source = "registry+https://github.com/rust-lang/crates.io-index" 2010 | checksum = "6bbae3363c08332cadccd13b67db371814cd214c2524020932f0804b8cf7c078" 2011 | dependencies = [ 2012 | "futures-util", 2013 | "js-sys", 2014 | "wasm-bindgen", 2015 | "wasm-bindgen-futures", 2016 | "web-sys", 2017 | ] 2018 | 2019 | [[package]] 2020 | name = "web-sys" 2021 | version = "0.3.61" 2022 | source = "registry+https://github.com/rust-lang/crates.io-index" 2023 | checksum = "e33b99f4b23ba3eec1a53ac264e35a755f00e966e0065077d6027c0f575b0b97" 2024 | dependencies = [ 2025 | "js-sys", 2026 | "wasm-bindgen", 2027 | ] 2028 | 2029 | [[package]] 2030 | name = "webpki" 2031 | version = "0.22.0" 2032 | source = "registry+https://github.com/rust-lang/crates.io-index" 2033 | checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" 2034 | dependencies = [ 2035 | "ring", 2036 | "untrusted", 2037 | ] 2038 | 2039 | [[package]] 2040 | name = "webpki-roots" 2041 | version = "0.22.6" 2042 | source = "registry+https://github.com/rust-lang/crates.io-index" 2043 | checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" 2044 | dependencies = [ 2045 | "webpki", 2046 | ] 2047 | 2048 | [[package]] 2049 | name = "which" 2050 | version = "4.4.0" 2051 | source = "registry+https://github.com/rust-lang/crates.io-index" 2052 | checksum = "2441c784c52b289a054b7201fc93253e288f094e2f4be9058343127c4226a269" 2053 | dependencies = [ 2054 | "either", 2055 | "libc", 2056 | "once_cell", 2057 | ] 2058 | 2059 | [[package]] 2060 | name = "winapi" 2061 | version = "0.3.9" 2062 | source = "registry+https://github.com/rust-lang/crates.io-index" 2063 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 2064 | dependencies = [ 2065 | "winapi-i686-pc-windows-gnu", 2066 | "winapi-x86_64-pc-windows-gnu", 2067 | ] 2068 | 2069 | [[package]] 2070 | name = "winapi-i686-pc-windows-gnu" 2071 | version = "0.4.0" 2072 | source = "registry+https://github.com/rust-lang/crates.io-index" 2073 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 2074 | 2075 | [[package]] 2076 | name = "winapi-util" 2077 | version = "0.1.5" 2078 | source = "registry+https://github.com/rust-lang/crates.io-index" 2079 | checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" 2080 | dependencies = [ 2081 | "winapi", 2082 | ] 2083 | 2084 | [[package]] 2085 | name = "winapi-x86_64-pc-windows-gnu" 2086 | version = "0.4.0" 2087 | source = "registry+https://github.com/rust-lang/crates.io-index" 2088 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 2089 | 2090 | [[package]] 2091 | name = "windows-sys" 2092 | version = "0.42.0" 2093 | source = "registry+https://github.com/rust-lang/crates.io-index" 2094 | checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" 2095 | dependencies = [ 2096 | "windows_aarch64_gnullvm", 2097 | "windows_aarch64_msvc", 2098 | "windows_i686_gnu", 2099 | "windows_i686_msvc", 2100 | "windows_x86_64_gnu", 2101 | "windows_x86_64_gnullvm", 2102 | "windows_x86_64_msvc", 2103 | ] 2104 | 2105 | [[package]] 2106 | name = "windows-sys" 2107 | version = "0.45.0" 2108 | source = "registry+https://github.com/rust-lang/crates.io-index" 2109 | checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" 2110 | dependencies = [ 2111 | "windows-targets", 2112 | ] 2113 | 2114 | [[package]] 2115 | name = "windows-targets" 2116 | version = "0.42.1" 2117 | source = "registry+https://github.com/rust-lang/crates.io-index" 2118 | checksum = "8e2522491fbfcd58cc84d47aeb2958948c4b8982e9a2d8a2a35bbaed431390e7" 2119 | dependencies = [ 2120 | "windows_aarch64_gnullvm", 2121 | "windows_aarch64_msvc", 2122 | "windows_i686_gnu", 2123 | "windows_i686_msvc", 2124 | "windows_x86_64_gnu", 2125 | "windows_x86_64_gnullvm", 2126 | "windows_x86_64_msvc", 2127 | ] 2128 | 2129 | [[package]] 2130 | name = "windows_aarch64_gnullvm" 2131 | version = "0.42.1" 2132 | source = "registry+https://github.com/rust-lang/crates.io-index" 2133 | checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" 2134 | 2135 | [[package]] 2136 | name = "windows_aarch64_msvc" 2137 | version = "0.42.1" 2138 | source = "registry+https://github.com/rust-lang/crates.io-index" 2139 | checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" 2140 | 2141 | [[package]] 2142 | name = "windows_i686_gnu" 2143 | version = "0.42.1" 2144 | source = "registry+https://github.com/rust-lang/crates.io-index" 2145 | checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" 2146 | 2147 | [[package]] 2148 | name = "windows_i686_msvc" 2149 | version = "0.42.1" 2150 | source = "registry+https://github.com/rust-lang/crates.io-index" 2151 | checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" 2152 | 2153 | [[package]] 2154 | name = "windows_x86_64_gnu" 2155 | version = "0.42.1" 2156 | source = "registry+https://github.com/rust-lang/crates.io-index" 2157 | checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" 2158 | 2159 | [[package]] 2160 | name = "windows_x86_64_gnullvm" 2161 | version = "0.42.1" 2162 | source = "registry+https://github.com/rust-lang/crates.io-index" 2163 | checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" 2164 | 2165 | [[package]] 2166 | name = "windows_x86_64_msvc" 2167 | version = "0.42.1" 2168 | source = "registry+https://github.com/rust-lang/crates.io-index" 2169 | checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" 2170 | 2171 | [[package]] 2172 | name = "winreg" 2173 | version = "0.10.1" 2174 | source = "registry+https://github.com/rust-lang/crates.io-index" 2175 | checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" 2176 | dependencies = [ 2177 | "winapi", 2178 | ] 2179 | -------------------------------------------------------------------------------- /runtime/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "runtime" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | deno_core = "0.171.0" 10 | deno_fetch = "0.113.0" 11 | rand = "0.8.5" 12 | reqwest = "0.11.14" 13 | rouille = "3.6.1" 14 | serde = { version = "1.0.152", features = ["derive"] } 15 | tokio = { version = "1.24.2", features = ["full"] } 16 | -------------------------------------------------------------------------------- /runtime/example.js: -------------------------------------------------------------------------------- 1 | console.log("Hi!"); 2 | 3 | const getExample = await request.get("http://healeycodes.com", { 4 | "someHeaderKey": "someHeaderValue", 5 | }); 6 | console.log({ 7 | status: getExample.status, 8 | headers: getExample.headers, 9 | url: getExample.url, 10 | body: getExample.body, 11 | }); 12 | 13 | const postExample = await request.post("http://healeycodes.com", { 14 | "someHeaderKey": "someHeaderValue", 15 | }, "a body!"); 16 | console.log({ 17 | status: postExample.status, 18 | headers: postExample.headers, 19 | url: postExample.url, 20 | body: postExample.body, 21 | }); 22 | -------------------------------------------------------------------------------- /runtime/src/main.rs: -------------------------------------------------------------------------------- 1 | use deno_core::error::AnyError; 2 | use deno_core::op; 3 | use deno_core::serde::Serialize; 4 | use deno_core::Extension; 5 | use rand::distributions::Alphanumeric; 6 | use rand::{thread_rng, Rng}; 7 | use rouille::Response; 8 | use std::fs::File; 9 | use std::io::{Read, Write}; 10 | use std::rc::Rc; 11 | use std::vec; 12 | 13 | #[derive(Serialize)] 14 | #[serde(rename_all = "camelCase")] 15 | pub struct RequestResponse { 16 | status: u16, 17 | headers: Vec<(String, String)>, 18 | url: String, 19 | body: String, 20 | } 21 | 22 | #[op] 23 | async fn op_request( 24 | method: String, 25 | url: String, 26 | headers: Vec<(String, String)>, 27 | body: String, 28 | ) -> Result { 29 | match method.as_str() { 30 | "GET" => { 31 | let client = reqwest::Client::new(); 32 | let mut req = client.get(&url); 33 | for (key, value) in headers.iter() { 34 | req = req.header(key, value); 35 | } 36 | let res = req.send().await?; 37 | 38 | let mut res_headers: Vec<(String, String)> = vec![]; 39 | for (key, value) in res.headers().iter() { 40 | res_headers.push(( 41 | key.to_string(), 42 | String::from_utf8_lossy(value.as_bytes()).to_string(), 43 | )) 44 | } 45 | 46 | Ok(RequestResponse { 47 | status: res.status().into(), 48 | headers: res_headers, 49 | url, 50 | body: res.text().await?, 51 | }) 52 | } 53 | "POST" => { 54 | let client = reqwest::Client::new(); 55 | let mut req = client.post(&url); 56 | for (key, value) in headers.iter() { 57 | req = req.header(key, value); 58 | } 59 | let res = req.body(body).send().await?; 60 | 61 | let mut res_headers: Vec<(String, String)> = vec![]; 62 | for (key, value) in res.headers().iter() { 63 | res_headers.push(( 64 | key.to_string(), 65 | String::from_utf8_lossy(value.as_bytes()).to_string(), 66 | )) 67 | } 68 | 69 | Ok(RequestResponse { 70 | status: res.status().into(), 71 | headers: res_headers, 72 | url, 73 | body: res.text().await?, 74 | }) 75 | } 76 | // Checked in src/minijs.js 77 | _ => unreachable!(), 78 | } 79 | } 80 | 81 | #[op] 82 | async fn op_log(text: String) -> Result<(), AnyError> { 83 | println!("{:?}", text); 84 | Ok(()) 85 | } 86 | 87 | #[op] 88 | async fn op_err_log(text: String) -> Result<(), AnyError> { 89 | println!("{:?}", text); 90 | Ok(()) 91 | } 92 | 93 | // See https://deno.com/blog/roll-your-own-javascript-runtime 94 | async fn run_js(file_path: &str) -> Result<(), AnyError> { 95 | let main_module = deno_core::resolve_path(file_path)?; 96 | let runjs_extension = Extension::builder("some name") 97 | .ops(vec![op_request::decl(), op_log::decl(), op_err_log::decl()]) 98 | .build(); 99 | let mut js_runtime = deno_core::JsRuntime::new(deno_core::RuntimeOptions { 100 | module_loader: Some(Rc::new(deno_core::FsModuleLoader)), 101 | extensions: vec![runjs_extension], 102 | ..Default::default() 103 | }); 104 | js_runtime 105 | .execute_script("[minijs.js]", include_str!("./minijs.js")) 106 | .unwrap(); 107 | 108 | let mod_id = js_runtime.load_main_module(&main_module, None).await?; 109 | let result = js_runtime.mod_evaluate(mod_id); 110 | js_runtime.run_event_loop(false).await?; 111 | result.await? 112 | } 113 | 114 | fn run_user_code(source: Vec) -> Result<(), AnyError> { 115 | let rnd_file_name: String = thread_rng() 116 | .sample_iter(&Alphanumeric) 117 | .take(30) 118 | .map(char::from) 119 | .collect(); 120 | let script_path = format!("./{}", rnd_file_name); 121 | 122 | let mut file = File::create(&script_path)?; 123 | file.write_all(&source)?; 124 | 125 | let runtime = tokio::runtime::Builder::new_current_thread() 126 | .enable_all() 127 | .build() 128 | .unwrap(); 129 | runtime.block_on(run_js(&script_path)) 130 | } 131 | 132 | fn main() { 133 | rouille::start_server("localhost:3000", move |request| { 134 | let mut data = request.data().expect("Oops, body already retrieved"); 135 | let mut buf = Vec::new(); 136 | match data.read_to_end(&mut buf) { 137 | Ok(_) => (), 138 | Err(_) => return Response::text("Failed to read body"), 139 | }; 140 | 141 | match run_user_code(buf) { 142 | Ok(value) => return Response::text(format!("{:?}", value)), 143 | Err(err) => return Response::text(err.to_string()), 144 | } 145 | }); 146 | } 147 | -------------------------------------------------------------------------------- /runtime/src/minijs.js: -------------------------------------------------------------------------------- 1 | // minijs.js 2 | ((globalThis) => { 3 | const core = Deno.core; 4 | 5 | function argsToMessage(...args) { 6 | return args.map((arg) => JSON.stringify(arg)).join(" "); 7 | } 8 | 9 | globalThis.console = { 10 | log: (...args) => { 11 | core.ops.op_log(argsToMessage(...args)); 12 | }, 13 | error: (...args) => { 14 | core.ops.op_log_err(argsToMessage(...args)); 15 | }, 16 | }; 17 | 18 | const makeHeadersVec = (headers) => { 19 | const headersVec = []; 20 | for (const [key, value] of Object.entries(headers)) { 21 | headersVec.push([key, value]); 22 | } 23 | return headersVec; 24 | }; 25 | 26 | core.initializeAsyncOps(); 27 | globalThis.request = { 28 | get: async (url, headers) => { 29 | return core.ops.op_request( 30 | "GET", 31 | url.toString(), 32 | makeHeadersVec(headers), 33 | "", 34 | ); 35 | }, 36 | post: async (url, headers, body) => { 37 | return core.ops.op_request( 38 | "POST", 39 | url.toString(), 40 | makeHeadersVec(headers), 41 | body.toString(), 42 | ); 43 | }, 44 | }; 45 | // }; 46 | })(globalThis); 47 | --------------------------------------------------------------------------------