├── .github └── workflows │ ├── release.yml │ └── rust.yml ├── .gitignore ├── CHANGELOG.md ├── Cargo.lock ├── Cargo.toml ├── LICENSE ├── README.md └── src └── main.rs /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Release 2 | 3 | on: 4 | push: 5 | tags: 6 | - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 7 | 8 | jobs: 9 | build: 10 | 11 | runs-on: ubuntu-latest 12 | 13 | steps: 14 | - uses: actions/checkout@v2 15 | - name: Build 16 | run: cargo build --verbose 17 | - name: Run tests 18 | run: cargo test --verbose 19 | - name: Create deb 20 | run: | 21 | cargo install cargo-deb 22 | cargo deb 23 | - name: Release 24 | uses: softprops/action-gh-release@v1 25 | with: 26 | files: | 27 | target/debian/*.deb 28 | env: 29 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 30 | -------------------------------------------------------------------------------- /.github/workflows/rust.yml: -------------------------------------------------------------------------------- 1 | name: Rust 2 | 3 | on: [push] 4 | 5 | jobs: 6 | build: 7 | 8 | runs-on: ubuntu-latest 9 | 10 | steps: 11 | - uses: actions/checkout@v2 12 | - name: Build 13 | run: cargo build --verbose 14 | - name: Run tests 15 | run: cargo test --verbose 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | **/*.rs.bk 3 | 4 | orig 5 | mirror 6 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | v0.9.0 2025-03-17 2 | ======================== 3 | 4 | 1. Migrate from clap v3 to v4 5 | 6 | v0.8.1 2024-03-12 7 | ======================== 8 | 9 | 1. Do not download "*" target for rustup 10 | 11 | v0.8.0 2024-03-12 12 | ======================== 13 | 14 | 1. Download latest version of rustup-init binary for bootstrapping 15 | 16 | v0.7.2 2024-01-06 17 | ======================== 18 | 19 | 1. Fix rustup compatibility: do not remove excluded target, but set available to false 20 | 21 | v0.7.1 2024-01-06 22 | ======================== 23 | 24 | 1. Sync target list from rustc 1.75.0 25 | 26 | v0.7.0 2023-12-02 27 | ======================== 28 | 29 | 1. Fix empty `rust-src` in channel.toml 30 | 2. Fix toml pretty output 31 | 32 | v0.6.2 2023-11-11 33 | ======================== 34 | 35 | 1. Bump dependencies and fix deprecations. 36 | 37 | v0.6.1 2022-06-04 38 | ======================== 39 | 40 | 1. Bump dependencies and fix deprecations. 41 | 42 | v0.6.0 2021-09-16 43 | ======================== 44 | 45 | 1. Add option to specify target architectures, thanks @johnlepikhin 46 | 47 | v0.5.0 2021-08-18 48 | ======================== 49 | 50 | 1. Add option to specify release channels, thanks @jessebraham 51 | 52 | v0.4.4 2021-02-18 53 | ======================== 54 | 55 | 1. Fix garbage collect regression. 56 | 57 | v0.4.3 2021-01-24 58 | ======================== 59 | 60 | 1. Upgrade dependencies. 61 | 2. Improve garbage collect logic. 62 | 63 | v0.4.2 2020-06-08 64 | ======================== 65 | 66 | 1. Upgrade dependencies. 67 | 68 | v0.4.1 2020-02-21 69 | ======================== 70 | 71 | 1. Correctly skip non-nightly files for --gc. 72 | 73 | v0.4.0 2020-02-20 74 | ======================== 75 | 76 | 1. Add --gc option to remove old nightly builds. 77 | 78 | v0.3.3 2020-02-18 79 | ======================== 80 | 81 | 1. HTTPS_PROXY env is respected now. 82 | 83 | v0.3.2 2019-10-04 84 | ======================== 85 | 86 | 1. SHA256 checksums of local files are saved. 87 | 88 | v0.3.1 2019-02-16 89 | ======================== 90 | 91 | 1. Beta channel is added. 92 | 2. Now support stable and beta toolchain installation with certain date. 93 | 94 | v0.3.0 2019-02-15 95 | ======================== 96 | 97 | 1. Now support nightly toolchain installation with certain date. 98 | 99 | v0.2.2 2019-02-15 100 | ======================== 101 | 102 | 1. Fix wrong use of clap library. 103 | 104 | v0.2.1 2019-02-14 105 | ======================== 106 | 107 | 1. Enable nightly channel mirroring. 108 | 109 | v0.1.1 2019-02-12 110 | ========================= 111 | 112 | 1. Add progress bar indicator for downloading. 113 | 114 | v0.1.0 2019-02-12 115 | ========================= 116 | 117 | 1. Add initial support for mirroring stable channel. 118 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 4 4 | 5 | [[package]] 6 | name = "addr2line" 7 | version = "0.24.2" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" 10 | dependencies = [ 11 | "gimli", 12 | ] 13 | 14 | [[package]] 15 | name = "adler2" 16 | version = "2.0.0" 17 | source = "registry+https://github.com/rust-lang/crates.io-index" 18 | checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" 19 | 20 | [[package]] 21 | name = "android-tzdata" 22 | version = "0.1.1" 23 | source = "registry+https://github.com/rust-lang/crates.io-index" 24 | checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" 25 | 26 | [[package]] 27 | name = "android_system_properties" 28 | version = "0.1.5" 29 | source = "registry+https://github.com/rust-lang/crates.io-index" 30 | checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" 31 | dependencies = [ 32 | "libc", 33 | ] 34 | 35 | [[package]] 36 | name = "anstream" 37 | version = "0.6.18" 38 | source = "registry+https://github.com/rust-lang/crates.io-index" 39 | checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" 40 | dependencies = [ 41 | "anstyle", 42 | "anstyle-parse", 43 | "anstyle-query", 44 | "anstyle-wincon", 45 | "colorchoice", 46 | "is_terminal_polyfill", 47 | "utf8parse", 48 | ] 49 | 50 | [[package]] 51 | name = "anstyle" 52 | version = "1.0.10" 53 | source = "registry+https://github.com/rust-lang/crates.io-index" 54 | checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" 55 | 56 | [[package]] 57 | name = "anstyle-parse" 58 | version = "0.2.6" 59 | source = "registry+https://github.com/rust-lang/crates.io-index" 60 | checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" 61 | dependencies = [ 62 | "utf8parse", 63 | ] 64 | 65 | [[package]] 66 | name = "anstyle-query" 67 | version = "1.1.2" 68 | source = "registry+https://github.com/rust-lang/crates.io-index" 69 | checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" 70 | dependencies = [ 71 | "windows-sys 0.59.0", 72 | ] 73 | 74 | [[package]] 75 | name = "anstyle-wincon" 76 | version = "3.0.7" 77 | source = "registry+https://github.com/rust-lang/crates.io-index" 78 | checksum = "ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e" 79 | dependencies = [ 80 | "anstyle", 81 | "once_cell", 82 | "windows-sys 0.59.0", 83 | ] 84 | 85 | [[package]] 86 | name = "anyhow" 87 | version = "1.0.97" 88 | source = "registry+https://github.com/rust-lang/crates.io-index" 89 | checksum = "dcfed56ad506cb2c684a14971b8861fdc3baaaae314b9e5f9bb532cbe3ba7a4f" 90 | 91 | [[package]] 92 | name = "atomic-waker" 93 | version = "1.1.2" 94 | source = "registry+https://github.com/rust-lang/crates.io-index" 95 | checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" 96 | 97 | [[package]] 98 | name = "autocfg" 99 | version = "1.4.0" 100 | source = "registry+https://github.com/rust-lang/crates.io-index" 101 | checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" 102 | 103 | [[package]] 104 | name = "backtrace" 105 | version = "0.3.74" 106 | source = "registry+https://github.com/rust-lang/crates.io-index" 107 | checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" 108 | dependencies = [ 109 | "addr2line", 110 | "cfg-if", 111 | "libc", 112 | "miniz_oxide", 113 | "object", 114 | "rustc-demangle", 115 | "windows-targets 0.52.6", 116 | ] 117 | 118 | [[package]] 119 | name = "base64" 120 | version = "0.22.1" 121 | source = "registry+https://github.com/rust-lang/crates.io-index" 122 | checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" 123 | 124 | [[package]] 125 | name = "bitflags" 126 | version = "2.9.0" 127 | source = "registry+https://github.com/rust-lang/crates.io-index" 128 | checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" 129 | 130 | [[package]] 131 | name = "bumpalo" 132 | version = "3.17.0" 133 | source = "registry+https://github.com/rust-lang/crates.io-index" 134 | checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" 135 | 136 | [[package]] 137 | name = "bytes" 138 | version = "1.10.1" 139 | source = "registry+https://github.com/rust-lang/crates.io-index" 140 | checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" 141 | 142 | [[package]] 143 | name = "cc" 144 | version = "1.2.17" 145 | source = "registry+https://github.com/rust-lang/crates.io-index" 146 | checksum = "1fcb57c740ae1daf453ae85f16e37396f672b039e00d9d866e07ddb24e328e3a" 147 | dependencies = [ 148 | "shlex", 149 | ] 150 | 151 | [[package]] 152 | name = "cfg-if" 153 | version = "1.0.0" 154 | source = "registry+https://github.com/rust-lang/crates.io-index" 155 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 156 | 157 | [[package]] 158 | name = "chrono" 159 | version = "0.4.40" 160 | source = "registry+https://github.com/rust-lang/crates.io-index" 161 | checksum = "1a7964611d71df112cb1730f2ee67324fcf4d0fc6606acbbe9bfe06df124637c" 162 | dependencies = [ 163 | "android-tzdata", 164 | "iana-time-zone", 165 | "js-sys", 166 | "num-traits", 167 | "wasm-bindgen", 168 | "windows-link", 169 | ] 170 | 171 | [[package]] 172 | name = "clap" 173 | version = "4.5.32" 174 | source = "registry+https://github.com/rust-lang/crates.io-index" 175 | checksum = "6088f3ae8c3608d19260cd7445411865a485688711b78b5be70d78cd96136f83" 176 | dependencies = [ 177 | "clap_builder", 178 | "clap_derive", 179 | ] 180 | 181 | [[package]] 182 | name = "clap_builder" 183 | version = "4.5.32" 184 | source = "registry+https://github.com/rust-lang/crates.io-index" 185 | checksum = "22a7ef7f676155edfb82daa97f99441f3ebf4a58d5e32f295a56259f1b6facc8" 186 | dependencies = [ 187 | "anstream", 188 | "anstyle", 189 | "clap_lex", 190 | "strsim", 191 | ] 192 | 193 | [[package]] 194 | name = "clap_derive" 195 | version = "4.5.32" 196 | source = "registry+https://github.com/rust-lang/crates.io-index" 197 | checksum = "09176aae279615badda0765c0c0b3f6ed53f4709118af73cf4655d85d1530cd7" 198 | dependencies = [ 199 | "heck", 200 | "proc-macro2", 201 | "quote", 202 | "syn", 203 | ] 204 | 205 | [[package]] 206 | name = "clap_lex" 207 | version = "0.7.4" 208 | source = "registry+https://github.com/rust-lang/crates.io-index" 209 | checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" 210 | 211 | [[package]] 212 | name = "colorchoice" 213 | version = "1.0.3" 214 | source = "registry+https://github.com/rust-lang/crates.io-index" 215 | checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" 216 | 217 | [[package]] 218 | name = "console" 219 | version = "0.15.11" 220 | source = "registry+https://github.com/rust-lang/crates.io-index" 221 | checksum = "054ccb5b10f9f2cbf51eb355ca1d05c2d279ce1804688d0db74b4733a5aeafd8" 222 | dependencies = [ 223 | "encode_unicode", 224 | "libc", 225 | "once_cell", 226 | "unicode-width", 227 | "windows-sys 0.59.0", 228 | ] 229 | 230 | [[package]] 231 | name = "core-foundation" 232 | version = "0.9.4" 233 | source = "registry+https://github.com/rust-lang/crates.io-index" 234 | checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" 235 | dependencies = [ 236 | "core-foundation-sys", 237 | "libc", 238 | ] 239 | 240 | [[package]] 241 | name = "core-foundation-sys" 242 | version = "0.8.7" 243 | source = "registry+https://github.com/rust-lang/crates.io-index" 244 | checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" 245 | 246 | [[package]] 247 | name = "displaydoc" 248 | version = "0.2.5" 249 | source = "registry+https://github.com/rust-lang/crates.io-index" 250 | checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" 251 | dependencies = [ 252 | "proc-macro2", 253 | "quote", 254 | "syn", 255 | ] 256 | 257 | [[package]] 258 | name = "either" 259 | version = "1.15.0" 260 | source = "registry+https://github.com/rust-lang/crates.io-index" 261 | checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" 262 | 263 | [[package]] 264 | name = "encode_unicode" 265 | version = "1.0.0" 266 | source = "registry+https://github.com/rust-lang/crates.io-index" 267 | checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" 268 | 269 | [[package]] 270 | name = "encoding_rs" 271 | version = "0.8.35" 272 | source = "registry+https://github.com/rust-lang/crates.io-index" 273 | checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" 274 | dependencies = [ 275 | "cfg-if", 276 | ] 277 | 278 | [[package]] 279 | name = "equivalent" 280 | version = "1.0.2" 281 | source = "registry+https://github.com/rust-lang/crates.io-index" 282 | checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" 283 | 284 | [[package]] 285 | name = "errno" 286 | version = "0.3.10" 287 | source = "registry+https://github.com/rust-lang/crates.io-index" 288 | checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" 289 | dependencies = [ 290 | "libc", 291 | "windows-sys 0.59.0", 292 | ] 293 | 294 | [[package]] 295 | name = "fastrand" 296 | version = "2.3.0" 297 | source = "registry+https://github.com/rust-lang/crates.io-index" 298 | checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" 299 | 300 | [[package]] 301 | name = "filebuffer" 302 | version = "1.0.0" 303 | source = "registry+https://github.com/rust-lang/crates.io-index" 304 | checksum = "c997bb4895e53c23e7ebdf8a315f0863206b19e51da2901cc24631eb0f26e209" 305 | dependencies = [ 306 | "libc", 307 | "winapi", 308 | ] 309 | 310 | [[package]] 311 | name = "fnv" 312 | version = "1.0.7" 313 | source = "registry+https://github.com/rust-lang/crates.io-index" 314 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 315 | 316 | [[package]] 317 | name = "foreign-types" 318 | version = "0.3.2" 319 | source = "registry+https://github.com/rust-lang/crates.io-index" 320 | checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" 321 | dependencies = [ 322 | "foreign-types-shared", 323 | ] 324 | 325 | [[package]] 326 | name = "foreign-types-shared" 327 | version = "0.1.1" 328 | source = "registry+https://github.com/rust-lang/crates.io-index" 329 | checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" 330 | 331 | [[package]] 332 | name = "form_urlencoded" 333 | version = "1.2.1" 334 | source = "registry+https://github.com/rust-lang/crates.io-index" 335 | checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" 336 | dependencies = [ 337 | "percent-encoding", 338 | ] 339 | 340 | [[package]] 341 | name = "futures-channel" 342 | version = "0.3.31" 343 | source = "registry+https://github.com/rust-lang/crates.io-index" 344 | checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" 345 | dependencies = [ 346 | "futures-core", 347 | "futures-sink", 348 | ] 349 | 350 | [[package]] 351 | name = "futures-core" 352 | version = "0.3.31" 353 | source = "registry+https://github.com/rust-lang/crates.io-index" 354 | checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" 355 | 356 | [[package]] 357 | name = "futures-io" 358 | version = "0.3.31" 359 | source = "registry+https://github.com/rust-lang/crates.io-index" 360 | checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" 361 | 362 | [[package]] 363 | name = "futures-sink" 364 | version = "0.3.31" 365 | source = "registry+https://github.com/rust-lang/crates.io-index" 366 | checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" 367 | 368 | [[package]] 369 | name = "futures-task" 370 | version = "0.3.31" 371 | source = "registry+https://github.com/rust-lang/crates.io-index" 372 | checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" 373 | 374 | [[package]] 375 | name = "futures-util" 376 | version = "0.3.31" 377 | source = "registry+https://github.com/rust-lang/crates.io-index" 378 | checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" 379 | dependencies = [ 380 | "futures-core", 381 | "futures-io", 382 | "futures-sink", 383 | "futures-task", 384 | "memchr", 385 | "pin-project-lite", 386 | "pin-utils", 387 | "slab", 388 | ] 389 | 390 | [[package]] 391 | name = "getrandom" 392 | version = "0.2.15" 393 | source = "registry+https://github.com/rust-lang/crates.io-index" 394 | checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" 395 | dependencies = [ 396 | "cfg-if", 397 | "libc", 398 | "wasi 0.11.0+wasi-snapshot-preview1", 399 | ] 400 | 401 | [[package]] 402 | name = "getrandom" 403 | version = "0.3.2" 404 | source = "registry+https://github.com/rust-lang/crates.io-index" 405 | checksum = "73fea8450eea4bac3940448fb7ae50d91f034f941199fcd9d909a5a07aa455f0" 406 | dependencies = [ 407 | "cfg-if", 408 | "libc", 409 | "r-efi", 410 | "wasi 0.14.2+wasi-0.2.4", 411 | ] 412 | 413 | [[package]] 414 | name = "gimli" 415 | version = "0.31.1" 416 | source = "registry+https://github.com/rust-lang/crates.io-index" 417 | checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" 418 | 419 | [[package]] 420 | name = "glob" 421 | version = "0.3.2" 422 | source = "registry+https://github.com/rust-lang/crates.io-index" 423 | checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" 424 | 425 | [[package]] 426 | name = "h2" 427 | version = "0.4.8" 428 | source = "registry+https://github.com/rust-lang/crates.io-index" 429 | checksum = "5017294ff4bb30944501348f6f8e42e6ad28f42c8bbef7a74029aff064a4e3c2" 430 | dependencies = [ 431 | "atomic-waker", 432 | "bytes", 433 | "fnv", 434 | "futures-core", 435 | "futures-sink", 436 | "http", 437 | "indexmap", 438 | "slab", 439 | "tokio", 440 | "tokio-util", 441 | "tracing", 442 | ] 443 | 444 | [[package]] 445 | name = "hashbrown" 446 | version = "0.15.2" 447 | source = "registry+https://github.com/rust-lang/crates.io-index" 448 | checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" 449 | 450 | [[package]] 451 | name = "heck" 452 | version = "0.5.0" 453 | source = "registry+https://github.com/rust-lang/crates.io-index" 454 | checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" 455 | 456 | [[package]] 457 | name = "hex" 458 | version = "0.4.3" 459 | source = "registry+https://github.com/rust-lang/crates.io-index" 460 | checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" 461 | 462 | [[package]] 463 | name = "http" 464 | version = "1.3.1" 465 | source = "registry+https://github.com/rust-lang/crates.io-index" 466 | checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" 467 | dependencies = [ 468 | "bytes", 469 | "fnv", 470 | "itoa", 471 | ] 472 | 473 | [[package]] 474 | name = "http-body" 475 | version = "1.0.1" 476 | source = "registry+https://github.com/rust-lang/crates.io-index" 477 | checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" 478 | dependencies = [ 479 | "bytes", 480 | "http", 481 | ] 482 | 483 | [[package]] 484 | name = "http-body-util" 485 | version = "0.1.3" 486 | source = "registry+https://github.com/rust-lang/crates.io-index" 487 | checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" 488 | dependencies = [ 489 | "bytes", 490 | "futures-core", 491 | "http", 492 | "http-body", 493 | "pin-project-lite", 494 | ] 495 | 496 | [[package]] 497 | name = "httparse" 498 | version = "1.10.1" 499 | source = "registry+https://github.com/rust-lang/crates.io-index" 500 | checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" 501 | 502 | [[package]] 503 | name = "hyper" 504 | version = "1.6.0" 505 | source = "registry+https://github.com/rust-lang/crates.io-index" 506 | checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80" 507 | dependencies = [ 508 | "bytes", 509 | "futures-channel", 510 | "futures-util", 511 | "h2", 512 | "http", 513 | "http-body", 514 | "httparse", 515 | "itoa", 516 | "pin-project-lite", 517 | "smallvec", 518 | "tokio", 519 | "want", 520 | ] 521 | 522 | [[package]] 523 | name = "hyper-rustls" 524 | version = "0.27.5" 525 | source = "registry+https://github.com/rust-lang/crates.io-index" 526 | checksum = "2d191583f3da1305256f22463b9bb0471acad48a4e534a5218b9963e9c1f59b2" 527 | dependencies = [ 528 | "futures-util", 529 | "http", 530 | "hyper", 531 | "hyper-util", 532 | "rustls", 533 | "rustls-pki-types", 534 | "tokio", 535 | "tokio-rustls", 536 | "tower-service", 537 | ] 538 | 539 | [[package]] 540 | name = "hyper-tls" 541 | version = "0.6.0" 542 | source = "registry+https://github.com/rust-lang/crates.io-index" 543 | checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" 544 | dependencies = [ 545 | "bytes", 546 | "http-body-util", 547 | "hyper", 548 | "hyper-util", 549 | "native-tls", 550 | "tokio", 551 | "tokio-native-tls", 552 | "tower-service", 553 | ] 554 | 555 | [[package]] 556 | name = "hyper-util" 557 | version = "0.1.10" 558 | source = "registry+https://github.com/rust-lang/crates.io-index" 559 | checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" 560 | dependencies = [ 561 | "bytes", 562 | "futures-channel", 563 | "futures-util", 564 | "http", 565 | "http-body", 566 | "hyper", 567 | "pin-project-lite", 568 | "socket2", 569 | "tokio", 570 | "tower-service", 571 | "tracing", 572 | ] 573 | 574 | [[package]] 575 | name = "iana-time-zone" 576 | version = "0.1.61" 577 | source = "registry+https://github.com/rust-lang/crates.io-index" 578 | checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" 579 | dependencies = [ 580 | "android_system_properties", 581 | "core-foundation-sys", 582 | "iana-time-zone-haiku", 583 | "js-sys", 584 | "wasm-bindgen", 585 | "windows-core", 586 | ] 587 | 588 | [[package]] 589 | name = "iana-time-zone-haiku" 590 | version = "0.1.2" 591 | source = "registry+https://github.com/rust-lang/crates.io-index" 592 | checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" 593 | dependencies = [ 594 | "cc", 595 | ] 596 | 597 | [[package]] 598 | name = "icu_collections" 599 | version = "1.5.0" 600 | source = "registry+https://github.com/rust-lang/crates.io-index" 601 | checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" 602 | dependencies = [ 603 | "displaydoc", 604 | "yoke", 605 | "zerofrom", 606 | "zerovec", 607 | ] 608 | 609 | [[package]] 610 | name = "icu_locid" 611 | version = "1.5.0" 612 | source = "registry+https://github.com/rust-lang/crates.io-index" 613 | checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" 614 | dependencies = [ 615 | "displaydoc", 616 | "litemap", 617 | "tinystr", 618 | "writeable", 619 | "zerovec", 620 | ] 621 | 622 | [[package]] 623 | name = "icu_locid_transform" 624 | version = "1.5.0" 625 | source = "registry+https://github.com/rust-lang/crates.io-index" 626 | checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" 627 | dependencies = [ 628 | "displaydoc", 629 | "icu_locid", 630 | "icu_locid_transform_data", 631 | "icu_provider", 632 | "tinystr", 633 | "zerovec", 634 | ] 635 | 636 | [[package]] 637 | name = "icu_locid_transform_data" 638 | version = "1.5.0" 639 | source = "registry+https://github.com/rust-lang/crates.io-index" 640 | checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" 641 | 642 | [[package]] 643 | name = "icu_normalizer" 644 | version = "1.5.0" 645 | source = "registry+https://github.com/rust-lang/crates.io-index" 646 | checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" 647 | dependencies = [ 648 | "displaydoc", 649 | "icu_collections", 650 | "icu_normalizer_data", 651 | "icu_properties", 652 | "icu_provider", 653 | "smallvec", 654 | "utf16_iter", 655 | "utf8_iter", 656 | "write16", 657 | "zerovec", 658 | ] 659 | 660 | [[package]] 661 | name = "icu_normalizer_data" 662 | version = "1.5.0" 663 | source = "registry+https://github.com/rust-lang/crates.io-index" 664 | checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" 665 | 666 | [[package]] 667 | name = "icu_properties" 668 | version = "1.5.1" 669 | source = "registry+https://github.com/rust-lang/crates.io-index" 670 | checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" 671 | dependencies = [ 672 | "displaydoc", 673 | "icu_collections", 674 | "icu_locid_transform", 675 | "icu_properties_data", 676 | "icu_provider", 677 | "tinystr", 678 | "zerovec", 679 | ] 680 | 681 | [[package]] 682 | name = "icu_properties_data" 683 | version = "1.5.0" 684 | source = "registry+https://github.com/rust-lang/crates.io-index" 685 | checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" 686 | 687 | [[package]] 688 | name = "icu_provider" 689 | version = "1.5.0" 690 | source = "registry+https://github.com/rust-lang/crates.io-index" 691 | checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" 692 | dependencies = [ 693 | "displaydoc", 694 | "icu_locid", 695 | "icu_provider_macros", 696 | "stable_deref_trait", 697 | "tinystr", 698 | "writeable", 699 | "yoke", 700 | "zerofrom", 701 | "zerovec", 702 | ] 703 | 704 | [[package]] 705 | name = "icu_provider_macros" 706 | version = "1.5.0" 707 | source = "registry+https://github.com/rust-lang/crates.io-index" 708 | checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" 709 | dependencies = [ 710 | "proc-macro2", 711 | "quote", 712 | "syn", 713 | ] 714 | 715 | [[package]] 716 | name = "idna" 717 | version = "1.0.3" 718 | source = "registry+https://github.com/rust-lang/crates.io-index" 719 | checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" 720 | dependencies = [ 721 | "idna_adapter", 722 | "smallvec", 723 | "utf8_iter", 724 | ] 725 | 726 | [[package]] 727 | name = "idna_adapter" 728 | version = "1.2.0" 729 | source = "registry+https://github.com/rust-lang/crates.io-index" 730 | checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" 731 | dependencies = [ 732 | "icu_normalizer", 733 | "icu_properties", 734 | ] 735 | 736 | [[package]] 737 | name = "indexmap" 738 | version = "2.8.0" 739 | source = "registry+https://github.com/rust-lang/crates.io-index" 740 | checksum = "3954d50fe15b02142bf25d3b8bdadb634ec3948f103d04ffe3031bc8fe9d7058" 741 | dependencies = [ 742 | "equivalent", 743 | "hashbrown", 744 | ] 745 | 746 | [[package]] 747 | name = "indicatif" 748 | version = "0.17.11" 749 | source = "registry+https://github.com/rust-lang/crates.io-index" 750 | checksum = "183b3088984b400f4cfac3620d5e076c84da5364016b4f49473de574b2586235" 751 | dependencies = [ 752 | "console", 753 | "number_prefix", 754 | "portable-atomic", 755 | "unicode-width", 756 | "web-time", 757 | ] 758 | 759 | [[package]] 760 | name = "ipnet" 761 | version = "2.11.0" 762 | source = "registry+https://github.com/rust-lang/crates.io-index" 763 | checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" 764 | 765 | [[package]] 766 | name = "is_terminal_polyfill" 767 | version = "1.70.1" 768 | source = "registry+https://github.com/rust-lang/crates.io-index" 769 | checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" 770 | 771 | [[package]] 772 | name = "itoa" 773 | version = "1.0.15" 774 | source = "registry+https://github.com/rust-lang/crates.io-index" 775 | checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" 776 | 777 | [[package]] 778 | name = "js-sys" 779 | version = "0.3.77" 780 | source = "registry+https://github.com/rust-lang/crates.io-index" 781 | checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" 782 | dependencies = [ 783 | "once_cell", 784 | "wasm-bindgen", 785 | ] 786 | 787 | [[package]] 788 | name = "libc" 789 | version = "0.2.171" 790 | source = "registry+https://github.com/rust-lang/crates.io-index" 791 | checksum = "c19937216e9d3aa9956d9bb8dfc0b0c8beb6058fc4f7a4dc4d850edf86a237d6" 792 | 793 | [[package]] 794 | name = "linux-raw-sys" 795 | version = "0.9.3" 796 | source = "registry+https://github.com/rust-lang/crates.io-index" 797 | checksum = "fe7db12097d22ec582439daf8618b8fdd1a7bef6270e9af3b1ebcd30893cf413" 798 | 799 | [[package]] 800 | name = "litemap" 801 | version = "0.7.5" 802 | source = "registry+https://github.com/rust-lang/crates.io-index" 803 | checksum = "23fb14cb19457329c82206317a5663005a4d404783dc74f4252769b0d5f42856" 804 | 805 | [[package]] 806 | name = "log" 807 | version = "0.4.26" 808 | source = "registry+https://github.com/rust-lang/crates.io-index" 809 | checksum = "30bde2b3dc3671ae49d8e2e9f044c7c005836e7a023ee57cffa25ab82764bb9e" 810 | 811 | [[package]] 812 | name = "memchr" 813 | version = "2.7.4" 814 | source = "registry+https://github.com/rust-lang/crates.io-index" 815 | checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" 816 | 817 | [[package]] 818 | name = "mime" 819 | version = "0.3.17" 820 | source = "registry+https://github.com/rust-lang/crates.io-index" 821 | checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" 822 | 823 | [[package]] 824 | name = "miniz_oxide" 825 | version = "0.8.5" 826 | source = "registry+https://github.com/rust-lang/crates.io-index" 827 | checksum = "8e3e04debbb59698c15bacbb6d93584a8c0ca9cc3213cb423d31f760d8843ce5" 828 | dependencies = [ 829 | "adler2", 830 | ] 831 | 832 | [[package]] 833 | name = "mio" 834 | version = "1.0.3" 835 | source = "registry+https://github.com/rust-lang/crates.io-index" 836 | checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" 837 | dependencies = [ 838 | "libc", 839 | "wasi 0.11.0+wasi-snapshot-preview1", 840 | "windows-sys 0.52.0", 841 | ] 842 | 843 | [[package]] 844 | name = "native-tls" 845 | version = "0.2.14" 846 | source = "registry+https://github.com/rust-lang/crates.io-index" 847 | checksum = "87de3442987e9dbec73158d5c715e7ad9072fda936bb03d19d7fa10e00520f0e" 848 | dependencies = [ 849 | "libc", 850 | "log", 851 | "openssl", 852 | "openssl-probe", 853 | "openssl-sys", 854 | "schannel", 855 | "security-framework", 856 | "security-framework-sys", 857 | "tempfile", 858 | ] 859 | 860 | [[package]] 861 | name = "num-traits" 862 | version = "0.2.19" 863 | source = "registry+https://github.com/rust-lang/crates.io-index" 864 | checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" 865 | dependencies = [ 866 | "autocfg", 867 | ] 868 | 869 | [[package]] 870 | name = "number_prefix" 871 | version = "0.4.0" 872 | source = "registry+https://github.com/rust-lang/crates.io-index" 873 | checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" 874 | 875 | [[package]] 876 | name = "object" 877 | version = "0.36.7" 878 | source = "registry+https://github.com/rust-lang/crates.io-index" 879 | checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" 880 | dependencies = [ 881 | "memchr", 882 | ] 883 | 884 | [[package]] 885 | name = "once_cell" 886 | version = "1.21.1" 887 | source = "registry+https://github.com/rust-lang/crates.io-index" 888 | checksum = "d75b0bedcc4fe52caa0e03d9f1151a323e4aa5e2d78ba3580400cd3c9e2bc4bc" 889 | 890 | [[package]] 891 | name = "openssl" 892 | version = "0.10.72" 893 | source = "registry+https://github.com/rust-lang/crates.io-index" 894 | checksum = "fedfea7d58a1f73118430a55da6a286e7b044961736ce96a16a17068ea25e5da" 895 | dependencies = [ 896 | "bitflags", 897 | "cfg-if", 898 | "foreign-types", 899 | "libc", 900 | "once_cell", 901 | "openssl-macros", 902 | "openssl-sys", 903 | ] 904 | 905 | [[package]] 906 | name = "openssl-macros" 907 | version = "0.1.1" 908 | source = "registry+https://github.com/rust-lang/crates.io-index" 909 | checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" 910 | dependencies = [ 911 | "proc-macro2", 912 | "quote", 913 | "syn", 914 | ] 915 | 916 | [[package]] 917 | name = "openssl-probe" 918 | version = "0.1.6" 919 | source = "registry+https://github.com/rust-lang/crates.io-index" 920 | checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" 921 | 922 | [[package]] 923 | name = "openssl-sys" 924 | version = "0.9.107" 925 | source = "registry+https://github.com/rust-lang/crates.io-index" 926 | checksum = "8288979acd84749c744a9014b4382d42b8f7b2592847b5afb2ed29e5d16ede07" 927 | dependencies = [ 928 | "cc", 929 | "libc", 930 | "pkg-config", 931 | "vcpkg", 932 | ] 933 | 934 | [[package]] 935 | name = "percent-encoding" 936 | version = "2.3.1" 937 | source = "registry+https://github.com/rust-lang/crates.io-index" 938 | checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" 939 | 940 | [[package]] 941 | name = "pin-project-lite" 942 | version = "0.2.16" 943 | source = "registry+https://github.com/rust-lang/crates.io-index" 944 | checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" 945 | 946 | [[package]] 947 | name = "pin-utils" 948 | version = "0.1.0" 949 | source = "registry+https://github.com/rust-lang/crates.io-index" 950 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 951 | 952 | [[package]] 953 | name = "pkg-config" 954 | version = "0.3.32" 955 | source = "registry+https://github.com/rust-lang/crates.io-index" 956 | checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" 957 | 958 | [[package]] 959 | name = "portable-atomic" 960 | version = "1.11.0" 961 | source = "registry+https://github.com/rust-lang/crates.io-index" 962 | checksum = "350e9b48cbc6b0e028b0473b114454c6316e57336ee184ceab6e53f72c178b3e" 963 | 964 | [[package]] 965 | name = "proc-macro2" 966 | version = "1.0.94" 967 | source = "registry+https://github.com/rust-lang/crates.io-index" 968 | checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84" 969 | dependencies = [ 970 | "unicode-ident", 971 | ] 972 | 973 | [[package]] 974 | name = "quote" 975 | version = "1.0.40" 976 | source = "registry+https://github.com/rust-lang/crates.io-index" 977 | checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" 978 | dependencies = [ 979 | "proc-macro2", 980 | ] 981 | 982 | [[package]] 983 | name = "r-efi" 984 | version = "5.2.0" 985 | source = "registry+https://github.com/rust-lang/crates.io-index" 986 | checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" 987 | 988 | [[package]] 989 | name = "reqwest" 990 | version = "0.12.15" 991 | source = "registry+https://github.com/rust-lang/crates.io-index" 992 | checksum = "d19c46a6fdd48bc4dab94b6103fccc55d34c67cc0ad04653aad4ea2a07cd7bbb" 993 | dependencies = [ 994 | "base64", 995 | "bytes", 996 | "encoding_rs", 997 | "futures-channel", 998 | "futures-core", 999 | "futures-util", 1000 | "h2", 1001 | "http", 1002 | "http-body", 1003 | "http-body-util", 1004 | "hyper", 1005 | "hyper-rustls", 1006 | "hyper-tls", 1007 | "hyper-util", 1008 | "ipnet", 1009 | "js-sys", 1010 | "log", 1011 | "mime", 1012 | "native-tls", 1013 | "once_cell", 1014 | "percent-encoding", 1015 | "pin-project-lite", 1016 | "rustls-pemfile", 1017 | "serde", 1018 | "serde_json", 1019 | "serde_urlencoded", 1020 | "sync_wrapper", 1021 | "system-configuration", 1022 | "tokio", 1023 | "tokio-native-tls", 1024 | "tokio-socks", 1025 | "tower", 1026 | "tower-service", 1027 | "url", 1028 | "wasm-bindgen", 1029 | "wasm-bindgen-futures", 1030 | "web-sys", 1031 | "windows-registry", 1032 | ] 1033 | 1034 | [[package]] 1035 | name = "ring" 1036 | version = "0.17.14" 1037 | source = "registry+https://github.com/rust-lang/crates.io-index" 1038 | checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" 1039 | dependencies = [ 1040 | "cc", 1041 | "cfg-if", 1042 | "getrandom 0.2.15", 1043 | "libc", 1044 | "untrusted", 1045 | "windows-sys 0.52.0", 1046 | ] 1047 | 1048 | [[package]] 1049 | name = "rustc-demangle" 1050 | version = "0.1.24" 1051 | source = "registry+https://github.com/rust-lang/crates.io-index" 1052 | checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" 1053 | 1054 | [[package]] 1055 | name = "rustix" 1056 | version = "1.0.3" 1057 | source = "registry+https://github.com/rust-lang/crates.io-index" 1058 | checksum = "e56a18552996ac8d29ecc3b190b4fdbb2d91ca4ec396de7bbffaf43f3d637e96" 1059 | dependencies = [ 1060 | "bitflags", 1061 | "errno", 1062 | "libc", 1063 | "linux-raw-sys", 1064 | "windows-sys 0.59.0", 1065 | ] 1066 | 1067 | [[package]] 1068 | name = "rustls" 1069 | version = "0.23.25" 1070 | source = "registry+https://github.com/rust-lang/crates.io-index" 1071 | checksum = "822ee9188ac4ec04a2f0531e55d035fb2de73f18b41a63c70c2712503b6fb13c" 1072 | dependencies = [ 1073 | "once_cell", 1074 | "rustls-pki-types", 1075 | "rustls-webpki", 1076 | "subtle", 1077 | "zeroize", 1078 | ] 1079 | 1080 | [[package]] 1081 | name = "rustls-pemfile" 1082 | version = "2.2.0" 1083 | source = "registry+https://github.com/rust-lang/crates.io-index" 1084 | checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" 1085 | dependencies = [ 1086 | "rustls-pki-types", 1087 | ] 1088 | 1089 | [[package]] 1090 | name = "rustls-pki-types" 1091 | version = "1.11.0" 1092 | source = "registry+https://github.com/rust-lang/crates.io-index" 1093 | checksum = "917ce264624a4b4db1c364dcc35bfca9ded014d0a958cd47ad3e960e988ea51c" 1094 | 1095 | [[package]] 1096 | name = "rustls-webpki" 1097 | version = "0.103.0" 1098 | source = "registry+https://github.com/rust-lang/crates.io-index" 1099 | checksum = "0aa4eeac2588ffff23e9d7a7e9b3f971c5fb5b7ebc9452745e0c232c64f83b2f" 1100 | dependencies = [ 1101 | "ring", 1102 | "rustls-pki-types", 1103 | "untrusted", 1104 | ] 1105 | 1106 | [[package]] 1107 | name = "rustup-mirror" 1108 | version = "0.9.0" 1109 | dependencies = [ 1110 | "anyhow", 1111 | "chrono", 1112 | "clap", 1113 | "filebuffer", 1114 | "glob", 1115 | "hex", 1116 | "indicatif", 1117 | "reqwest", 1118 | "ring", 1119 | "toml", 1120 | "url", 1121 | ] 1122 | 1123 | [[package]] 1124 | name = "rustversion" 1125 | version = "1.0.20" 1126 | source = "registry+https://github.com/rust-lang/crates.io-index" 1127 | checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2" 1128 | 1129 | [[package]] 1130 | name = "ryu" 1131 | version = "1.0.20" 1132 | source = "registry+https://github.com/rust-lang/crates.io-index" 1133 | checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" 1134 | 1135 | [[package]] 1136 | name = "schannel" 1137 | version = "0.1.27" 1138 | source = "registry+https://github.com/rust-lang/crates.io-index" 1139 | checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" 1140 | dependencies = [ 1141 | "windows-sys 0.59.0", 1142 | ] 1143 | 1144 | [[package]] 1145 | name = "security-framework" 1146 | version = "2.11.1" 1147 | source = "registry+https://github.com/rust-lang/crates.io-index" 1148 | checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" 1149 | dependencies = [ 1150 | "bitflags", 1151 | "core-foundation", 1152 | "core-foundation-sys", 1153 | "libc", 1154 | "security-framework-sys", 1155 | ] 1156 | 1157 | [[package]] 1158 | name = "security-framework-sys" 1159 | version = "2.14.0" 1160 | source = "registry+https://github.com/rust-lang/crates.io-index" 1161 | checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" 1162 | dependencies = [ 1163 | "core-foundation-sys", 1164 | "libc", 1165 | ] 1166 | 1167 | [[package]] 1168 | name = "serde" 1169 | version = "1.0.219" 1170 | source = "registry+https://github.com/rust-lang/crates.io-index" 1171 | checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" 1172 | dependencies = [ 1173 | "serde_derive", 1174 | ] 1175 | 1176 | [[package]] 1177 | name = "serde_derive" 1178 | version = "1.0.219" 1179 | source = "registry+https://github.com/rust-lang/crates.io-index" 1180 | checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" 1181 | dependencies = [ 1182 | "proc-macro2", 1183 | "quote", 1184 | "syn", 1185 | ] 1186 | 1187 | [[package]] 1188 | name = "serde_json" 1189 | version = "1.0.140" 1190 | source = "registry+https://github.com/rust-lang/crates.io-index" 1191 | checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" 1192 | dependencies = [ 1193 | "itoa", 1194 | "memchr", 1195 | "ryu", 1196 | "serde", 1197 | ] 1198 | 1199 | [[package]] 1200 | name = "serde_spanned" 1201 | version = "0.6.8" 1202 | source = "registry+https://github.com/rust-lang/crates.io-index" 1203 | checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" 1204 | dependencies = [ 1205 | "serde", 1206 | ] 1207 | 1208 | [[package]] 1209 | name = "serde_urlencoded" 1210 | version = "0.7.1" 1211 | source = "registry+https://github.com/rust-lang/crates.io-index" 1212 | checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" 1213 | dependencies = [ 1214 | "form_urlencoded", 1215 | "itoa", 1216 | "ryu", 1217 | "serde", 1218 | ] 1219 | 1220 | [[package]] 1221 | name = "shlex" 1222 | version = "1.3.0" 1223 | source = "registry+https://github.com/rust-lang/crates.io-index" 1224 | checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" 1225 | 1226 | [[package]] 1227 | name = "slab" 1228 | version = "0.4.9" 1229 | source = "registry+https://github.com/rust-lang/crates.io-index" 1230 | checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" 1231 | dependencies = [ 1232 | "autocfg", 1233 | ] 1234 | 1235 | [[package]] 1236 | name = "smallvec" 1237 | version = "1.14.0" 1238 | source = "registry+https://github.com/rust-lang/crates.io-index" 1239 | checksum = "7fcf8323ef1faaee30a44a340193b1ac6814fd9b7b4e88e9d4519a3e4abe1cfd" 1240 | 1241 | [[package]] 1242 | name = "socket2" 1243 | version = "0.5.8" 1244 | source = "registry+https://github.com/rust-lang/crates.io-index" 1245 | checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8" 1246 | dependencies = [ 1247 | "libc", 1248 | "windows-sys 0.52.0", 1249 | ] 1250 | 1251 | [[package]] 1252 | name = "stable_deref_trait" 1253 | version = "1.2.0" 1254 | source = "registry+https://github.com/rust-lang/crates.io-index" 1255 | checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" 1256 | 1257 | [[package]] 1258 | name = "strsim" 1259 | version = "0.11.1" 1260 | source = "registry+https://github.com/rust-lang/crates.io-index" 1261 | checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" 1262 | 1263 | [[package]] 1264 | name = "subtle" 1265 | version = "2.6.1" 1266 | source = "registry+https://github.com/rust-lang/crates.io-index" 1267 | checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" 1268 | 1269 | [[package]] 1270 | name = "syn" 1271 | version = "2.0.100" 1272 | source = "registry+https://github.com/rust-lang/crates.io-index" 1273 | checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0" 1274 | dependencies = [ 1275 | "proc-macro2", 1276 | "quote", 1277 | "unicode-ident", 1278 | ] 1279 | 1280 | [[package]] 1281 | name = "sync_wrapper" 1282 | version = "1.0.2" 1283 | source = "registry+https://github.com/rust-lang/crates.io-index" 1284 | checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" 1285 | dependencies = [ 1286 | "futures-core", 1287 | ] 1288 | 1289 | [[package]] 1290 | name = "synstructure" 1291 | version = "0.13.1" 1292 | source = "registry+https://github.com/rust-lang/crates.io-index" 1293 | checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" 1294 | dependencies = [ 1295 | "proc-macro2", 1296 | "quote", 1297 | "syn", 1298 | ] 1299 | 1300 | [[package]] 1301 | name = "system-configuration" 1302 | version = "0.6.1" 1303 | source = "registry+https://github.com/rust-lang/crates.io-index" 1304 | checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" 1305 | dependencies = [ 1306 | "bitflags", 1307 | "core-foundation", 1308 | "system-configuration-sys", 1309 | ] 1310 | 1311 | [[package]] 1312 | name = "system-configuration-sys" 1313 | version = "0.6.0" 1314 | source = "registry+https://github.com/rust-lang/crates.io-index" 1315 | checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" 1316 | dependencies = [ 1317 | "core-foundation-sys", 1318 | "libc", 1319 | ] 1320 | 1321 | [[package]] 1322 | name = "tempfile" 1323 | version = "3.19.1" 1324 | source = "registry+https://github.com/rust-lang/crates.io-index" 1325 | checksum = "7437ac7763b9b123ccf33c338a5cc1bac6f69b45a136c19bdd8a65e3916435bf" 1326 | dependencies = [ 1327 | "fastrand", 1328 | "getrandom 0.3.2", 1329 | "once_cell", 1330 | "rustix", 1331 | "windows-sys 0.59.0", 1332 | ] 1333 | 1334 | [[package]] 1335 | name = "thiserror" 1336 | version = "1.0.69" 1337 | source = "registry+https://github.com/rust-lang/crates.io-index" 1338 | checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" 1339 | dependencies = [ 1340 | "thiserror-impl", 1341 | ] 1342 | 1343 | [[package]] 1344 | name = "thiserror-impl" 1345 | version = "1.0.69" 1346 | source = "registry+https://github.com/rust-lang/crates.io-index" 1347 | checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" 1348 | dependencies = [ 1349 | "proc-macro2", 1350 | "quote", 1351 | "syn", 1352 | ] 1353 | 1354 | [[package]] 1355 | name = "tinystr" 1356 | version = "0.7.6" 1357 | source = "registry+https://github.com/rust-lang/crates.io-index" 1358 | checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" 1359 | dependencies = [ 1360 | "displaydoc", 1361 | "zerovec", 1362 | ] 1363 | 1364 | [[package]] 1365 | name = "tokio" 1366 | version = "1.44.2" 1367 | source = "registry+https://github.com/rust-lang/crates.io-index" 1368 | checksum = "e6b88822cbe49de4185e3a4cbf8321dd487cf5fe0c5c65695fef6346371e9c48" 1369 | dependencies = [ 1370 | "backtrace", 1371 | "bytes", 1372 | "libc", 1373 | "mio", 1374 | "pin-project-lite", 1375 | "socket2", 1376 | "windows-sys 0.52.0", 1377 | ] 1378 | 1379 | [[package]] 1380 | name = "tokio-native-tls" 1381 | version = "0.3.1" 1382 | source = "registry+https://github.com/rust-lang/crates.io-index" 1383 | checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" 1384 | dependencies = [ 1385 | "native-tls", 1386 | "tokio", 1387 | ] 1388 | 1389 | [[package]] 1390 | name = "tokio-rustls" 1391 | version = "0.26.2" 1392 | source = "registry+https://github.com/rust-lang/crates.io-index" 1393 | checksum = "8e727b36a1a0e8b74c376ac2211e40c2c8af09fb4013c60d910495810f008e9b" 1394 | dependencies = [ 1395 | "rustls", 1396 | "tokio", 1397 | ] 1398 | 1399 | [[package]] 1400 | name = "tokio-socks" 1401 | version = "0.5.2" 1402 | source = "registry+https://github.com/rust-lang/crates.io-index" 1403 | checksum = "0d4770b8024672c1101b3f6733eab95b18007dbe0847a8afe341fcf79e06043f" 1404 | dependencies = [ 1405 | "either", 1406 | "futures-util", 1407 | "thiserror", 1408 | "tokio", 1409 | ] 1410 | 1411 | [[package]] 1412 | name = "tokio-util" 1413 | version = "0.7.14" 1414 | source = "registry+https://github.com/rust-lang/crates.io-index" 1415 | checksum = "6b9590b93e6fcc1739458317cccd391ad3955e2bde8913edf6f95f9e65a8f034" 1416 | dependencies = [ 1417 | "bytes", 1418 | "futures-core", 1419 | "futures-sink", 1420 | "pin-project-lite", 1421 | "tokio", 1422 | ] 1423 | 1424 | [[package]] 1425 | name = "toml" 1426 | version = "0.8.20" 1427 | source = "registry+https://github.com/rust-lang/crates.io-index" 1428 | checksum = "cd87a5cdd6ffab733b2f74bc4fd7ee5fff6634124999ac278c35fc78c6120148" 1429 | dependencies = [ 1430 | "serde", 1431 | "serde_spanned", 1432 | "toml_datetime", 1433 | "toml_edit", 1434 | ] 1435 | 1436 | [[package]] 1437 | name = "toml_datetime" 1438 | version = "0.6.8" 1439 | source = "registry+https://github.com/rust-lang/crates.io-index" 1440 | checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" 1441 | dependencies = [ 1442 | "serde", 1443 | ] 1444 | 1445 | [[package]] 1446 | name = "toml_edit" 1447 | version = "0.22.24" 1448 | source = "registry+https://github.com/rust-lang/crates.io-index" 1449 | checksum = "17b4795ff5edd201c7cd6dca065ae59972ce77d1b80fa0a84d94950ece7d1474" 1450 | dependencies = [ 1451 | "indexmap", 1452 | "serde", 1453 | "serde_spanned", 1454 | "toml_datetime", 1455 | "winnow", 1456 | ] 1457 | 1458 | [[package]] 1459 | name = "tower" 1460 | version = "0.5.2" 1461 | source = "registry+https://github.com/rust-lang/crates.io-index" 1462 | checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" 1463 | dependencies = [ 1464 | "futures-core", 1465 | "futures-util", 1466 | "pin-project-lite", 1467 | "sync_wrapper", 1468 | "tokio", 1469 | "tower-layer", 1470 | "tower-service", 1471 | ] 1472 | 1473 | [[package]] 1474 | name = "tower-layer" 1475 | version = "0.3.3" 1476 | source = "registry+https://github.com/rust-lang/crates.io-index" 1477 | checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" 1478 | 1479 | [[package]] 1480 | name = "tower-service" 1481 | version = "0.3.3" 1482 | source = "registry+https://github.com/rust-lang/crates.io-index" 1483 | checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" 1484 | 1485 | [[package]] 1486 | name = "tracing" 1487 | version = "0.1.41" 1488 | source = "registry+https://github.com/rust-lang/crates.io-index" 1489 | checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" 1490 | dependencies = [ 1491 | "pin-project-lite", 1492 | "tracing-core", 1493 | ] 1494 | 1495 | [[package]] 1496 | name = "tracing-core" 1497 | version = "0.1.33" 1498 | source = "registry+https://github.com/rust-lang/crates.io-index" 1499 | checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" 1500 | dependencies = [ 1501 | "once_cell", 1502 | ] 1503 | 1504 | [[package]] 1505 | name = "try-lock" 1506 | version = "0.2.5" 1507 | source = "registry+https://github.com/rust-lang/crates.io-index" 1508 | checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" 1509 | 1510 | [[package]] 1511 | name = "unicode-ident" 1512 | version = "1.0.18" 1513 | source = "registry+https://github.com/rust-lang/crates.io-index" 1514 | checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" 1515 | 1516 | [[package]] 1517 | name = "unicode-width" 1518 | version = "0.2.0" 1519 | source = "registry+https://github.com/rust-lang/crates.io-index" 1520 | checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" 1521 | 1522 | [[package]] 1523 | name = "untrusted" 1524 | version = "0.9.0" 1525 | source = "registry+https://github.com/rust-lang/crates.io-index" 1526 | checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" 1527 | 1528 | [[package]] 1529 | name = "url" 1530 | version = "2.5.4" 1531 | source = "registry+https://github.com/rust-lang/crates.io-index" 1532 | checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" 1533 | dependencies = [ 1534 | "form_urlencoded", 1535 | "idna", 1536 | "percent-encoding", 1537 | ] 1538 | 1539 | [[package]] 1540 | name = "utf16_iter" 1541 | version = "1.0.5" 1542 | source = "registry+https://github.com/rust-lang/crates.io-index" 1543 | checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" 1544 | 1545 | [[package]] 1546 | name = "utf8_iter" 1547 | version = "1.0.4" 1548 | source = "registry+https://github.com/rust-lang/crates.io-index" 1549 | checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" 1550 | 1551 | [[package]] 1552 | name = "utf8parse" 1553 | version = "0.2.2" 1554 | source = "registry+https://github.com/rust-lang/crates.io-index" 1555 | checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" 1556 | 1557 | [[package]] 1558 | name = "vcpkg" 1559 | version = "0.2.15" 1560 | source = "registry+https://github.com/rust-lang/crates.io-index" 1561 | checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" 1562 | 1563 | [[package]] 1564 | name = "want" 1565 | version = "0.3.1" 1566 | source = "registry+https://github.com/rust-lang/crates.io-index" 1567 | checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" 1568 | dependencies = [ 1569 | "try-lock", 1570 | ] 1571 | 1572 | [[package]] 1573 | name = "wasi" 1574 | version = "0.11.0+wasi-snapshot-preview1" 1575 | source = "registry+https://github.com/rust-lang/crates.io-index" 1576 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 1577 | 1578 | [[package]] 1579 | name = "wasi" 1580 | version = "0.14.2+wasi-0.2.4" 1581 | source = "registry+https://github.com/rust-lang/crates.io-index" 1582 | checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" 1583 | dependencies = [ 1584 | "wit-bindgen-rt", 1585 | ] 1586 | 1587 | [[package]] 1588 | name = "wasm-bindgen" 1589 | version = "0.2.100" 1590 | source = "registry+https://github.com/rust-lang/crates.io-index" 1591 | checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" 1592 | dependencies = [ 1593 | "cfg-if", 1594 | "once_cell", 1595 | "rustversion", 1596 | "wasm-bindgen-macro", 1597 | ] 1598 | 1599 | [[package]] 1600 | name = "wasm-bindgen-backend" 1601 | version = "0.2.100" 1602 | source = "registry+https://github.com/rust-lang/crates.io-index" 1603 | checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" 1604 | dependencies = [ 1605 | "bumpalo", 1606 | "log", 1607 | "proc-macro2", 1608 | "quote", 1609 | "syn", 1610 | "wasm-bindgen-shared", 1611 | ] 1612 | 1613 | [[package]] 1614 | name = "wasm-bindgen-futures" 1615 | version = "0.4.50" 1616 | source = "registry+https://github.com/rust-lang/crates.io-index" 1617 | checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" 1618 | dependencies = [ 1619 | "cfg-if", 1620 | "js-sys", 1621 | "once_cell", 1622 | "wasm-bindgen", 1623 | "web-sys", 1624 | ] 1625 | 1626 | [[package]] 1627 | name = "wasm-bindgen-macro" 1628 | version = "0.2.100" 1629 | source = "registry+https://github.com/rust-lang/crates.io-index" 1630 | checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" 1631 | dependencies = [ 1632 | "quote", 1633 | "wasm-bindgen-macro-support", 1634 | ] 1635 | 1636 | [[package]] 1637 | name = "wasm-bindgen-macro-support" 1638 | version = "0.2.100" 1639 | source = "registry+https://github.com/rust-lang/crates.io-index" 1640 | checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" 1641 | dependencies = [ 1642 | "proc-macro2", 1643 | "quote", 1644 | "syn", 1645 | "wasm-bindgen-backend", 1646 | "wasm-bindgen-shared", 1647 | ] 1648 | 1649 | [[package]] 1650 | name = "wasm-bindgen-shared" 1651 | version = "0.2.100" 1652 | source = "registry+https://github.com/rust-lang/crates.io-index" 1653 | checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" 1654 | dependencies = [ 1655 | "unicode-ident", 1656 | ] 1657 | 1658 | [[package]] 1659 | name = "web-sys" 1660 | version = "0.3.77" 1661 | source = "registry+https://github.com/rust-lang/crates.io-index" 1662 | checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" 1663 | dependencies = [ 1664 | "js-sys", 1665 | "wasm-bindgen", 1666 | ] 1667 | 1668 | [[package]] 1669 | name = "web-time" 1670 | version = "1.1.0" 1671 | source = "registry+https://github.com/rust-lang/crates.io-index" 1672 | checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" 1673 | dependencies = [ 1674 | "js-sys", 1675 | "wasm-bindgen", 1676 | ] 1677 | 1678 | [[package]] 1679 | name = "winapi" 1680 | version = "0.3.9" 1681 | source = "registry+https://github.com/rust-lang/crates.io-index" 1682 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 1683 | dependencies = [ 1684 | "winapi-i686-pc-windows-gnu", 1685 | "winapi-x86_64-pc-windows-gnu", 1686 | ] 1687 | 1688 | [[package]] 1689 | name = "winapi-i686-pc-windows-gnu" 1690 | version = "0.4.0" 1691 | source = "registry+https://github.com/rust-lang/crates.io-index" 1692 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 1693 | 1694 | [[package]] 1695 | name = "winapi-x86_64-pc-windows-gnu" 1696 | version = "0.4.0" 1697 | source = "registry+https://github.com/rust-lang/crates.io-index" 1698 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 1699 | 1700 | [[package]] 1701 | name = "windows-core" 1702 | version = "0.52.0" 1703 | source = "registry+https://github.com/rust-lang/crates.io-index" 1704 | checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" 1705 | dependencies = [ 1706 | "windows-targets 0.52.6", 1707 | ] 1708 | 1709 | [[package]] 1710 | name = "windows-link" 1711 | version = "0.1.1" 1712 | source = "registry+https://github.com/rust-lang/crates.io-index" 1713 | checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38" 1714 | 1715 | [[package]] 1716 | name = "windows-registry" 1717 | version = "0.4.0" 1718 | source = "registry+https://github.com/rust-lang/crates.io-index" 1719 | checksum = "4286ad90ddb45071efd1a66dfa43eb02dd0dfbae1545ad6cc3c51cf34d7e8ba3" 1720 | dependencies = [ 1721 | "windows-result", 1722 | "windows-strings", 1723 | "windows-targets 0.53.0", 1724 | ] 1725 | 1726 | [[package]] 1727 | name = "windows-result" 1728 | version = "0.3.2" 1729 | source = "registry+https://github.com/rust-lang/crates.io-index" 1730 | checksum = "c64fd11a4fd95df68efcfee5f44a294fe71b8bc6a91993e2791938abcc712252" 1731 | dependencies = [ 1732 | "windows-link", 1733 | ] 1734 | 1735 | [[package]] 1736 | name = "windows-strings" 1737 | version = "0.3.1" 1738 | source = "registry+https://github.com/rust-lang/crates.io-index" 1739 | checksum = "87fa48cc5d406560701792be122a10132491cff9d0aeb23583cc2dcafc847319" 1740 | dependencies = [ 1741 | "windows-link", 1742 | ] 1743 | 1744 | [[package]] 1745 | name = "windows-sys" 1746 | version = "0.52.0" 1747 | source = "registry+https://github.com/rust-lang/crates.io-index" 1748 | checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" 1749 | dependencies = [ 1750 | "windows-targets 0.52.6", 1751 | ] 1752 | 1753 | [[package]] 1754 | name = "windows-sys" 1755 | version = "0.59.0" 1756 | source = "registry+https://github.com/rust-lang/crates.io-index" 1757 | checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" 1758 | dependencies = [ 1759 | "windows-targets 0.52.6", 1760 | ] 1761 | 1762 | [[package]] 1763 | name = "windows-targets" 1764 | version = "0.52.6" 1765 | source = "registry+https://github.com/rust-lang/crates.io-index" 1766 | checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" 1767 | dependencies = [ 1768 | "windows_aarch64_gnullvm 0.52.6", 1769 | "windows_aarch64_msvc 0.52.6", 1770 | "windows_i686_gnu 0.52.6", 1771 | "windows_i686_gnullvm 0.52.6", 1772 | "windows_i686_msvc 0.52.6", 1773 | "windows_x86_64_gnu 0.52.6", 1774 | "windows_x86_64_gnullvm 0.52.6", 1775 | "windows_x86_64_msvc 0.52.6", 1776 | ] 1777 | 1778 | [[package]] 1779 | name = "windows-targets" 1780 | version = "0.53.0" 1781 | source = "registry+https://github.com/rust-lang/crates.io-index" 1782 | checksum = "b1e4c7e8ceaaf9cb7d7507c974735728ab453b67ef8f18febdd7c11fe59dca8b" 1783 | dependencies = [ 1784 | "windows_aarch64_gnullvm 0.53.0", 1785 | "windows_aarch64_msvc 0.53.0", 1786 | "windows_i686_gnu 0.53.0", 1787 | "windows_i686_gnullvm 0.53.0", 1788 | "windows_i686_msvc 0.53.0", 1789 | "windows_x86_64_gnu 0.53.0", 1790 | "windows_x86_64_gnullvm 0.53.0", 1791 | "windows_x86_64_msvc 0.53.0", 1792 | ] 1793 | 1794 | [[package]] 1795 | name = "windows_aarch64_gnullvm" 1796 | version = "0.52.6" 1797 | source = "registry+https://github.com/rust-lang/crates.io-index" 1798 | checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" 1799 | 1800 | [[package]] 1801 | name = "windows_aarch64_gnullvm" 1802 | version = "0.53.0" 1803 | source = "registry+https://github.com/rust-lang/crates.io-index" 1804 | checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" 1805 | 1806 | [[package]] 1807 | name = "windows_aarch64_msvc" 1808 | version = "0.52.6" 1809 | source = "registry+https://github.com/rust-lang/crates.io-index" 1810 | checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" 1811 | 1812 | [[package]] 1813 | name = "windows_aarch64_msvc" 1814 | version = "0.53.0" 1815 | source = "registry+https://github.com/rust-lang/crates.io-index" 1816 | checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" 1817 | 1818 | [[package]] 1819 | name = "windows_i686_gnu" 1820 | version = "0.52.6" 1821 | source = "registry+https://github.com/rust-lang/crates.io-index" 1822 | checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" 1823 | 1824 | [[package]] 1825 | name = "windows_i686_gnu" 1826 | version = "0.53.0" 1827 | source = "registry+https://github.com/rust-lang/crates.io-index" 1828 | checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" 1829 | 1830 | [[package]] 1831 | name = "windows_i686_gnullvm" 1832 | version = "0.52.6" 1833 | source = "registry+https://github.com/rust-lang/crates.io-index" 1834 | checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" 1835 | 1836 | [[package]] 1837 | name = "windows_i686_gnullvm" 1838 | version = "0.53.0" 1839 | source = "registry+https://github.com/rust-lang/crates.io-index" 1840 | checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" 1841 | 1842 | [[package]] 1843 | name = "windows_i686_msvc" 1844 | version = "0.52.6" 1845 | source = "registry+https://github.com/rust-lang/crates.io-index" 1846 | checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" 1847 | 1848 | [[package]] 1849 | name = "windows_i686_msvc" 1850 | version = "0.53.0" 1851 | source = "registry+https://github.com/rust-lang/crates.io-index" 1852 | checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" 1853 | 1854 | [[package]] 1855 | name = "windows_x86_64_gnu" 1856 | version = "0.52.6" 1857 | source = "registry+https://github.com/rust-lang/crates.io-index" 1858 | checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" 1859 | 1860 | [[package]] 1861 | name = "windows_x86_64_gnu" 1862 | version = "0.53.0" 1863 | source = "registry+https://github.com/rust-lang/crates.io-index" 1864 | checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" 1865 | 1866 | [[package]] 1867 | name = "windows_x86_64_gnullvm" 1868 | version = "0.52.6" 1869 | source = "registry+https://github.com/rust-lang/crates.io-index" 1870 | checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" 1871 | 1872 | [[package]] 1873 | name = "windows_x86_64_gnullvm" 1874 | version = "0.53.0" 1875 | source = "registry+https://github.com/rust-lang/crates.io-index" 1876 | checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" 1877 | 1878 | [[package]] 1879 | name = "windows_x86_64_msvc" 1880 | version = "0.52.6" 1881 | source = "registry+https://github.com/rust-lang/crates.io-index" 1882 | checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" 1883 | 1884 | [[package]] 1885 | name = "windows_x86_64_msvc" 1886 | version = "0.53.0" 1887 | source = "registry+https://github.com/rust-lang/crates.io-index" 1888 | checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" 1889 | 1890 | [[package]] 1891 | name = "winnow" 1892 | version = "0.7.4" 1893 | source = "registry+https://github.com/rust-lang/crates.io-index" 1894 | checksum = "0e97b544156e9bebe1a0ffbc03484fc1ffe3100cbce3ffb17eac35f7cdd7ab36" 1895 | dependencies = [ 1896 | "memchr", 1897 | ] 1898 | 1899 | [[package]] 1900 | name = "wit-bindgen-rt" 1901 | version = "0.39.0" 1902 | source = "registry+https://github.com/rust-lang/crates.io-index" 1903 | checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" 1904 | dependencies = [ 1905 | "bitflags", 1906 | ] 1907 | 1908 | [[package]] 1909 | name = "write16" 1910 | version = "1.0.0" 1911 | source = "registry+https://github.com/rust-lang/crates.io-index" 1912 | checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" 1913 | 1914 | [[package]] 1915 | name = "writeable" 1916 | version = "0.5.5" 1917 | source = "registry+https://github.com/rust-lang/crates.io-index" 1918 | checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" 1919 | 1920 | [[package]] 1921 | name = "yoke" 1922 | version = "0.7.5" 1923 | source = "registry+https://github.com/rust-lang/crates.io-index" 1924 | checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" 1925 | dependencies = [ 1926 | "serde", 1927 | "stable_deref_trait", 1928 | "yoke-derive", 1929 | "zerofrom", 1930 | ] 1931 | 1932 | [[package]] 1933 | name = "yoke-derive" 1934 | version = "0.7.5" 1935 | source = "registry+https://github.com/rust-lang/crates.io-index" 1936 | checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" 1937 | dependencies = [ 1938 | "proc-macro2", 1939 | "quote", 1940 | "syn", 1941 | "synstructure", 1942 | ] 1943 | 1944 | [[package]] 1945 | name = "zerofrom" 1946 | version = "0.1.6" 1947 | source = "registry+https://github.com/rust-lang/crates.io-index" 1948 | checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" 1949 | dependencies = [ 1950 | "zerofrom-derive", 1951 | ] 1952 | 1953 | [[package]] 1954 | name = "zerofrom-derive" 1955 | version = "0.1.6" 1956 | source = "registry+https://github.com/rust-lang/crates.io-index" 1957 | checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" 1958 | dependencies = [ 1959 | "proc-macro2", 1960 | "quote", 1961 | "syn", 1962 | "synstructure", 1963 | ] 1964 | 1965 | [[package]] 1966 | name = "zeroize" 1967 | version = "1.8.1" 1968 | source = "registry+https://github.com/rust-lang/crates.io-index" 1969 | checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" 1970 | 1971 | [[package]] 1972 | name = "zerovec" 1973 | version = "0.10.4" 1974 | source = "registry+https://github.com/rust-lang/crates.io-index" 1975 | checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" 1976 | dependencies = [ 1977 | "yoke", 1978 | "zerofrom", 1979 | "zerovec-derive", 1980 | ] 1981 | 1982 | [[package]] 1983 | name = "zerovec-derive" 1984 | version = "0.10.3" 1985 | source = "registry+https://github.com/rust-lang/crates.io-index" 1986 | checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" 1987 | dependencies = [ 1988 | "proc-macro2", 1989 | "quote", 1990 | "syn", 1991 | ] 1992 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "rustup-mirror" 3 | version = "0.9.0" 4 | authors = ["Jiajie Chen "] 5 | edition = "2024" 6 | description = "Setup a local rustup mirror." 7 | repository = "https://github.com/jiegec/rustup-mirror" 8 | readme = "README.md" 9 | keywords = ["rustup", "mirror"] 10 | license = "MIT" 11 | 12 | [dependencies] 13 | chrono = "0.4.19" 14 | clap = { version = "4.5.32", features = ["derive"] } 15 | filebuffer = "1.0.0" 16 | glob = "0.3.0" 17 | indicatif = "0.17.5" 18 | reqwest = { version = "0.12.15", features = ["blocking", "socks"] } 19 | ring = "0.17.12" 20 | toml = "0.8.1" 21 | url = "2.2.2" 22 | hex = "0.4.3" 23 | anyhow = "1.0.58" 24 | 25 | [package.metadata.deb] 26 | section = "utils" 27 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2019-2024 Jiajie Chen 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | rustup-mirror 2 | ===================================== 3 | 4 | [![Crates.io version][crate-img]][crate] 5 | [![Changelog][changelog-img]][changelog] 6 | [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fjiegec%2Frustup-mirror.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fjiegec%2Frustup-mirror?ref=badge_shield) 7 | 8 | Setup a local rustup mirror. For usage, please run `rustup-mirror -h`. 9 | 10 | How to install 11 | ===================================== 12 | 13 | Run `cargo install rustup-mirror`. 14 | 15 | Features 16 | =================================== 17 | 18 | 1. Check if file is already downloaded and check its integrity by comparing sha256 checksum. 19 | 2. Download and replace links in the manifest files. 20 | 21 | Example usage 22 | ===================================== 23 | 24 | ```shell 25 | $ rustup-mirror # use HTTPS_PROXY for proxy 26 | $ # wait for downloading 27 | $ cd ./mirror # default directory, see rustup-mirror -h 28 | $ python3 -m http.server & 29 | $ RUSTUP_DIST_SERVER=http://127.0.0.1:8000 rustup install stable 30 | ``` 31 | 32 | Note: 33 | 34 | 1. A full clone of a stable distribution takes 16G disk space (as of Feb 2019). 35 | 2. Python3 http.server module does not support Range download. It may fail when a partial downloaded file exists. Do not use this in production. 36 | 37 | [crate-img]: https://img.shields.io/crates/v/rustup-mirror.svg 38 | [crate]: https://crates.io/crates/rustup-mirror 39 | [changelog-img]: https://img.shields.io/badge/changelog-online-blue.svg 40 | [changelog]: https://github.com/jiegec/rustup-mirror/blob/master/CHANGELOG.md 41 | 42 | 43 | ## License 44 | [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fjiegec%2Frustup-mirror.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fjiegec%2Frustup-mirror?ref=badge_large) -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | #![forbid(unsafe_code)] 2 | 3 | use anyhow::{anyhow, Error}; 4 | use chrono::{Duration, Local, NaiveDate}; 5 | use clap::Parser; 6 | use filebuffer::FileBuffer; 7 | use indicatif::{ProgressBar, ProgressStyle}; 8 | use ring::digest; 9 | use std::collections::HashSet; 10 | use std::fs::{copy, create_dir_all, read_dir, remove_dir_all, remove_file, File}; 11 | use std::io::{Read, Write}; 12 | use std::path::{Component, Path, PathBuf}; 13 | use toml::Value; 14 | use url::Url; 15 | 16 | const RELEASE_CHANNELS: [&str; 3] = ["stable", "beta", "nightly"]; 17 | 18 | // rustc --print target-list | awk '{print " \"" $1 "\","}' 19 | const TARGETS: [&str; 271] = [ 20 | "aarch64-apple-darwin", 21 | "aarch64-apple-ios", 22 | "aarch64-apple-ios-macabi", 23 | "aarch64-apple-ios-sim", 24 | "aarch64-apple-tvos", 25 | "aarch64-apple-tvos-sim", 26 | "aarch64-apple-visionos", 27 | "aarch64-apple-visionos-sim", 28 | "aarch64-apple-watchos", 29 | "aarch64-apple-watchos-sim", 30 | "aarch64-kmc-solid_asp3", 31 | "aarch64-linux-android", 32 | "aarch64-nintendo-switch-freestanding", 33 | "aarch64-pc-windows-gnullvm", 34 | "aarch64-pc-windows-msvc", 35 | "aarch64-unknown-freebsd", 36 | "aarch64-unknown-fuchsia", 37 | "aarch64-unknown-hermit", 38 | "aarch64-unknown-illumos", 39 | "aarch64-unknown-linux-gnu", 40 | "aarch64-unknown-linux-gnu_ilp32", 41 | "aarch64-unknown-linux-musl", 42 | "aarch64-unknown-linux-ohos", 43 | "aarch64-unknown-netbsd", 44 | "aarch64-unknown-none", 45 | "aarch64-unknown-none-softfloat", 46 | "aarch64-unknown-nto-qnx700", 47 | "aarch64-unknown-nto-qnx710", 48 | "aarch64-unknown-openbsd", 49 | "aarch64-unknown-redox", 50 | "aarch64-unknown-teeos", 51 | "aarch64-unknown-trusty", 52 | "aarch64-unknown-uefi", 53 | "aarch64-uwp-windows-msvc", 54 | "aarch64-wrs-vxworks", 55 | "aarch64_be-unknown-linux-gnu", 56 | "aarch64_be-unknown-linux-gnu_ilp32", 57 | "aarch64_be-unknown-netbsd", 58 | "arm-linux-androideabi", 59 | "arm-unknown-linux-gnueabi", 60 | "arm-unknown-linux-gnueabihf", 61 | "arm-unknown-linux-musleabi", 62 | "arm-unknown-linux-musleabihf", 63 | "arm64_32-apple-watchos", 64 | "arm64e-apple-darwin", 65 | "arm64e-apple-ios", 66 | "arm64e-apple-tvos", 67 | "arm64ec-pc-windows-msvc", 68 | "armeb-unknown-linux-gnueabi", 69 | "armebv7r-none-eabi", 70 | "armebv7r-none-eabihf", 71 | "armv4t-none-eabi", 72 | "armv4t-unknown-linux-gnueabi", 73 | "armv5te-none-eabi", 74 | "armv5te-unknown-linux-gnueabi", 75 | "armv5te-unknown-linux-musleabi", 76 | "armv5te-unknown-linux-uclibceabi", 77 | "armv6-unknown-freebsd", 78 | "armv6-unknown-netbsd-eabihf", 79 | "armv6k-nintendo-3ds", 80 | "armv7-linux-androideabi", 81 | "armv7-rtems-eabihf", 82 | "armv7-sony-vita-newlibeabihf", 83 | "armv7-unknown-freebsd", 84 | "armv7-unknown-linux-gnueabi", 85 | "armv7-unknown-linux-gnueabihf", 86 | "armv7-unknown-linux-musleabi", 87 | "armv7-unknown-linux-musleabihf", 88 | "armv7-unknown-linux-ohos", 89 | "armv7-unknown-linux-uclibceabi", 90 | "armv7-unknown-linux-uclibceabihf", 91 | "armv7-unknown-netbsd-eabihf", 92 | "armv7-unknown-trusty", 93 | "armv7-wrs-vxworks-eabihf", 94 | "armv7a-kmc-solid_asp3-eabi", 95 | "armv7a-kmc-solid_asp3-eabihf", 96 | "armv7a-none-eabi", 97 | "armv7a-none-eabihf", 98 | "armv7k-apple-watchos", 99 | "armv7r-none-eabi", 100 | "armv7r-none-eabihf", 101 | "armv7s-apple-ios", 102 | "armv8r-none-eabihf", 103 | "avr-unknown-gnu-atmega328", 104 | "bpfeb-unknown-none", 105 | "bpfel-unknown-none", 106 | "csky-unknown-linux-gnuabiv2", 107 | "csky-unknown-linux-gnuabiv2hf", 108 | "hexagon-unknown-linux-musl", 109 | "hexagon-unknown-none-elf", 110 | "i386-apple-ios", 111 | "i586-pc-nto-qnx700", 112 | "i586-pc-windows-msvc", 113 | "i586-unknown-linux-gnu", 114 | "i586-unknown-linux-musl", 115 | "i586-unknown-netbsd", 116 | "i686-apple-darwin", 117 | "i686-linux-android", 118 | "i686-pc-windows-gnu", 119 | "i686-pc-windows-gnullvm", 120 | "i686-pc-windows-msvc", 121 | "i686-unknown-freebsd", 122 | "i686-unknown-haiku", 123 | "i686-unknown-hurd-gnu", 124 | "i686-unknown-linux-gnu", 125 | "i686-unknown-linux-musl", 126 | "i686-unknown-netbsd", 127 | "i686-unknown-openbsd", 128 | "i686-unknown-redox", 129 | "i686-unknown-uefi", 130 | "i686-uwp-windows-gnu", 131 | "i686-uwp-windows-msvc", 132 | "i686-win7-windows-msvc", 133 | "i686-wrs-vxworks", 134 | "loongarch64-unknown-linux-gnu", 135 | "loongarch64-unknown-linux-musl", 136 | "loongarch64-unknown-linux-ohos", 137 | "loongarch64-unknown-none", 138 | "loongarch64-unknown-none-softfloat", 139 | "m68k-unknown-linux-gnu", 140 | "mips-unknown-linux-gnu", 141 | "mips-unknown-linux-musl", 142 | "mips-unknown-linux-uclibc", 143 | "mips64-openwrt-linux-musl", 144 | "mips64-unknown-linux-gnuabi64", 145 | "mips64-unknown-linux-muslabi64", 146 | "mips64el-unknown-linux-gnuabi64", 147 | "mips64el-unknown-linux-muslabi64", 148 | "mipsel-sony-psp", 149 | "mipsel-sony-psx", 150 | "mipsel-unknown-linux-gnu", 151 | "mipsel-unknown-linux-musl", 152 | "mipsel-unknown-linux-uclibc", 153 | "mipsel-unknown-netbsd", 154 | "mipsel-unknown-none", 155 | "mipsisa32r6-unknown-linux-gnu", 156 | "mipsisa32r6el-unknown-linux-gnu", 157 | "mipsisa64r6-unknown-linux-gnuabi64", 158 | "mipsisa64r6el-unknown-linux-gnuabi64", 159 | "msp430-none-elf", 160 | "nvptx64-nvidia-cuda", 161 | "powerpc-unknown-freebsd", 162 | "powerpc-unknown-linux-gnu", 163 | "powerpc-unknown-linux-gnuspe", 164 | "powerpc-unknown-linux-musl", 165 | "powerpc-unknown-linux-muslspe", 166 | "powerpc-unknown-netbsd", 167 | "powerpc-unknown-openbsd", 168 | "powerpc-wrs-vxworks", 169 | "powerpc-wrs-vxworks-spe", 170 | "powerpc64-ibm-aix", 171 | "powerpc64-unknown-freebsd", 172 | "powerpc64-unknown-linux-gnu", 173 | "powerpc64-unknown-linux-musl", 174 | "powerpc64-unknown-openbsd", 175 | "powerpc64-wrs-vxworks", 176 | "powerpc64le-unknown-freebsd", 177 | "powerpc64le-unknown-linux-gnu", 178 | "powerpc64le-unknown-linux-musl", 179 | "riscv32-wrs-vxworks", 180 | "riscv32e-unknown-none-elf", 181 | "riscv32em-unknown-none-elf", 182 | "riscv32emc-unknown-none-elf", 183 | "riscv32gc-unknown-linux-gnu", 184 | "riscv32gc-unknown-linux-musl", 185 | "riscv32i-unknown-none-elf", 186 | "riscv32im-risc0-zkvm-elf", 187 | "riscv32im-unknown-none-elf", 188 | "riscv32ima-unknown-none-elf", 189 | "riscv32imac-esp-espidf", 190 | "riscv32imac-unknown-none-elf", 191 | "riscv32imac-unknown-nuttx-elf", 192 | "riscv32imac-unknown-xous-elf", 193 | "riscv32imafc-esp-espidf", 194 | "riscv32imafc-unknown-none-elf", 195 | "riscv32imafc-unknown-nuttx-elf", 196 | "riscv32imc-esp-espidf", 197 | "riscv32imc-unknown-none-elf", 198 | "riscv32imc-unknown-nuttx-elf", 199 | "riscv64-linux-android", 200 | "riscv64-wrs-vxworks", 201 | "riscv64gc-unknown-freebsd", 202 | "riscv64gc-unknown-fuchsia", 203 | "riscv64gc-unknown-hermit", 204 | "riscv64gc-unknown-linux-gnu", 205 | "riscv64gc-unknown-linux-musl", 206 | "riscv64gc-unknown-netbsd", 207 | "riscv64gc-unknown-none-elf", 208 | "riscv64gc-unknown-nuttx-elf", 209 | "riscv64gc-unknown-openbsd", 210 | "riscv64imac-unknown-none-elf", 211 | "riscv64imac-unknown-nuttx-elf", 212 | "s390x-unknown-linux-gnu", 213 | "s390x-unknown-linux-musl", 214 | "sparc-unknown-linux-gnu", 215 | "sparc-unknown-none-elf", 216 | "sparc64-unknown-linux-gnu", 217 | "sparc64-unknown-netbsd", 218 | "sparc64-unknown-openbsd", 219 | "sparcv9-sun-solaris", 220 | "thumbv4t-none-eabi", 221 | "thumbv5te-none-eabi", 222 | "thumbv6m-none-eabi", 223 | "thumbv6m-nuttx-eabi", 224 | "thumbv7a-pc-windows-msvc", 225 | "thumbv7a-uwp-windows-msvc", 226 | "thumbv7em-none-eabi", 227 | "thumbv7em-none-eabihf", 228 | "thumbv7em-nuttx-eabi", 229 | "thumbv7em-nuttx-eabihf", 230 | "thumbv7m-none-eabi", 231 | "thumbv7m-nuttx-eabi", 232 | "thumbv7neon-linux-androideabi", 233 | "thumbv7neon-unknown-linux-gnueabihf", 234 | "thumbv7neon-unknown-linux-musleabihf", 235 | "thumbv8m.base-none-eabi", 236 | "thumbv8m.base-nuttx-eabi", 237 | "thumbv8m.main-none-eabi", 238 | "thumbv8m.main-none-eabihf", 239 | "thumbv8m.main-nuttx-eabi", 240 | "thumbv8m.main-nuttx-eabihf", 241 | "wasm32-unknown-emscripten", 242 | "wasm32-unknown-unknown", 243 | "wasm32-wasip1", 244 | "wasm32-wasip1-threads", 245 | "wasm32-wasip2", 246 | "wasm32v1-none", 247 | "wasm64-unknown-unknown", 248 | "x86_64-apple-darwin", 249 | "x86_64-apple-ios", 250 | "x86_64-apple-ios-macabi", 251 | "x86_64-apple-tvos", 252 | "x86_64-apple-watchos-sim", 253 | "x86_64-fortanix-unknown-sgx", 254 | "x86_64-linux-android", 255 | "x86_64-pc-nto-qnx710", 256 | "x86_64-pc-solaris", 257 | "x86_64-pc-windows-gnu", 258 | "x86_64-pc-windows-gnullvm", 259 | "x86_64-pc-windows-msvc", 260 | "x86_64-unikraft-linux-musl", 261 | "x86_64-unknown-dragonfly", 262 | "x86_64-unknown-freebsd", 263 | "x86_64-unknown-fuchsia", 264 | "x86_64-unknown-haiku", 265 | "x86_64-unknown-hermit", 266 | "x86_64-unknown-hurd-gnu", 267 | "x86_64-unknown-illumos", 268 | "x86_64-unknown-l4re-uclibc", 269 | "x86_64-unknown-linux-gnu", 270 | "x86_64-unknown-linux-gnux32", 271 | "x86_64-unknown-linux-musl", 272 | "x86_64-unknown-linux-none", 273 | "x86_64-unknown-linux-ohos", 274 | "x86_64-unknown-netbsd", 275 | "x86_64-unknown-none", 276 | "x86_64-unknown-openbsd", 277 | "x86_64-unknown-redox", 278 | "x86_64-unknown-trusty", 279 | "x86_64-unknown-uefi", 280 | "x86_64-uwp-windows-gnu", 281 | "x86_64-uwp-windows-msvc", 282 | "x86_64-win7-windows-msvc", 283 | "x86_64-wrs-vxworks", 284 | "x86_64h-apple-darwin", 285 | "xtensa-esp32-espidf", 286 | "xtensa-esp32-none-elf", 287 | "xtensa-esp32s2-espidf", 288 | "xtensa-esp32s2-none-elf", 289 | "xtensa-esp32s3-espidf", 290 | "xtensa-esp32s3-none-elf", 291 | ]; 292 | 293 | const DEFAULT_UPSTREAM_URL: &str = "https://static.rust-lang.org/"; 294 | 295 | fn file_sha256(file_path: &Path) -> Option { 296 | let file = Path::new(file_path); 297 | if file.exists() { 298 | let buffer = FileBuffer::open(&file).unwrap(); 299 | Some(hex::encode(digest::digest(&digest::SHA256, &buffer))) 300 | } else { 301 | None 302 | } 303 | } 304 | 305 | fn download(upstream_url: &str, dir: &str, path: &str) -> Result { 306 | let manifest = format!("{}{}", upstream_url, path); 307 | let mut response = reqwest::blocking::get(&manifest)?; 308 | let mirror = Path::new(dir); 309 | let file_path = mirror.join(&path); 310 | create_dir_all(file_path.parent().unwrap())?; 311 | let mut dest = File::create(file_path)?; 312 | 313 | println!("File /{} downloading", path); 314 | let length = match response.content_length() { 315 | None => return Err(anyhow!("Not found")), 316 | Some(l) => l, 317 | }; 318 | let pb = ProgressBar::new(length); 319 | pb.set_style(ProgressStyle::default_bar() 320 | .template("{spinner:.green} [{elapsed_precise}] [{bar:40.cyan/blue}] {bytes}/{total_bytes} (ETA {eta_precise})")? 321 | .progress_chars("#>-")); 322 | 323 | let mut buffer = [0u8; 4096]; 324 | let mut read = 0; 325 | 326 | while read < length { 327 | let len = response.read(&mut buffer)?; 328 | dest.write_all(&buffer[..len])?; 329 | read += len as u64; 330 | pb.set_position(read); 331 | } 332 | 333 | pb.finish_and_clear(); 334 | println!("File /{} downloaded", path); 335 | Ok(mirror.join(path)) 336 | } 337 | 338 | #[derive(Parser)] 339 | #[command( 340 | version, 341 | about = "Make a mirror for rustup", 342 | author = "Jiajie Chen " 343 | )] 344 | struct Cli { 345 | /// Where to store original manifest 346 | #[arg(short, long, default_value = "./orig")] 347 | orig: String, 348 | 349 | /// Where to store mirror files 350 | #[arg(short, long, default_value = "./mirror")] 351 | mirror: String, 352 | 353 | /// Where mirror is served 354 | #[arg(short, long, default_value = "http://127.0.0.1:8000")] 355 | url: String, 356 | 357 | /// Keep how many days of nightly toolchains, e.g. 365 358 | #[arg(short, long)] 359 | gc: Option, 360 | 361 | /// Which release channel(s) to mirror, e.g. stable,nightly 362 | #[arg(short, long, value_delimiter = ',', default_values_t = RELEASE_CHANNELS.map(String::from))] 363 | channels: Vec, 364 | 365 | /// Which targets to mirror, e.g. x86_64-unknown-linux-gnu,x86_64-apple-darwin 366 | #[arg(short, long, value_delimiter = ',', default_values_t = TARGETS.map(String::from))] 367 | targets: Vec, 368 | 369 | /// Upstream url to sync from 370 | #[arg(short = 'U', long, default_value_t = DEFAULT_UPSTREAM_URL.to_string())] 371 | upstream_url: String, 372 | } 373 | 374 | fn main() { 375 | let args = Cli::parse(); 376 | 377 | let orig_path = &args.orig; 378 | let mirror_path = &args.mirror; 379 | let mirror_url = &args.url; 380 | let upstream_url = &args.upstream_url; 381 | 382 | let parsed_gc_days = args.gc.map(|parsed_days| { 383 | let mut day = Local::now().date_naive(); 384 | day -= Duration::days(parsed_days); 385 | println!("Nightly before {} will be deleted", day); 386 | day 387 | }); 388 | 389 | let channels = args.channels; 390 | let filter_targets = args 391 | .targets 392 | .iter() 393 | .collect::>(); 394 | 395 | let mut all_targets = HashSet::new(); 396 | 397 | // All referenced files 398 | let mut referenced = HashSet::new(); 399 | 400 | // Fetch rust components 401 | for channel in channels.iter() { 402 | let name = format!("dist/channel-rust-{}.toml", channel); 403 | let file_path = download(upstream_url, orig_path, &name).unwrap(); 404 | let sha256_name = format!("dist/channel-rust-{}.toml.sha256", channel); 405 | let sha256_file_path = download(upstream_url, orig_path, &sha256_name).unwrap(); 406 | 407 | let mut file = File::open(file_path.clone()).unwrap(); 408 | let mut data = String::new(); 409 | file.read_to_string(&mut data).unwrap(); 410 | 411 | let mut sha256_file = File::open(sha256_file_path.clone()).unwrap(); 412 | let mut sha256_data = String::new(); 413 | sha256_file.read_to_string(&mut sha256_data).unwrap(); 414 | assert_eq!( 415 | file_sha256(file_path.as_path()).unwrap(), 416 | &sha256_data[..64] 417 | ); 418 | 419 | let mut value = data.parse::().unwrap(); 420 | assert_eq!(value["manifest-version"].as_str(), Some("2")); 421 | println!( 422 | "Channel {} date {}", 423 | channel, 424 | value["date"].as_str().unwrap() 425 | ); 426 | 427 | let pkgs = value["pkg"].as_table_mut().unwrap(); 428 | let keys: Vec = pkgs.keys().cloned().collect(); 429 | for pkg_name in keys { 430 | let pkg = pkgs.get_mut(&pkg_name).unwrap().as_table_mut().unwrap(); 431 | let pkg_targets = pkg.get_mut("target").unwrap().as_table_mut().unwrap(); 432 | for (target, pkg_target) in pkg_targets { 433 | let pkg_target = pkg_target.as_table_mut().unwrap(); 434 | 435 | // if we don't want to download this target 436 | // set available to false and do not download 437 | // but we will keep this table in the toml, which is required for newer version of 438 | // rustup 439 | if !(filter_targets.contains(target) || *target == "*") { 440 | *pkg_target.get_mut("available").unwrap() = toml::Value::Boolean(false); 441 | continue; 442 | } 443 | 444 | if pkg_target["available"].as_bool().unwrap() { 445 | all_targets.insert(target.clone()); 446 | 447 | let prefixes = ["", "xz_"]; 448 | for prefix in prefixes.iter() { 449 | let url = 450 | Url::parse(pkg_target[&format!("{}url", prefix)].as_str().unwrap()) 451 | .unwrap(); 452 | let mirror = Path::new(mirror_path); 453 | let file_name = url.path().replace("%20", " "); 454 | let file = mirror.join(&file_name[1..]); 455 | 456 | referenced.insert(normalize_path(&file)); 457 | 458 | let hash_file = mirror.join(format!("{}.sha256", &file_name[1..])); 459 | let hash_file_cont = 460 | File::open(hash_file.clone()).ok().and_then(|mut f| { 461 | let mut cont = String::new(); 462 | f.read_to_string(&mut cont).ok().map(|_| cont) 463 | }); 464 | 465 | let hash_file_missing = hash_file_cont.is_none(); 466 | let mut hash_file_cont = 467 | hash_file_cont.or_else(|| file_sha256(file.as_path())); 468 | 469 | let chksum_upstream = 470 | pkg_target[&format!("{}hash", prefix)].as_str().unwrap(); 471 | 472 | let need_download = match hash_file_cont { 473 | Some(ref chksum) => chksum_upstream != chksum, 474 | None => true, 475 | }; 476 | 477 | if need_download { 478 | download(upstream_url, mirror_path, &file_name[1..]).unwrap(); 479 | hash_file_cont = file_sha256(file.as_path()); 480 | assert_eq!(Some(chksum_upstream), hash_file_cont.as_deref()); 481 | } else { 482 | println!("File {} already downloaded, skipping", file_name); 483 | } 484 | 485 | if need_download || hash_file_missing { 486 | File::create(hash_file) 487 | .unwrap() 488 | .write_all(hash_file_cont.unwrap().as_bytes()) 489 | .unwrap(); 490 | println!("Writing checksum for file {}", file_name); 491 | } 492 | 493 | pkg_target.insert( 494 | format!("{}url", prefix), 495 | Value::String(format!("{}{}", mirror_url, file_name)), 496 | ); 497 | } 498 | } 499 | } 500 | } 501 | 502 | let output = toml::to_string(&value).unwrap(); 503 | let path = Path::new(mirror_path).join(&name); 504 | create_dir_all(path.parent().unwrap()).unwrap(); 505 | let mut file = File::create(path.clone()).unwrap(); 506 | println!("Producing /{}", name); 507 | file.write_all(output.as_bytes()).unwrap(); 508 | 509 | let sha256_new_file = file_sha256(&path).unwrap(); 510 | let sha256_new_file_path = Path::new(mirror_path).join(&sha256_name); 511 | let mut file = File::create(sha256_new_file_path.clone()).unwrap(); 512 | println!("Producing /{}", sha256_name); 513 | file.write_all(format!("{} channel-rust-{}.toml", sha256_new_file, channel).as_bytes()) 514 | .unwrap(); 515 | 516 | let date = value["date"].as_str().unwrap(); 517 | 518 | let alt_name = format!("dist/{}/channel-rust-{}.toml", date, channel); 519 | let alt_path = Path::new(mirror_path).join(&alt_name); 520 | create_dir_all(alt_path.parent().unwrap()).unwrap(); 521 | copy(path, alt_path).unwrap(); 522 | println!("Producing /{}", alt_name); 523 | 524 | let alt_sha256_new_file_name = 525 | format!("dist/{}/channel-rust-{}.toml.sha256", date, channel); 526 | let alt_sha256_new_file_path = Path::new(mirror_path).join(&alt_sha256_new_file_name); 527 | copy(sha256_new_file_path, alt_sha256_new_file_path).unwrap(); 528 | println!("Producing /{}", alt_sha256_new_file_name); 529 | } 530 | 531 | // Fetch latest binary of rustup 532 | println!("Downloading latest binary of rustup..."); 533 | for target in &all_targets { 534 | if target == "*" { 535 | continue; 536 | } 537 | 538 | let is_windows = target.contains("windows"); 539 | 540 | let ext = if is_windows { ".exe" } else { "" }; 541 | 542 | if download( 543 | upstream_url, 544 | mirror_path, 545 | &format!("rustup/dist/{}/rustup-init{}", target, ext), 546 | ) 547 | .is_err() 548 | { 549 | println!("Failed to fetch rustup-init for target {}, ignored", target); 550 | } 551 | } 552 | 553 | // Fetch rustup self update 554 | println!("Downloading rustup self update manifest..."); 555 | let self_update_manifest_path = 556 | download(upstream_url, orig_path, "rustup/release-stable.toml").unwrap(); 557 | 558 | let mut self_update_manifest = File::open(self_update_manifest_path.clone()).unwrap(); 559 | let mut self_update_manifest_data = String::new(); 560 | self_update_manifest 561 | .read_to_string(&mut self_update_manifest_data) 562 | .unwrap(); 563 | 564 | let self_update_manifest_val = self_update_manifest_data.parse::().unwrap(); 565 | assert_eq!( 566 | self_update_manifest_val["schema-version"].as_str(), 567 | Some("1") 568 | ); 569 | 570 | let self_version = self_update_manifest_val["version"].as_str().unwrap(); 571 | 572 | for target in all_targets { 573 | if target == "*" { 574 | continue; 575 | } 576 | 577 | let is_windows = target.contains("windows"); 578 | 579 | let ext = if is_windows { ".exe" } else { "" }; 580 | 581 | if download( 582 | upstream_url, 583 | mirror_path, 584 | &format!( 585 | "rustup/archive/{}/{}/rustup-init{}", 586 | self_version, target, ext 587 | ), 588 | ) 589 | .is_err() 590 | { 591 | println!("Failed to fetch rustup-init for target {}, ignored", target); 592 | } 593 | } 594 | 595 | copy( 596 | self_update_manifest_path, 597 | Path::new(mirror_path).join("rustup/release-stable.toml"), 598 | ) 599 | .unwrap(); 600 | 601 | // Garbage collect old nightly builds, and unreferenced stable/beta builds 602 | for date_dir in read_dir(Path::new(mirror_path).join("dist")).expect("Unable to read dist dir") 603 | { 604 | let date_dir = date_dir.unwrap(); 605 | if !date_dir.file_type().unwrap().is_dir() { 606 | // Is metadata 607 | continue; 608 | } 609 | 610 | let clear_nightly = if let Some(parsed_gc_days) = parsed_gc_days { 611 | let dir_name = date_dir.file_name().into_string().unwrap(); 612 | let parsed_dir_name = NaiveDate::parse_from_str(&dir_name, "%Y-%m-%d").unwrap(); 613 | parsed_dir_name < parsed_gc_days 614 | } else { 615 | false 616 | }; 617 | 618 | // Is there anyone left? 619 | let mut perserve_dir = false; 620 | 621 | for file in read_dir(date_dir.path()).expect("inner dir") { 622 | let file = file.unwrap(); 623 | let fname = file.file_name(); 624 | let fname = fname.to_string_lossy(); 625 | if fname.ends_with(".sha256") { 626 | // Is an hash, will be deleted alongside the hashed file 627 | continue; 628 | } 629 | 630 | let canonicalized = file.path().canonicalize().unwrap(); 631 | let normalized = normalize_path(&file.path()); 632 | 633 | // Filter referenced artifacts. Manifests will never be referenced 634 | let to_be_deleted = if referenced.contains(&normalized) { 635 | false 636 | } else if fname.find("nightly").is_some() { 637 | // Is nightly artifact or manifest 638 | clear_nightly 639 | } else { 640 | // Is stable/beta artifact or manifest, delete by default 641 | true 642 | }; 643 | 644 | if to_be_deleted { 645 | // Delete artifact / manifest and its corresponding hash 646 | println!("Deleting file {}[.sha256]", canonicalized.display()); 647 | remove_file(&canonicalized).unwrap(); 648 | // Ignore error if the hash is not deleted (e.g. there is no hash present) 649 | let mut canonicalized = canonicalized; 650 | canonicalized.set_file_name((fname + ".sha256").as_ref()); 651 | let _ = remove_file(canonicalized); 652 | } else { 653 | perserve_dir = true; 654 | } 655 | } 656 | 657 | if !perserve_dir { 658 | println!( 659 | "No useful file left in dir {}, removing the entire directory.", 660 | date_dir.path().display() 661 | ); 662 | remove_dir_all(date_dir.path()).unwrap(); 663 | } 664 | } 665 | } 666 | 667 | pub fn normalize_path(path: &Path) -> PathBuf { 668 | let mut components = path.components().peekable(); 669 | let mut ret = if let Some(c @ Component::Prefix(..)) = components.peek().cloned() { 670 | components.next(); 671 | PathBuf::from(c.as_os_str()) 672 | } else { 673 | PathBuf::new() 674 | }; 675 | 676 | for component in components { 677 | match component { 678 | Component::Prefix(..) => unreachable!(), 679 | Component::RootDir => { 680 | ret.push(component.as_os_str()); 681 | } 682 | Component::CurDir => {} 683 | Component::ParentDir => { 684 | ret.pop(); 685 | } 686 | Component::Normal(c) => { 687 | ret.push(c); 688 | } 689 | } 690 | } 691 | ret 692 | } 693 | --------------------------------------------------------------------------------