├── .docs ├── bum-quick-demo.gif ├── logo.png └── new-logo.jpg ├── .github └── workflows │ └── deploy.yml ├── .gitignore ├── .vscode └── settings.json ├── Cargo.lock ├── Cargo.toml ├── README.md ├── install.sh └── src ├── bun.rs ├── commands.rs ├── main.rs ├── os.rs └── utils.rs /.docs/bum-quick-demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owenizedd/bum/f6ab435ce58262460600711bcd1255ba44a5f414/.docs/bum-quick-demo.gif -------------------------------------------------------------------------------- /.docs/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owenizedd/bum/f6ab435ce58262460600711bcd1255ba44a5f414/.docs/logo.png -------------------------------------------------------------------------------- /.docs/new-logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owenizedd/bum/f6ab435ce58262460600711bcd1255ba44a5f414/.docs/new-logo.jpg -------------------------------------------------------------------------------- /.github/workflows/deploy.yml: -------------------------------------------------------------------------------- 1 | name: Deploy 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | tags: 8 | - "v[0-9]+.[0-9]+.[0-9]+" 9 | 10 | concurrency: 11 | group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} 12 | cancel-in-progress: true 13 | 14 | permissions: 15 | contents: write 16 | 17 | jobs: 18 | build-and-upload: 19 | name: Build and upload 20 | runs-on: ${{ matrix.os }} 21 | 22 | strategy: 23 | matrix: 24 | # You can add more, for any target you'd like! 25 | include: 26 | - build: linux 27 | os: ubuntu-latest 28 | rust: stable 29 | target: x86_64-unknown-linux-gnu 30 | - build: linux-musl 31 | os: ubuntu-latest 32 | rust: stable 33 | target: x86_64-unknown-linux-musl 34 | - build: linux-aarch64 35 | os: ubuntu-latest 36 | rust: stable 37 | target: aarch64-unknown-linux-gnu 38 | - build: macos 39 | os: macos-latest 40 | rust: stable 41 | target: x86_64-apple-darwin 42 | - build: macos-arm 43 | os: macos-latest 44 | rust: stable 45 | target: aarch64-apple-darwin 46 | - build: windows 47 | os: windows-latest 48 | rust: stable 49 | target: x86_64-pc-windows-gnu 50 | 51 | steps: 52 | - name: Checkout 53 | uses: actions/checkout@v3 54 | 55 | - name: Get the release version from the tag 56 | shell: bash 57 | run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV 58 | 59 | - name: Install libssl 60 | shell: bash 61 | if: matrix.os == 'ubuntu-latest' 62 | run: sudo apt-get install -y libssl-dev pkg-config 63 | 64 | - name: Install Rust 65 | # Or @nightly if you want 66 | uses: dtolnay/rust-toolchain@stable 67 | # Arguments to pass in 68 | with: 69 | # Make Rust compile to our target (defined in the matrix) 70 | targets: ${{ matrix.target }} 71 | 72 | - name: Build 73 | uses: actions-rs/cargo@v1 74 | with: 75 | use-cross: ${{matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' }} 76 | command: build 77 | args: --verbose --release --target ${{ matrix.target }} 78 | 79 | - name: Build archive 80 | shell: bash 81 | run: | 82 | # Replace with the name of your binary 83 | binary_name="bum" 84 | 85 | dirname="$binary_name-${{ env.VERSION }}-${{ matrix.target }}" 86 | mkdir -p "$dirname" 87 | if [ "${{ matrix.os }}" = "windows-latest" ]; then 88 | mv "target/${{ matrix.target }}/release/$binary_name.exe" "$dirname" 89 | else 90 | mv "target/${{ matrix.target }}/release/$binary_name" "$dirname" 91 | fi 92 | 93 | if [ "${{ matrix.os }}" = "windows-latest" ]; then 94 | 7z a "$dirname.zip" "$dirname" 95 | echo "ASSET=$dirname.zip" >> $GITHUB_ENV 96 | else 97 | tar -czf "$dirname.tar.gz" "$dirname" 98 | echo "ASSET=$dirname.tar.gz" >> $GITHUB_ENV 99 | fi 100 | 101 | - name: Release 102 | if: startsWith(github.ref, 'refs/tags/') 103 | uses: softprops/action-gh-release@v1 104 | env: 105 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 106 | with: 107 | files: | 108 | ${{ env.ASSET }} 109 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | .DS_Store 3 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "rust-analyzer.linkedProjects": [ 3 | "./Cargo.toml", 4 | "./Cargo.toml" 5 | ] 6 | } -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "addr2line" 7 | version = "0.21.0" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" 10 | dependencies = [ 11 | "gimli", 12 | ] 13 | 14 | [[package]] 15 | name = "adler" 16 | version = "1.0.2" 17 | source = "registry+https://github.com/rust-lang/crates.io-index" 18 | checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" 19 | 20 | [[package]] 21 | name = "aes" 22 | version = "0.8.4" 23 | source = "registry+https://github.com/rust-lang/crates.io-index" 24 | checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" 25 | dependencies = [ 26 | "cfg-if", 27 | "cipher", 28 | "cpufeatures", 29 | ] 30 | 31 | [[package]] 32 | name = "anstream" 33 | version = "0.6.14" 34 | source = "registry+https://github.com/rust-lang/crates.io-index" 35 | checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" 36 | dependencies = [ 37 | "anstyle", 38 | "anstyle-parse", 39 | "anstyle-query", 40 | "anstyle-wincon", 41 | "colorchoice", 42 | "is_terminal_polyfill", 43 | "utf8parse", 44 | ] 45 | 46 | [[package]] 47 | name = "anstyle" 48 | version = "1.0.7" 49 | source = "registry+https://github.com/rust-lang/crates.io-index" 50 | checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" 51 | 52 | [[package]] 53 | name = "anstyle-parse" 54 | version = "0.2.4" 55 | source = "registry+https://github.com/rust-lang/crates.io-index" 56 | checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" 57 | dependencies = [ 58 | "utf8parse", 59 | ] 60 | 61 | [[package]] 62 | name = "anstyle-query" 63 | version = "1.0.3" 64 | source = "registry+https://github.com/rust-lang/crates.io-index" 65 | checksum = "a64c907d4e79225ac72e2a354c9ce84d50ebb4586dee56c82b3ee73004f537f5" 66 | dependencies = [ 67 | "windows-sys 0.52.0", 68 | ] 69 | 70 | [[package]] 71 | name = "anstyle-wincon" 72 | version = "3.0.3" 73 | source = "registry+https://github.com/rust-lang/crates.io-index" 74 | checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" 75 | dependencies = [ 76 | "anstyle", 77 | "windows-sys 0.52.0", 78 | ] 79 | 80 | [[package]] 81 | name = "anyhow" 82 | version = "1.0.82" 83 | source = "registry+https://github.com/rust-lang/crates.io-index" 84 | checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" 85 | 86 | [[package]] 87 | name = "arbitrary" 88 | version = "1.3.2" 89 | source = "registry+https://github.com/rust-lang/crates.io-index" 90 | checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" 91 | dependencies = [ 92 | "derive_arbitrary", 93 | ] 94 | 95 | [[package]] 96 | name = "autocfg" 97 | version = "1.3.0" 98 | source = "registry+https://github.com/rust-lang/crates.io-index" 99 | checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" 100 | 101 | [[package]] 102 | name = "backtrace" 103 | version = "0.3.71" 104 | source = "registry+https://github.com/rust-lang/crates.io-index" 105 | checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" 106 | dependencies = [ 107 | "addr2line", 108 | "cc", 109 | "cfg-if", 110 | "libc", 111 | "miniz_oxide", 112 | "object", 113 | "rustc-demangle", 114 | ] 115 | 116 | [[package]] 117 | name = "base64" 118 | version = "0.22.1" 119 | source = "registry+https://github.com/rust-lang/crates.io-index" 120 | checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" 121 | 122 | [[package]] 123 | name = "bitflags" 124 | version = "1.3.2" 125 | source = "registry+https://github.com/rust-lang/crates.io-index" 126 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 127 | 128 | [[package]] 129 | name = "bitflags" 130 | version = "2.5.0" 131 | source = "registry+https://github.com/rust-lang/crates.io-index" 132 | checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" 133 | 134 | [[package]] 135 | name = "block-buffer" 136 | version = "0.10.4" 137 | source = "registry+https://github.com/rust-lang/crates.io-index" 138 | checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" 139 | dependencies = [ 140 | "generic-array", 141 | ] 142 | 143 | [[package]] 144 | name = "bum" 145 | version = "0.6.1" 146 | dependencies = [ 147 | "anyhow", 148 | "clap", 149 | "lazy_static", 150 | "openssl", 151 | "owo-colors", 152 | "reqwest", 153 | "resolve-path", 154 | "serde", 155 | "serde_json", 156 | "tokio", 157 | "zip", 158 | ] 159 | 160 | [[package]] 161 | name = "bumpalo" 162 | version = "3.16.0" 163 | source = "registry+https://github.com/rust-lang/crates.io-index" 164 | checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" 165 | 166 | [[package]] 167 | name = "byteorder" 168 | version = "1.5.0" 169 | source = "registry+https://github.com/rust-lang/crates.io-index" 170 | checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" 171 | 172 | [[package]] 173 | name = "bytes" 174 | version = "1.6.0" 175 | source = "registry+https://github.com/rust-lang/crates.io-index" 176 | checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" 177 | 178 | [[package]] 179 | name = "bzip2" 180 | version = "0.4.4" 181 | source = "registry+https://github.com/rust-lang/crates.io-index" 182 | checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" 183 | dependencies = [ 184 | "bzip2-sys", 185 | "libc", 186 | ] 187 | 188 | [[package]] 189 | name = "bzip2-sys" 190 | version = "0.1.11+1.0.8" 191 | source = "registry+https://github.com/rust-lang/crates.io-index" 192 | checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" 193 | dependencies = [ 194 | "cc", 195 | "libc", 196 | "pkg-config", 197 | ] 198 | 199 | [[package]] 200 | name = "cc" 201 | version = "1.0.97" 202 | source = "registry+https://github.com/rust-lang/crates.io-index" 203 | checksum = "099a5357d84c4c61eb35fc8eafa9a79a902c2f76911e5747ced4e032edd8d9b4" 204 | dependencies = [ 205 | "jobserver", 206 | "libc", 207 | "once_cell", 208 | ] 209 | 210 | [[package]] 211 | name = "cfg-if" 212 | version = "1.0.0" 213 | source = "registry+https://github.com/rust-lang/crates.io-index" 214 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 215 | 216 | [[package]] 217 | name = "cipher" 218 | version = "0.4.4" 219 | source = "registry+https://github.com/rust-lang/crates.io-index" 220 | checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" 221 | dependencies = [ 222 | "crypto-common", 223 | "inout", 224 | ] 225 | 226 | [[package]] 227 | name = "clap" 228 | version = "4.5.4" 229 | source = "registry+https://github.com/rust-lang/crates.io-index" 230 | checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" 231 | dependencies = [ 232 | "clap_builder", 233 | "clap_derive", 234 | ] 235 | 236 | [[package]] 237 | name = "clap_builder" 238 | version = "4.5.2" 239 | source = "registry+https://github.com/rust-lang/crates.io-index" 240 | checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" 241 | dependencies = [ 242 | "anstream", 243 | "anstyle", 244 | "clap_lex", 245 | "strsim", 246 | ] 247 | 248 | [[package]] 249 | name = "clap_derive" 250 | version = "4.5.4" 251 | source = "registry+https://github.com/rust-lang/crates.io-index" 252 | checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" 253 | dependencies = [ 254 | "heck", 255 | "proc-macro2", 256 | "quote", 257 | "syn", 258 | ] 259 | 260 | [[package]] 261 | name = "clap_lex" 262 | version = "0.7.0" 263 | source = "registry+https://github.com/rust-lang/crates.io-index" 264 | checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" 265 | 266 | [[package]] 267 | name = "cmake" 268 | version = "0.1.50" 269 | source = "registry+https://github.com/rust-lang/crates.io-index" 270 | checksum = "a31c789563b815f77f4250caee12365734369f942439b7defd71e18a48197130" 271 | dependencies = [ 272 | "cc", 273 | ] 274 | 275 | [[package]] 276 | name = "colorchoice" 277 | version = "1.0.1" 278 | source = "registry+https://github.com/rust-lang/crates.io-index" 279 | checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" 280 | 281 | [[package]] 282 | name = "constant_time_eq" 283 | version = "0.3.0" 284 | source = "registry+https://github.com/rust-lang/crates.io-index" 285 | checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" 286 | 287 | [[package]] 288 | name = "core-foundation" 289 | version = "0.9.4" 290 | source = "registry+https://github.com/rust-lang/crates.io-index" 291 | checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" 292 | dependencies = [ 293 | "core-foundation-sys", 294 | "libc", 295 | ] 296 | 297 | [[package]] 298 | name = "core-foundation-sys" 299 | version = "0.8.6" 300 | source = "registry+https://github.com/rust-lang/crates.io-index" 301 | checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" 302 | 303 | [[package]] 304 | name = "cpufeatures" 305 | version = "0.2.12" 306 | source = "registry+https://github.com/rust-lang/crates.io-index" 307 | checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" 308 | dependencies = [ 309 | "libc", 310 | ] 311 | 312 | [[package]] 313 | name = "crc" 314 | version = "3.2.1" 315 | source = "registry+https://github.com/rust-lang/crates.io-index" 316 | checksum = "69e6e4d7b33a94f0991c26729976b10ebde1d34c3ee82408fb536164fa10d636" 317 | dependencies = [ 318 | "crc-catalog", 319 | ] 320 | 321 | [[package]] 322 | name = "crc-catalog" 323 | version = "2.4.0" 324 | source = "registry+https://github.com/rust-lang/crates.io-index" 325 | checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" 326 | 327 | [[package]] 328 | name = "crc32fast" 329 | version = "1.4.0" 330 | source = "registry+https://github.com/rust-lang/crates.io-index" 331 | checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" 332 | dependencies = [ 333 | "cfg-if", 334 | ] 335 | 336 | [[package]] 337 | name = "crossbeam-utils" 338 | version = "0.8.19" 339 | source = "registry+https://github.com/rust-lang/crates.io-index" 340 | checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" 341 | 342 | [[package]] 343 | name = "crypto-common" 344 | version = "0.1.6" 345 | source = "registry+https://github.com/rust-lang/crates.io-index" 346 | checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" 347 | dependencies = [ 348 | "generic-array", 349 | "typenum", 350 | ] 351 | 352 | [[package]] 353 | name = "deflate64" 354 | version = "0.1.8" 355 | source = "registry+https://github.com/rust-lang/crates.io-index" 356 | checksum = "83ace6c86376be0b6cdcf3fb41882e81d94b31587573d1cfa9d01cd06bba210d" 357 | 358 | [[package]] 359 | name = "deranged" 360 | version = "0.3.11" 361 | source = "registry+https://github.com/rust-lang/crates.io-index" 362 | checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" 363 | dependencies = [ 364 | "powerfmt", 365 | ] 366 | 367 | [[package]] 368 | name = "derive_arbitrary" 369 | version = "1.3.2" 370 | source = "registry+https://github.com/rust-lang/crates.io-index" 371 | checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" 372 | dependencies = [ 373 | "proc-macro2", 374 | "quote", 375 | "syn", 376 | ] 377 | 378 | [[package]] 379 | name = "digest" 380 | version = "0.10.7" 381 | source = "registry+https://github.com/rust-lang/crates.io-index" 382 | checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" 383 | dependencies = [ 384 | "block-buffer", 385 | "crypto-common", 386 | "subtle", 387 | ] 388 | 389 | [[package]] 390 | name = "dirs" 391 | version = "4.0.0" 392 | source = "registry+https://github.com/rust-lang/crates.io-index" 393 | checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" 394 | dependencies = [ 395 | "dirs-sys", 396 | ] 397 | 398 | [[package]] 399 | name = "dirs-sys" 400 | version = "0.3.7" 401 | source = "registry+https://github.com/rust-lang/crates.io-index" 402 | checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" 403 | dependencies = [ 404 | "libc", 405 | "redox_users", 406 | "winapi", 407 | ] 408 | 409 | [[package]] 410 | name = "displaydoc" 411 | version = "0.2.4" 412 | source = "registry+https://github.com/rust-lang/crates.io-index" 413 | checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" 414 | dependencies = [ 415 | "proc-macro2", 416 | "quote", 417 | "syn", 418 | ] 419 | 420 | [[package]] 421 | name = "encoding_rs" 422 | version = "0.8.34" 423 | source = "registry+https://github.com/rust-lang/crates.io-index" 424 | checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" 425 | dependencies = [ 426 | "cfg-if", 427 | ] 428 | 429 | [[package]] 430 | name = "equivalent" 431 | version = "1.0.1" 432 | source = "registry+https://github.com/rust-lang/crates.io-index" 433 | checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" 434 | 435 | [[package]] 436 | name = "errno" 437 | version = "0.3.8" 438 | source = "registry+https://github.com/rust-lang/crates.io-index" 439 | checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" 440 | dependencies = [ 441 | "libc", 442 | "windows-sys 0.52.0", 443 | ] 444 | 445 | [[package]] 446 | name = "fastrand" 447 | version = "2.1.0" 448 | source = "registry+https://github.com/rust-lang/crates.io-index" 449 | checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" 450 | 451 | [[package]] 452 | name = "flate2" 453 | version = "1.0.30" 454 | source = "registry+https://github.com/rust-lang/crates.io-index" 455 | checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" 456 | dependencies = [ 457 | "crc32fast", 458 | "libz-ng-sys", 459 | "miniz_oxide", 460 | ] 461 | 462 | [[package]] 463 | name = "fnv" 464 | version = "1.0.7" 465 | source = "registry+https://github.com/rust-lang/crates.io-index" 466 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 467 | 468 | [[package]] 469 | name = "foreign-types" 470 | version = "0.3.2" 471 | source = "registry+https://github.com/rust-lang/crates.io-index" 472 | checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" 473 | dependencies = [ 474 | "foreign-types-shared", 475 | ] 476 | 477 | [[package]] 478 | name = "foreign-types-shared" 479 | version = "0.1.1" 480 | source = "registry+https://github.com/rust-lang/crates.io-index" 481 | checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" 482 | 483 | [[package]] 484 | name = "form_urlencoded" 485 | version = "1.2.1" 486 | source = "registry+https://github.com/rust-lang/crates.io-index" 487 | checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" 488 | dependencies = [ 489 | "percent-encoding", 490 | ] 491 | 492 | [[package]] 493 | name = "futures-channel" 494 | version = "0.3.30" 495 | source = "registry+https://github.com/rust-lang/crates.io-index" 496 | checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" 497 | dependencies = [ 498 | "futures-core", 499 | ] 500 | 501 | [[package]] 502 | name = "futures-core" 503 | version = "0.3.30" 504 | source = "registry+https://github.com/rust-lang/crates.io-index" 505 | checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" 506 | 507 | [[package]] 508 | name = "futures-sink" 509 | version = "0.3.30" 510 | source = "registry+https://github.com/rust-lang/crates.io-index" 511 | checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" 512 | 513 | [[package]] 514 | name = "futures-task" 515 | version = "0.3.30" 516 | source = "registry+https://github.com/rust-lang/crates.io-index" 517 | checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" 518 | 519 | [[package]] 520 | name = "futures-util" 521 | version = "0.3.30" 522 | source = "registry+https://github.com/rust-lang/crates.io-index" 523 | checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" 524 | dependencies = [ 525 | "futures-core", 526 | "futures-task", 527 | "pin-project-lite", 528 | "pin-utils", 529 | ] 530 | 531 | [[package]] 532 | name = "generic-array" 533 | version = "0.14.7" 534 | source = "registry+https://github.com/rust-lang/crates.io-index" 535 | checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" 536 | dependencies = [ 537 | "typenum", 538 | "version_check", 539 | ] 540 | 541 | [[package]] 542 | name = "getrandom" 543 | version = "0.2.14" 544 | source = "registry+https://github.com/rust-lang/crates.io-index" 545 | checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" 546 | dependencies = [ 547 | "cfg-if", 548 | "libc", 549 | "wasi", 550 | ] 551 | 552 | [[package]] 553 | name = "gimli" 554 | version = "0.28.1" 555 | source = "registry+https://github.com/rust-lang/crates.io-index" 556 | checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" 557 | 558 | [[package]] 559 | name = "h2" 560 | version = "0.4.4" 561 | source = "registry+https://github.com/rust-lang/crates.io-index" 562 | checksum = "816ec7294445779408f36fe57bc5b7fc1cf59664059096c65f905c1c61f58069" 563 | dependencies = [ 564 | "bytes", 565 | "fnv", 566 | "futures-core", 567 | "futures-sink", 568 | "futures-util", 569 | "http", 570 | "indexmap", 571 | "slab", 572 | "tokio", 573 | "tokio-util", 574 | "tracing", 575 | ] 576 | 577 | [[package]] 578 | name = "hashbrown" 579 | version = "0.14.5" 580 | source = "registry+https://github.com/rust-lang/crates.io-index" 581 | checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" 582 | 583 | [[package]] 584 | name = "heck" 585 | version = "0.5.0" 586 | source = "registry+https://github.com/rust-lang/crates.io-index" 587 | checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" 588 | 589 | [[package]] 590 | name = "hermit-abi" 591 | version = "0.3.9" 592 | source = "registry+https://github.com/rust-lang/crates.io-index" 593 | checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" 594 | 595 | [[package]] 596 | name = "hmac" 597 | version = "0.12.1" 598 | source = "registry+https://github.com/rust-lang/crates.io-index" 599 | checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" 600 | dependencies = [ 601 | "digest", 602 | ] 603 | 604 | [[package]] 605 | name = "http" 606 | version = "1.1.0" 607 | source = "registry+https://github.com/rust-lang/crates.io-index" 608 | checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" 609 | dependencies = [ 610 | "bytes", 611 | "fnv", 612 | "itoa", 613 | ] 614 | 615 | [[package]] 616 | name = "http-body" 617 | version = "1.0.0" 618 | source = "registry+https://github.com/rust-lang/crates.io-index" 619 | checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" 620 | dependencies = [ 621 | "bytes", 622 | "http", 623 | ] 624 | 625 | [[package]] 626 | name = "http-body-util" 627 | version = "0.1.1" 628 | source = "registry+https://github.com/rust-lang/crates.io-index" 629 | checksum = "0475f8b2ac86659c21b64320d5d653f9efe42acd2a4e560073ec61a155a34f1d" 630 | dependencies = [ 631 | "bytes", 632 | "futures-core", 633 | "http", 634 | "http-body", 635 | "pin-project-lite", 636 | ] 637 | 638 | [[package]] 639 | name = "httparse" 640 | version = "1.8.0" 641 | source = "registry+https://github.com/rust-lang/crates.io-index" 642 | checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" 643 | 644 | [[package]] 645 | name = "hyper" 646 | version = "1.3.1" 647 | source = "registry+https://github.com/rust-lang/crates.io-index" 648 | checksum = "fe575dd17d0862a9a33781c8c4696a55c320909004a67a00fb286ba8b1bc496d" 649 | dependencies = [ 650 | "bytes", 651 | "futures-channel", 652 | "futures-util", 653 | "h2", 654 | "http", 655 | "http-body", 656 | "httparse", 657 | "itoa", 658 | "pin-project-lite", 659 | "smallvec", 660 | "tokio", 661 | "want", 662 | ] 663 | 664 | [[package]] 665 | name = "hyper-tls" 666 | version = "0.6.0" 667 | source = "registry+https://github.com/rust-lang/crates.io-index" 668 | checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" 669 | dependencies = [ 670 | "bytes", 671 | "http-body-util", 672 | "hyper", 673 | "hyper-util", 674 | "native-tls", 675 | "tokio", 676 | "tokio-native-tls", 677 | "tower-service", 678 | ] 679 | 680 | [[package]] 681 | name = "hyper-util" 682 | version = "0.1.3" 683 | source = "registry+https://github.com/rust-lang/crates.io-index" 684 | checksum = "ca38ef113da30126bbff9cd1705f9273e15d45498615d138b0c20279ac7a76aa" 685 | dependencies = [ 686 | "bytes", 687 | "futures-channel", 688 | "futures-util", 689 | "http", 690 | "http-body", 691 | "hyper", 692 | "pin-project-lite", 693 | "socket2", 694 | "tokio", 695 | "tower", 696 | "tower-service", 697 | "tracing", 698 | ] 699 | 700 | [[package]] 701 | name = "idna" 702 | version = "0.5.0" 703 | source = "registry+https://github.com/rust-lang/crates.io-index" 704 | checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" 705 | dependencies = [ 706 | "unicode-bidi", 707 | "unicode-normalization", 708 | ] 709 | 710 | [[package]] 711 | name = "indexmap" 712 | version = "2.2.6" 713 | source = "registry+https://github.com/rust-lang/crates.io-index" 714 | checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" 715 | dependencies = [ 716 | "equivalent", 717 | "hashbrown", 718 | ] 719 | 720 | [[package]] 721 | name = "inout" 722 | version = "0.1.3" 723 | source = "registry+https://github.com/rust-lang/crates.io-index" 724 | checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" 725 | dependencies = [ 726 | "generic-array", 727 | ] 728 | 729 | [[package]] 730 | name = "ipnet" 731 | version = "2.9.0" 732 | source = "registry+https://github.com/rust-lang/crates.io-index" 733 | checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" 734 | 735 | [[package]] 736 | name = "is_terminal_polyfill" 737 | version = "1.70.0" 738 | source = "registry+https://github.com/rust-lang/crates.io-index" 739 | checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" 740 | 741 | [[package]] 742 | name = "itoa" 743 | version = "1.0.11" 744 | source = "registry+https://github.com/rust-lang/crates.io-index" 745 | checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" 746 | 747 | [[package]] 748 | name = "jobserver" 749 | version = "0.1.31" 750 | source = "registry+https://github.com/rust-lang/crates.io-index" 751 | checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" 752 | dependencies = [ 753 | "libc", 754 | ] 755 | 756 | [[package]] 757 | name = "js-sys" 758 | version = "0.3.69" 759 | source = "registry+https://github.com/rust-lang/crates.io-index" 760 | checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" 761 | dependencies = [ 762 | "wasm-bindgen", 763 | ] 764 | 765 | [[package]] 766 | name = "lazy_static" 767 | version = "1.4.0" 768 | source = "registry+https://github.com/rust-lang/crates.io-index" 769 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 770 | 771 | [[package]] 772 | name = "libc" 773 | version = "0.2.154" 774 | source = "registry+https://github.com/rust-lang/crates.io-index" 775 | checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346" 776 | 777 | [[package]] 778 | name = "libredox" 779 | version = "0.1.3" 780 | source = "registry+https://github.com/rust-lang/crates.io-index" 781 | checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" 782 | dependencies = [ 783 | "bitflags 2.5.0", 784 | "libc", 785 | ] 786 | 787 | [[package]] 788 | name = "libz-ng-sys" 789 | version = "1.1.15" 790 | source = "registry+https://github.com/rust-lang/crates.io-index" 791 | checksum = "c6409efc61b12687963e602df8ecf70e8ddacf95bc6576bcf16e3ac6328083c5" 792 | dependencies = [ 793 | "cmake", 794 | "libc", 795 | ] 796 | 797 | [[package]] 798 | name = "linux-raw-sys" 799 | version = "0.4.13" 800 | source = "registry+https://github.com/rust-lang/crates.io-index" 801 | checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" 802 | 803 | [[package]] 804 | name = "lock_api" 805 | version = "0.4.12" 806 | source = "registry+https://github.com/rust-lang/crates.io-index" 807 | checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" 808 | dependencies = [ 809 | "autocfg", 810 | "scopeguard", 811 | ] 812 | 813 | [[package]] 814 | name = "log" 815 | version = "0.4.21" 816 | source = "registry+https://github.com/rust-lang/crates.io-index" 817 | checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" 818 | 819 | [[package]] 820 | name = "lzma-rs" 821 | version = "0.3.0" 822 | source = "registry+https://github.com/rust-lang/crates.io-index" 823 | checksum = "297e814c836ae64db86b36cf2a557ba54368d03f6afcd7d947c266692f71115e" 824 | dependencies = [ 825 | "byteorder", 826 | "crc", 827 | ] 828 | 829 | [[package]] 830 | name = "memchr" 831 | version = "2.7.2" 832 | source = "registry+https://github.com/rust-lang/crates.io-index" 833 | checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" 834 | 835 | [[package]] 836 | name = "mime" 837 | version = "0.3.17" 838 | source = "registry+https://github.com/rust-lang/crates.io-index" 839 | checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" 840 | 841 | [[package]] 842 | name = "miniz_oxide" 843 | version = "0.7.2" 844 | source = "registry+https://github.com/rust-lang/crates.io-index" 845 | checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" 846 | dependencies = [ 847 | "adler", 848 | ] 849 | 850 | [[package]] 851 | name = "mio" 852 | version = "0.8.11" 853 | source = "registry+https://github.com/rust-lang/crates.io-index" 854 | checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" 855 | dependencies = [ 856 | "libc", 857 | "wasi", 858 | "windows-sys 0.48.0", 859 | ] 860 | 861 | [[package]] 862 | name = "native-tls" 863 | version = "0.2.11" 864 | source = "registry+https://github.com/rust-lang/crates.io-index" 865 | checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" 866 | dependencies = [ 867 | "lazy_static", 868 | "libc", 869 | "log", 870 | "openssl", 871 | "openssl-probe", 872 | "openssl-sys", 873 | "schannel", 874 | "security-framework", 875 | "security-framework-sys", 876 | "tempfile", 877 | ] 878 | 879 | [[package]] 880 | name = "num-conv" 881 | version = "0.1.0" 882 | source = "registry+https://github.com/rust-lang/crates.io-index" 883 | checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" 884 | 885 | [[package]] 886 | name = "num_cpus" 887 | version = "1.16.0" 888 | source = "registry+https://github.com/rust-lang/crates.io-index" 889 | checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" 890 | dependencies = [ 891 | "hermit-abi", 892 | "libc", 893 | ] 894 | 895 | [[package]] 896 | name = "num_enum" 897 | version = "0.7.2" 898 | source = "registry+https://github.com/rust-lang/crates.io-index" 899 | checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" 900 | dependencies = [ 901 | "num_enum_derive", 902 | ] 903 | 904 | [[package]] 905 | name = "num_enum_derive" 906 | version = "0.7.2" 907 | source = "registry+https://github.com/rust-lang/crates.io-index" 908 | checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" 909 | dependencies = [ 910 | "proc-macro-crate", 911 | "proc-macro2", 912 | "quote", 913 | "syn", 914 | ] 915 | 916 | [[package]] 917 | name = "object" 918 | version = "0.32.2" 919 | source = "registry+https://github.com/rust-lang/crates.io-index" 920 | checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" 921 | dependencies = [ 922 | "memchr", 923 | ] 924 | 925 | [[package]] 926 | name = "once_cell" 927 | version = "1.19.0" 928 | source = "registry+https://github.com/rust-lang/crates.io-index" 929 | checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" 930 | 931 | [[package]] 932 | name = "openssl" 933 | version = "0.10.66" 934 | source = "registry+https://github.com/rust-lang/crates.io-index" 935 | checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" 936 | dependencies = [ 937 | "bitflags 2.5.0", 938 | "cfg-if", 939 | "foreign-types", 940 | "libc", 941 | "once_cell", 942 | "openssl-macros", 943 | "openssl-sys", 944 | ] 945 | 946 | [[package]] 947 | name = "openssl-macros" 948 | version = "0.1.1" 949 | source = "registry+https://github.com/rust-lang/crates.io-index" 950 | checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" 951 | dependencies = [ 952 | "proc-macro2", 953 | "quote", 954 | "syn", 955 | ] 956 | 957 | [[package]] 958 | name = "openssl-probe" 959 | version = "0.1.5" 960 | source = "registry+https://github.com/rust-lang/crates.io-index" 961 | checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" 962 | 963 | [[package]] 964 | name = "openssl-src" 965 | version = "300.2.3+3.2.1" 966 | source = "registry+https://github.com/rust-lang/crates.io-index" 967 | checksum = "5cff92b6f71555b61bb9315f7c64da3ca43d87531622120fea0195fc761b4843" 968 | dependencies = [ 969 | "cc", 970 | ] 971 | 972 | [[package]] 973 | name = "openssl-sys" 974 | version = "0.9.103" 975 | source = "registry+https://github.com/rust-lang/crates.io-index" 976 | checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" 977 | dependencies = [ 978 | "cc", 979 | "libc", 980 | "openssl-src", 981 | "pkg-config", 982 | "vcpkg", 983 | ] 984 | 985 | [[package]] 986 | name = "owo-colors" 987 | version = "4.0.0" 988 | source = "registry+https://github.com/rust-lang/crates.io-index" 989 | checksum = "caff54706df99d2a78a5a4e3455ff45448d81ef1bb63c22cd14052ca0e993a3f" 990 | 991 | [[package]] 992 | name = "parking_lot" 993 | version = "0.12.2" 994 | source = "registry+https://github.com/rust-lang/crates.io-index" 995 | checksum = "7e4af0ca4f6caed20e900d564c242b8e5d4903fdacf31d3daf527b66fe6f42fb" 996 | dependencies = [ 997 | "lock_api", 998 | "parking_lot_core", 999 | ] 1000 | 1001 | [[package]] 1002 | name = "parking_lot_core" 1003 | version = "0.9.10" 1004 | source = "registry+https://github.com/rust-lang/crates.io-index" 1005 | checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" 1006 | dependencies = [ 1007 | "cfg-if", 1008 | "libc", 1009 | "redox_syscall", 1010 | "smallvec", 1011 | "windows-targets 0.52.5", 1012 | ] 1013 | 1014 | [[package]] 1015 | name = "pbkdf2" 1016 | version = "0.12.2" 1017 | source = "registry+https://github.com/rust-lang/crates.io-index" 1018 | checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" 1019 | dependencies = [ 1020 | "digest", 1021 | "hmac", 1022 | ] 1023 | 1024 | [[package]] 1025 | name = "percent-encoding" 1026 | version = "2.3.1" 1027 | source = "registry+https://github.com/rust-lang/crates.io-index" 1028 | checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" 1029 | 1030 | [[package]] 1031 | name = "pin-project" 1032 | version = "1.1.5" 1033 | source = "registry+https://github.com/rust-lang/crates.io-index" 1034 | checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" 1035 | dependencies = [ 1036 | "pin-project-internal", 1037 | ] 1038 | 1039 | [[package]] 1040 | name = "pin-project-internal" 1041 | version = "1.1.5" 1042 | source = "registry+https://github.com/rust-lang/crates.io-index" 1043 | checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" 1044 | dependencies = [ 1045 | "proc-macro2", 1046 | "quote", 1047 | "syn", 1048 | ] 1049 | 1050 | [[package]] 1051 | name = "pin-project-lite" 1052 | version = "0.2.14" 1053 | source = "registry+https://github.com/rust-lang/crates.io-index" 1054 | checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" 1055 | 1056 | [[package]] 1057 | name = "pin-utils" 1058 | version = "0.1.0" 1059 | source = "registry+https://github.com/rust-lang/crates.io-index" 1060 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 1061 | 1062 | [[package]] 1063 | name = "pkg-config" 1064 | version = "0.3.30" 1065 | source = "registry+https://github.com/rust-lang/crates.io-index" 1066 | checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" 1067 | 1068 | [[package]] 1069 | name = "powerfmt" 1070 | version = "0.2.0" 1071 | source = "registry+https://github.com/rust-lang/crates.io-index" 1072 | checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" 1073 | 1074 | [[package]] 1075 | name = "proc-macro-crate" 1076 | version = "3.1.0" 1077 | source = "registry+https://github.com/rust-lang/crates.io-index" 1078 | checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" 1079 | dependencies = [ 1080 | "toml_edit", 1081 | ] 1082 | 1083 | [[package]] 1084 | name = "proc-macro2" 1085 | version = "1.0.81" 1086 | source = "registry+https://github.com/rust-lang/crates.io-index" 1087 | checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" 1088 | dependencies = [ 1089 | "unicode-ident", 1090 | ] 1091 | 1092 | [[package]] 1093 | name = "quote" 1094 | version = "1.0.36" 1095 | source = "registry+https://github.com/rust-lang/crates.io-index" 1096 | checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" 1097 | dependencies = [ 1098 | "proc-macro2", 1099 | ] 1100 | 1101 | [[package]] 1102 | name = "redox_syscall" 1103 | version = "0.5.1" 1104 | source = "registry+https://github.com/rust-lang/crates.io-index" 1105 | checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" 1106 | dependencies = [ 1107 | "bitflags 2.5.0", 1108 | ] 1109 | 1110 | [[package]] 1111 | name = "redox_users" 1112 | version = "0.4.5" 1113 | source = "registry+https://github.com/rust-lang/crates.io-index" 1114 | checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" 1115 | dependencies = [ 1116 | "getrandom", 1117 | "libredox", 1118 | "thiserror", 1119 | ] 1120 | 1121 | [[package]] 1122 | name = "reqwest" 1123 | version = "0.12.4" 1124 | source = "registry+https://github.com/rust-lang/crates.io-index" 1125 | checksum = "566cafdd92868e0939d3fb961bd0dc25fcfaaed179291093b3d43e6b3150ea10" 1126 | dependencies = [ 1127 | "base64", 1128 | "bytes", 1129 | "encoding_rs", 1130 | "futures-core", 1131 | "futures-util", 1132 | "h2", 1133 | "http", 1134 | "http-body", 1135 | "http-body-util", 1136 | "hyper", 1137 | "hyper-tls", 1138 | "hyper-util", 1139 | "ipnet", 1140 | "js-sys", 1141 | "log", 1142 | "mime", 1143 | "native-tls", 1144 | "once_cell", 1145 | "percent-encoding", 1146 | "pin-project-lite", 1147 | "rustls-pemfile", 1148 | "serde", 1149 | "serde_json", 1150 | "serde_urlencoded", 1151 | "sync_wrapper", 1152 | "system-configuration", 1153 | "tokio", 1154 | "tokio-native-tls", 1155 | "tower-service", 1156 | "url", 1157 | "wasm-bindgen", 1158 | "wasm-bindgen-futures", 1159 | "web-sys", 1160 | "winreg", 1161 | ] 1162 | 1163 | [[package]] 1164 | name = "resolve-path" 1165 | version = "0.1.0" 1166 | source = "registry+https://github.com/rust-lang/crates.io-index" 1167 | checksum = "321e5e41b3b192dab6f1e75b9deacb6688b4b8c5e68906a78e8f43e7c2887bb5" 1168 | dependencies = [ 1169 | "dirs", 1170 | ] 1171 | 1172 | [[package]] 1173 | name = "rustc-demangle" 1174 | version = "0.1.23" 1175 | source = "registry+https://github.com/rust-lang/crates.io-index" 1176 | checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" 1177 | 1178 | [[package]] 1179 | name = "rustix" 1180 | version = "0.38.34" 1181 | source = "registry+https://github.com/rust-lang/crates.io-index" 1182 | checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" 1183 | dependencies = [ 1184 | "bitflags 2.5.0", 1185 | "errno", 1186 | "libc", 1187 | "linux-raw-sys", 1188 | "windows-sys 0.52.0", 1189 | ] 1190 | 1191 | [[package]] 1192 | name = "rustls-pemfile" 1193 | version = "2.1.2" 1194 | source = "registry+https://github.com/rust-lang/crates.io-index" 1195 | checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d" 1196 | dependencies = [ 1197 | "base64", 1198 | "rustls-pki-types", 1199 | ] 1200 | 1201 | [[package]] 1202 | name = "rustls-pki-types" 1203 | version = "1.5.0" 1204 | source = "registry+https://github.com/rust-lang/crates.io-index" 1205 | checksum = "beb461507cee2c2ff151784c52762cf4d9ff6a61f3e80968600ed24fa837fa54" 1206 | 1207 | [[package]] 1208 | name = "ryu" 1209 | version = "1.0.17" 1210 | source = "registry+https://github.com/rust-lang/crates.io-index" 1211 | checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" 1212 | 1213 | [[package]] 1214 | name = "schannel" 1215 | version = "0.1.23" 1216 | source = "registry+https://github.com/rust-lang/crates.io-index" 1217 | checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" 1218 | dependencies = [ 1219 | "windows-sys 0.52.0", 1220 | ] 1221 | 1222 | [[package]] 1223 | name = "scopeguard" 1224 | version = "1.2.0" 1225 | source = "registry+https://github.com/rust-lang/crates.io-index" 1226 | checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" 1227 | 1228 | [[package]] 1229 | name = "security-framework" 1230 | version = "2.11.0" 1231 | source = "registry+https://github.com/rust-lang/crates.io-index" 1232 | checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" 1233 | dependencies = [ 1234 | "bitflags 2.5.0", 1235 | "core-foundation", 1236 | "core-foundation-sys", 1237 | "libc", 1238 | "security-framework-sys", 1239 | ] 1240 | 1241 | [[package]] 1242 | name = "security-framework-sys" 1243 | version = "2.11.0" 1244 | source = "registry+https://github.com/rust-lang/crates.io-index" 1245 | checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7" 1246 | dependencies = [ 1247 | "core-foundation-sys", 1248 | "libc", 1249 | ] 1250 | 1251 | [[package]] 1252 | name = "serde" 1253 | version = "1.0.200" 1254 | source = "registry+https://github.com/rust-lang/crates.io-index" 1255 | checksum = "ddc6f9cc94d67c0e21aaf7eda3a010fd3af78ebf6e096aa6e2e13c79749cce4f" 1256 | dependencies = [ 1257 | "serde_derive", 1258 | ] 1259 | 1260 | [[package]] 1261 | name = "serde_derive" 1262 | version = "1.0.200" 1263 | source = "registry+https://github.com/rust-lang/crates.io-index" 1264 | checksum = "856f046b9400cee3c8c94ed572ecdb752444c24528c035cd35882aad6f492bcb" 1265 | dependencies = [ 1266 | "proc-macro2", 1267 | "quote", 1268 | "syn", 1269 | ] 1270 | 1271 | [[package]] 1272 | name = "serde_json" 1273 | version = "1.0.116" 1274 | source = "registry+https://github.com/rust-lang/crates.io-index" 1275 | checksum = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813" 1276 | dependencies = [ 1277 | "itoa", 1278 | "ryu", 1279 | "serde", 1280 | ] 1281 | 1282 | [[package]] 1283 | name = "serde_urlencoded" 1284 | version = "0.7.1" 1285 | source = "registry+https://github.com/rust-lang/crates.io-index" 1286 | checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" 1287 | dependencies = [ 1288 | "form_urlencoded", 1289 | "itoa", 1290 | "ryu", 1291 | "serde", 1292 | ] 1293 | 1294 | [[package]] 1295 | name = "sha1" 1296 | version = "0.10.6" 1297 | source = "registry+https://github.com/rust-lang/crates.io-index" 1298 | checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" 1299 | dependencies = [ 1300 | "cfg-if", 1301 | "cpufeatures", 1302 | "digest", 1303 | ] 1304 | 1305 | [[package]] 1306 | name = "signal-hook-registry" 1307 | version = "1.4.2" 1308 | source = "registry+https://github.com/rust-lang/crates.io-index" 1309 | checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" 1310 | dependencies = [ 1311 | "libc", 1312 | ] 1313 | 1314 | [[package]] 1315 | name = "simd-adler32" 1316 | version = "0.3.7" 1317 | source = "registry+https://github.com/rust-lang/crates.io-index" 1318 | checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" 1319 | 1320 | [[package]] 1321 | name = "slab" 1322 | version = "0.4.9" 1323 | source = "registry+https://github.com/rust-lang/crates.io-index" 1324 | checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" 1325 | dependencies = [ 1326 | "autocfg", 1327 | ] 1328 | 1329 | [[package]] 1330 | name = "smallvec" 1331 | version = "1.13.2" 1332 | source = "registry+https://github.com/rust-lang/crates.io-index" 1333 | checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" 1334 | 1335 | [[package]] 1336 | name = "socket2" 1337 | version = "0.5.7" 1338 | source = "registry+https://github.com/rust-lang/crates.io-index" 1339 | checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" 1340 | dependencies = [ 1341 | "libc", 1342 | "windows-sys 0.52.0", 1343 | ] 1344 | 1345 | [[package]] 1346 | name = "strsim" 1347 | version = "0.11.1" 1348 | source = "registry+https://github.com/rust-lang/crates.io-index" 1349 | checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" 1350 | 1351 | [[package]] 1352 | name = "subtle" 1353 | version = "2.5.0" 1354 | source = "registry+https://github.com/rust-lang/crates.io-index" 1355 | checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" 1356 | 1357 | [[package]] 1358 | name = "syn" 1359 | version = "2.0.60" 1360 | source = "registry+https://github.com/rust-lang/crates.io-index" 1361 | checksum = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3" 1362 | dependencies = [ 1363 | "proc-macro2", 1364 | "quote", 1365 | "unicode-ident", 1366 | ] 1367 | 1368 | [[package]] 1369 | name = "sync_wrapper" 1370 | version = "0.1.2" 1371 | source = "registry+https://github.com/rust-lang/crates.io-index" 1372 | checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" 1373 | 1374 | [[package]] 1375 | name = "system-configuration" 1376 | version = "0.5.1" 1377 | source = "registry+https://github.com/rust-lang/crates.io-index" 1378 | checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" 1379 | dependencies = [ 1380 | "bitflags 1.3.2", 1381 | "core-foundation", 1382 | "system-configuration-sys", 1383 | ] 1384 | 1385 | [[package]] 1386 | name = "system-configuration-sys" 1387 | version = "0.5.0" 1388 | source = "registry+https://github.com/rust-lang/crates.io-index" 1389 | checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" 1390 | dependencies = [ 1391 | "core-foundation-sys", 1392 | "libc", 1393 | ] 1394 | 1395 | [[package]] 1396 | name = "tempfile" 1397 | version = "3.10.1" 1398 | source = "registry+https://github.com/rust-lang/crates.io-index" 1399 | checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" 1400 | dependencies = [ 1401 | "cfg-if", 1402 | "fastrand", 1403 | "rustix", 1404 | "windows-sys 0.52.0", 1405 | ] 1406 | 1407 | [[package]] 1408 | name = "thiserror" 1409 | version = "1.0.59" 1410 | source = "registry+https://github.com/rust-lang/crates.io-index" 1411 | checksum = "f0126ad08bff79f29fc3ae6a55cc72352056dfff61e3ff8bb7129476d44b23aa" 1412 | dependencies = [ 1413 | "thiserror-impl", 1414 | ] 1415 | 1416 | [[package]] 1417 | name = "thiserror-impl" 1418 | version = "1.0.59" 1419 | source = "registry+https://github.com/rust-lang/crates.io-index" 1420 | checksum = "d1cd413b5d558b4c5bf3680e324a6fa5014e7b7c067a51e69dbdf47eb7148b66" 1421 | dependencies = [ 1422 | "proc-macro2", 1423 | "quote", 1424 | "syn", 1425 | ] 1426 | 1427 | [[package]] 1428 | name = "time" 1429 | version = "0.3.36" 1430 | source = "registry+https://github.com/rust-lang/crates.io-index" 1431 | checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" 1432 | dependencies = [ 1433 | "deranged", 1434 | "num-conv", 1435 | "powerfmt", 1436 | "serde", 1437 | "time-core", 1438 | ] 1439 | 1440 | [[package]] 1441 | name = "time-core" 1442 | version = "0.1.2" 1443 | source = "registry+https://github.com/rust-lang/crates.io-index" 1444 | checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" 1445 | 1446 | [[package]] 1447 | name = "tinyvec" 1448 | version = "1.6.0" 1449 | source = "registry+https://github.com/rust-lang/crates.io-index" 1450 | checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" 1451 | dependencies = [ 1452 | "tinyvec_macros", 1453 | ] 1454 | 1455 | [[package]] 1456 | name = "tinyvec_macros" 1457 | version = "0.1.1" 1458 | source = "registry+https://github.com/rust-lang/crates.io-index" 1459 | checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" 1460 | 1461 | [[package]] 1462 | name = "tokio" 1463 | version = "1.37.0" 1464 | source = "registry+https://github.com/rust-lang/crates.io-index" 1465 | checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" 1466 | dependencies = [ 1467 | "backtrace", 1468 | "bytes", 1469 | "libc", 1470 | "mio", 1471 | "num_cpus", 1472 | "parking_lot", 1473 | "pin-project-lite", 1474 | "signal-hook-registry", 1475 | "socket2", 1476 | "tokio-macros", 1477 | "windows-sys 0.48.0", 1478 | ] 1479 | 1480 | [[package]] 1481 | name = "tokio-macros" 1482 | version = "2.2.0" 1483 | source = "registry+https://github.com/rust-lang/crates.io-index" 1484 | checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" 1485 | dependencies = [ 1486 | "proc-macro2", 1487 | "quote", 1488 | "syn", 1489 | ] 1490 | 1491 | [[package]] 1492 | name = "tokio-native-tls" 1493 | version = "0.3.1" 1494 | source = "registry+https://github.com/rust-lang/crates.io-index" 1495 | checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" 1496 | dependencies = [ 1497 | "native-tls", 1498 | "tokio", 1499 | ] 1500 | 1501 | [[package]] 1502 | name = "tokio-util" 1503 | version = "0.7.11" 1504 | source = "registry+https://github.com/rust-lang/crates.io-index" 1505 | checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" 1506 | dependencies = [ 1507 | "bytes", 1508 | "futures-core", 1509 | "futures-sink", 1510 | "pin-project-lite", 1511 | "tokio", 1512 | ] 1513 | 1514 | [[package]] 1515 | name = "toml_datetime" 1516 | version = "0.6.5" 1517 | source = "registry+https://github.com/rust-lang/crates.io-index" 1518 | checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" 1519 | 1520 | [[package]] 1521 | name = "toml_edit" 1522 | version = "0.21.1" 1523 | source = "registry+https://github.com/rust-lang/crates.io-index" 1524 | checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" 1525 | dependencies = [ 1526 | "indexmap", 1527 | "toml_datetime", 1528 | "winnow", 1529 | ] 1530 | 1531 | [[package]] 1532 | name = "tower" 1533 | version = "0.4.13" 1534 | source = "registry+https://github.com/rust-lang/crates.io-index" 1535 | checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" 1536 | dependencies = [ 1537 | "futures-core", 1538 | "futures-util", 1539 | "pin-project", 1540 | "pin-project-lite", 1541 | "tokio", 1542 | "tower-layer", 1543 | "tower-service", 1544 | "tracing", 1545 | ] 1546 | 1547 | [[package]] 1548 | name = "tower-layer" 1549 | version = "0.3.2" 1550 | source = "registry+https://github.com/rust-lang/crates.io-index" 1551 | checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" 1552 | 1553 | [[package]] 1554 | name = "tower-service" 1555 | version = "0.3.2" 1556 | source = "registry+https://github.com/rust-lang/crates.io-index" 1557 | checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" 1558 | 1559 | [[package]] 1560 | name = "tracing" 1561 | version = "0.1.40" 1562 | source = "registry+https://github.com/rust-lang/crates.io-index" 1563 | checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" 1564 | dependencies = [ 1565 | "log", 1566 | "pin-project-lite", 1567 | "tracing-core", 1568 | ] 1569 | 1570 | [[package]] 1571 | name = "tracing-core" 1572 | version = "0.1.32" 1573 | source = "registry+https://github.com/rust-lang/crates.io-index" 1574 | checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" 1575 | dependencies = [ 1576 | "once_cell", 1577 | ] 1578 | 1579 | [[package]] 1580 | name = "try-lock" 1581 | version = "0.2.5" 1582 | source = "registry+https://github.com/rust-lang/crates.io-index" 1583 | checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" 1584 | 1585 | [[package]] 1586 | name = "typed-arena" 1587 | version = "2.0.2" 1588 | source = "registry+https://github.com/rust-lang/crates.io-index" 1589 | checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a" 1590 | 1591 | [[package]] 1592 | name = "typenum" 1593 | version = "1.17.0" 1594 | source = "registry+https://github.com/rust-lang/crates.io-index" 1595 | checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" 1596 | 1597 | [[package]] 1598 | name = "unicode-bidi" 1599 | version = "0.3.15" 1600 | source = "registry+https://github.com/rust-lang/crates.io-index" 1601 | checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" 1602 | 1603 | [[package]] 1604 | name = "unicode-ident" 1605 | version = "1.0.12" 1606 | source = "registry+https://github.com/rust-lang/crates.io-index" 1607 | checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" 1608 | 1609 | [[package]] 1610 | name = "unicode-normalization" 1611 | version = "0.1.23" 1612 | source = "registry+https://github.com/rust-lang/crates.io-index" 1613 | checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" 1614 | dependencies = [ 1615 | "tinyvec", 1616 | ] 1617 | 1618 | [[package]] 1619 | name = "url" 1620 | version = "2.5.0" 1621 | source = "registry+https://github.com/rust-lang/crates.io-index" 1622 | checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" 1623 | dependencies = [ 1624 | "form_urlencoded", 1625 | "idna", 1626 | "percent-encoding", 1627 | ] 1628 | 1629 | [[package]] 1630 | name = "utf8parse" 1631 | version = "0.2.1" 1632 | source = "registry+https://github.com/rust-lang/crates.io-index" 1633 | checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" 1634 | 1635 | [[package]] 1636 | name = "vcpkg" 1637 | version = "0.2.15" 1638 | source = "registry+https://github.com/rust-lang/crates.io-index" 1639 | checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" 1640 | 1641 | [[package]] 1642 | name = "version_check" 1643 | version = "0.9.4" 1644 | source = "registry+https://github.com/rust-lang/crates.io-index" 1645 | checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" 1646 | 1647 | [[package]] 1648 | name = "want" 1649 | version = "0.3.1" 1650 | source = "registry+https://github.com/rust-lang/crates.io-index" 1651 | checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" 1652 | dependencies = [ 1653 | "try-lock", 1654 | ] 1655 | 1656 | [[package]] 1657 | name = "wasi" 1658 | version = "0.11.0+wasi-snapshot-preview1" 1659 | source = "registry+https://github.com/rust-lang/crates.io-index" 1660 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 1661 | 1662 | [[package]] 1663 | name = "wasm-bindgen" 1664 | version = "0.2.92" 1665 | source = "registry+https://github.com/rust-lang/crates.io-index" 1666 | checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" 1667 | dependencies = [ 1668 | "cfg-if", 1669 | "wasm-bindgen-macro", 1670 | ] 1671 | 1672 | [[package]] 1673 | name = "wasm-bindgen-backend" 1674 | version = "0.2.92" 1675 | source = "registry+https://github.com/rust-lang/crates.io-index" 1676 | checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" 1677 | dependencies = [ 1678 | "bumpalo", 1679 | "log", 1680 | "once_cell", 1681 | "proc-macro2", 1682 | "quote", 1683 | "syn", 1684 | "wasm-bindgen-shared", 1685 | ] 1686 | 1687 | [[package]] 1688 | name = "wasm-bindgen-futures" 1689 | version = "0.4.42" 1690 | source = "registry+https://github.com/rust-lang/crates.io-index" 1691 | checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" 1692 | dependencies = [ 1693 | "cfg-if", 1694 | "js-sys", 1695 | "wasm-bindgen", 1696 | "web-sys", 1697 | ] 1698 | 1699 | [[package]] 1700 | name = "wasm-bindgen-macro" 1701 | version = "0.2.92" 1702 | source = "registry+https://github.com/rust-lang/crates.io-index" 1703 | checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" 1704 | dependencies = [ 1705 | "quote", 1706 | "wasm-bindgen-macro-support", 1707 | ] 1708 | 1709 | [[package]] 1710 | name = "wasm-bindgen-macro-support" 1711 | version = "0.2.92" 1712 | source = "registry+https://github.com/rust-lang/crates.io-index" 1713 | checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" 1714 | dependencies = [ 1715 | "proc-macro2", 1716 | "quote", 1717 | "syn", 1718 | "wasm-bindgen-backend", 1719 | "wasm-bindgen-shared", 1720 | ] 1721 | 1722 | [[package]] 1723 | name = "wasm-bindgen-shared" 1724 | version = "0.2.92" 1725 | source = "registry+https://github.com/rust-lang/crates.io-index" 1726 | checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" 1727 | 1728 | [[package]] 1729 | name = "web-sys" 1730 | version = "0.3.69" 1731 | source = "registry+https://github.com/rust-lang/crates.io-index" 1732 | checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" 1733 | dependencies = [ 1734 | "js-sys", 1735 | "wasm-bindgen", 1736 | ] 1737 | 1738 | [[package]] 1739 | name = "winapi" 1740 | version = "0.3.9" 1741 | source = "registry+https://github.com/rust-lang/crates.io-index" 1742 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 1743 | dependencies = [ 1744 | "winapi-i686-pc-windows-gnu", 1745 | "winapi-x86_64-pc-windows-gnu", 1746 | ] 1747 | 1748 | [[package]] 1749 | name = "winapi-i686-pc-windows-gnu" 1750 | version = "0.4.0" 1751 | source = "registry+https://github.com/rust-lang/crates.io-index" 1752 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 1753 | 1754 | [[package]] 1755 | name = "winapi-x86_64-pc-windows-gnu" 1756 | version = "0.4.0" 1757 | source = "registry+https://github.com/rust-lang/crates.io-index" 1758 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 1759 | 1760 | [[package]] 1761 | name = "windows-sys" 1762 | version = "0.48.0" 1763 | source = "registry+https://github.com/rust-lang/crates.io-index" 1764 | checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" 1765 | dependencies = [ 1766 | "windows-targets 0.48.5", 1767 | ] 1768 | 1769 | [[package]] 1770 | name = "windows-sys" 1771 | version = "0.52.0" 1772 | source = "registry+https://github.com/rust-lang/crates.io-index" 1773 | checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" 1774 | dependencies = [ 1775 | "windows-targets 0.52.5", 1776 | ] 1777 | 1778 | [[package]] 1779 | name = "windows-targets" 1780 | version = "0.48.5" 1781 | source = "registry+https://github.com/rust-lang/crates.io-index" 1782 | checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" 1783 | dependencies = [ 1784 | "windows_aarch64_gnullvm 0.48.5", 1785 | "windows_aarch64_msvc 0.48.5", 1786 | "windows_i686_gnu 0.48.5", 1787 | "windows_i686_msvc 0.48.5", 1788 | "windows_x86_64_gnu 0.48.5", 1789 | "windows_x86_64_gnullvm 0.48.5", 1790 | "windows_x86_64_msvc 0.48.5", 1791 | ] 1792 | 1793 | [[package]] 1794 | name = "windows-targets" 1795 | version = "0.52.5" 1796 | source = "registry+https://github.com/rust-lang/crates.io-index" 1797 | checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" 1798 | dependencies = [ 1799 | "windows_aarch64_gnullvm 0.52.5", 1800 | "windows_aarch64_msvc 0.52.5", 1801 | "windows_i686_gnu 0.52.5", 1802 | "windows_i686_gnullvm", 1803 | "windows_i686_msvc 0.52.5", 1804 | "windows_x86_64_gnu 0.52.5", 1805 | "windows_x86_64_gnullvm 0.52.5", 1806 | "windows_x86_64_msvc 0.52.5", 1807 | ] 1808 | 1809 | [[package]] 1810 | name = "windows_aarch64_gnullvm" 1811 | version = "0.48.5" 1812 | source = "registry+https://github.com/rust-lang/crates.io-index" 1813 | checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" 1814 | 1815 | [[package]] 1816 | name = "windows_aarch64_gnullvm" 1817 | version = "0.52.5" 1818 | source = "registry+https://github.com/rust-lang/crates.io-index" 1819 | checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" 1820 | 1821 | [[package]] 1822 | name = "windows_aarch64_msvc" 1823 | version = "0.48.5" 1824 | source = "registry+https://github.com/rust-lang/crates.io-index" 1825 | checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" 1826 | 1827 | [[package]] 1828 | name = "windows_aarch64_msvc" 1829 | version = "0.52.5" 1830 | source = "registry+https://github.com/rust-lang/crates.io-index" 1831 | checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" 1832 | 1833 | [[package]] 1834 | name = "windows_i686_gnu" 1835 | version = "0.48.5" 1836 | source = "registry+https://github.com/rust-lang/crates.io-index" 1837 | checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" 1838 | 1839 | [[package]] 1840 | name = "windows_i686_gnu" 1841 | version = "0.52.5" 1842 | source = "registry+https://github.com/rust-lang/crates.io-index" 1843 | checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" 1844 | 1845 | [[package]] 1846 | name = "windows_i686_gnullvm" 1847 | version = "0.52.5" 1848 | source = "registry+https://github.com/rust-lang/crates.io-index" 1849 | checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" 1850 | 1851 | [[package]] 1852 | name = "windows_i686_msvc" 1853 | version = "0.48.5" 1854 | source = "registry+https://github.com/rust-lang/crates.io-index" 1855 | checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" 1856 | 1857 | [[package]] 1858 | name = "windows_i686_msvc" 1859 | version = "0.52.5" 1860 | source = "registry+https://github.com/rust-lang/crates.io-index" 1861 | checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" 1862 | 1863 | [[package]] 1864 | name = "windows_x86_64_gnu" 1865 | version = "0.48.5" 1866 | source = "registry+https://github.com/rust-lang/crates.io-index" 1867 | checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" 1868 | 1869 | [[package]] 1870 | name = "windows_x86_64_gnu" 1871 | version = "0.52.5" 1872 | source = "registry+https://github.com/rust-lang/crates.io-index" 1873 | checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" 1874 | 1875 | [[package]] 1876 | name = "windows_x86_64_gnullvm" 1877 | version = "0.48.5" 1878 | source = "registry+https://github.com/rust-lang/crates.io-index" 1879 | checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" 1880 | 1881 | [[package]] 1882 | name = "windows_x86_64_gnullvm" 1883 | version = "0.52.5" 1884 | source = "registry+https://github.com/rust-lang/crates.io-index" 1885 | checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" 1886 | 1887 | [[package]] 1888 | name = "windows_x86_64_msvc" 1889 | version = "0.48.5" 1890 | source = "registry+https://github.com/rust-lang/crates.io-index" 1891 | checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" 1892 | 1893 | [[package]] 1894 | name = "windows_x86_64_msvc" 1895 | version = "0.52.5" 1896 | source = "registry+https://github.com/rust-lang/crates.io-index" 1897 | checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" 1898 | 1899 | [[package]] 1900 | name = "winnow" 1901 | version = "0.5.40" 1902 | source = "registry+https://github.com/rust-lang/crates.io-index" 1903 | checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" 1904 | dependencies = [ 1905 | "memchr", 1906 | ] 1907 | 1908 | [[package]] 1909 | name = "winreg" 1910 | version = "0.52.0" 1911 | source = "registry+https://github.com/rust-lang/crates.io-index" 1912 | checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" 1913 | dependencies = [ 1914 | "cfg-if", 1915 | "windows-sys 0.48.0", 1916 | ] 1917 | 1918 | [[package]] 1919 | name = "zip" 1920 | version = "1.1.4" 1921 | source = "registry+https://github.com/rust-lang/crates.io-index" 1922 | checksum = "9cc23c04387f4da0374be4533ad1208cbb091d5c11d070dfef13676ad6497164" 1923 | dependencies = [ 1924 | "aes", 1925 | "arbitrary", 1926 | "bzip2", 1927 | "constant_time_eq", 1928 | "crc32fast", 1929 | "crossbeam-utils", 1930 | "deflate64", 1931 | "displaydoc", 1932 | "flate2", 1933 | "hmac", 1934 | "indexmap", 1935 | "lzma-rs", 1936 | "num_enum", 1937 | "pbkdf2", 1938 | "sha1", 1939 | "thiserror", 1940 | "time", 1941 | "zopfli", 1942 | "zstd", 1943 | ] 1944 | 1945 | [[package]] 1946 | name = "zopfli" 1947 | version = "0.8.0" 1948 | source = "registry+https://github.com/rust-lang/crates.io-index" 1949 | checksum = "5c1f48f3508a3a3f2faee01629564400bc12260f6214a056d06a3aaaa6ef0736" 1950 | dependencies = [ 1951 | "crc32fast", 1952 | "log", 1953 | "simd-adler32", 1954 | "typed-arena", 1955 | ] 1956 | 1957 | [[package]] 1958 | name = "zstd" 1959 | version = "0.13.1" 1960 | source = "registry+https://github.com/rust-lang/crates.io-index" 1961 | checksum = "2d789b1514203a1120ad2429eae43a7bd32b90976a7bb8a05f7ec02fa88cc23a" 1962 | dependencies = [ 1963 | "zstd-safe", 1964 | ] 1965 | 1966 | [[package]] 1967 | name = "zstd-safe" 1968 | version = "7.1.0" 1969 | source = "registry+https://github.com/rust-lang/crates.io-index" 1970 | checksum = "1cd99b45c6bc03a018c8b8a86025678c87e55526064e38f9df301989dce7ec0a" 1971 | dependencies = [ 1972 | "zstd-sys", 1973 | ] 1974 | 1975 | [[package]] 1976 | name = "zstd-sys" 1977 | version = "2.0.10+zstd.1.5.6" 1978 | source = "registry+https://github.com/rust-lang/crates.io-index" 1979 | checksum = "c253a4914af5bafc8fa8c86ee400827e83cf6ec01195ec1f1ed8441bf00d65aa" 1980 | dependencies = [ 1981 | "cc", 1982 | "pkg-config", 1983 | ] 1984 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "bum" 3 | version = "0.6.1" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | reqwest = { version = "0.12", features = ["json"] } 10 | clap = { version = "4.0", features = ["derive"] } 11 | tokio = { version = "1", features = ["full"] } 12 | zip = "1.1" 13 | owo-colors = "4.0" 14 | serde_json = "1.0" 15 | serde = { version = "1.0", features = ["derive"] } 16 | resolve-path = "0.1" 17 | lazy_static = "1.4" 18 | anyhow = "1.0" 19 | 20 | [target.x86_64-unknown-linux-gnu.dependencies] 21 | openssl = { version = "0.10.66", features = ["vendored"] } 22 | [target.x86_64-unknown-linux-musl.dependencies] 23 | openssl = { version = "0.10.66", features = ["vendored"] } 24 | [target.aarch64-unknown-linux-gnu.dependencies] 25 | openssl = { version = "0.10.66", features = ["vendored"] } 26 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Bum - Bun Version Manager 2 | 3 | 4 |
5 | 6 |
7 | GitHub CI Status 8 | 9 | 10 |
11 |
12 | Introducing Bum, a fast Bun version manager written in Rust from scratch. 13 | 14 | 15 | 16 | ## How to install: 17 | 18 | ## Unix 19 | 20 | 1. Open your terminal and execute: 21 | 22 | ``` 23 | curl -fsSL https://github.com/owenizedd/bum/raw/main/install.sh | bash 24 | ``` 25 | 26 | > This installation will install bun for you and also bum altogether. 27 | 28 | ## Windows 29 | 30 | I only own a Mac, so I can't test at all if Windows is working, and I can't write a script to auto-install on Windows as well. So here are a few instructions on how to install Bum for Windows: 31 | 32 | 1. Install [Bun](https://bun.sh/) 33 | 2. Download the last exe in the [latest release](https://github.com/owenizedd/bum/releases/latest), and unzip it 34 | 3. Put the exe in your favorite directory, add the path to this directory in your PATH, and that's it! 35 | 36 | As Bum is not tested at all on Windows, it may not works. If it's the case please open an issue and I'll be glad to fix it. 37 | 38 | ## How to use: 39 | 40 | - You can just run `bum` without any parameter to see default help menu. 41 | 42 | ### Commands 43 | 44 | - `bum use ` 45 | - Change the current active bun version, e.g. `bum use 1.0.3`. This will automatically use v1.0.3. 46 | - If there's no target version is installed in the local, it will install that version then use it. 47 | - Else, it will just use that version directly as the active version. 48 | - `bum remove ` 49 | - Remove the installed version locally. 50 | > This feature will only remove local copy, but if you're using the removed version, you will still be able to use that version, but once you change to other version, you will not be able to change to that version anymore. 51 | - In the future we will automatically switch to the latest version available upon removal of the version. 52 | - `bum list` 53 | - Show all local installed versions of Bun. 54 | - `bum list-remote` 55 | 56 | - Show all remote versions of Bun that could be installed. 57 | 58 | - .bumrc file 59 | - When file exists, everytime you use `bum use` command without `` argument, Bum will try to use the version from the .bumrc file. 60 | 61 | ### Future features (possibly) 62 | 63 | - `bum default ` 64 | 65 | > Any contribution is appreciated, have any doubts/questions/suggestions/ideas? Drop them in the Discussion page. 66 | -------------------------------------------------------------------------------- /install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | 4 | VERSION="v0.6.1" 5 | 6 | if ! bun &>/dev/null; then 7 | curl -fsSL https://bun.sh/install | bash 8 | fi 9 | 10 | # Fill missing functions 11 | 12 | Color_Off='' 13 | Red='' 14 | Green='' 15 | Dim='' 16 | Bold_White='' 17 | Bold_Green='' 18 | 19 | if [[ -t 1 ]]; then 20 | # Reset 21 | Color_Off='\033[0m' # Text Reset 22 | 23 | # Regular Colors 24 | Red='\033[0;31m' # Red 25 | Green='\033[0;32m' # Green 26 | Dim='\033[0;2m' # White 27 | 28 | # Bold 29 | Bold_Green='\033[1;32m' # Bold Green 30 | Bold_White='\033[1m' # Bold White 31 | fi 32 | 33 | 34 | error() { 35 | echo -e "${Red}error${Color_Off}:" "$@" >&2 36 | exit 1 37 | } 38 | 39 | info() { 40 | echo -e "${Dim}$@ ${Color_Off}" 41 | } 42 | 43 | info_bold() { 44 | echo -e "${Bold_White}$@ ${Color_Off}" 45 | } 46 | 47 | success() { 48 | echo -e "${Green}$@ ${Color_Off}" 49 | } 50 | 51 | arch=$(uname -ms) 52 | 53 | case $arch in 54 | 'Darwin x86_64') 55 | target=x86_64-apple-darwin 56 | ;; 57 | 'Darwin arm64') 58 | target=aarch64-apple-darwin 59 | ;; 60 | 'Linux aarch64' | 'Linux arm64') 61 | target=aarch64-unknown-linux-gnu 62 | ;; 63 | 'Linux x86_64' | *) 64 | target=x86_64-unknown-linux-gnu 65 | ;; 66 | esac 67 | 68 | GITHUB=${GITHUB-"https://github.com"} 69 | 70 | github_repo="$GITHUB/owenizedd/bum" 71 | 72 | bum_folder_name="bum-$VERSION-$target" 73 | 74 | bum_uri=$github_repo/releases/download/$VERSION/bum-$VERSION-"$target".tar.gz 75 | 76 | install_env=BUM_INSTALL 77 | bin_env=\$$install_env/bin 78 | 79 | install_dir=${!install_env:-$HOME/.bum} 80 | bin_dir=$install_dir/bin 81 | exe=$bin_dir/bum 82 | exe_compressed=$bin_dir/bum.tar.gz 83 | 84 | if [[ ! -d $bin_dir ]]; then 85 | mkdir -p "$bin_dir" || 86 | error "Failed to create install directory \"$bin_dir\"" 87 | fi 88 | 89 | curl --fail --location --progress-bar --output "$exe_compressed" "$bum_uri" || 90 | error "Failed to download bum from \"$bum_uri\"" 91 | 92 | tar -xvf "$exe_compressed" || error "Failed on decompress the executable" 93 | 94 | rm "$exe_compressed" 95 | 96 | mv "$bum_folder_name/bum" $exe 97 | 98 | rm -r $bum_folder_name 99 | 100 | mkdir -p "$install_dir/bun-versions" 101 | 102 | chmod +x "$exe" || 103 | error 'Failed to set permissions on bum executable' 104 | 105 | tildify() { 106 | if [[ $1 = $HOME/* ]]; then 107 | local replacement=\~/ 108 | 109 | echo "${1/$HOME\//$replacement}" 110 | else 111 | echo "$1" 112 | fi 113 | } 114 | 115 | echo "bum was installed successfully to "$exe"" 116 | 117 | refresh_command='' 118 | 119 | tilde_bin_dir="$bin_dir" 120 | quoted_install_dir=\"${install_dir//\"/\\\"}\" 121 | 122 | if [[ $quoted_install_dir = \"$HOME/* ]]; then 123 | quoted_install_dir=${quoted_install_dir/$HOME\//\$HOME/} 124 | fi 125 | 126 | echo 127 | 128 | case $(basename "$SHELL") in 129 | fish) 130 | commands=( 131 | "set --export $install_env $quoted_install_dir" 132 | "set --export PATH $bin_env \$PATH" 133 | ) 134 | 135 | fish_config=$HOME/.config/fish/config.fish 136 | tilde_fish_config=$(tildify "$fish_config") 137 | 138 | if [[ -w $fish_config ]]; then 139 | { 140 | echo -e '\n# bum' 141 | 142 | for command in "${commands[@]}"; do 143 | echo "$command" 144 | done 145 | } >>"$fish_config" 146 | 147 | info "Added \"$tilde_bin_dir\" to \$PATH in \"$tilde_fish_config\"" 148 | 149 | refresh_command="source $tilde_fish_config" 150 | else 151 | echo "Manually add the directory to $tilde_fish_config (or similar):" 152 | 153 | for command in "${commands[@]}"; do 154 | info_bold " $command" 155 | done 156 | fi 157 | ;; 158 | zsh) 159 | 160 | commands=( 161 | "export $install_env=$quoted_install_dir" 162 | "export PATH=\"$bin_env:\$PATH\"" 163 | ) 164 | 165 | zsh_config=$HOME/.zshrc 166 | tilde_zsh_config=$(tildify "$zsh_config") 167 | 168 | if [[ -w $zsh_config ]]; then 169 | { 170 | echo -e '\n# bum' 171 | 172 | for command in "${commands[@]}"; do 173 | echo "$command" 174 | done 175 | } >>"$zsh_config" 176 | 177 | refresh_command="exec $SHELL" 178 | else 179 | echo "Manually add the directory to $tilde_zsh_config (or similar):" 180 | 181 | for command in "${commands[@]}"; do 182 | info_bold " $command" 183 | done 184 | fi 185 | ;; 186 | bash) 187 | 188 | commands=( 189 | "export $install_env=$quoted_install_dir" 190 | "export PATH=$bin_env:\$PATH" 191 | ) 192 | 193 | bash_configs=( 194 | "$HOME/.bashrc" 195 | "$HOME/.bash_profile" 196 | ) 197 | 198 | if [[ ${XDG_CONFIG_HOME:-} ]]; then 199 | bash_configs+=( 200 | "$XDG_CONFIG_HOME/.bash_profile" 201 | "$XDG_CONFIG_HOME/.bashrc" 202 | "$XDG_CONFIG_HOME/bash_profile" 203 | "$XDG_CONFIG_HOME/bashrc" 204 | ) 205 | fi 206 | 207 | set_manually=true 208 | for bash_config in "${bash_configs[@]}"; do 209 | tilde_bash_config=$(tildify "$bash_config") 210 | 211 | if [[ -w $bash_config ]]; then 212 | { 213 | echo -e '\n# bum' 214 | 215 | for command in "${commands[@]}"; do 216 | echo "$command" 217 | done 218 | } >>"$bash_config" 219 | 220 | info "Added \"$tilde_bin_dir\" to \$PATH in \"$tilde_bash_config\"" 221 | 222 | refresh_command="source $bash_config" 223 | set_manually=false 224 | break 225 | fi 226 | done 227 | 228 | if [[ $set_manually = true ]]; then 229 | echo "Manually add the directory to $tilde_bash_config (or similar):" 230 | 231 | for command in "${commands[@]}"; do 232 | info_bold " $command" 233 | done 234 | fi 235 | ;; 236 | *) 237 | echo 'Manually add the directory to ~/.bashrc (or similar):' 238 | info_bold " export $install_env=$quoted_install_dir" 239 | info_bold " export PATH=\"$bin_env:\$PATH\"" 240 | ;; 241 | esac 242 | -------------------------------------------------------------------------------- /src/bun.rs: -------------------------------------------------------------------------------- 1 | use crate::{commands::FOLDER_VERSION_BASE, os}; 2 | use anyhow::{bail, Result}; 3 | use reqwest::StatusCode; 4 | use serde::Deserialize; 5 | use std::path::{Path, PathBuf}; 6 | use tokio::{ 7 | fs::{self, create_dir_all, File}, 8 | io::{AsyncWriteExt, BufWriter}, 9 | process::Command, 10 | }; 11 | 12 | const BUN_GITHUB_TAGS_URL: &str = "https://api.github.com/repos/oven-sh/bun/tags"; 13 | pub const BUN_BIN_NAME: &str = "bun"; 14 | 15 | pub async fn get_active_version() -> String { 16 | //get active version by running bun -v 17 | let output = Command::new("bun") 18 | .arg("-v") 19 | .output() 20 | .await 21 | .expect("Failed to execute bun -v, is bun installed?"); 22 | 23 | let stdout = std::str::from_utf8(&output.stdout).expect("Failed to convert stdout to string"); 24 | stdout.trim().to_string() 25 | } 26 | 27 | #[derive(Deserialize)] 28 | struct Tag { 29 | name: String, 30 | } 31 | 32 | pub async fn get_github_tags() -> Result> { 33 | let client = reqwest::Client::builder() 34 | .user_agent("bum-version-manager-app") 35 | .build()?; 36 | 37 | let response = client.get(BUN_GITHUB_TAGS_URL).send().await?; 38 | 39 | Ok(response 40 | .json::>() 41 | .await? 42 | .into_iter() 43 | .filter_map(|tag| { 44 | if tag.name.starts_with("bun-") { 45 | Some(tag.name.replace("bun-", "")) 46 | } else { 47 | None 48 | } 49 | }) 50 | .collect()) 51 | } 52 | 53 | pub async fn download_version_to(version: &str, to_path: &Path) -> Result { 54 | let client = reqwest::Client::new(); 55 | 56 | let arch = os::get_architecture(); 57 | 58 | let url = format!( 59 | "https://github.com/oven-sh/bun/releases/download/bun-v{}/bun-{}.zip", 60 | version, arch 61 | ); 62 | 63 | let response = client.get(url).send().await?; 64 | 65 | match response.status() { 66 | StatusCode::OK => { 67 | let file = File::create(to_path).await?; 68 | let mut writer = BufWriter::new(file); 69 | 70 | // Read the entire response body into a Vec 71 | let bytes = response.bytes().await?; 72 | 73 | // Write the bytes to the local file 74 | writer.write_all(&bytes).await?; 75 | 76 | writer.flush().await?; 77 | } 78 | StatusCode::NOT_FOUND => { 79 | bail!("Version \"{version}\" doesn't exist"); 80 | } 81 | e => { 82 | bail!("HTTP request was not successful: {e}"); 83 | } 84 | } 85 | 86 | extract_bun_bin_of_zip(&to_path, &FOLDER_VERSION_BASE).await 87 | } 88 | 89 | // TODO: Refactor this function when zip crate has async: https://github.com/zip-rs/zip2/pull/73 90 | async fn extract_bun_bin_of_zip(zip_file_path: &Path, output_dir: &Path) -> Result { 91 | // Extract the version from the ZIP file name (excluding ".zip" suffix) 92 | let version = Path::new(zip_file_path) 93 | .file_stem() 94 | .and_then(|stem| stem.to_str()) 95 | .expect("Invalid ZIP file path"); 96 | 97 | let output_dir = output_dir.join(version); 98 | 99 | println!("Extracting zip file..."); 100 | 101 | let zip_file = std::fs::File::open(zip_file_path)?; 102 | 103 | let mut archive = zip::ZipArchive::new(zip_file)?; 104 | 105 | for i in 0..archive.len() { 106 | let mut file_in_archive = archive.by_index(i).unwrap(); 107 | let output_path = match file_in_archive.enclosed_name() { 108 | Some(path) => path.to_owned(), 109 | None => continue, 110 | }; 111 | 112 | if !output_path.ends_with(BUN_BIN_NAME) { 113 | continue; 114 | } 115 | 116 | create_dir_all(output_dir.clone()).await?; 117 | 118 | let output_path = output_dir.join(BUN_BIN_NAME); 119 | let mut output_file = std::fs::File::create(output_path.clone())?; 120 | std::io::copy(&mut file_in_archive, &mut output_file)?; 121 | 122 | fs::remove_file(zip_file_path).await?; 123 | 124 | return Ok(output_path); 125 | } 126 | 127 | bail!("Failed to find Bun binary in the zip file") 128 | } 129 | -------------------------------------------------------------------------------- /src/commands.rs: -------------------------------------------------------------------------------- 1 | use crate::bun; 2 | use crate::bun::BUN_BIN_NAME; 3 | use crate::utils; 4 | use anyhow::Result; 5 | use lazy_static::lazy_static; 6 | use owo_colors::{self, DynColors, OwoColorize}; 7 | use resolve_path::PathResolveExt; 8 | use std::borrow::Cow; 9 | #[cfg(not(windows))] 10 | use std::os::unix::fs::PermissionsExt; 11 | use std::path::{Path, PathBuf}; 12 | use tokio::fs; 13 | use tokio::fs::remove_dir_all; 14 | use utils::check_folder_exists; 15 | 16 | lazy_static! { 17 | pub static ref FOLDER_VERSION_BASE: Cow<'static, Path> = "~/.bum/bun-versions".resolve(); 18 | pub static ref BUN_BIN_PATH: Cow<'static, Path> = "~/.bun/bin/bun".resolve(); 19 | } 20 | 21 | fn normalize_version(version: &str) -> String { 22 | version.replace('v', "") 23 | } 24 | 25 | async fn get_bumrc_version() -> Result { 26 | let bumrc_path = Path::new(".bumrc"); 27 | if bumrc_path.exists() { 28 | let bumrc_version = fs::read_to_string(".bumrc") 29 | .await 30 | .expect("Failed to read .bumrc, is it a valid file?"); 31 | Ok(bumrc_version.trim().to_string()) 32 | } else { 33 | Err("No .bumrc file found") 34 | } 35 | } 36 | 37 | pub async fn use_bun(version: &str) -> Result<()> { 38 | let version = normalize_version(version); 39 | 40 | let active_color: DynColors = "#eea990".parse().unwrap(); 41 | let active_style = owo_colors::Style::new().color(active_color).bold(); 42 | 43 | let path_with_version = FOLDER_VERSION_BASE.join(&version); 44 | 45 | if check_folder_exists(&path_with_version).await { 46 | let bun_used_path = path_with_version.join(BUN_BIN_NAME); 47 | 48 | match activate_bun(bun_used_path).await { 49 | Ok(()) => { 50 | println!( 51 | "Bun {} is activated.", 52 | format!("v{}", version).style(active_style) 53 | ); 54 | } 55 | Err(e) => { 56 | eprintln!("Failed to activate Bun v{}", version); 57 | eprintln!("Reason: {e:?}"); 58 | } 59 | } 60 | 61 | return Ok(()); 62 | } 63 | 64 | println!("Bum - installing bun for version {}...", version); 65 | 66 | if fs::metadata(FOLDER_VERSION_BASE.to_owned()).await.is_err() { 67 | let _ = fs::create_dir_all(FOLDER_VERSION_BASE.to_owned()); 68 | } 69 | 70 | let zip_file_path = FOLDER_VERSION_BASE.join(format!("{}.zip", version)); 71 | 72 | match bun::download_version_to(&version, &zip_file_path).await { 73 | Ok(bun_path) => match activate_bun(bun_path).await { 74 | Ok(()) => println!( 75 | "Bun {} is activated.", 76 | format!("v{}", version).style(active_style) 77 | ), 78 | e => eprintln!("Failed {e:?}"), 79 | }, 80 | Err(err) => eprintln!("{err}"), 81 | } 82 | 83 | Ok(()) 84 | } 85 | 86 | pub async fn activate_bun(bun_used_path: PathBuf) -> Result<()> { 87 | fs::copy(bun_used_path, BUN_BIN_PATH.to_owned()).await?; 88 | 89 | let metadata = fs::metadata(BUN_BIN_PATH.to_owned()).await?; 90 | 91 | let mut permissions = metadata.permissions(); 92 | 93 | #[cfg(not(windows))] 94 | permissions.set_mode(permissions.mode() | 0o111); // Add execute permission 95 | 96 | fs::set_permissions(BUN_BIN_PATH.to_owned(), permissions) 97 | .await 98 | .unwrap(); 99 | 100 | Ok(()) 101 | } 102 | 103 | pub async fn remove(version: &str) { 104 | let version = normalize_version(version); 105 | 106 | println!("{:?}", FOLDER_VERSION_BASE.join(&version)); 107 | let result = remove_dir_all(FOLDER_VERSION_BASE.join(&version)).await; 108 | match result { 109 | Ok(()) => { 110 | println!("v{} has been removed.", version); 111 | } 112 | Err(error) => { 113 | println!( 114 | "Failed to remove the version, possibly not installed yet: {}", 115 | error 116 | ) 117 | } 118 | } 119 | } 120 | 121 | pub async fn list() -> Result<()> { 122 | let mut versions_list: Vec = Vec::new(); 123 | 124 | match fs::read_dir(FOLDER_VERSION_BASE.to_owned()).await { 125 | Ok(mut entries) => { 126 | while let Some(entry) = entries.next_entry().await? { 127 | let path_buf: PathBuf = entry.path(); 128 | let path_str = path_buf.to_string_lossy().to_string(); 129 | 130 | // Normalize path separators 131 | let path_str = path_str.replace('\\', "/"); 132 | 133 | let version = path_str.split('/').last().unwrap_or_default(); 134 | versions_list.push(version.to_string()); 135 | } 136 | versions_list.sort(); 137 | versions_list.reverse(); 138 | let active_version = bun::get_active_version().await; 139 | let active_color: DynColors = "#eea990".parse().unwrap(); 140 | let active_style = owo_colors::Style::new().color(active_color).bold(); 141 | for version in versions_list { 142 | if version == active_version { 143 | let active_version = format!("{} (active)", version.style(active_style)); 144 | println!("{} {active_version}", "•".style(active_style)); 145 | } else { 146 | println!("• {}", version); 147 | } 148 | } 149 | } 150 | Err(error) => { 151 | println!("Failed to read versions: {}", error); 152 | } 153 | } 154 | 155 | Ok(()) 156 | } 157 | 158 | pub async fn use_bumrc() -> Result<()> { 159 | let bumrc_version = get_bumrc_version().await; 160 | match bumrc_version { 161 | Ok(version) => { 162 | println!("Using version {} from .bumrc", version); 163 | use_bun(&version).await?; 164 | } 165 | Err(e) => { 166 | println!( 167 | "No version specified or {}, please use bum use or use -h to print help", 168 | e 169 | ); 170 | } 171 | } 172 | 173 | Ok(()) 174 | } 175 | 176 | pub async fn list_remote() { 177 | let tags = bun::get_github_tags().await; 178 | 179 | match tags { 180 | Ok(tags) => { 181 | for tag in tags { 182 | println!(" {}", tag); 183 | } 184 | } 185 | Err(e) => { 186 | println!("Failed to get remote version list: {}", e); 187 | } 188 | } 189 | } 190 | -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | #![allow(clippy::all, clippy::pedantic)] 2 | 3 | use anyhow::Result; 4 | use clap::Parser; 5 | use commands::{list, list_remote, remove, use_bumrc, use_bun}; 6 | use owo_colors::{DynColors, OwoColorize}; 7 | 8 | mod bun; 9 | mod commands; 10 | mod os; 11 | mod utils; 12 | 13 | pub const VERSION: &str = env!("CARGO_PKG_VERSION"); 14 | #[derive(Parser)] 15 | #[command(arg_required_else_help = true)] 16 | pub struct Cli { 17 | #[clap(short, long)] 18 | version: bool, 19 | 20 | #[clap(subcommand)] 21 | pub command: Option, 22 | } 23 | 24 | #[derive(Parser)] 25 | pub enum Command { 26 | Default(DefaultCommand), 27 | Use(UseCommand), 28 | Remove(RemoveCommand), 29 | List(ListCommand), 30 | ListRemote(ListRemoteCommand), 31 | } 32 | 33 | #[derive(Parser)] 34 | pub struct DefaultCommand { 35 | version: String, 36 | } 37 | 38 | #[derive(Parser)] 39 | pub struct UseCommand { 40 | version: Option, 41 | } 42 | 43 | #[derive(Parser)] 44 | pub struct RemoveCommand { 45 | version: String, 46 | } 47 | 48 | #[derive(Parser)] 49 | pub struct ListCommand {} 50 | #[derive(Parser)] 51 | pub struct ListRemoteCommand {} 52 | 53 | #[tokio::main] 54 | pub async fn main() { 55 | let cli = Cli::try_parse(); 56 | 57 | match cli { 58 | Ok(result) => { 59 | if result.version { 60 | println!("{}", VERSION); 61 | } else { 62 | if let Err(e) = run_commands(result.command).await { 63 | println!("An error occured during the execution: {e}"); 64 | }; 65 | } 66 | } 67 | Err(e) => { 68 | print_default_message(); 69 | println!("{}", e); 70 | } 71 | } 72 | } 73 | 74 | async fn run_commands(used_command: Option) -> Result<()> { 75 | if used_command.is_none() { 76 | println!("Use -h to print help"); 77 | 78 | return Ok(()); 79 | } 80 | match used_command.unwrap() { 81 | Command::Default(_args) => { 82 | println!("This feature will be implemented in the future."); 83 | } 84 | Command::Remove(args) => { 85 | remove(&args.version).await; 86 | } 87 | Command::Use(args) => match args.version { 88 | Some(version) => { 89 | use_bun(&version).await?; 90 | } 91 | None => { 92 | use_bumrc().await?; 93 | } 94 | }, 95 | Command::List(_) => list().await?, 96 | Command::ListRemote(_) => { 97 | list_remote().await; 98 | } 99 | } 100 | 101 | Ok(()) 102 | } 103 | 104 | fn print_default_message() { 105 | const BUM: &str = r#" _____ ____ ____ ______ _______ 106 | ___|\ \ | | | | | \/ \ 107 | | |\ \ | | | | / /\ \ 108 | | | | || | | | / /\ / /\ | 109 | | | /_ _ / | | | | / /\ \_/ / / /| 110 | | |\ \ | | | || | \|_|/ / / | 111 | | | | | | | | || | | | | 112 | |____|/____/| |\___\_|____||\____\ |____| / 113 | | / || | | | || | | | | / 114 | |____|_____|/ \|____|____| \|____| |____|/ 115 | \( )/ \( )/ \( )/ 116 | ' ' ' ' ' ' "#; 117 | 118 | let colors: [DynColors; 3] = 119 | ["#f6e0b5", "#aa6f73", "#eea990"].map(|color| color.parse().unwrap()); 120 | 121 | for line in BUM.split_inclusive('\n') { 122 | print!("{}", line[0..16].to_string().color(colors[0])); 123 | print!("{}", line[17..33].to_string().color(colors[1])); 124 | print!("{}", line[34..54].to_string().color(colors[2])); 125 | } 126 | println!() 127 | } 128 | -------------------------------------------------------------------------------- /src/os.rs: -------------------------------------------------------------------------------- 1 | use std::env::consts::{ARCH, OS}; 2 | 3 | pub fn get_architecture() -> String { 4 | let os = if OS == "macos" { "darwin" } else { OS }; 5 | 6 | let arch = match ARCH { 7 | "x86_64" => "x64", 8 | "arm" => "aarch64", 9 | _ => ARCH, 10 | }; 11 | 12 | format!("{os}-{arch}") 13 | } 14 | -------------------------------------------------------------------------------- /src/utils.rs: -------------------------------------------------------------------------------- 1 | use std::path::PathBuf; 2 | use tokio::fs::{self}; 3 | 4 | pub async fn check_folder_exists(path: &PathBuf) -> bool { 5 | fs::metadata(path) 6 | .await 7 | .map(|metadata| metadata.is_dir()) 8 | .unwrap_or(false) 9 | } 10 | --------------------------------------------------------------------------------