├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── README.md ├── example.js └── src ├── main.rs └── runtime.js /.gitignore: -------------------------------------------------------------------------------- 1 | target/* 2 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "aho-corasick" 7 | version = "0.7.18" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" 10 | dependencies = [ 11 | "memchr", 12 | ] 13 | 14 | [[package]] 15 | name = "anyhow" 16 | version = "1.0.58" 17 | source = "registry+https://github.com/rust-lang/crates.io-index" 18 | checksum = "bb07d2053ccdbe10e2af2995a2f116c1330396493dc1269f6a91d0ae82e19704" 19 | 20 | [[package]] 21 | name = "autocfg" 22 | version = "1.1.0" 23 | source = "registry+https://github.com/rust-lang/crates.io-index" 24 | checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" 25 | 26 | [[package]] 27 | name = "base64" 28 | version = "0.11.0" 29 | source = "registry+https://github.com/rust-lang/crates.io-index" 30 | checksum = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" 31 | 32 | [[package]] 33 | name = "base64" 34 | version = "0.13.0" 35 | source = "registry+https://github.com/rust-lang/crates.io-index" 36 | checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" 37 | 38 | [[package]] 39 | name = "bitflags" 40 | version = "1.3.2" 41 | source = "registry+https://github.com/rust-lang/crates.io-index" 42 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 43 | 44 | [[package]] 45 | name = "bumpalo" 46 | version = "3.10.0" 47 | source = "registry+https://github.com/rust-lang/crates.io-index" 48 | checksum = "37ccbd214614c6783386c1af30caf03192f17891059cecc394b4fb119e363de3" 49 | 50 | [[package]] 51 | name = "bytes" 52 | version = "1.2.1" 53 | source = "registry+https://github.com/rust-lang/crates.io-index" 54 | checksum = "ec8a7b6a70fde80372154c65702f00a0f56f3e1c36abbc6c440484be248856db" 55 | 56 | [[package]] 57 | name = "cc" 58 | version = "1.0.73" 59 | source = "registry+https://github.com/rust-lang/crates.io-index" 60 | checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" 61 | 62 | [[package]] 63 | name = "cfg-if" 64 | version = "1.0.0" 65 | source = "registry+https://github.com/rust-lang/crates.io-index" 66 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 67 | 68 | [[package]] 69 | name = "convert_case" 70 | version = "0.4.0" 71 | source = "registry+https://github.com/rust-lang/crates.io-index" 72 | checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" 73 | 74 | [[package]] 75 | name = "core-foundation" 76 | version = "0.9.3" 77 | source = "registry+https://github.com/rust-lang/crates.io-index" 78 | checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" 79 | dependencies = [ 80 | "core-foundation-sys", 81 | "libc", 82 | ] 83 | 84 | [[package]] 85 | name = "core-foundation-sys" 86 | version = "0.8.3" 87 | source = "registry+https://github.com/rust-lang/crates.io-index" 88 | checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" 89 | 90 | [[package]] 91 | name = "deno_core" 92 | version = "0.142.0" 93 | source = "registry+https://github.com/rust-lang/crates.io-index" 94 | checksum = "65c902448001f76f4112341c226456d20ecffe4266051495c2181ad60144b38c" 95 | dependencies = [ 96 | "anyhow", 97 | "deno_ops", 98 | "futures", 99 | "indexmap", 100 | "libc", 101 | "log", 102 | "once_cell", 103 | "parking_lot", 104 | "pin-project", 105 | "serde", 106 | "serde_json", 107 | "serde_v8", 108 | "sourcemap", 109 | "url", 110 | "v8", 111 | ] 112 | 113 | [[package]] 114 | name = "deno_ops" 115 | version = "0.20.0" 116 | source = "registry+https://github.com/rust-lang/crates.io-index" 117 | checksum = "a66c12cd4ed52c7a96b4ab4663d4b2a0098489986316bb2e36dcdaffe7ae6e3d" 118 | dependencies = [ 119 | "once_cell", 120 | "proc-macro-crate", 121 | "proc-macro2", 122 | "quote", 123 | "regex", 124 | "syn", 125 | ] 126 | 127 | [[package]] 128 | name = "derive_more" 129 | version = "0.99.17" 130 | source = "registry+https://github.com/rust-lang/crates.io-index" 131 | checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" 132 | dependencies = [ 133 | "convert_case", 134 | "proc-macro2", 135 | "quote", 136 | "rustc_version 0.4.0", 137 | "syn", 138 | ] 139 | 140 | [[package]] 141 | name = "either" 142 | version = "1.7.0" 143 | source = "registry+https://github.com/rust-lang/crates.io-index" 144 | checksum = "3f107b87b6afc2a64fd13cac55fe06d6c8859f12d4b14cbcdd2c67d0976781be" 145 | 146 | [[package]] 147 | name = "encoding_rs" 148 | version = "0.8.31" 149 | source = "registry+https://github.com/rust-lang/crates.io-index" 150 | checksum = "9852635589dc9f9ea1b6fe9f05b50ef208c85c834a562f0c6abb1c475736ec2b" 151 | dependencies = [ 152 | "cfg-if", 153 | ] 154 | 155 | [[package]] 156 | name = "fastrand" 157 | version = "1.8.0" 158 | source = "registry+https://github.com/rust-lang/crates.io-index" 159 | checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" 160 | dependencies = [ 161 | "instant", 162 | ] 163 | 164 | [[package]] 165 | name = "fnv" 166 | version = "1.0.7" 167 | source = "registry+https://github.com/rust-lang/crates.io-index" 168 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 169 | 170 | [[package]] 171 | name = "foreign-types" 172 | version = "0.3.2" 173 | source = "registry+https://github.com/rust-lang/crates.io-index" 174 | checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" 175 | dependencies = [ 176 | "foreign-types-shared", 177 | ] 178 | 179 | [[package]] 180 | name = "foreign-types-shared" 181 | version = "0.1.1" 182 | source = "registry+https://github.com/rust-lang/crates.io-index" 183 | checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" 184 | 185 | [[package]] 186 | name = "form_urlencoded" 187 | version = "1.0.1" 188 | source = "registry+https://github.com/rust-lang/crates.io-index" 189 | checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" 190 | dependencies = [ 191 | "matches", 192 | "percent-encoding", 193 | ] 194 | 195 | [[package]] 196 | name = "fslock" 197 | version = "0.1.8" 198 | source = "registry+https://github.com/rust-lang/crates.io-index" 199 | checksum = "57eafdd0c16f57161105ae1b98a1238f97645f2f588438b2949c99a2af9616bf" 200 | dependencies = [ 201 | "libc", 202 | "winapi", 203 | ] 204 | 205 | [[package]] 206 | name = "futures" 207 | version = "0.3.21" 208 | source = "registry+https://github.com/rust-lang/crates.io-index" 209 | checksum = "f73fe65f54d1e12b726f517d3e2135ca3125a437b6d998caf1962961f7172d9e" 210 | dependencies = [ 211 | "futures-channel", 212 | "futures-core", 213 | "futures-executor", 214 | "futures-io", 215 | "futures-sink", 216 | "futures-task", 217 | "futures-util", 218 | ] 219 | 220 | [[package]] 221 | name = "futures-channel" 222 | version = "0.3.21" 223 | source = "registry+https://github.com/rust-lang/crates.io-index" 224 | checksum = "c3083ce4b914124575708913bca19bfe887522d6e2e6d0952943f5eac4a74010" 225 | dependencies = [ 226 | "futures-core", 227 | "futures-sink", 228 | ] 229 | 230 | [[package]] 231 | name = "futures-core" 232 | version = "0.3.21" 233 | source = "registry+https://github.com/rust-lang/crates.io-index" 234 | checksum = "0c09fd04b7e4073ac7156a9539b57a484a8ea920f79c7c675d05d289ab6110d3" 235 | 236 | [[package]] 237 | name = "futures-executor" 238 | version = "0.3.21" 239 | source = "registry+https://github.com/rust-lang/crates.io-index" 240 | checksum = "9420b90cfa29e327d0429f19be13e7ddb68fa1cccb09d65e5706b8c7a749b8a6" 241 | dependencies = [ 242 | "futures-core", 243 | "futures-task", 244 | "futures-util", 245 | ] 246 | 247 | [[package]] 248 | name = "futures-io" 249 | version = "0.3.21" 250 | source = "registry+https://github.com/rust-lang/crates.io-index" 251 | checksum = "fc4045962a5a5e935ee2fdedaa4e08284547402885ab326734432bed5d12966b" 252 | 253 | [[package]] 254 | name = "futures-macro" 255 | version = "0.3.21" 256 | source = "registry+https://github.com/rust-lang/crates.io-index" 257 | checksum = "33c1e13800337f4d4d7a316bf45a567dbcb6ffe087f16424852d97e97a91f512" 258 | dependencies = [ 259 | "proc-macro2", 260 | "quote", 261 | "syn", 262 | ] 263 | 264 | [[package]] 265 | name = "futures-sink" 266 | version = "0.3.21" 267 | source = "registry+https://github.com/rust-lang/crates.io-index" 268 | checksum = "21163e139fa306126e6eedaf49ecdb4588f939600f0b1e770f4205ee4b7fa868" 269 | 270 | [[package]] 271 | name = "futures-task" 272 | version = "0.3.21" 273 | source = "registry+https://github.com/rust-lang/crates.io-index" 274 | checksum = "57c66a976bf5909d801bbef33416c41372779507e7a6b3a5e25e4749c58f776a" 275 | 276 | [[package]] 277 | name = "futures-util" 278 | version = "0.3.21" 279 | source = "registry+https://github.com/rust-lang/crates.io-index" 280 | checksum = "d8b7abd5d659d9b90c8cba917f6ec750a74e2dc23902ef9cd4cc8c8b22e6036a" 281 | dependencies = [ 282 | "futures-channel", 283 | "futures-core", 284 | "futures-io", 285 | "futures-macro", 286 | "futures-sink", 287 | "futures-task", 288 | "memchr", 289 | "pin-project-lite", 290 | "pin-utils", 291 | "slab", 292 | ] 293 | 294 | [[package]] 295 | name = "h2" 296 | version = "0.3.13" 297 | source = "registry+https://github.com/rust-lang/crates.io-index" 298 | checksum = "37a82c6d637fc9515a4694bbf1cb2457b79d81ce52b3108bdeea58b07dd34a57" 299 | dependencies = [ 300 | "bytes", 301 | "fnv", 302 | "futures-core", 303 | "futures-sink", 304 | "futures-util", 305 | "http", 306 | "indexmap", 307 | "slab", 308 | "tokio", 309 | "tokio-util", 310 | "tracing", 311 | ] 312 | 313 | [[package]] 314 | name = "hashbrown" 315 | version = "0.12.3" 316 | source = "registry+https://github.com/rust-lang/crates.io-index" 317 | checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" 318 | 319 | [[package]] 320 | name = "hermit-abi" 321 | version = "0.1.19" 322 | source = "registry+https://github.com/rust-lang/crates.io-index" 323 | checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" 324 | dependencies = [ 325 | "libc", 326 | ] 327 | 328 | [[package]] 329 | name = "http" 330 | version = "0.2.8" 331 | source = "registry+https://github.com/rust-lang/crates.io-index" 332 | checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" 333 | dependencies = [ 334 | "bytes", 335 | "fnv", 336 | "itoa", 337 | ] 338 | 339 | [[package]] 340 | name = "http-body" 341 | version = "0.4.5" 342 | source = "registry+https://github.com/rust-lang/crates.io-index" 343 | checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" 344 | dependencies = [ 345 | "bytes", 346 | "http", 347 | "pin-project-lite", 348 | ] 349 | 350 | [[package]] 351 | name = "httparse" 352 | version = "1.7.1" 353 | source = "registry+https://github.com/rust-lang/crates.io-index" 354 | checksum = "496ce29bb5a52785b44e0f7ca2847ae0bb839c9bd28f69acac9b99d461c0c04c" 355 | 356 | [[package]] 357 | name = "httpdate" 358 | version = "1.0.2" 359 | source = "registry+https://github.com/rust-lang/crates.io-index" 360 | checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" 361 | 362 | [[package]] 363 | name = "hyper" 364 | version = "0.14.20" 365 | source = "registry+https://github.com/rust-lang/crates.io-index" 366 | checksum = "02c929dc5c39e335a03c405292728118860721b10190d98c2a0f0efd5baafbac" 367 | dependencies = [ 368 | "bytes", 369 | "futures-channel", 370 | "futures-core", 371 | "futures-util", 372 | "h2", 373 | "http", 374 | "http-body", 375 | "httparse", 376 | "httpdate", 377 | "itoa", 378 | "pin-project-lite", 379 | "socket2", 380 | "tokio", 381 | "tower-service", 382 | "tracing", 383 | "want", 384 | ] 385 | 386 | [[package]] 387 | name = "hyper-tls" 388 | version = "0.5.0" 389 | source = "registry+https://github.com/rust-lang/crates.io-index" 390 | checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" 391 | dependencies = [ 392 | "bytes", 393 | "hyper", 394 | "native-tls", 395 | "tokio", 396 | "tokio-native-tls", 397 | ] 398 | 399 | [[package]] 400 | name = "idna" 401 | version = "0.2.3" 402 | source = "registry+https://github.com/rust-lang/crates.io-index" 403 | checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" 404 | dependencies = [ 405 | "matches", 406 | "unicode-bidi", 407 | "unicode-normalization", 408 | ] 409 | 410 | [[package]] 411 | name = "if_chain" 412 | version = "1.0.2" 413 | source = "registry+https://github.com/rust-lang/crates.io-index" 414 | checksum = "cb56e1aa765b4b4f3aadfab769793b7087bb03a4ea4920644a6d238e2df5b9ed" 415 | 416 | [[package]] 417 | name = "indexmap" 418 | version = "1.9.1" 419 | source = "registry+https://github.com/rust-lang/crates.io-index" 420 | checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" 421 | dependencies = [ 422 | "autocfg", 423 | "hashbrown", 424 | ] 425 | 426 | [[package]] 427 | name = "instant" 428 | version = "0.1.12" 429 | source = "registry+https://github.com/rust-lang/crates.io-index" 430 | checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" 431 | dependencies = [ 432 | "cfg-if", 433 | ] 434 | 435 | [[package]] 436 | name = "ipnet" 437 | version = "2.5.0" 438 | source = "registry+https://github.com/rust-lang/crates.io-index" 439 | checksum = "879d54834c8c76457ef4293a689b2a8c59b076067ad77b15efafbb05f92a592b" 440 | 441 | [[package]] 442 | name = "itoa" 443 | version = "1.0.2" 444 | source = "registry+https://github.com/rust-lang/crates.io-index" 445 | checksum = "112c678d4050afce233f4f2852bb2eb519230b3cf12f33585275537d7e41578d" 446 | 447 | [[package]] 448 | name = "js-sys" 449 | version = "0.3.59" 450 | source = "registry+https://github.com/rust-lang/crates.io-index" 451 | checksum = "258451ab10b34f8af53416d1fdab72c22e805f0c92a1136d59470ec0b11138b2" 452 | dependencies = [ 453 | "wasm-bindgen", 454 | ] 455 | 456 | [[package]] 457 | name = "lazy_static" 458 | version = "1.4.0" 459 | source = "registry+https://github.com/rust-lang/crates.io-index" 460 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 461 | 462 | [[package]] 463 | name = "libc" 464 | version = "0.2.126" 465 | source = "registry+https://github.com/rust-lang/crates.io-index" 466 | checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836" 467 | 468 | [[package]] 469 | name = "lock_api" 470 | version = "0.4.7" 471 | source = "registry+https://github.com/rust-lang/crates.io-index" 472 | checksum = "327fa5b6a6940e4699ec49a9beae1ea4845c6bab9314e4f84ac68742139d8c53" 473 | dependencies = [ 474 | "autocfg", 475 | "scopeguard", 476 | ] 477 | 478 | [[package]] 479 | name = "log" 480 | version = "0.4.17" 481 | source = "registry+https://github.com/rust-lang/crates.io-index" 482 | checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" 483 | dependencies = [ 484 | "cfg-if", 485 | ] 486 | 487 | [[package]] 488 | name = "matches" 489 | version = "0.1.9" 490 | source = "registry+https://github.com/rust-lang/crates.io-index" 491 | checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" 492 | 493 | [[package]] 494 | name = "memchr" 495 | version = "2.5.0" 496 | source = "registry+https://github.com/rust-lang/crates.io-index" 497 | checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" 498 | 499 | [[package]] 500 | name = "mime" 501 | version = "0.3.16" 502 | source = "registry+https://github.com/rust-lang/crates.io-index" 503 | checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" 504 | 505 | [[package]] 506 | name = "mio" 507 | version = "0.8.4" 508 | source = "registry+https://github.com/rust-lang/crates.io-index" 509 | checksum = "57ee1c23c7c63b0c9250c339ffdc69255f110b298b901b9f6c82547b7b87caaf" 510 | dependencies = [ 511 | "libc", 512 | "log", 513 | "wasi", 514 | "windows-sys", 515 | ] 516 | 517 | [[package]] 518 | name = "native-tls" 519 | version = "0.2.10" 520 | source = "registry+https://github.com/rust-lang/crates.io-index" 521 | checksum = "fd7e2f3618557f980e0b17e8856252eee3c97fa12c54dff0ca290fb6266ca4a9" 522 | dependencies = [ 523 | "lazy_static", 524 | "libc", 525 | "log", 526 | "openssl", 527 | "openssl-probe", 528 | "openssl-sys", 529 | "schannel", 530 | "security-framework", 531 | "security-framework-sys", 532 | "tempfile", 533 | ] 534 | 535 | [[package]] 536 | name = "num_cpus" 537 | version = "1.13.1" 538 | source = "registry+https://github.com/rust-lang/crates.io-index" 539 | checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" 540 | dependencies = [ 541 | "hermit-abi", 542 | "libc", 543 | ] 544 | 545 | [[package]] 546 | name = "once_cell" 547 | version = "1.13.0" 548 | source = "registry+https://github.com/rust-lang/crates.io-index" 549 | checksum = "18a6dbe30758c9f83eb00cbea4ac95966305f5a7772f3f42ebfc7fc7eddbd8e1" 550 | 551 | [[package]] 552 | name = "openssl" 553 | version = "0.10.41" 554 | source = "registry+https://github.com/rust-lang/crates.io-index" 555 | checksum = "618febf65336490dfcf20b73f885f5651a0c89c64c2d4a8c3662585a70bf5bd0" 556 | dependencies = [ 557 | "bitflags", 558 | "cfg-if", 559 | "foreign-types", 560 | "libc", 561 | "once_cell", 562 | "openssl-macros", 563 | "openssl-sys", 564 | ] 565 | 566 | [[package]] 567 | name = "openssl-macros" 568 | version = "0.1.0" 569 | source = "registry+https://github.com/rust-lang/crates.io-index" 570 | checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" 571 | dependencies = [ 572 | "proc-macro2", 573 | "quote", 574 | "syn", 575 | ] 576 | 577 | [[package]] 578 | name = "openssl-probe" 579 | version = "0.1.5" 580 | source = "registry+https://github.com/rust-lang/crates.io-index" 581 | checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" 582 | 583 | [[package]] 584 | name = "openssl-sys" 585 | version = "0.9.75" 586 | source = "registry+https://github.com/rust-lang/crates.io-index" 587 | checksum = "e5f9bd0c2710541a3cda73d6f9ac4f1b240de4ae261065d309dbe73d9dceb42f" 588 | dependencies = [ 589 | "autocfg", 590 | "cc", 591 | "libc", 592 | "pkg-config", 593 | "vcpkg", 594 | ] 595 | 596 | [[package]] 597 | name = "parking_lot" 598 | version = "0.12.1" 599 | source = "registry+https://github.com/rust-lang/crates.io-index" 600 | checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" 601 | dependencies = [ 602 | "lock_api", 603 | "parking_lot_core", 604 | ] 605 | 606 | [[package]] 607 | name = "parking_lot_core" 608 | version = "0.9.3" 609 | source = "registry+https://github.com/rust-lang/crates.io-index" 610 | checksum = "09a279cbf25cb0757810394fbc1e359949b59e348145c643a939a525692e6929" 611 | dependencies = [ 612 | "cfg-if", 613 | "libc", 614 | "redox_syscall", 615 | "smallvec", 616 | "windows-sys", 617 | ] 618 | 619 | [[package]] 620 | name = "percent-encoding" 621 | version = "2.1.0" 622 | source = "registry+https://github.com/rust-lang/crates.io-index" 623 | checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" 624 | 625 | [[package]] 626 | name = "pin-project" 627 | version = "1.0.11" 628 | source = "registry+https://github.com/rust-lang/crates.io-index" 629 | checksum = "78203e83c48cffbe01e4a2d35d566ca4de445d79a85372fc64e378bfc812a260" 630 | dependencies = [ 631 | "pin-project-internal", 632 | ] 633 | 634 | [[package]] 635 | name = "pin-project-internal" 636 | version = "1.0.11" 637 | source = "registry+https://github.com/rust-lang/crates.io-index" 638 | checksum = "710faf75e1b33345361201d36d04e98ac1ed8909151a017ed384700836104c74" 639 | dependencies = [ 640 | "proc-macro2", 641 | "quote", 642 | "syn", 643 | ] 644 | 645 | [[package]] 646 | name = "pin-project-lite" 647 | version = "0.2.9" 648 | source = "registry+https://github.com/rust-lang/crates.io-index" 649 | checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" 650 | 651 | [[package]] 652 | name = "pin-utils" 653 | version = "0.1.0" 654 | source = "registry+https://github.com/rust-lang/crates.io-index" 655 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 656 | 657 | [[package]] 658 | name = "pkg-config" 659 | version = "0.3.25" 660 | source = "registry+https://github.com/rust-lang/crates.io-index" 661 | checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae" 662 | 663 | [[package]] 664 | name = "proc-macro-crate" 665 | version = "1.1.3" 666 | source = "registry+https://github.com/rust-lang/crates.io-index" 667 | checksum = "e17d47ce914bf4de440332250b0edd23ce48c005f59fab39d3335866b114f11a" 668 | dependencies = [ 669 | "thiserror", 670 | "toml", 671 | ] 672 | 673 | [[package]] 674 | name = "proc-macro2" 675 | version = "1.0.42" 676 | source = "registry+https://github.com/rust-lang/crates.io-index" 677 | checksum = "c278e965f1d8cf32d6e0e96de3d3e79712178ae67986d9cf9151f51e95aac89b" 678 | dependencies = [ 679 | "unicode-ident", 680 | ] 681 | 682 | [[package]] 683 | name = "quote" 684 | version = "1.0.20" 685 | source = "registry+https://github.com/rust-lang/crates.io-index" 686 | checksum = "3bcdf212e9776fbcb2d23ab029360416bb1706b1aea2d1a5ba002727cbcab804" 687 | dependencies = [ 688 | "proc-macro2", 689 | ] 690 | 691 | [[package]] 692 | name = "redox_syscall" 693 | version = "0.2.16" 694 | source = "registry+https://github.com/rust-lang/crates.io-index" 695 | checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" 696 | dependencies = [ 697 | "bitflags", 698 | ] 699 | 700 | [[package]] 701 | name = "regex" 702 | version = "1.6.0" 703 | source = "registry+https://github.com/rust-lang/crates.io-index" 704 | checksum = "4c4eb3267174b8c6c2f654116623910a0fef09c4753f8dd83db29c48a0df988b" 705 | dependencies = [ 706 | "aho-corasick", 707 | "memchr", 708 | "regex-syntax", 709 | ] 710 | 711 | [[package]] 712 | name = "regex-syntax" 713 | version = "0.6.27" 714 | source = "registry+https://github.com/rust-lang/crates.io-index" 715 | checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244" 716 | 717 | [[package]] 718 | name = "remove_dir_all" 719 | version = "0.5.3" 720 | source = "registry+https://github.com/rust-lang/crates.io-index" 721 | checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" 722 | dependencies = [ 723 | "winapi", 724 | ] 725 | 726 | [[package]] 727 | name = "reqwest" 728 | version = "0.11.11" 729 | source = "registry+https://github.com/rust-lang/crates.io-index" 730 | checksum = "b75aa69a3f06bbcc66ede33af2af253c6f7a86b1ca0033f60c580a27074fbf92" 731 | dependencies = [ 732 | "base64 0.13.0", 733 | "bytes", 734 | "encoding_rs", 735 | "futures-core", 736 | "futures-util", 737 | "h2", 738 | "http", 739 | "http-body", 740 | "hyper", 741 | "hyper-tls", 742 | "ipnet", 743 | "js-sys", 744 | "lazy_static", 745 | "log", 746 | "mime", 747 | "native-tls", 748 | "percent-encoding", 749 | "pin-project-lite", 750 | "serde", 751 | "serde_json", 752 | "serde_urlencoded", 753 | "tokio", 754 | "tokio-native-tls", 755 | "tower-service", 756 | "url", 757 | "wasm-bindgen", 758 | "wasm-bindgen-futures", 759 | "web-sys", 760 | "winreg", 761 | ] 762 | 763 | [[package]] 764 | name = "rustc_version" 765 | version = "0.2.3" 766 | source = "registry+https://github.com/rust-lang/crates.io-index" 767 | checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" 768 | dependencies = [ 769 | "semver 0.9.0", 770 | ] 771 | 772 | [[package]] 773 | name = "rustc_version" 774 | version = "0.4.0" 775 | source = "registry+https://github.com/rust-lang/crates.io-index" 776 | checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" 777 | dependencies = [ 778 | "semver 1.0.12", 779 | ] 780 | 781 | [[package]] 782 | name = "ryu" 783 | version = "1.0.10" 784 | source = "registry+https://github.com/rust-lang/crates.io-index" 785 | checksum = "f3f6f92acf49d1b98f7a81226834412ada05458b7364277387724a237f062695" 786 | 787 | [[package]] 788 | name = "schannel" 789 | version = "0.1.20" 790 | source = "registry+https://github.com/rust-lang/crates.io-index" 791 | checksum = "88d6731146462ea25d9244b2ed5fd1d716d25c52e4d54aa4fb0f3c4e9854dbe2" 792 | dependencies = [ 793 | "lazy_static", 794 | "windows-sys", 795 | ] 796 | 797 | [[package]] 798 | name = "scopeguard" 799 | version = "1.1.0" 800 | source = "registry+https://github.com/rust-lang/crates.io-index" 801 | checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" 802 | 803 | [[package]] 804 | name = "security-framework" 805 | version = "2.6.1" 806 | source = "registry+https://github.com/rust-lang/crates.io-index" 807 | checksum = "2dc14f172faf8a0194a3aded622712b0de276821addc574fa54fc0a1167e10dc" 808 | dependencies = [ 809 | "bitflags", 810 | "core-foundation", 811 | "core-foundation-sys", 812 | "libc", 813 | "security-framework-sys", 814 | ] 815 | 816 | [[package]] 817 | name = "security-framework-sys" 818 | version = "2.6.1" 819 | source = "registry+https://github.com/rust-lang/crates.io-index" 820 | checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556" 821 | dependencies = [ 822 | "core-foundation-sys", 823 | "libc", 824 | ] 825 | 826 | [[package]] 827 | name = "semver" 828 | version = "0.9.0" 829 | source = "registry+https://github.com/rust-lang/crates.io-index" 830 | checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" 831 | dependencies = [ 832 | "semver-parser", 833 | ] 834 | 835 | [[package]] 836 | name = "semver" 837 | version = "1.0.12" 838 | source = "registry+https://github.com/rust-lang/crates.io-index" 839 | checksum = "a2333e6df6d6598f2b1974829f853c2b4c5f4a6e503c10af918081aa6f8564e1" 840 | 841 | [[package]] 842 | name = "semver-parser" 843 | version = "0.7.0" 844 | source = "registry+https://github.com/rust-lang/crates.io-index" 845 | checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" 846 | 847 | [[package]] 848 | name = "serde" 849 | version = "1.0.140" 850 | source = "registry+https://github.com/rust-lang/crates.io-index" 851 | checksum = "fc855a42c7967b7c369eb5860f7164ef1f6f81c20c7cc1141f2a604e18723b03" 852 | dependencies = [ 853 | "serde_derive", 854 | ] 855 | 856 | [[package]] 857 | name = "serde_derive" 858 | version = "1.0.140" 859 | source = "registry+https://github.com/rust-lang/crates.io-index" 860 | checksum = "6f2122636b9fe3b81f1cb25099fcf2d3f542cdb1d45940d56c713158884a05da" 861 | dependencies = [ 862 | "proc-macro2", 863 | "quote", 864 | "syn", 865 | ] 866 | 867 | [[package]] 868 | name = "serde_json" 869 | version = "1.0.82" 870 | source = "registry+https://github.com/rust-lang/crates.io-index" 871 | checksum = "82c2c1fdcd807d1098552c5b9a36e425e42e9fbd7c6a37a8425f390f781f7fa7" 872 | dependencies = [ 873 | "indexmap", 874 | "itoa", 875 | "ryu", 876 | "serde", 877 | ] 878 | 879 | [[package]] 880 | name = "serde_urlencoded" 881 | version = "0.7.1" 882 | source = "registry+https://github.com/rust-lang/crates.io-index" 883 | checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" 884 | dependencies = [ 885 | "form_urlencoded", 886 | "itoa", 887 | "ryu", 888 | "serde", 889 | ] 890 | 891 | [[package]] 892 | name = "serde_v8" 893 | version = "0.53.0" 894 | source = "registry+https://github.com/rust-lang/crates.io-index" 895 | checksum = "0b0c0792ac64702a8aba4f6520b190ea5651db42266136636ad2a6d04811686f" 896 | dependencies = [ 897 | "bytes", 898 | "derive_more", 899 | "serde", 900 | "smallvec", 901 | "v8", 902 | ] 903 | 904 | [[package]] 905 | name = "signal-hook-registry" 906 | version = "1.4.0" 907 | source = "registry+https://github.com/rust-lang/crates.io-index" 908 | checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0" 909 | dependencies = [ 910 | "libc", 911 | ] 912 | 913 | [[package]] 914 | name = "slab" 915 | version = "0.4.7" 916 | source = "registry+https://github.com/rust-lang/crates.io-index" 917 | checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" 918 | dependencies = [ 919 | "autocfg", 920 | ] 921 | 922 | [[package]] 923 | name = "smallvec" 924 | version = "1.9.0" 925 | source = "registry+https://github.com/rust-lang/crates.io-index" 926 | checksum = "2fd0db749597d91ff862fd1d55ea87f7855a744a8425a64695b6fca237d1dad1" 927 | 928 | [[package]] 929 | name = "socket2" 930 | version = "0.4.4" 931 | source = "registry+https://github.com/rust-lang/crates.io-index" 932 | checksum = "66d72b759436ae32898a2af0a14218dbf55efde3feeb170eb623637db85ee1e0" 933 | dependencies = [ 934 | "libc", 935 | "winapi", 936 | ] 937 | 938 | [[package]] 939 | name = "sourcemap" 940 | version = "6.0.1" 941 | source = "registry+https://github.com/rust-lang/crates.io-index" 942 | checksum = "6e031f2463ecbdd5f34c950f89f5c1e1032f22c0f8e3dc4bdb2e8b6658cf61eb" 943 | dependencies = [ 944 | "base64 0.11.0", 945 | "if_chain", 946 | "lazy_static", 947 | "regex", 948 | "rustc_version 0.2.3", 949 | "serde", 950 | "serde_json", 951 | "url", 952 | ] 953 | 954 | [[package]] 955 | name = "syn" 956 | version = "1.0.98" 957 | source = "registry+https://github.com/rust-lang/crates.io-index" 958 | checksum = "c50aef8a904de4c23c788f104b7dddc7d6f79c647c7c8ce4cc8f73eb0ca773dd" 959 | dependencies = [ 960 | "proc-macro2", 961 | "quote", 962 | "unicode-ident", 963 | ] 964 | 965 | [[package]] 966 | name = "tempfile" 967 | version = "3.3.0" 968 | source = "registry+https://github.com/rust-lang/crates.io-index" 969 | checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" 970 | dependencies = [ 971 | "cfg-if", 972 | "fastrand", 973 | "libc", 974 | "redox_syscall", 975 | "remove_dir_all", 976 | "winapi", 977 | ] 978 | 979 | [[package]] 980 | name = "thiserror" 981 | version = "1.0.31" 982 | source = "registry+https://github.com/rust-lang/crates.io-index" 983 | checksum = "bd829fe32373d27f76265620b5309d0340cb8550f523c1dda251d6298069069a" 984 | dependencies = [ 985 | "thiserror-impl", 986 | ] 987 | 988 | [[package]] 989 | name = "thiserror-impl" 990 | version = "1.0.31" 991 | source = "registry+https://github.com/rust-lang/crates.io-index" 992 | checksum = "0396bc89e626244658bef819e22d0cc459e795a5ebe878e6ec336d1674a8d79a" 993 | dependencies = [ 994 | "proc-macro2", 995 | "quote", 996 | "syn", 997 | ] 998 | 999 | [[package]] 1000 | name = "tinyvec" 1001 | version = "1.6.0" 1002 | source = "registry+https://github.com/rust-lang/crates.io-index" 1003 | checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" 1004 | dependencies = [ 1005 | "tinyvec_macros", 1006 | ] 1007 | 1008 | [[package]] 1009 | name = "tinyvec_macros" 1010 | version = "0.1.0" 1011 | source = "registry+https://github.com/rust-lang/crates.io-index" 1012 | checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" 1013 | 1014 | [[package]] 1015 | name = "tokio" 1016 | version = "1.20.1" 1017 | source = "registry+https://github.com/rust-lang/crates.io-index" 1018 | checksum = "7a8325f63a7d4774dd041e363b2409ed1c5cbbd0f867795e661df066b2b0a581" 1019 | dependencies = [ 1020 | "autocfg", 1021 | "bytes", 1022 | "libc", 1023 | "memchr", 1024 | "mio", 1025 | "num_cpus", 1026 | "once_cell", 1027 | "parking_lot", 1028 | "pin-project-lite", 1029 | "signal-hook-registry", 1030 | "socket2", 1031 | "tokio-macros", 1032 | "winapi", 1033 | ] 1034 | 1035 | [[package]] 1036 | name = "tokio-macros" 1037 | version = "1.8.0" 1038 | source = "registry+https://github.com/rust-lang/crates.io-index" 1039 | checksum = "9724f9a975fb987ef7a3cd9be0350edcbe130698af5b8f7a631e23d42d052484" 1040 | dependencies = [ 1041 | "proc-macro2", 1042 | "quote", 1043 | "syn", 1044 | ] 1045 | 1046 | [[package]] 1047 | name = "tokio-native-tls" 1048 | version = "0.3.0" 1049 | source = "registry+https://github.com/rust-lang/crates.io-index" 1050 | checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b" 1051 | dependencies = [ 1052 | "native-tls", 1053 | "tokio", 1054 | ] 1055 | 1056 | [[package]] 1057 | name = "tokio-util" 1058 | version = "0.7.3" 1059 | source = "registry+https://github.com/rust-lang/crates.io-index" 1060 | checksum = "cc463cd8deddc3770d20f9852143d50bf6094e640b485cb2e189a2099085ff45" 1061 | dependencies = [ 1062 | "bytes", 1063 | "futures-core", 1064 | "futures-sink", 1065 | "pin-project-lite", 1066 | "tokio", 1067 | "tracing", 1068 | ] 1069 | 1070 | [[package]] 1071 | name = "toml" 1072 | version = "0.5.9" 1073 | source = "registry+https://github.com/rust-lang/crates.io-index" 1074 | checksum = "8d82e1a7758622a465f8cee077614c73484dac5b836c02ff6a40d5d1010324d7" 1075 | dependencies = [ 1076 | "serde", 1077 | ] 1078 | 1079 | [[package]] 1080 | name = "tower-service" 1081 | version = "0.3.2" 1082 | source = "registry+https://github.com/rust-lang/crates.io-index" 1083 | checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" 1084 | 1085 | [[package]] 1086 | name = "tracing" 1087 | version = "0.1.36" 1088 | source = "registry+https://github.com/rust-lang/crates.io-index" 1089 | checksum = "2fce9567bd60a67d08a16488756721ba392f24f29006402881e43b19aac64307" 1090 | dependencies = [ 1091 | "cfg-if", 1092 | "pin-project-lite", 1093 | "tracing-core", 1094 | ] 1095 | 1096 | [[package]] 1097 | name = "tracing-core" 1098 | version = "0.1.29" 1099 | source = "registry+https://github.com/rust-lang/crates.io-index" 1100 | checksum = "5aeea4303076558a00714b823f9ad67d58a3bbda1df83d8827d21193156e22f7" 1101 | dependencies = [ 1102 | "once_cell", 1103 | ] 1104 | 1105 | [[package]] 1106 | name = "try-lock" 1107 | version = "0.2.3" 1108 | source = "registry+https://github.com/rust-lang/crates.io-index" 1109 | checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" 1110 | 1111 | [[package]] 1112 | name = "unicode-bidi" 1113 | version = "0.3.8" 1114 | source = "registry+https://github.com/rust-lang/crates.io-index" 1115 | checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" 1116 | 1117 | [[package]] 1118 | name = "unicode-ident" 1119 | version = "1.0.2" 1120 | source = "registry+https://github.com/rust-lang/crates.io-index" 1121 | checksum = "15c61ba63f9235225a22310255a29b806b907c9b8c964bcbd0a2c70f3f2deea7" 1122 | 1123 | [[package]] 1124 | name = "unicode-normalization" 1125 | version = "0.1.21" 1126 | source = "registry+https://github.com/rust-lang/crates.io-index" 1127 | checksum = "854cbdc4f7bc6ae19c820d44abdc3277ac3e1b2b93db20a636825d9322fb60e6" 1128 | dependencies = [ 1129 | "tinyvec", 1130 | ] 1131 | 1132 | [[package]] 1133 | name = "url" 1134 | version = "2.2.2" 1135 | source = "registry+https://github.com/rust-lang/crates.io-index" 1136 | checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c" 1137 | dependencies = [ 1138 | "form_urlencoded", 1139 | "idna", 1140 | "matches", 1141 | "percent-encoding", 1142 | "serde", 1143 | ] 1144 | 1145 | [[package]] 1146 | name = "v8" 1147 | version = "0.44.3" 1148 | source = "registry+https://github.com/rust-lang/crates.io-index" 1149 | checksum = "f3f92c29dd66c7342443280695afc5bb79d773c3aa3eb02978cf24f058ae2b3d" 1150 | dependencies = [ 1151 | "bitflags", 1152 | "fslock", 1153 | "lazy_static", 1154 | "libc", 1155 | "which", 1156 | ] 1157 | 1158 | [[package]] 1159 | name = "vcpkg" 1160 | version = "0.2.15" 1161 | source = "registry+https://github.com/rust-lang/crates.io-index" 1162 | checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" 1163 | 1164 | [[package]] 1165 | name = "want" 1166 | version = "0.3.0" 1167 | source = "registry+https://github.com/rust-lang/crates.io-index" 1168 | checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" 1169 | dependencies = [ 1170 | "log", 1171 | "try-lock", 1172 | ] 1173 | 1174 | [[package]] 1175 | name = "wasi" 1176 | version = "0.11.0+wasi-snapshot-preview1" 1177 | source = "registry+https://github.com/rust-lang/crates.io-index" 1178 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 1179 | 1180 | [[package]] 1181 | name = "wasm-bindgen" 1182 | version = "0.2.82" 1183 | source = "registry+https://github.com/rust-lang/crates.io-index" 1184 | checksum = "fc7652e3f6c4706c8d9cd54832c4a4ccb9b5336e2c3bd154d5cccfbf1c1f5f7d" 1185 | dependencies = [ 1186 | "cfg-if", 1187 | "wasm-bindgen-macro", 1188 | ] 1189 | 1190 | [[package]] 1191 | name = "wasm-bindgen-backend" 1192 | version = "0.2.82" 1193 | source = "registry+https://github.com/rust-lang/crates.io-index" 1194 | checksum = "662cd44805586bd52971b9586b1df85cdbbd9112e4ef4d8f41559c334dc6ac3f" 1195 | dependencies = [ 1196 | "bumpalo", 1197 | "log", 1198 | "once_cell", 1199 | "proc-macro2", 1200 | "quote", 1201 | "syn", 1202 | "wasm-bindgen-shared", 1203 | ] 1204 | 1205 | [[package]] 1206 | name = "wasm-bindgen-futures" 1207 | version = "0.4.32" 1208 | source = "registry+https://github.com/rust-lang/crates.io-index" 1209 | checksum = "fa76fb221a1f8acddf5b54ace85912606980ad661ac7a503b4570ffd3a624dad" 1210 | dependencies = [ 1211 | "cfg-if", 1212 | "js-sys", 1213 | "wasm-bindgen", 1214 | "web-sys", 1215 | ] 1216 | 1217 | [[package]] 1218 | name = "wasm-bindgen-macro" 1219 | version = "0.2.82" 1220 | source = "registry+https://github.com/rust-lang/crates.io-index" 1221 | checksum = "b260f13d3012071dfb1512849c033b1925038373aea48ced3012c09df952c602" 1222 | dependencies = [ 1223 | "quote", 1224 | "wasm-bindgen-macro-support", 1225 | ] 1226 | 1227 | [[package]] 1228 | name = "wasm-bindgen-macro-support" 1229 | version = "0.2.82" 1230 | source = "registry+https://github.com/rust-lang/crates.io-index" 1231 | checksum = "5be8e654bdd9b79216c2929ab90721aa82faf65c48cdf08bdc4e7f51357b80da" 1232 | dependencies = [ 1233 | "proc-macro2", 1234 | "quote", 1235 | "syn", 1236 | "wasm-bindgen-backend", 1237 | "wasm-bindgen-shared", 1238 | ] 1239 | 1240 | [[package]] 1241 | name = "wasm-bindgen-shared" 1242 | version = "0.2.82" 1243 | source = "registry+https://github.com/rust-lang/crates.io-index" 1244 | checksum = "6598dd0bd3c7d51095ff6531a5b23e02acdc81804e30d8f07afb77b7215a140a" 1245 | 1246 | [[package]] 1247 | name = "web-sys" 1248 | version = "0.3.59" 1249 | source = "registry+https://github.com/rust-lang/crates.io-index" 1250 | checksum = "ed055ab27f941423197eb86b2035720b1a3ce40504df082cac2ecc6ed73335a1" 1251 | dependencies = [ 1252 | "js-sys", 1253 | "wasm-bindgen", 1254 | ] 1255 | 1256 | [[package]] 1257 | name = "which" 1258 | version = "4.2.5" 1259 | source = "registry+https://github.com/rust-lang/crates.io-index" 1260 | checksum = "5c4fb54e6113b6a8772ee41c3404fb0301ac79604489467e0a9ce1f3e97c24ae" 1261 | dependencies = [ 1262 | "either", 1263 | "lazy_static", 1264 | "libc", 1265 | ] 1266 | 1267 | [[package]] 1268 | name = "winapi" 1269 | version = "0.3.9" 1270 | source = "registry+https://github.com/rust-lang/crates.io-index" 1271 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 1272 | dependencies = [ 1273 | "winapi-i686-pc-windows-gnu", 1274 | "winapi-x86_64-pc-windows-gnu", 1275 | ] 1276 | 1277 | [[package]] 1278 | name = "winapi-i686-pc-windows-gnu" 1279 | version = "0.4.0" 1280 | source = "registry+https://github.com/rust-lang/crates.io-index" 1281 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 1282 | 1283 | [[package]] 1284 | name = "winapi-x86_64-pc-windows-gnu" 1285 | version = "0.4.0" 1286 | source = "registry+https://github.com/rust-lang/crates.io-index" 1287 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 1288 | 1289 | [[package]] 1290 | name = "windows-sys" 1291 | version = "0.36.1" 1292 | source = "registry+https://github.com/rust-lang/crates.io-index" 1293 | checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" 1294 | dependencies = [ 1295 | "windows_aarch64_msvc", 1296 | "windows_i686_gnu", 1297 | "windows_i686_msvc", 1298 | "windows_x86_64_gnu", 1299 | "windows_x86_64_msvc", 1300 | ] 1301 | 1302 | [[package]] 1303 | name = "windows_aarch64_msvc" 1304 | version = "0.36.1" 1305 | source = "registry+https://github.com/rust-lang/crates.io-index" 1306 | checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" 1307 | 1308 | [[package]] 1309 | name = "windows_i686_gnu" 1310 | version = "0.36.1" 1311 | source = "registry+https://github.com/rust-lang/crates.io-index" 1312 | checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" 1313 | 1314 | [[package]] 1315 | name = "windows_i686_msvc" 1316 | version = "0.36.1" 1317 | source = "registry+https://github.com/rust-lang/crates.io-index" 1318 | checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" 1319 | 1320 | [[package]] 1321 | name = "windows_x86_64_gnu" 1322 | version = "0.36.1" 1323 | source = "registry+https://github.com/rust-lang/crates.io-index" 1324 | checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" 1325 | 1326 | [[package]] 1327 | name = "windows_x86_64_msvc" 1328 | version = "0.36.1" 1329 | source = "registry+https://github.com/rust-lang/crates.io-index" 1330 | checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" 1331 | 1332 | [[package]] 1333 | name = "winreg" 1334 | version = "0.10.1" 1335 | source = "registry+https://github.com/rust-lang/crates.io-index" 1336 | checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" 1337 | dependencies = [ 1338 | "winapi", 1339 | ] 1340 | 1341 | [[package]] 1342 | name = "zjs" 1343 | version = "0.1.0" 1344 | dependencies = [ 1345 | "deno_core", 1346 | "reqwest", 1347 | "tokio", 1348 | ] 1349 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "zjs" 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.142.0" 10 | tokio = { version = "1.19.2", features = ["full"] } 11 | reqwest = {version = "0.11.11", features = ["json"]} -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # zjs - Yet Another JavaScript Runtime 2 | Recently I saw a blog post which immediately caught my eye; ["Roll your own Javascript runtime"](https://deno.com/blog/roll-your-own-javascript-runtime) written by the folks over at Deno. Given the proliferation of Javascript runtimes over the past few years, I thought *"why not, I'll make my own Javascript runtime"*. The result is quite interesting, with ~100 lines of code we're able to run Javascript outside of a browser, and even send HTTP requests. 3 | 4 | ## Requirements 5 | `zjs` requires `cargo` and `rustc` to be installed. The following versions are confirmed to work: 6 | ``` 7 | $ cargo -V 8 | cargo 1.62.1 (a748cf5a3 2022-06-08) 9 | $ rustc -V 10 | rustc 1.62.1 (e092d0b6b 2022-07-16) 11 | ``` 12 | ## Installation 13 | If you want to try out `zjs` for yourself, follow the steps below: 14 | ``` 15 | # Clone the repository 16 | git clone git@github.com:JLCarveth/zjs.git 17 | 18 | cd zjs 19 | 20 | cargo build 21 | ``` 22 | Once compiled, a `zjs` binary will be available at `target/debug/zjs`. You can run the example file with the following command: 23 | ``` 24 | target/debug/zjs example.js 25 | ``` 26 | The following should be output to the console: 27 | ``` 28 | [out]: "Hello, zjs!" 29 | [err]: "Uh oh... Something went wrong." 30 | [err]: "Unable to read file" "./log.txt" {} 31 | [out]: "Read from a file" "./log.txt" "contents:" "I can write to a file." 32 | [out]: "Removing file" "./log.txt" 33 | [out]: "Removed file" 34 | [out]: "Sending a GET HTTP Request" 35 | [out]: "[\"0439f6cd-9a1a-412b-973f-3b3ba56ea0f9\"]" 36 | ``` 37 | -------------------------------------------------------------------------------- /example.js: -------------------------------------------------------------------------------- 1 | console.log("Hello, zjs!") 2 | console.error("Uh oh... Something went wrong."); 3 | 4 | const path = "./log.txt"; 5 | 6 | try { 7 | const contents = await zjs.readFile(path); 8 | console.log("Read from a file", contents); 9 | } catch (err) { 10 | console.error("Unable to read file", path, err); 11 | } 12 | 13 | await zjs.writeFile(path, "I can write to a file."); 14 | const contents = await zjs.readFile(path); 15 | console.log("Read from a file", path, "contents:", contents); 16 | console.log("Removing file", path); 17 | zjs.removeFile(path); 18 | console.log("Removed file") 19 | 20 | // Try to send an HTTP request 21 | console.log("Sending a GET HTTP Request") 22 | let response = await http.get("https://www.uuidtools.com/api/generate/v4"); 23 | console.log(response); 24 | -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | /** 2 | * My first rust program, a Javascript runtime using deno_core 3 | * https://deno.com/blog/roll-your-own-javascript-runtime 4 | */ 5 | use deno_core::error::AnyError; 6 | use std::rc::Rc; 7 | use deno_core::op; 8 | use deno_core::Extension; 9 | use reqwest; 10 | 11 | #[op] 12 | async fn op_http_get_request(uri : String) -> Result { 13 | let response = reqwest::get(uri) 14 | .await? 15 | .text() 16 | //.json::>() 17 | .await?; 18 | Ok(response) 19 | } 20 | 21 | #[op] 22 | async fn op_read_file(path : String) -> Result { 23 | let contents = tokio::fs::read_to_string(path).await?; 24 | Ok(contents) 25 | } 26 | 27 | #[op] 28 | async fn op_write_file(path : String, contents : String) -> Result<(), AnyError> { 29 | tokio::fs::write(path, contents).await?; 30 | Ok(()) 31 | } 32 | 33 | #[op] 34 | fn op_remove_file(path : String) -> Result<(), AnyError> { 35 | std::fs::remove_file(path)?; 36 | Ok(()) 37 | } 38 | 39 | async fn zjs(file_path: &str) -> Result<(), AnyError> { 40 | let main_module = deno_core::resolve_path(file_path)?; 41 | let zjs_extension = Extension::builder().ops(vec![ 42 | op_read_file::decl(), 43 | op_write_file::decl(), 44 | op_remove_file::decl(), 45 | ]).build(); 46 | 47 | // HTTP Extension 48 | let http_extension = Extension::builder().ops(vec![ 49 | op_http_get_request::decl(), 50 | ]).build(); 51 | 52 | let mut js_runtime = deno_core::JsRuntime::new(deno_core::RuntimeOptions { 53 | module_loader: Some(Rc::new(deno_core::FsModuleLoader)), 54 | extensions : vec![zjs_extension, http_extension], 55 | ..Default::default() 56 | }); 57 | js_runtime.execute_script("[zjs:runtime.js]", include_str!("./runtime.js")).unwrap(); 58 | 59 | let mod_id = js_runtime.load_main_module(&main_module, None).await?; 60 | let result = js_runtime.mod_evaluate(mod_id); 61 | js_runtime.run_event_loop(false).await?; 62 | result.await? 63 | } 64 | 65 | fn main() { 66 | let runtime = tokio::runtime::Builder::new_current_thread() 67 | .enable_all() 68 | .build().unwrap(); 69 | if let Err(error) = runtime.block_on(zjs("./example.js")) { 70 | eprintln!("error: {}", error); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /src/runtime.js: -------------------------------------------------------------------------------- 1 | // runtime.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.print(`[out]: ${argsToMessage(...args)}\n`, false); 12 | }, 13 | error : (...args) => { 14 | core.print(`[err]: ${argsToMessage(...args)}\n`, true); 15 | } 16 | }; 17 | 18 | globalThis.zjs = { 19 | readFile : (path) => { 20 | return core.opAsync("op_read_file", path); 21 | }, 22 | 23 | writeFile : (path, contents) => { 24 | return core.opAsync("op_write_file", path, contents); 25 | }, 26 | 27 | removeFile : (path) => { 28 | return core.opSync("op_remove_file", path); 29 | }, 30 | } 31 | 32 | globalThis.http = { 33 | get : (path) => { 34 | return core.opAsync("op_http_get_request", path); 35 | } 36 | } 37 | })(globalThis); --------------------------------------------------------------------------------