Prepare, configure, and manage Firecracker microVMs in seconds!
virtualization linux microvm firecracker

feat: add fire-client and fire-server crates for MicroVM management

- Created `fire-client` crate with dependencies on `anyhow` and `reqwest`.
- Created `fire-server` crate with dependencies on `actix-web`, `utoipa`, and others for API documentation and handling.
- Implemented MicroVM API endpoints in `fire-server` for creating, deleting, retrieving, listing, starting, and stopping MicroVMs.
- Added SSH keys support in `fire-config` for MicroVM configuration.
- Integrated `fire-server` into the main application with a new `serve` command.
- Updated `firecracker-up` to include `fire-client` and `fire-server` dependencies and added command-line options for SSH keys.

+1537 -23
+1301 -20
Cargo.lock
··· 3 3 version = 4 4 4 5 5 [[package]] 6 + name = "actix-codec" 7 + version = "0.5.2" 8 + source = "registry+https://github.com/rust-lang/crates.io-index" 9 + checksum = "5f7b0a21988c1bf877cf4759ef5ddaac04c1c9fe808c9142ecb78ba97d97a28a" 10 + dependencies = [ 11 + "bitflags 2.9.1", 12 + "bytes", 13 + "futures-core", 14 + "futures-sink", 15 + "memchr", 16 + "pin-project-lite", 17 + "tokio", 18 + "tokio-util", 19 + "tracing", 20 + ] 21 + 22 + [[package]] 23 + name = "actix-http" 24 + version = "3.11.1" 25 + source = "registry+https://github.com/rust-lang/crates.io-index" 26 + checksum = "44cceded2fb55f3c4b67068fa64962e2ca59614edc5b03167de9ff82ae803da0" 27 + dependencies = [ 28 + "actix-codec", 29 + "actix-rt", 30 + "actix-service", 31 + "actix-utils", 32 + "base64", 33 + "bitflags 2.9.1", 34 + "brotli", 35 + "bytes", 36 + "bytestring", 37 + "derive_more", 38 + "encoding_rs", 39 + "flate2", 40 + "foldhash", 41 + "futures-core", 42 + "h2 0.3.27", 43 + "http 0.2.12", 44 + "httparse", 45 + "httpdate", 46 + "itoa", 47 + "language-tags", 48 + "local-channel", 49 + "mime", 50 + "percent-encoding", 51 + "pin-project-lite", 52 + "rand 0.9.2", 53 + "sha1", 54 + "smallvec", 55 + "tokio", 56 + "tokio-util", 57 + "tracing", 58 + "zstd", 59 + ] 60 + 61 + [[package]] 62 + name = "actix-macros" 63 + version = "0.2.4" 64 + source = "registry+https://github.com/rust-lang/crates.io-index" 65 + checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb" 66 + dependencies = [ 67 + "quote", 68 + "syn 2.0.104", 69 + ] 70 + 71 + [[package]] 72 + name = "actix-router" 73 + version = "0.5.3" 74 + source = "registry+https://github.com/rust-lang/crates.io-index" 75 + checksum = "13d324164c51f63867b57e73ba5936ea151b8a41a1d23d1031eeb9f70d0236f8" 76 + dependencies = [ 77 + "bytestring", 78 + "cfg-if", 79 + "http 0.2.12", 80 + "regex", 81 + "regex-lite", 82 + "serde", 83 + "tracing", 84 + ] 85 + 86 + [[package]] 87 + name = "actix-rt" 88 + version = "2.11.0" 89 + source = "registry+https://github.com/rust-lang/crates.io-index" 90 + checksum = "92589714878ca59a7626ea19734f0e07a6a875197eec751bb5d3f99e64998c63" 91 + dependencies = [ 92 + "futures-core", 93 + "tokio", 94 + ] 95 + 96 + [[package]] 97 + name = "actix-server" 98 + version = "2.6.0" 99 + source = "registry+https://github.com/rust-lang/crates.io-index" 100 + checksum = "a65064ea4a457eaf07f2fba30b4c695bf43b721790e9530d26cb6f9019ff7502" 101 + dependencies = [ 102 + "actix-rt", 103 + "actix-service", 104 + "actix-utils", 105 + "futures-core", 106 + "futures-util", 107 + "mio", 108 + "socket2 0.5.10", 109 + "tokio", 110 + "tracing", 111 + ] 112 + 113 + [[package]] 114 + name = "actix-service" 115 + version = "2.0.3" 116 + source = "registry+https://github.com/rust-lang/crates.io-index" 117 + checksum = "9e46f36bf0e5af44bdc4bdb36fbbd421aa98c79a9bce724e1edeb3894e10dc7f" 118 + dependencies = [ 119 + "futures-core", 120 + "pin-project-lite", 121 + ] 122 + 123 + [[package]] 124 + name = "actix-utils" 125 + version = "3.0.1" 126 + source = "registry+https://github.com/rust-lang/crates.io-index" 127 + checksum = "88a1dcdff1466e3c2488e1cb5c36a71822750ad43839937f85d2f4d9f8b705d8" 128 + dependencies = [ 129 + "local-waker", 130 + "pin-project-lite", 131 + ] 132 + 133 + [[package]] 134 + name = "actix-web" 135 + version = "4.11.0" 136 + source = "registry+https://github.com/rust-lang/crates.io-index" 137 + checksum = "a597b77b5c6d6a1e1097fddde329a83665e25c5437c696a3a9a4aa514a614dea" 138 + dependencies = [ 139 + "actix-codec", 140 + "actix-http", 141 + "actix-macros", 142 + "actix-router", 143 + "actix-rt", 144 + "actix-server", 145 + "actix-service", 146 + "actix-utils", 147 + "actix-web-codegen", 148 + "bytes", 149 + "bytestring", 150 + "cfg-if", 151 + "cookie", 152 + "derive_more", 153 + "encoding_rs", 154 + "foldhash", 155 + "futures-core", 156 + "futures-util", 157 + "impl-more", 158 + "itoa", 159 + "language-tags", 160 + "log", 161 + "mime", 162 + "once_cell", 163 + "pin-project-lite", 164 + "regex", 165 + "regex-lite", 166 + "serde", 167 + "serde_json", 168 + "serde_urlencoded", 169 + "smallvec", 170 + "socket2 0.5.10", 171 + "time", 172 + "tracing", 173 + "url", 174 + ] 175 + 176 + [[package]] 177 + name = "actix-web-codegen" 178 + version = "4.3.0" 179 + source = "registry+https://github.com/rust-lang/crates.io-index" 180 + checksum = "f591380e2e68490b5dfaf1dd1aa0ebe78d84ba7067078512b4ea6e4492d622b8" 181 + dependencies = [ 182 + "actix-router", 183 + "proc-macro2", 184 + "quote", 185 + "syn 2.0.104", 186 + ] 187 + 188 + [[package]] 6 189 name = "addr2line" 7 190 version = "0.24.2" 8 191 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 24 207 checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" 25 208 dependencies = [ 26 209 "memchr", 210 + ] 211 + 212 + [[package]] 213 + name = "alloc-no-stdlib" 214 + version = "2.0.4" 215 + source = "registry+https://github.com/rust-lang/crates.io-index" 216 + checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" 217 + 218 + [[package]] 219 + name = "alloc-stdlib" 220 + version = "0.2.2" 221 + source = "registry+https://github.com/rust-lang/crates.io-index" 222 + checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" 223 + dependencies = [ 224 + "alloc-no-stdlib", 27 225 ] 28 226 29 227 [[package]] ··· 93 291 94 292 [[package]] 95 293 name = "anyhow" 96 - version = "1.0.98" 294 + version = "1.0.99" 97 295 source = "registry+https://github.com/rust-lang/crates.io-index" 98 - checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" 296 + checksum = "b0674a1ddeecb70197781e945de4b3b8ffb61fa939a5597bcf48503737663100" 297 + 298 + [[package]] 299 + name = "arbitrary" 300 + version = "1.4.2" 301 + source = "registry+https://github.com/rust-lang/crates.io-index" 302 + checksum = "c3d036a3c4ab069c7b410a2ce876bd74808d2d0888a82667669f8e783a898bf1" 303 + dependencies = [ 304 + "derive_arbitrary", 305 + ] 99 306 100 307 [[package]] 101 308 name = "atoi" ··· 105 312 dependencies = [ 106 313 "num-traits", 107 314 ] 315 + 316 + [[package]] 317 + name = "atomic-waker" 318 + version = "1.1.2" 319 + source = "registry+https://github.com/rust-lang/crates.io-index" 320 + checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" 108 321 109 322 [[package]] 110 323 name = "atty" ··· 218 431 ] 219 432 220 433 [[package]] 434 + name = "brotli" 435 + version = "8.0.2" 436 + source = "registry+https://github.com/rust-lang/crates.io-index" 437 + checksum = "4bd8b9603c7aa97359dbd97ecf258968c95f3adddd6db2f7e7a5bef101c84560" 438 + dependencies = [ 439 + "alloc-no-stdlib", 440 + "alloc-stdlib", 441 + "brotli-decompressor", 442 + ] 443 + 444 + [[package]] 445 + name = "brotli-decompressor" 446 + version = "5.0.0" 447 + source = "registry+https://github.com/rust-lang/crates.io-index" 448 + checksum = "874bb8112abecc98cbd6d81ea4fa7e94fb9449648c93cc89aa40c81c24d7de03" 449 + dependencies = [ 450 + "alloc-no-stdlib", 451 + "alloc-stdlib", 452 + ] 453 + 454 + [[package]] 221 455 name = "bumpalo" 222 456 version = "3.19.0" 223 457 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 236 470 checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" 237 471 238 472 [[package]] 473 + name = "bytestring" 474 + version = "1.5.0" 475 + source = "registry+https://github.com/rust-lang/crates.io-index" 476 + checksum = "113b4343b5f6617e7ad401ced8de3cc8b012e73a594347c307b90db3e9271289" 477 + dependencies = [ 478 + "bytes", 479 + ] 480 + 481 + [[package]] 239 482 name = "cc" 240 483 version = "1.2.30" 241 484 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 262 505 checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268" 263 506 264 507 [[package]] 508 + name = "cfg_aliases" 509 + version = "0.2.1" 510 + source = "registry+https://github.com/rust-lang/crates.io-index" 511 + checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" 512 + 513 + [[package]] 265 514 name = "chrono" 266 515 version = "0.4.42" 267 516 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 383 632 checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" 384 633 385 634 [[package]] 635 + name = "cookie" 636 + version = "0.16.2" 637 + source = "registry+https://github.com/rust-lang/crates.io-index" 638 + checksum = "e859cd57d0710d9e06c381b550c06e76992472a8c6d527aecd2fc673dcc231fb" 639 + dependencies = [ 640 + "percent-encoding", 641 + "time", 642 + "version_check", 643 + ] 644 + 645 + [[package]] 646 + name = "core-foundation" 647 + version = "0.9.4" 648 + source = "registry+https://github.com/rust-lang/crates.io-index" 649 + checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" 650 + dependencies = [ 651 + "core-foundation-sys", 652 + "libc", 653 + ] 654 + 655 + [[package]] 386 656 name = "core-foundation" 387 657 version = "0.10.1" 388 658 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 468 738 ] 469 739 470 740 [[package]] 741 + name = "deranged" 742 + version = "0.5.3" 743 + source = "registry+https://github.com/rust-lang/crates.io-index" 744 + checksum = "d630bccd429a5bb5a64b5e94f693bfc48c9f8566418fda4c494cc94f911f87cc" 745 + dependencies = [ 746 + "powerfmt", 747 + ] 748 + 749 + [[package]] 750 + name = "derive_arbitrary" 751 + version = "1.4.2" 752 + source = "registry+https://github.com/rust-lang/crates.io-index" 753 + checksum = "1e567bd82dcff979e4b03460c307b3cdc9e96fde3d73bed1496d2bc75d9dd62a" 754 + dependencies = [ 755 + "proc-macro2", 756 + "quote", 757 + "syn 2.0.104", 758 + ] 759 + 760 + [[package]] 761 + name = "derive_more" 762 + version = "2.0.1" 763 + source = "registry+https://github.com/rust-lang/crates.io-index" 764 + checksum = "093242cf7570c207c83073cf82f79706fe7b8317e98620a47d5be7c3d8497678" 765 + dependencies = [ 766 + "derive_more-impl", 767 + ] 768 + 769 + [[package]] 770 + name = "derive_more-impl" 771 + version = "2.0.1" 772 + source = "registry+https://github.com/rust-lang/crates.io-index" 773 + checksum = "bda628edc44c4bb645fbe0f758797143e4e07926f7ebf4e9bdfbd3d2ce621df3" 774 + dependencies = [ 775 + "proc-macro2", 776 + "quote", 777 + "syn 2.0.104", 778 + "unicode-xid", 779 + ] 780 + 781 + [[package]] 471 782 name = "digest" 472 783 version = "0.10.7" 473 784 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 533 844 ] 534 845 535 846 [[package]] 847 + name = "encoding_rs" 848 + version = "0.8.35" 849 + source = "registry+https://github.com/rust-lang/crates.io-index" 850 + checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" 851 + dependencies = [ 852 + "cfg-if", 853 + ] 854 + 855 + [[package]] 536 856 name = "equivalent" 537 857 version = "1.0.2" 538 858 source = "registry+https://github.com/rust-lang/crates.io-index" 539 859 checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" 540 860 541 861 [[package]] 862 + name = "errno" 863 + version = "0.3.14" 864 + source = "registry+https://github.com/rust-lang/crates.io-index" 865 + checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" 866 + dependencies = [ 867 + "libc", 868 + "windows-sys 0.61.0", 869 + ] 870 + 871 + [[package]] 542 872 name = "etcetera" 543 873 version = "0.8.0" 544 874 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 561 891 ] 562 892 563 893 [[package]] 894 + name = "fastrand" 895 + version = "2.3.0" 896 + source = "registry+https://github.com/rust-lang/crates.io-index" 897 + checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" 898 + 899 + [[package]] 900 + name = "fire-client" 901 + version = "0.1.0" 902 + dependencies = [ 903 + "anyhow", 904 + "reqwest", 905 + ] 906 + 907 + [[package]] 564 908 name = "fire-config" 565 909 version = "0.1.0" 566 910 dependencies = [ ··· 574 918 ] 575 919 576 920 [[package]] 921 + name = "fire-server" 922 + version = "0.1.0" 923 + dependencies = [ 924 + "actix-web", 925 + "anyhow", 926 + "owo-colors", 927 + "serde", 928 + "utoipa", 929 + "utoipa-actix-web", 930 + "utoipa-rapidoc", 931 + "utoipa-redoc", 932 + "utoipa-swagger-ui", 933 + ] 934 + 935 + [[package]] 577 936 name = "firecracker-prepare" 578 937 version = "0.1.0" 579 938 dependencies = [ ··· 624 983 "names", 625 984 "num_cpus", 626 985 "owo-colors", 627 - "rand", 986 + "rand 0.8.5", 628 987 "rumqttc", 629 988 "serde_json", 630 989 "tokio", ··· 638 997 "chrono", 639 998 "clap 4.5.41", 640 999 "dirs", 1000 + "fire-client", 641 1001 "fire-config", 1002 + "fire-server", 642 1003 "firecracker-prepare", 643 1004 "firecracker-process", 644 1005 "firecracker-state", ··· 658 1019 checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99" 659 1020 660 1021 [[package]] 1022 + name = "flate2" 1023 + version = "1.1.2" 1024 + source = "registry+https://github.com/rust-lang/crates.io-index" 1025 + checksum = "4a3d7db9596fecd151c5f638c0ee5d5bd487b6e0ea232e5dc96d5250f6f94b1d" 1026 + dependencies = [ 1027 + "crc32fast", 1028 + "libz-rs-sys", 1029 + "miniz_oxide", 1030 + ] 1031 + 1032 + [[package]] 661 1033 name = "flume" 662 1034 version = "0.11.1" 663 1035 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 669 1041 ] 670 1042 671 1043 [[package]] 1044 + name = "fnv" 1045 + version = "1.0.7" 1046 + source = "registry+https://github.com/rust-lang/crates.io-index" 1047 + checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 1048 + 1049 + [[package]] 672 1050 name = "foldhash" 673 1051 version = "0.1.5" 674 1052 source = "registry+https://github.com/rust-lang/crates.io-index" 675 1053 checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" 1054 + 1055 + [[package]] 1056 + name = "foreign-types" 1057 + version = "0.3.2" 1058 + source = "registry+https://github.com/rust-lang/crates.io-index" 1059 + checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" 1060 + dependencies = [ 1061 + "foreign-types-shared", 1062 + ] 1063 + 1064 + [[package]] 1065 + name = "foreign-types-shared" 1066 + version = "0.1.1" 1067 + source = "registry+https://github.com/rust-lang/crates.io-index" 1068 + checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" 676 1069 677 1070 [[package]] 678 1071 name = "form_urlencoded" ··· 778 1171 checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" 779 1172 dependencies = [ 780 1173 "cfg-if", 1174 + "js-sys", 781 1175 "libc", 782 1176 "wasi 0.11.1+wasi-snapshot-preview1", 1177 + "wasm-bindgen", 783 1178 ] 784 1179 785 1180 [[package]] ··· 789 1184 checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" 790 1185 dependencies = [ 791 1186 "cfg-if", 1187 + "js-sys", 792 1188 "libc", 793 1189 "r-efi", 794 1190 "wasi 0.14.5+wasi-0.2.4", 1191 + "wasm-bindgen", 795 1192 ] 796 1193 797 1194 [[package]] ··· 807 1204 checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" 808 1205 809 1206 [[package]] 1207 + name = "h2" 1208 + version = "0.3.27" 1209 + source = "registry+https://github.com/rust-lang/crates.io-index" 1210 + checksum = "0beca50380b1fc32983fc1cb4587bfa4bb9e78fc259aad4a0032d2080309222d" 1211 + dependencies = [ 1212 + "bytes", 1213 + "fnv", 1214 + "futures-core", 1215 + "futures-sink", 1216 + "futures-util", 1217 + "http 0.2.12", 1218 + "indexmap 2.10.0", 1219 + "slab", 1220 + "tokio", 1221 + "tokio-util", 1222 + "tracing", 1223 + ] 1224 + 1225 + [[package]] 1226 + name = "h2" 1227 + version = "0.4.12" 1228 + source = "registry+https://github.com/rust-lang/crates.io-index" 1229 + checksum = "f3c0b69cfcb4e1b9f1bf2f53f95f766e4661169728ec61cd3fe5a0166f2d1386" 1230 + dependencies = [ 1231 + "atomic-waker", 1232 + "bytes", 1233 + "fnv", 1234 + "futures-core", 1235 + "futures-sink", 1236 + "http 1.3.1", 1237 + "indexmap 2.10.0", 1238 + "slab", 1239 + "tokio", 1240 + "tokio-util", 1241 + "tracing", 1242 + ] 1243 + 1244 + [[package]] 810 1245 name = "hashbrown" 811 1246 version = "0.12.3" 812 1247 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 904 1339 ] 905 1340 906 1341 [[package]] 1342 + name = "http" 1343 + version = "0.2.12" 1344 + source = "registry+https://github.com/rust-lang/crates.io-index" 1345 + checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" 1346 + dependencies = [ 1347 + "bytes", 1348 + "fnv", 1349 + "itoa", 1350 + ] 1351 + 1352 + [[package]] 1353 + name = "http" 1354 + version = "1.3.1" 1355 + source = "registry+https://github.com/rust-lang/crates.io-index" 1356 + checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" 1357 + dependencies = [ 1358 + "bytes", 1359 + "fnv", 1360 + "itoa", 1361 + ] 1362 + 1363 + [[package]] 1364 + name = "http-body" 1365 + version = "1.0.1" 1366 + source = "registry+https://github.com/rust-lang/crates.io-index" 1367 + checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" 1368 + dependencies = [ 1369 + "bytes", 1370 + "http 1.3.1", 1371 + ] 1372 + 1373 + [[package]] 1374 + name = "http-body-util" 1375 + version = "0.1.3" 1376 + source = "registry+https://github.com/rust-lang/crates.io-index" 1377 + checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" 1378 + dependencies = [ 1379 + "bytes", 1380 + "futures-core", 1381 + "http 1.3.1", 1382 + "http-body", 1383 + "pin-project-lite", 1384 + ] 1385 + 1386 + [[package]] 1387 + name = "httparse" 1388 + version = "1.10.1" 1389 + source = "registry+https://github.com/rust-lang/crates.io-index" 1390 + checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" 1391 + 1392 + [[package]] 1393 + name = "httpdate" 1394 + version = "1.0.3" 1395 + source = "registry+https://github.com/rust-lang/crates.io-index" 1396 + checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" 1397 + 1398 + [[package]] 1399 + name = "hyper" 1400 + version = "1.7.0" 1401 + source = "registry+https://github.com/rust-lang/crates.io-index" 1402 + checksum = "eb3aa54a13a0dfe7fbe3a59e0c76093041720fdc77b110cc0fc260fafb4dc51e" 1403 + dependencies = [ 1404 + "atomic-waker", 1405 + "bytes", 1406 + "futures-channel", 1407 + "futures-core", 1408 + "h2 0.4.12", 1409 + "http 1.3.1", 1410 + "http-body", 1411 + "httparse", 1412 + "itoa", 1413 + "pin-project-lite", 1414 + "pin-utils", 1415 + "smallvec", 1416 + "tokio", 1417 + "want", 1418 + ] 1419 + 1420 + [[package]] 1421 + name = "hyper-rustls" 1422 + version = "0.27.7" 1423 + source = "registry+https://github.com/rust-lang/crates.io-index" 1424 + checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" 1425 + dependencies = [ 1426 + "http 1.3.1", 1427 + "hyper", 1428 + "hyper-util", 1429 + "rustls", 1430 + "rustls-pki-types", 1431 + "tokio", 1432 + "tokio-rustls", 1433 + "tower-service", 1434 + "webpki-roots 1.0.2", 1435 + ] 1436 + 1437 + [[package]] 1438 + name = "hyper-tls" 1439 + version = "0.6.0" 1440 + source = "registry+https://github.com/rust-lang/crates.io-index" 1441 + checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" 1442 + dependencies = [ 1443 + "bytes", 1444 + "http-body-util", 1445 + "hyper", 1446 + "hyper-util", 1447 + "native-tls", 1448 + "tokio", 1449 + "tokio-native-tls", 1450 + "tower-service", 1451 + ] 1452 + 1453 + [[package]] 1454 + name = "hyper-util" 1455 + version = "0.1.17" 1456 + source = "registry+https://github.com/rust-lang/crates.io-index" 1457 + checksum = "3c6995591a8f1380fcb4ba966a252a4b29188d51d2b89e3a252f5305be65aea8" 1458 + dependencies = [ 1459 + "base64", 1460 + "bytes", 1461 + "futures-channel", 1462 + "futures-core", 1463 + "futures-util", 1464 + "http 1.3.1", 1465 + "http-body", 1466 + "hyper", 1467 + "ipnet", 1468 + "libc", 1469 + "percent-encoding", 1470 + "pin-project-lite", 1471 + "socket2 0.6.0", 1472 + "system-configuration", 1473 + "tokio", 1474 + "tower-service", 1475 + "tracing", 1476 + "windows-registry", 1477 + ] 1478 + 1479 + [[package]] 907 1480 name = "iana-time-zone" 908 1481 version = "0.1.63" 909 1482 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1035 1608 ] 1036 1609 1037 1610 [[package]] 1611 + name = "impl-more" 1612 + version = "0.1.9" 1613 + source = "registry+https://github.com/rust-lang/crates.io-index" 1614 + checksum = "e8a5a9a0ff0086c7a148acb942baaabeadf9504d10400b5a05645853729b9cd2" 1615 + 1616 + [[package]] 1038 1617 name = "indexmap" 1039 1618 version = "1.9.3" 1040 1619 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1052 1631 dependencies = [ 1053 1632 "equivalent", 1054 1633 "hashbrown 0.15.4", 1634 + "serde", 1055 1635 ] 1056 1636 1057 1637 [[package]] ··· 1066 1646 ] 1067 1647 1068 1648 [[package]] 1649 + name = "ipnet" 1650 + version = "2.11.0" 1651 + source = "registry+https://github.com/rust-lang/crates.io-index" 1652 + checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" 1653 + 1654 + [[package]] 1655 + name = "iri-string" 1656 + version = "0.7.8" 1657 + source = "registry+https://github.com/rust-lang/crates.io-index" 1658 + checksum = "dbc5ebe9c3a1a7a5127f920a418f7585e9e758e911d0466ed004f393b0e380b2" 1659 + dependencies = [ 1660 + "memchr", 1661 + "serde", 1662 + ] 1663 + 1664 + [[package]] 1069 1665 name = "is_terminal_polyfill" 1070 1666 version = "1.70.1" 1071 1667 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1105 1701 "once_cell", 1106 1702 "wasm-bindgen", 1107 1703 ] 1704 + 1705 + [[package]] 1706 + name = "language-tags" 1707 + version = "0.3.2" 1708 + source = "registry+https://github.com/rust-lang/crates.io-index" 1709 + checksum = "d4345964bb142484797b161f473a503a434de77149dd8c7427788c6e13379388" 1108 1710 1109 1711 [[package]] 1110 1712 name = "lazy_static" ··· 1169 1771 ] 1170 1772 1171 1773 [[package]] 1774 + name = "libz-rs-sys" 1775 + version = "0.5.2" 1776 + source = "registry+https://github.com/rust-lang/crates.io-index" 1777 + checksum = "840db8cf39d9ec4dd794376f38acc40d0fc65eec2a8f484f7fd375b84602becd" 1778 + dependencies = [ 1779 + "zlib-rs", 1780 + ] 1781 + 1782 + [[package]] 1783 + name = "linux-raw-sys" 1784 + version = "0.11.0" 1785 + source = "registry+https://github.com/rust-lang/crates.io-index" 1786 + checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" 1787 + 1788 + [[package]] 1172 1789 name = "litemap" 1173 1790 version = "0.8.0" 1174 1791 source = "registry+https://github.com/rust-lang/crates.io-index" 1175 1792 checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956" 1176 1793 1177 1794 [[package]] 1795 + name = "local-channel" 1796 + version = "0.1.5" 1797 + source = "registry+https://github.com/rust-lang/crates.io-index" 1798 + checksum = "b6cbc85e69b8df4b8bb8b89ec634e7189099cea8927a276b7384ce5488e53ec8" 1799 + dependencies = [ 1800 + "futures-core", 1801 + "futures-sink", 1802 + "local-waker", 1803 + ] 1804 + 1805 + [[package]] 1806 + name = "local-waker" 1807 + version = "0.1.4" 1808 + source = "registry+https://github.com/rust-lang/crates.io-index" 1809 + checksum = "4d873d7c67ce09b42110d801813efbc9364414e356be9935700d368351657487" 1810 + 1811 + [[package]] 1178 1812 name = "lock_api" 1179 1813 version = "0.4.13" 1180 1814 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1191 1825 checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" 1192 1826 1193 1827 [[package]] 1828 + name = "lru-slab" 1829 + version = "0.1.2" 1830 + source = "registry+https://github.com/rust-lang/crates.io-index" 1831 + checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" 1832 + 1833 + [[package]] 1194 1834 name = "match_cfg" 1195 1835 version = "0.1.0" 1196 1836 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1219 1859 checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" 1220 1860 1221 1861 [[package]] 1862 + name = "mime" 1863 + version = "0.3.17" 1864 + source = "registry+https://github.com/rust-lang/crates.io-index" 1865 + checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" 1866 + 1867 + [[package]] 1868 + name = "mime_guess" 1869 + version = "2.0.5" 1870 + source = "registry+https://github.com/rust-lang/crates.io-index" 1871 + checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" 1872 + dependencies = [ 1873 + "mime", 1874 + "unicase", 1875 + ] 1876 + 1877 + [[package]] 1222 1878 name = "minimal-lexical" 1223 1879 version = "0.2.1" 1224 1880 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1240 1896 checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" 1241 1897 dependencies = [ 1242 1898 "libc", 1899 + "log", 1243 1900 "wasi 0.11.1+wasi-snapshot-preview1", 1244 1901 "windows-sys 0.59.0", 1245 1902 ] ··· 1251 1908 checksum = "7bddcd3bf5144b6392de80e04c347cd7fab2508f6df16a85fc496ecd5cec39bc" 1252 1909 dependencies = [ 1253 1910 "clap 3.2.25", 1254 - "rand", 1911 + "rand 0.8.5", 1912 + ] 1913 + 1914 + [[package]] 1915 + name = "native-tls" 1916 + version = "0.2.14" 1917 + source = "registry+https://github.com/rust-lang/crates.io-index" 1918 + checksum = "87de3442987e9dbec73158d5c715e7ad9072fda936bb03d19d7fa10e00520f0e" 1919 + dependencies = [ 1920 + "libc", 1921 + "log", 1922 + "openssl", 1923 + "openssl-probe", 1924 + "openssl-sys", 1925 + "schannel", 1926 + "security-framework 2.11.1", 1927 + "security-framework-sys", 1928 + "tempfile", 1255 1929 ] 1256 1930 1257 1931 [[package]] ··· 1276 1950 "num-integer", 1277 1951 "num-iter", 1278 1952 "num-traits", 1279 - "rand", 1953 + "rand 0.8.5", 1280 1954 "smallvec", 1281 1955 "zeroize", 1282 1956 ] 1957 + 1958 + [[package]] 1959 + name = "num-conv" 1960 + version = "0.1.0" 1961 + source = "registry+https://github.com/rust-lang/crates.io-index" 1962 + checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" 1283 1963 1284 1964 [[package]] 1285 1965 name = "num-integer" ··· 1343 2023 checksum = "a4895175b425cb1f87721b59f0f286c2092bd4af812243672510e1ac53e2e0ad" 1344 2024 1345 2025 [[package]] 2026 + name = "openssl" 2027 + version = "0.10.73" 2028 + source = "registry+https://github.com/rust-lang/crates.io-index" 2029 + checksum = "8505734d46c8ab1e19a1dce3aef597ad87dcb4c37e7188231769bd6bd51cebf8" 2030 + dependencies = [ 2031 + "bitflags 2.9.1", 2032 + "cfg-if", 2033 + "foreign-types", 2034 + "libc", 2035 + "once_cell", 2036 + "openssl-macros", 2037 + "openssl-sys", 2038 + ] 2039 + 2040 + [[package]] 2041 + name = "openssl-macros" 2042 + version = "0.1.1" 2043 + source = "registry+https://github.com/rust-lang/crates.io-index" 2044 + checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" 2045 + dependencies = [ 2046 + "proc-macro2", 2047 + "quote", 2048 + "syn 2.0.104", 2049 + ] 2050 + 2051 + [[package]] 1346 2052 name = "openssl-probe" 1347 2053 version = "0.1.6" 1348 2054 source = "registry+https://github.com/rust-lang/crates.io-index" 1349 2055 checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" 2056 + 2057 + [[package]] 2058 + name = "openssl-sys" 2059 + version = "0.9.109" 2060 + source = "registry+https://github.com/rust-lang/crates.io-index" 2061 + checksum = "90096e2e47630d78b7d1c20952dc621f957103f8bc2c8359ec81290d75238571" 2062 + dependencies = [ 2063 + "cc", 2064 + "libc", 2065 + "pkg-config", 2066 + "vcpkg", 2067 + ] 1350 2068 1351 2069 [[package]] 1352 2070 name = "option-ext" ··· 1459 2177 ] 1460 2178 1461 2179 [[package]] 2180 + name = "powerfmt" 2181 + version = "0.2.0" 2182 + source = "registry+https://github.com/rust-lang/crates.io-index" 2183 + checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" 2184 + 2185 + [[package]] 1462 2186 name = "ppv-lite86" 1463 2187 version = "0.2.21" 1464 2188 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1511 2235 ] 1512 2236 1513 2237 [[package]] 2238 + name = "quinn" 2239 + version = "0.11.9" 2240 + source = "registry+https://github.com/rust-lang/crates.io-index" 2241 + checksum = "b9e20a958963c291dc322d98411f541009df2ced7b5a4f2bd52337638cfccf20" 2242 + dependencies = [ 2243 + "bytes", 2244 + "cfg_aliases", 2245 + "pin-project-lite", 2246 + "quinn-proto", 2247 + "quinn-udp", 2248 + "rustc-hash", 2249 + "rustls", 2250 + "socket2 0.6.0", 2251 + "thiserror 2.0.12", 2252 + "tokio", 2253 + "tracing", 2254 + "web-time", 2255 + ] 2256 + 2257 + [[package]] 2258 + name = "quinn-proto" 2259 + version = "0.11.13" 2260 + source = "registry+https://github.com/rust-lang/crates.io-index" 2261 + checksum = "f1906b49b0c3bc04b5fe5d86a77925ae6524a19b816ae38ce1e426255f1d8a31" 2262 + dependencies = [ 2263 + "bytes", 2264 + "getrandom 0.3.3", 2265 + "lru-slab", 2266 + "rand 0.9.2", 2267 + "ring", 2268 + "rustc-hash", 2269 + "rustls", 2270 + "rustls-pki-types", 2271 + "slab", 2272 + "thiserror 2.0.12", 2273 + "tinyvec", 2274 + "tracing", 2275 + "web-time", 2276 + ] 2277 + 2278 + [[package]] 2279 + name = "quinn-udp" 2280 + version = "0.5.14" 2281 + source = "registry+https://github.com/rust-lang/crates.io-index" 2282 + checksum = "addec6a0dcad8a8d96a771f815f0eaf55f9d1805756410b39f5fa81332574cbd" 2283 + dependencies = [ 2284 + "cfg_aliases", 2285 + "libc", 2286 + "once_cell", 2287 + "socket2 0.6.0", 2288 + "tracing", 2289 + "windows-sys 0.59.0", 2290 + ] 2291 + 2292 + [[package]] 1514 2293 name = "quote" 1515 2294 version = "1.0.40" 1516 2295 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1532 2311 checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 1533 2312 dependencies = [ 1534 2313 "libc", 1535 - "rand_chacha", 1536 - "rand_core", 2314 + "rand_chacha 0.3.1", 2315 + "rand_core 0.6.4", 2316 + ] 2317 + 2318 + [[package]] 2319 + name = "rand" 2320 + version = "0.9.2" 2321 + source = "registry+https://github.com/rust-lang/crates.io-index" 2322 + checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" 2323 + dependencies = [ 2324 + "rand_chacha 0.9.0", 2325 + "rand_core 0.9.3", 1537 2326 ] 1538 2327 1539 2328 [[package]] ··· 1543 2332 checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 1544 2333 dependencies = [ 1545 2334 "ppv-lite86", 1546 - "rand_core", 2335 + "rand_core 0.6.4", 2336 + ] 2337 + 2338 + [[package]] 2339 + name = "rand_chacha" 2340 + version = "0.9.0" 2341 + source = "registry+https://github.com/rust-lang/crates.io-index" 2342 + checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" 2343 + dependencies = [ 2344 + "ppv-lite86", 2345 + "rand_core 0.9.3", 1547 2346 ] 1548 2347 1549 2348 [[package]] ··· 1553 2352 checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" 1554 2353 dependencies = [ 1555 2354 "getrandom 0.2.16", 2355 + ] 2356 + 2357 + [[package]] 2358 + name = "rand_core" 2359 + version = "0.9.3" 2360 + source = "registry+https://github.com/rust-lang/crates.io-index" 2361 + checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" 2362 + dependencies = [ 2363 + "getrandom 0.3.3", 1556 2364 ] 1557 2365 1558 2366 [[package]] ··· 1599 2407 ] 1600 2408 1601 2409 [[package]] 2410 + name = "regex-lite" 2411 + version = "0.1.7" 2412 + source = "registry+https://github.com/rust-lang/crates.io-index" 2413 + checksum = "943f41321c63ef1c92fd763bfe054d2668f7f225a5c29f0105903dc2fc04ba30" 2414 + 2415 + [[package]] 1602 2416 name = "regex-syntax" 1603 2417 version = "0.8.5" 1604 2418 source = "registry+https://github.com/rust-lang/crates.io-index" 1605 2419 checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" 1606 2420 1607 2421 [[package]] 2422 + name = "reqwest" 2423 + version = "0.12.23" 2424 + source = "registry+https://github.com/rust-lang/crates.io-index" 2425 + checksum = "d429f34c8092b2d42c7c93cec323bb4adeb7c67698f70839adec842ec10c7ceb" 2426 + dependencies = [ 2427 + "base64", 2428 + "bytes", 2429 + "encoding_rs", 2430 + "futures-core", 2431 + "h2 0.4.12", 2432 + "http 1.3.1", 2433 + "http-body", 2434 + "http-body-util", 2435 + "hyper", 2436 + "hyper-rustls", 2437 + "hyper-tls", 2438 + "hyper-util", 2439 + "js-sys", 2440 + "log", 2441 + "mime", 2442 + "native-tls", 2443 + "percent-encoding", 2444 + "pin-project-lite", 2445 + "quinn", 2446 + "rustls", 2447 + "rustls-pki-types", 2448 + "serde", 2449 + "serde_json", 2450 + "serde_urlencoded", 2451 + "sync_wrapper", 2452 + "tokio", 2453 + "tokio-native-tls", 2454 + "tokio-rustls", 2455 + "tower", 2456 + "tower-http", 2457 + "tower-service", 2458 + "url", 2459 + "wasm-bindgen", 2460 + "wasm-bindgen-futures", 2461 + "web-sys", 2462 + "webpki-roots 1.0.2", 2463 + ] 2464 + 2465 + [[package]] 1608 2466 name = "ring" 1609 2467 version = "0.17.14" 1610 2468 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1631 2489 "num-traits", 1632 2490 "pkcs1", 1633 2491 "pkcs8", 1634 - "rand_core", 2492 + "rand_core 0.6.4", 1635 2493 "signature", 1636 2494 "spki", 1637 2495 "subtle", ··· 1660 2518 ] 1661 2519 1662 2520 [[package]] 2521 + name = "rust-embed" 2522 + version = "8.7.2" 2523 + source = "registry+https://github.com/rust-lang/crates.io-index" 2524 + checksum = "025908b8682a26ba8d12f6f2d66b987584a4a87bc024abc5bbc12553a8cd178a" 2525 + dependencies = [ 2526 + "rust-embed-impl", 2527 + "rust-embed-utils", 2528 + "walkdir", 2529 + ] 2530 + 2531 + [[package]] 2532 + name = "rust-embed-impl" 2533 + version = "8.7.2" 2534 + source = "registry+https://github.com/rust-lang/crates.io-index" 2535 + checksum = "6065f1a4392b71819ec1ea1df1120673418bf386f50de1d6f54204d836d4349c" 2536 + dependencies = [ 2537 + "proc-macro2", 2538 + "quote", 2539 + "rust-embed-utils", 2540 + "syn 2.0.104", 2541 + "walkdir", 2542 + ] 2543 + 2544 + [[package]] 2545 + name = "rust-embed-utils" 2546 + version = "8.7.2" 2547 + source = "registry+https://github.com/rust-lang/crates.io-index" 2548 + checksum = "f6cc0c81648b20b70c491ff8cce00c1c3b223bb8ed2b5d41f0e54c6c4c0a3594" 2549 + dependencies = [ 2550 + "sha2", 2551 + "walkdir", 2552 + ] 2553 + 2554 + [[package]] 1663 2555 name = "rustc-demangle" 1664 2556 version = "0.1.26" 1665 2557 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1672 2564 checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" 1673 2565 1674 2566 [[package]] 2567 + name = "rustix" 2568 + version = "1.1.2" 2569 + source = "registry+https://github.com/rust-lang/crates.io-index" 2570 + checksum = "cd15f8a2c5551a84d56efdc1cd049089e409ac19a3072d5037a17fd70719ff3e" 2571 + dependencies = [ 2572 + "bitflags 2.9.1", 2573 + "errno", 2574 + "libc", 2575 + "linux-raw-sys", 2576 + "windows-sys 0.61.0", 2577 + ] 2578 + 2579 + [[package]] 1675 2580 name = "rustls" 1676 2581 version = "0.23.29" 1677 2582 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1696 2601 "openssl-probe", 1697 2602 "rustls-pki-types", 1698 2603 "schannel", 1699 - "security-framework", 2604 + "security-framework 3.4.0", 1700 2605 ] 1701 2606 1702 2607 [[package]] ··· 1714 2619 source = "registry+https://github.com/rust-lang/crates.io-index" 1715 2620 checksum = "229a4a4c221013e7e1f1a043678c5cc39fe5171437c88fb47151a21e6f5b5c79" 1716 2621 dependencies = [ 2622 + "web-time", 1717 2623 "zeroize", 1718 2624 ] 1719 2625 ··· 1778 2684 1779 2685 [[package]] 1780 2686 name = "security-framework" 2687 + version = "2.11.1" 2688 + source = "registry+https://github.com/rust-lang/crates.io-index" 2689 + checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" 2690 + dependencies = [ 2691 + "bitflags 2.9.1", 2692 + "core-foundation 0.9.4", 2693 + "core-foundation-sys", 2694 + "libc", 2695 + "security-framework-sys", 2696 + ] 2697 + 2698 + [[package]] 2699 + name = "security-framework" 1781 2700 version = "3.4.0" 1782 2701 source = "registry+https://github.com/rust-lang/crates.io-index" 1783 2702 checksum = "60b369d18893388b345804dc0007963c99b7d665ae71d275812d828c6f089640" 1784 2703 dependencies = [ 1785 2704 "bitflags 2.9.1", 1786 - "core-foundation", 2705 + "core-foundation 0.10.1", 1787 2706 "core-foundation-sys", 1788 2707 "libc", 1789 2708 "security-framework-sys", ··· 1801 2720 1802 2721 [[package]] 1803 2722 name = "serde" 1804 - version = "1.0.219" 2723 + version = "1.0.225" 1805 2724 source = "registry+https://github.com/rust-lang/crates.io-index" 1806 - checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" 2725 + checksum = "fd6c24dee235d0da097043389623fb913daddf92c76e9f5a1db88607a0bcbd1d" 2726 + dependencies = [ 2727 + "serde_core", 2728 + "serde_derive", 2729 + ] 2730 + 2731 + [[package]] 2732 + name = "serde_core" 2733 + version = "1.0.225" 2734 + source = "registry+https://github.com/rust-lang/crates.io-index" 2735 + checksum = "659356f9a0cb1e529b24c01e43ad2bdf520ec4ceaf83047b83ddcc2251f96383" 1807 2736 dependencies = [ 1808 2737 "serde_derive", 1809 2738 ] 1810 2739 1811 2740 [[package]] 1812 2741 name = "serde_derive" 1813 - version = "1.0.219" 2742 + version = "1.0.225" 1814 2743 source = "registry+https://github.com/rust-lang/crates.io-index" 1815 - checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" 2744 + checksum = "0ea936adf78b1f766949a4977b91d2f5595825bd6ec079aa9543ad2685fc4516" 1816 2745 dependencies = [ 1817 2746 "proc-macro2", 1818 2747 "quote", ··· 1911 2840 checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" 1912 2841 dependencies = [ 1913 2842 "digest", 1914 - "rand_core", 2843 + "rand_core 0.6.4", 1915 2844 ] 2845 + 2846 + [[package]] 2847 + name = "simd-adler32" 2848 + version = "0.3.7" 2849 + source = "registry+https://github.com/rust-lang/crates.io-index" 2850 + checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" 1916 2851 1917 2852 [[package]] 1918 2853 name = "slab" ··· 1931 2866 1932 2867 [[package]] 1933 2868 name = "socket2" 2869 + version = "0.5.10" 2870 + source = "registry+https://github.com/rust-lang/crates.io-index" 2871 + checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" 2872 + dependencies = [ 2873 + "libc", 2874 + "windows-sys 0.52.0", 2875 + ] 2876 + 2877 + [[package]] 2878 + name = "socket2" 1934 2879 version = "0.6.0" 1935 2880 source = "registry+https://github.com/rust-lang/crates.io-index" 1936 2881 checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807" ··· 2076 3021 "memchr", 2077 3022 "once_cell", 2078 3023 "percent-encoding", 2079 - "rand", 3024 + "rand 0.8.5", 2080 3025 "rsa", 2081 3026 "serde", 2082 3027 "sha1", ··· 2115 3060 "md-5", 2116 3061 "memchr", 2117 3062 "once_cell", 2118 - "rand", 3063 + "rand 0.8.5", 2119 3064 "serde", 2120 3065 "serde_json", 2121 3066 "sha2", ··· 2210 3155 ] 2211 3156 2212 3157 [[package]] 3158 + name = "sync_wrapper" 3159 + version = "1.0.2" 3160 + source = "registry+https://github.com/rust-lang/crates.io-index" 3161 + checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" 3162 + dependencies = [ 3163 + "futures-core", 3164 + ] 3165 + 3166 + [[package]] 2213 3167 name = "synstructure" 2214 3168 version = "0.13.2" 2215 3169 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2234 3188 ] 2235 3189 2236 3190 [[package]] 3191 + name = "system-configuration" 3192 + version = "0.6.1" 3193 + source = "registry+https://github.com/rust-lang/crates.io-index" 3194 + checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" 3195 + dependencies = [ 3196 + "bitflags 2.9.1", 3197 + "core-foundation 0.9.4", 3198 + "system-configuration-sys", 3199 + ] 3200 + 3201 + [[package]] 3202 + name = "system-configuration-sys" 3203 + version = "0.6.0" 3204 + source = "registry+https://github.com/rust-lang/crates.io-index" 3205 + checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" 3206 + dependencies = [ 3207 + "core-foundation-sys", 3208 + "libc", 3209 + ] 3210 + 3211 + [[package]] 3212 + name = "tempfile" 3213 + version = "3.22.0" 3214 + source = "registry+https://github.com/rust-lang/crates.io-index" 3215 + checksum = "84fa4d11fadde498443cca10fd3ac23c951f0dc59e080e9f4b93d4df4e4eea53" 3216 + dependencies = [ 3217 + "fastrand", 3218 + "getrandom 0.3.3", 3219 + "once_cell", 3220 + "rustix", 3221 + "windows-sys 0.61.0", 3222 + ] 3223 + 3224 + [[package]] 2237 3225 name = "termcolor" 2238 3226 version = "1.4.1" 2239 3227 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2289 3277 ] 2290 3278 2291 3279 [[package]] 3280 + name = "time" 3281 + version = "0.3.43" 3282 + source = "registry+https://github.com/rust-lang/crates.io-index" 3283 + checksum = "83bde6f1ec10e72d583d91623c939f623002284ef622b87de38cfd546cbf2031" 3284 + dependencies = [ 3285 + "deranged", 3286 + "num-conv", 3287 + "powerfmt", 3288 + "serde", 3289 + "time-core", 3290 + "time-macros", 3291 + ] 3292 + 3293 + [[package]] 3294 + name = "time-core" 3295 + version = "0.1.6" 3296 + source = "registry+https://github.com/rust-lang/crates.io-index" 3297 + checksum = "40868e7c1d2f0b8d73e4a8c7f0ff63af4f6d19be117e90bd73eb1d62cf831c6b" 3298 + 3299 + [[package]] 3300 + name = "time-macros" 3301 + version = "0.2.24" 3302 + source = "registry+https://github.com/rust-lang/crates.io-index" 3303 + checksum = "30cfb0125f12d9c277f35663a0a33f8c30190f4e4574868a330595412d34ebf3" 3304 + dependencies = [ 3305 + "num-conv", 3306 + "time-core", 3307 + ] 3308 + 3309 + [[package]] 2292 3310 name = "tinystr" 2293 3311 version = "0.8.1" 2294 3312 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2328 3346 "pin-project-lite", 2329 3347 "signal-hook-registry", 2330 3348 "slab", 2331 - "socket2", 3349 + "socket2 0.6.0", 2332 3350 "tokio-macros", 2333 3351 "windows-sys 0.59.0", 2334 3352 ] ··· 2342 3360 "proc-macro2", 2343 3361 "quote", 2344 3362 "syn 2.0.104", 3363 + ] 3364 + 3365 + [[package]] 3366 + name = "tokio-native-tls" 3367 + version = "0.3.1" 3368 + source = "registry+https://github.com/rust-lang/crates.io-index" 3369 + checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" 3370 + dependencies = [ 3371 + "native-tls", 3372 + "tokio", 2345 3373 ] 2346 3374 2347 3375 [[package]] ··· 2418 3446 checksum = "fcc842091f2def52017664b53082ecbbeb5c7731092bad69d2c63050401dfd64" 2419 3447 2420 3448 [[package]] 3449 + name = "tower" 3450 + version = "0.5.2" 3451 + source = "registry+https://github.com/rust-lang/crates.io-index" 3452 + checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" 3453 + dependencies = [ 3454 + "futures-core", 3455 + "futures-util", 3456 + "pin-project-lite", 3457 + "sync_wrapper", 3458 + "tokio", 3459 + "tower-layer", 3460 + "tower-service", 3461 + ] 3462 + 3463 + [[package]] 3464 + name = "tower-http" 3465 + version = "0.6.6" 3466 + source = "registry+https://github.com/rust-lang/crates.io-index" 3467 + checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2" 3468 + dependencies = [ 3469 + "bitflags 2.9.1", 3470 + "bytes", 3471 + "futures-util", 3472 + "http 1.3.1", 3473 + "http-body", 3474 + "iri-string", 3475 + "pin-project-lite", 3476 + "tower", 3477 + "tower-layer", 3478 + "tower-service", 3479 + ] 3480 + 3481 + [[package]] 3482 + name = "tower-layer" 3483 + version = "0.3.3" 3484 + source = "registry+https://github.com/rust-lang/crates.io-index" 3485 + checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" 3486 + 3487 + [[package]] 3488 + name = "tower-service" 3489 + version = "0.3.3" 3490 + source = "registry+https://github.com/rust-lang/crates.io-index" 3491 + checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" 3492 + 3493 + [[package]] 2421 3494 name = "tracing" 2422 3495 version = "0.1.41" 2423 3496 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2450 3523 ] 2451 3524 2452 3525 [[package]] 3526 + name = "try-lock" 3527 + version = "0.2.5" 3528 + source = "registry+https://github.com/rust-lang/crates.io-index" 3529 + checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" 3530 + 3531 + [[package]] 2453 3532 name = "typenum" 2454 3533 version = "1.18.0" 2455 3534 source = "registry+https://github.com/rust-lang/crates.io-index" 2456 3535 checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f" 3536 + 3537 + [[package]] 3538 + name = "unicase" 3539 + version = "2.8.1" 3540 + source = "registry+https://github.com/rust-lang/crates.io-index" 3541 + checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" 2457 3542 2458 3543 [[package]] 2459 3544 name = "unicode-bidi" ··· 2483 3568 checksum = "e70f2a8b45122e719eb623c01822704c4e0907e7e426a05927e1a1cfff5b75d0" 2484 3569 2485 3570 [[package]] 3571 + name = "unicode-xid" 3572 + version = "0.2.6" 3573 + source = "registry+https://github.com/rust-lang/crates.io-index" 3574 + checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" 3575 + 3576 + [[package]] 2486 3577 name = "untrusted" 2487 3578 version = "0.9.0" 2488 3579 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2512 3603 checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" 2513 3604 2514 3605 [[package]] 3606 + name = "utoipa" 3607 + version = "5.4.0" 3608 + source = "registry+https://github.com/rust-lang/crates.io-index" 3609 + checksum = "2fcc29c80c21c31608227e0912b2d7fddba57ad76b606890627ba8ee7964e993" 3610 + dependencies = [ 3611 + "indexmap 2.10.0", 3612 + "serde", 3613 + "serde_json", 3614 + "utoipa-gen", 3615 + ] 3616 + 3617 + [[package]] 3618 + name = "utoipa-actix-web" 3619 + version = "0.1.2" 3620 + source = "registry+https://github.com/rust-lang/crates.io-index" 3621 + checksum = "b7eda9c23c05af0fb812f6a177514047331dac4851a2c8e9c4b895d6d826967f" 3622 + dependencies = [ 3623 + "actix-service", 3624 + "actix-web", 3625 + "utoipa", 3626 + ] 3627 + 3628 + [[package]] 3629 + name = "utoipa-gen" 3630 + version = "5.4.0" 3631 + source = "registry+https://github.com/rust-lang/crates.io-index" 3632 + checksum = "6d79d08d92ab8af4c5e8a6da20c47ae3f61a0f1dabc1997cdf2d082b757ca08b" 3633 + dependencies = [ 3634 + "proc-macro2", 3635 + "quote", 3636 + "regex", 3637 + "syn 2.0.104", 3638 + ] 3639 + 3640 + [[package]] 3641 + name = "utoipa-rapidoc" 3642 + version = "6.0.0" 3643 + source = "registry+https://github.com/rust-lang/crates.io-index" 3644 + checksum = "e5f8f5abd341cce16bb4f09a8bafc087d4884a004f25fb980e538d51d6501dab" 3645 + dependencies = [ 3646 + "actix-web", 3647 + "serde", 3648 + "serde_json", 3649 + "utoipa", 3650 + ] 3651 + 3652 + [[package]] 3653 + name = "utoipa-redoc" 3654 + version = "6.0.0" 3655 + source = "registry+https://github.com/rust-lang/crates.io-index" 3656 + checksum = "6427547f6db7ec006cbbef95f7565952a16f362e298b416d2d497d9706fef72d" 3657 + dependencies = [ 3658 + "actix-web", 3659 + "serde", 3660 + "serde_json", 3661 + "utoipa", 3662 + ] 3663 + 3664 + [[package]] 3665 + name = "utoipa-swagger-ui" 3666 + version = "9.0.2" 3667 + source = "registry+https://github.com/rust-lang/crates.io-index" 3668 + checksum = "d047458f1b5b65237c2f6dc6db136945667f40a7668627b3490b9513a3d43a55" 3669 + dependencies = [ 3670 + "actix-web", 3671 + "base64", 3672 + "mime_guess", 3673 + "regex", 3674 + "rust-embed", 3675 + "serde", 3676 + "serde_json", 3677 + "url", 3678 + "utoipa", 3679 + "zip", 3680 + ] 3681 + 3682 + [[package]] 2515 3683 name = "vcpkg" 2516 3684 version = "0.2.15" 2517 3685 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2531 3699 dependencies = [ 2532 3700 "same-file", 2533 3701 "winapi-util", 3702 + ] 3703 + 3704 + [[package]] 3705 + name = "want" 3706 + version = "0.3.1" 3707 + source = "registry+https://github.com/rust-lang/crates.io-index" 3708 + checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" 3709 + dependencies = [ 3710 + "try-lock", 2534 3711 ] 2535 3712 2536 3713 [[package]] ··· 2590 3767 ] 2591 3768 2592 3769 [[package]] 3770 + name = "wasm-bindgen-futures" 3771 + version = "0.4.50" 3772 + source = "registry+https://github.com/rust-lang/crates.io-index" 3773 + checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" 3774 + dependencies = [ 3775 + "cfg-if", 3776 + "js-sys", 3777 + "once_cell", 3778 + "wasm-bindgen", 3779 + "web-sys", 3780 + ] 3781 + 3782 + [[package]] 2593 3783 name = "wasm-bindgen-macro" 2594 3784 version = "0.2.100" 2595 3785 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2622 3812 ] 2623 3813 2624 3814 [[package]] 3815 + name = "web-sys" 3816 + version = "0.3.77" 3817 + source = "registry+https://github.com/rust-lang/crates.io-index" 3818 + checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" 3819 + dependencies = [ 3820 + "js-sys", 3821 + "wasm-bindgen", 3822 + ] 3823 + 3824 + [[package]] 3825 + name = "web-time" 3826 + version = "1.1.0" 3827 + source = "registry+https://github.com/rust-lang/crates.io-index" 3828 + checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" 3829 + dependencies = [ 3830 + "js-sys", 3831 + "wasm-bindgen", 3832 + ] 3833 + 3834 + [[package]] 2625 3835 name = "webpki-roots" 2626 3836 version = "0.26.11" 2627 3837 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2726 3936 version = "0.2.0" 2727 3937 source = "registry+https://github.com/rust-lang/crates.io-index" 2728 3938 checksum = "45e46c0661abb7180e7b9c281db115305d49ca1709ab8242adf09666d2173c65" 3939 + 3940 + [[package]] 3941 + name = "windows-registry" 3942 + version = "0.5.3" 3943 + source = "registry+https://github.com/rust-lang/crates.io-index" 3944 + checksum = "5b8a9ed28765efc97bbc954883f4e6796c33a06546ebafacbabee9696967499e" 3945 + dependencies = [ 3946 + "windows-link 0.1.3", 3947 + "windows-result", 3948 + "windows-strings", 3949 + ] 2729 3950 2730 3951 [[package]] 2731 3952 name = "windows-result" ··· 2939 4160 "hostname", 2940 4161 "md5", 2941 4162 "once_cell", 2942 - "rand", 4163 + "rand 0.8.5", 2943 4164 "sysctl", 2944 4165 "thiserror 1.0.69", 2945 4166 "winreg", ··· 3048 4269 "quote", 3049 4270 "syn 2.0.104", 3050 4271 ] 4272 + 4273 + [[package]] 4274 + name = "zip" 4275 + version = "3.0.0" 4276 + source = "registry+https://github.com/rust-lang/crates.io-index" 4277 + checksum = "12598812502ed0105f607f941c386f43d441e00148fce9dec3ca5ffb0bde9308" 4278 + dependencies = [ 4279 + "arbitrary", 4280 + "crc32fast", 4281 + "flate2", 4282 + "indexmap 2.10.0", 4283 + "memchr", 4284 + "zopfli", 4285 + ] 4286 + 4287 + [[package]] 4288 + name = "zlib-rs" 4289 + version = "0.5.2" 4290 + source = "registry+https://github.com/rust-lang/crates.io-index" 4291 + checksum = "2f06ae92f42f5e5c42443fd094f245eb656abf56dd7cce9b8b263236565e00f2" 4292 + 4293 + [[package]] 4294 + name = "zopfli" 4295 + version = "0.8.2" 4296 + source = "registry+https://github.com/rust-lang/crates.io-index" 4297 + checksum = "edfc5ee405f504cd4984ecc6f14d02d55cfda60fa4b689434ef4102aae150cd7" 4298 + dependencies = [ 4299 + "bumpalo", 4300 + "crc32fast", 4301 + "log", 4302 + "simd-adler32", 4303 + ] 4304 + 4305 + [[package]] 4306 + name = "zstd" 4307 + version = "0.13.3" 4308 + source = "registry+https://github.com/rust-lang/crates.io-index" 4309 + checksum = "e91ee311a569c327171651566e07972200e76fcfe2242a4fa446149a3881c08a" 4310 + dependencies = [ 4311 + "zstd-safe", 4312 + ] 4313 + 4314 + [[package]] 4315 + name = "zstd-safe" 4316 + version = "7.2.4" 4317 + source = "registry+https://github.com/rust-lang/crates.io-index" 4318 + checksum = "8f49c4d5f0abb602a93fb8736af2a4f4dd9512e36f7f570d66e65ff867ed3b9d" 4319 + dependencies = [ 4320 + "zstd-sys", 4321 + ] 4322 + 4323 + [[package]] 4324 + name = "zstd-sys" 4325 + version = "2.0.16+zstd.1.5.7" 4326 + source = "registry+https://github.com/rust-lang/crates.io-index" 4327 + checksum = "91e19ebc2adc8f83e43039e79776e3fda8ca919132d68a1fed6a5faca2683748" 4328 + dependencies = [ 4329 + "cc", 4330 + "pkg-config", 4331 + ]
+11
crates/fire-client/Cargo.toml
··· 1 + [package] 2 + name = "fire-client" 3 + version = "0.1.0" 4 + authors.workspace = true 5 + edition.workspace = true 6 + license.workspace = true 7 + repository.workspace = true 8 + 9 + [dependencies] 10 + anyhow = "1.0.99" 11 + reqwest = { version = "0.12.23", features = ["rustls-tls", "json"] }
+1
crates/fire-client/src/lib.rs
··· 1 +
+2
crates/fire-config/src/lib.rs
··· 25 25 pub tap: Option<String>, 26 26 pub api_socket: Option<String>, 27 27 pub mac: Option<String>, 28 + pub ssh_keys: Option<Vec<String>>, 28 29 } 29 30 30 31 #[derive(Debug, Serialize, Deserialize)] ··· 48 49 tap: None, 49 50 api_socket: None, 50 51 mac: None, 52 + ssh_keys: None, 51 53 }, 52 54 etcd: None, 53 55 }
+18
crates/fire-server/Cargo.toml
··· 1 + [package] 2 + name = "fire-server" 3 + version = "0.1.0" 4 + authors.workspace = true 5 + edition.workspace = true 6 + license.workspace = true 7 + repository.workspace = true 8 + 9 + [dependencies] 10 + actix-web = "4.11.0" 11 + anyhow = "1.0.99" 12 + owo-colors = "4.2.2" 13 + serde = { version = "1.0.225", features = ["serde_derive", "derive"] } 14 + utoipa = { version = "5.4.0", features = ["actix_extras"] } 15 + utoipa-actix-web = "0.1.2" 16 + utoipa-rapidoc = { version = "6.0.0", features = ["actix-web"] } 17 + utoipa-redoc = { version = "6.0.0", features = ["actix-web"] } 18 + utoipa-swagger-ui = { version = "9", features = ["actix-web"] }
+120
crates/fire-server/src/api/microvm.rs
··· 1 + use actix_web::{delete, get, post, Responder}; 2 + use serde::{Deserialize, Serialize}; 3 + use utoipa::ToSchema; 4 + use utoipa_actix_web::service_config::ServiceConfig; 5 + 6 + const MICRO_VM: &str = "MicroVM"; 7 + 8 + #[derive(Serialize, Deserialize, Clone, ToSchema)] 9 + pub(super) struct MicroVM { 10 + pub id: String, 11 + pub name: String, 12 + pub status: String, 13 + pub vcpus: u8, 14 + pub memory_mb: u32, 15 + pub kernel_image: String, 16 + pub rootfs_image: String, 17 + pub ssh_keys: Vec<String>, 18 + } 19 + 20 + #[derive(Serialize, Deserialize, Clone, ToSchema)] 21 + pub(super) enum ErrorResponse { 22 + NotFound(String), 23 + Conflict(String), 24 + Unauthorized(String), 25 + } 26 + 27 + #[utoipa::path( 28 + tag = MICRO_VM, 29 + responses( 30 + (status = 201, description = "MicroVM created successfully", body = MicroVM), 31 + (status = 409, description = "MicroVM with id already exists", body = ErrorResponse, example = json!(ErrorResponse::Conflict(String::from("id = 1")))) 32 + ) 33 + )] 34 + #[post("")] 35 + async fn create_microvm() -> Result<impl Responder, actix_web::Error> { 36 + Ok("MicroVM created") 37 + } 38 + 39 + #[utoipa::path( 40 + tag = MICRO_VM, 41 + responses( 42 + (status = 200, description = "MicroVM deleted successfully"), 43 + (status = 404, description = "MicroVM with id not found", body = ErrorResponse, example = json!(ErrorResponse::NotFound(String::from("id = 1")))) 44 + ), 45 + params( 46 + ("id", description = "The ID of the MicroVM to delete") 47 + ) 48 + )] 49 + #[delete("/{id}")] 50 + async fn delete_microvm() -> Result<impl Responder, actix_web::Error> { 51 + Ok("MicroVM deleted") 52 + } 53 + 54 + #[utoipa::path( 55 + tag = MICRO_VM, 56 + responses( 57 + (status = 200, description = "MicroVM details retrieved successfully", body = MicroVM), 58 + (status = 404, description = "MicroVM with id not found", body = ErrorResponse, example = json!(ErrorResponse::NotFound(String::from("id = 1")))) 59 + ), 60 + params( 61 + ("id", description = "The ID of the MicroVM to retrieve") 62 + ) 63 + )] 64 + #[get("/{id}")] 65 + async fn get_microvm() -> Result<impl Responder, actix_web::Error> { 66 + Ok("MicroVM details") 67 + } 68 + 69 + #[utoipa::path( 70 + tag = MICRO_VM, 71 + responses( 72 + (status = 200, description = "List of MicroVMs retrieved successfully", body = [MicroVM]), 73 + ) 74 + )] 75 + #[get("")] 76 + async fn list_microvms() -> Result<impl Responder, actix_web::Error> { 77 + Ok("List of MicroVMs") 78 + } 79 + 80 + #[utoipa::path( 81 + tag = MICRO_VM, 82 + responses( 83 + (status = 200, description = "MicroVM started successfully"), 84 + (status = 404, description = "MicroVM with id not found", body = ErrorResponse, example = json!(ErrorResponse::NotFound(String::from("id = 1")))) 85 + ), 86 + params( 87 + ("id", description = "The ID of the MicroVM to start") 88 + ) 89 + )] 90 + #[post("/{id}/start")] 91 + async fn start_microvm() -> Result<impl Responder, actix_web::Error> { 92 + Ok("MicroVM started") 93 + } 94 + 95 + #[utoipa::path( 96 + tag = MICRO_VM, 97 + responses( 98 + (status = 200, description = "MicroVM stopped successfully"), 99 + (status = 404, description = "MicroVM with id not found", body = ErrorResponse, example = json!(ErrorResponse::NotFound(String::from("id = 1")))) 100 + ), 101 + params( 102 + ("id", description = "The ID of the MicroVM to stop") 103 + ) 104 + )] 105 + #[post("/{id}/stop")] 106 + async fn stop_microvm() -> Result<impl Responder, actix_web::Error> { 107 + Ok("MicroVM stopped") 108 + } 109 + 110 + pub fn configure() -> impl FnOnce(&mut ServiceConfig) { 111 + |config: &mut ServiceConfig| { 112 + config 113 + .service(create_microvm) 114 + .service(delete_microvm) 115 + .service(get_microvm) 116 + .service(list_microvms) 117 + .service(start_microvm) 118 + .service(stop_microvm); 119 + } 120 + }
+1
crates/fire-server/src/api/mod.rs
··· 1 + pub mod microvm;
+1
crates/fire-server/src/handlers/microvm.rs
··· 1 +
+1
crates/fire-server/src/handlers/mod.rs
··· 1 + pub mod microvm;
+3
crates/fire-server/src/lib.rs
··· 1 + pub mod api; 2 + pub mod handlers; 3 + pub mod server;
+46
crates/fire-server/src/server.rs
··· 1 + use std::env; 2 + 3 + use actix_web::{App, HttpServer}; 4 + use anyhow::Error; 5 + use owo_colors::OwoColorize; 6 + use utoipa::OpenApi; 7 + use utoipa_actix_web::AppExt; 8 + use utoipa_rapidoc::RapiDoc; 9 + use utoipa_swagger_ui::SwaggerUi; 10 + 11 + use crate::api::microvm; 12 + 13 + #[derive(OpenApi)] 14 + #[openapi( 15 + tags( 16 + (name = "fireup", description = "Firecracker microVM management API") 17 + ), 18 + )] 19 + struct ApiDoc; 20 + 21 + pub async fn run() -> Result<(), Error> { 22 + let port = env::var("FIREUP_PORT").unwrap_or_else(|_| "9090".to_string()); 23 + let host = env::var("FIREUP_HOST").unwrap_or_else(|_| "127.0.0.1".to_string()); 24 + let addr = format!("{}:{}", host, port); 25 + 26 + let url = format!("http://{}", addr); 27 + println!("Starting server at {}", url.green()); 28 + 29 + HttpServer::new(move || { 30 + App::new() 31 + .into_utoipa_app() 32 + .openapi(ApiDoc::openapi()) 33 + .service(utoipa_actix_web::scope("/v1/microvms").configure(microvm::configure())) 34 + .openapi_service(|api| { 35 + SwaggerUi::new("/swagger-ui/{_:.*}").url("/api-docs/openapi.json", api) 36 + }) 37 + .map(|app| app.service(RapiDoc::new("/api-docs/openapi.json").path("/rapidoc"))) 38 + .into_app() 39 + }) 40 + .bind(addr)? 41 + .run() 42 + .await 43 + .map_err(Error::new)?; 44 + 45 + Ok(()) 46 + }
+2
crates/firecracker-up/Cargo.toml
··· 13 13 firecracker-process = { path = "../firecracker-process" } 14 14 firecracker-state = { path = "../firecracker-state" } 15 15 fire-config = { path = "../fire-config" } 16 + fire-server = { path = "../fire-server" } 17 + fire-client = { path = "../fire-client" } 16 18 clap = "4.5.41" 17 19 owo-colors = "4.2.2" 18 20 glob = "0.3.2"
+1
crates/firecracker-up/src/cmd/mod.rs
··· 3 3 pub mod logs; 4 4 pub mod ps; 5 5 pub mod reset; 6 + pub mod serve; 6 7 pub mod ssh; 7 8 pub mod start; 8 9 pub mod status;
+7
crates/firecracker-up/src/cmd/serve.rs
··· 1 + use anyhow::Error; 2 + use fire_server::server; 3 + 4 + pub async fn serve() -> Result<(), Error> { 5 + server::run().await?; 6 + Ok(()) 7 + }
+22 -3
crates/firecracker-up/src/main.rs
··· 4 4 use owo_colors::OwoColorize; 5 5 6 6 use crate::cmd::{ 7 - down::down, init::init, logs::logs, ps::list_all_instances, reset::reset, ssh::ssh, 8 - start::start, status::status, stop::stop, up::up, 7 + down::down, init::init, logs::logs, ps::list_all_instances, reset::reset, serve::serve, 8 + ssh::ssh, start::start, status::status, stop::stop, up::up, 9 9 }; 10 10 11 11 pub mod cmd; ··· 96 96 .value_name("ARGS") 97 97 .help("Override boot arguments"), 98 98 ) 99 + .arg( 100 + Arg::new("ssh-keys") 101 + .long("ssh-keys") 102 + .value_name("SSH_KEYS") 103 + .help("Comma-separated list of SSH public keys to add to the VM"), 104 + ) 99 105 .about("Start a new Firecracker MicroVM"), 100 106 ) 101 107 .subcommand(Command::new("down").about("Stop Firecracker MicroVM")) ··· 107 113 .subcommand( 108 114 Command::new("logs") 109 115 .arg( 110 - arg!(--follow -f "Follow the logs") 116 + arg!(-f --follow "Follow the logs") 111 117 .short('f') 112 118 .long("follow") 113 119 .default_value("false"), ··· 124 130 .arg(arg!([name] "Name of the Firecracker MicroVM to reset").required(false)) 125 131 .about("Reset the Firecracker MicroVM"), 126 132 ) 133 + .subcommand( 134 + Command::new("serve") 135 + .about("Start fireup HTTP API server") 136 + .arg(arg!(--host <host> "Host to bind the server")) 137 + .arg(arg!(--port <port> "Port to bind the server")), 138 + ) 127 139 .arg(arg!(--debian "Prepare Debian MicroVM").default_value("false")) 128 140 .arg(arg!(--alpine "Prepare Alpine MicroVM").default_value("false")) 129 141 .arg(arg!(--nixos "Prepare NixOS MicroVM").default_value("false")) ··· 164 176 .long("boot-args") 165 177 .value_name("ARGS") 166 178 .help("Override boot arguments"), 179 + ) 180 + .arg( 181 + Arg::new("ssh-keys") 182 + .long("ssh-keys") 183 + .value_name("SSH_KEYS") 184 + .help("Comma-separated list of SSH public keys to add to the VM"), 167 185 ) 168 186 } 169 187 ··· 265 283 }) 266 284 .await? 267 285 } 286 + Some(("serve", _)) => serve().await?, 268 287 _ => { 269 288 let debian = matches.get_one::<bool>("debian").copied().unwrap_or(false); 270 289 let alpine = matches.get_one::<bool>("alpine").copied().unwrap_or(false);