├── .github ├── dependabot.yml └── workflows │ └── rust.yml ├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── LICENSE ├── README.md ├── lefthook.yml └── src └── main.rs /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | 4 | # Maintain dependencies for GitHub Actions 5 | - package-ecosystem: "github-actions" 6 | directory: "/" 7 | schedule: 8 | interval: "daily" 9 | -------------------------------------------------------------------------------- /.github/workflows/rust.yml: -------------------------------------------------------------------------------- 1 | name: Rust 2 | 3 | on: 4 | workflow_dispatch: 5 | push: 6 | branches: [main] 7 | tags: ["v*.*.*"] 8 | pull_request: 9 | branches: [main] 10 | release: 11 | types: 12 | - created 13 | 14 | env: 15 | CARGO_TERM_COLOR: always 16 | 17 | jobs: 18 | build: 19 | name: Build 20 | runs-on: ubuntu-latest 21 | 22 | steps: 23 | - uses: actions/checkout@v3 24 | with: 25 | fetch-depth: 1 26 | 27 | - name: Build 28 | run: cargo build --verbose 29 | 30 | - name: Check format 31 | run: cargo fmt --all -- --check 32 | 33 | - name: Clippy 34 | run: cargo clippy -- -D warnings 35 | 36 | - name: Run tests 37 | run: cargo test --verbose 38 | 39 | release: 40 | name: Release ${{ matrix.name }} 41 | needs: [build] 42 | if: github.event_name == 'pull_request' || github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') 43 | runs-on: ${{ matrix.os }} 44 | strategy: 45 | matrix: 46 | name: [linux, macos] 47 | 48 | include: 49 | - name: Linux 50 | os: ubuntu-latest 51 | sccache-path: /home/runner/.cache/sccache 52 | artifact_name: target/release/blackd-client_linux 53 | asset_name: blackd-client_linux 54 | - name: macOS 55 | os: macos-latest 56 | sccache-path: /Users/runner/Library/Caches/Mozilla.sccache 57 | artifact_name: target/release/blackd-client_macos 58 | asset_name: blackd-client_macos 59 | 60 | env: 61 | RUST_BACKTRACE: full 62 | RUSTC_WRAPPER: sccache 63 | RUSTV: ${{ matrix.rust }} 64 | SCCACHE_CACHE_SIZE: 2G 65 | SCCACHE_DIR: ${{ matrix.sccache-path }} 66 | # SCCACHE_RECACHE: 1 # Uncomment this to clear cache, then comment it back out 67 | 68 | steps: 69 | - uses: actions/checkout@v3 70 | with: 71 | fetch-depth: 1 72 | 73 | - name: Install sccache (linux) 74 | if: matrix.os == 'ubuntu-latest' 75 | env: 76 | LINK: https://github.com/mozilla/sccache/releases/download 77 | SCCACHE_VERSION: 0.2.13 78 | run: | 79 | SCCACHE_FILE=sccache-$SCCACHE_VERSION-x86_64-unknown-linux-musl 80 | mkdir -p $HOME/.local/bin 81 | curl -L "$LINK/$SCCACHE_VERSION/$SCCACHE_FILE.tar.gz" | tar xz 82 | mv -f $SCCACHE_FILE/sccache $HOME/.local/bin/sccache 83 | echo "$HOME/.local/bin" >> $GITHUB_PATH 84 | 85 | - name: Install sccache (macos) 86 | if: matrix.os == 'macos-latest' 87 | run: | 88 | brew update 89 | brew install sccache 90 | 91 | - uses: actions-rs/toolchain@v1.0.7 92 | with: 93 | toolchain: stable 94 | profile: minimal 95 | override: true 96 | 97 | - name: Cache cargo registry 98 | uses: actions/cache@v3 99 | continue-on-error: false 100 | with: 101 | path: | 102 | ~/.cargo/registry 103 | ~/.cargo/git 104 | key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} 105 | restore-keys: | 106 | ${{ runner.os }}-cargo- 107 | 108 | - name: Save sccache 109 | uses: actions/cache@v3 110 | continue-on-error: false 111 | with: 112 | path: ${{ matrix.sccache-path }} 113 | key: ${{ runner.os }}-sccache-${{ hashFiles('**/Cargo.lock') }} 114 | restore-keys: | 115 | ${{ runner.os }}-sccache- 116 | 117 | - name: Start sccache server 118 | run: sccache --start-server 119 | 120 | - name: Build 121 | run: | 122 | cargo build --release --locked 123 | strip target/release/blackd-client 124 | mv target/release/blackd-client ${{ matrix.artifact_name }} 125 | 126 | - name: Print sccache stats 127 | run: sccache --show-stats 128 | 129 | - name: Stop sccache server 130 | run: sccache --stop-server || true 131 | 132 | - name: Upload binaries to release 133 | uses: actions/upload-artifact@v3 134 | with: 135 | name: ${{ matrix.asset_name }} 136 | path: ${{ matrix.artifact_name }} 137 | 138 | - name: Set outputs 139 | id: vars 140 | run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" 141 | 142 | - name: Check outputs 143 | run: echo ${{ steps.vars.outputs.sha_short }} 144 | 145 | - name: Create tag 146 | uses: actions/github-script@v6 147 | if: startsWith(github.ref , 'refs/tags/') != true 148 | continue-on-error: true 149 | with: 150 | github-token: ${{secrets.GITHUB_TOKEN}} 151 | script: | 152 | github.git.createRef({ 153 | owner: context.repo.owner, 154 | repo: context.repo.repo, 155 | ref: "refs/tags/${{ steps.vars.outputs.sha_short }}", 156 | sha: context.sha 157 | }) 158 | 159 | - name: Release artifacts commit 160 | uses: softprops/action-gh-release@v1 161 | if: startsWith(github.ref , 'refs/tags/') != true 162 | with: 163 | files: ${{ matrix.artifact_name }} 164 | draft: true 165 | tag_name: ${{ steps.vars.outputs.sha_short }} 166 | env: 167 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 168 | 169 | - name: Release artifacts tag 170 | uses: softprops/action-gh-release@v1 171 | if: startsWith(github.ref, 'refs/tags/') 172 | with: 173 | files: ${{ matrix.artifact_name }} 174 | env: 175 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 176 | 177 | publish: 178 | name: Publish 179 | needs: [build] 180 | if: github.event_name == 'release' && github.event.action == 'created' 181 | runs-on: ubuntu-latest 182 | 183 | steps: 184 | - uses: actions/checkout@v3 185 | with: 186 | fetch-depth: 1 187 | 188 | - name: Publish crate 189 | run: cargo publish 190 | env: 191 | CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_PUBLISH_TOKEN }} 192 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "aho-corasick" 7 | version = "0.7.19" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "b4f55bd91a0978cbfd91c457a164bab8b4001c833b7f323132c0a4e1922dd44e" 10 | dependencies = [ 11 | "memchr", 12 | ] 13 | 14 | [[package]] 15 | name = "ansi_term" 16 | version = "0.12.1" 17 | source = "registry+https://github.com/rust-lang/crates.io-index" 18 | checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" 19 | dependencies = [ 20 | "winapi", 21 | ] 22 | 23 | [[package]] 24 | name = "ascii-canvas" 25 | version = "3.0.0" 26 | source = "registry+https://github.com/rust-lang/crates.io-index" 27 | checksum = "8824ecca2e851cec16968d54a01dd372ef8f95b244fb84b84e70128be347c3c6" 28 | dependencies = [ 29 | "term", 30 | ] 31 | 32 | [[package]] 33 | name = "assert-json-diff" 34 | version = "2.0.2" 35 | source = "registry+https://github.com/rust-lang/crates.io-index" 36 | checksum = "47e4f2b81832e72834d7518d8487a0396a28cc408186a2e8854c0f98011faf12" 37 | dependencies = [ 38 | "serde", 39 | "serde_json", 40 | ] 41 | 42 | [[package]] 43 | name = "async-channel" 44 | version = "1.7.1" 45 | source = "registry+https://github.com/rust-lang/crates.io-index" 46 | checksum = "e14485364214912d3b19cc3435dde4df66065127f05fa0d75c712f36f12c2f28" 47 | dependencies = [ 48 | "concurrent-queue", 49 | "event-listener", 50 | "futures-core", 51 | ] 52 | 53 | [[package]] 54 | name = "async-executor" 55 | version = "1.4.1" 56 | source = "registry+https://github.com/rust-lang/crates.io-index" 57 | checksum = "871f9bb5e0a22eeb7e8cf16641feb87c9dc67032ccf8ff49e772eb9941d3a965" 58 | dependencies = [ 59 | "async-task", 60 | "concurrent-queue", 61 | "fastrand", 62 | "futures-lite", 63 | "once_cell", 64 | "slab", 65 | ] 66 | 67 | [[package]] 68 | name = "async-global-executor" 69 | version = "2.3.0" 70 | source = "registry+https://github.com/rust-lang/crates.io-index" 71 | checksum = "0da5b41ee986eed3f524c380e6d64965aea573882a8907682ad100f7859305ca" 72 | dependencies = [ 73 | "async-channel", 74 | "async-executor", 75 | "async-io", 76 | "async-lock", 77 | "blocking", 78 | "futures-lite", 79 | "once_cell", 80 | ] 81 | 82 | [[package]] 83 | name = "async-io" 84 | version = "1.9.0" 85 | source = "registry+https://github.com/rust-lang/crates.io-index" 86 | checksum = "83e21f3a490c72b3b0cf44962180e60045de2925d8dff97918f7ee43c8f637c7" 87 | dependencies = [ 88 | "autocfg", 89 | "concurrent-queue", 90 | "futures-lite", 91 | "libc", 92 | "log", 93 | "once_cell", 94 | "parking", 95 | "polling", 96 | "slab", 97 | "socket2", 98 | "waker-fn", 99 | "winapi", 100 | ] 101 | 102 | [[package]] 103 | name = "async-lock" 104 | version = "2.6.0" 105 | source = "registry+https://github.com/rust-lang/crates.io-index" 106 | checksum = "c8101efe8695a6c17e02911402145357e718ac92d3ff88ae8419e84b1707b685" 107 | dependencies = [ 108 | "event-listener", 109 | "futures-lite", 110 | ] 111 | 112 | [[package]] 113 | name = "async-object-pool" 114 | version = "0.1.4" 115 | source = "registry+https://github.com/rust-lang/crates.io-index" 116 | checksum = "aeb901c30ebc2fc4ab46395bbfbdba9542c16559d853645d75190c3056caf3bc" 117 | dependencies = [ 118 | "async-std", 119 | ] 120 | 121 | [[package]] 122 | name = "async-process" 123 | version = "1.5.0" 124 | source = "registry+https://github.com/rust-lang/crates.io-index" 125 | checksum = "02111fd8655a613c25069ea89fc8d9bb89331fa77486eb3bc059ee757cfa481c" 126 | dependencies = [ 127 | "async-io", 128 | "autocfg", 129 | "blocking", 130 | "cfg-if", 131 | "event-listener", 132 | "futures-lite", 133 | "libc", 134 | "once_cell", 135 | "signal-hook", 136 | "winapi", 137 | ] 138 | 139 | [[package]] 140 | name = "async-std" 141 | version = "1.12.0" 142 | source = "registry+https://github.com/rust-lang/crates.io-index" 143 | checksum = "62565bb4402e926b29953c785397c6dc0391b7b446e45008b0049eb43cec6f5d" 144 | dependencies = [ 145 | "async-channel", 146 | "async-global-executor", 147 | "async-io", 148 | "async-lock", 149 | "async-process", 150 | "crossbeam-utils", 151 | "futures-channel", 152 | "futures-core", 153 | "futures-io", 154 | "futures-lite", 155 | "gloo-timers", 156 | "kv-log-macro", 157 | "log", 158 | "memchr", 159 | "once_cell", 160 | "pin-project-lite", 161 | "pin-utils", 162 | "slab", 163 | "wasm-bindgen-futures", 164 | ] 165 | 166 | [[package]] 167 | name = "async-task" 168 | version = "4.3.0" 169 | source = "registry+https://github.com/rust-lang/crates.io-index" 170 | checksum = "7a40729d2133846d9ed0ea60a8b9541bccddab49cd30f0715a1da672fe9a2524" 171 | 172 | [[package]] 173 | name = "async-trait" 174 | version = "0.1.58" 175 | source = "registry+https://github.com/rust-lang/crates.io-index" 176 | checksum = "1e805d94e6b5001b651426cf4cd446b1ab5f319d27bab5c644f61de0a804360c" 177 | dependencies = [ 178 | "proc-macro2", 179 | "quote", 180 | "syn", 181 | ] 182 | 183 | [[package]] 184 | name = "atomic-waker" 185 | version = "1.0.0" 186 | source = "registry+https://github.com/rust-lang/crates.io-index" 187 | checksum = "065374052e7df7ee4047b1160cca5e1467a12351a40b3da123c870ba0b8eda2a" 188 | 189 | [[package]] 190 | name = "atty" 191 | version = "0.2.14" 192 | source = "registry+https://github.com/rust-lang/crates.io-index" 193 | checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" 194 | dependencies = [ 195 | "hermit-abi", 196 | "libc", 197 | "winapi", 198 | ] 199 | 200 | [[package]] 201 | name = "autocfg" 202 | version = "1.1.0" 203 | source = "registry+https://github.com/rust-lang/crates.io-index" 204 | checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" 205 | 206 | [[package]] 207 | name = "base64" 208 | version = "0.13.1" 209 | source = "registry+https://github.com/rust-lang/crates.io-index" 210 | checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" 211 | 212 | [[package]] 213 | name = "basic-cookies" 214 | version = "0.1.4" 215 | source = "registry+https://github.com/rust-lang/crates.io-index" 216 | checksum = "cb53b6b315f924c7f113b162e53b3901c05fc9966baf84d201dfcc7432a4bb38" 217 | dependencies = [ 218 | "lalrpop", 219 | "lalrpop-util", 220 | "regex", 221 | ] 222 | 223 | [[package]] 224 | name = "bit-set" 225 | version = "0.5.3" 226 | source = "registry+https://github.com/rust-lang/crates.io-index" 227 | checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" 228 | dependencies = [ 229 | "bit-vec", 230 | ] 231 | 232 | [[package]] 233 | name = "bit-vec" 234 | version = "0.6.3" 235 | source = "registry+https://github.com/rust-lang/crates.io-index" 236 | checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" 237 | 238 | [[package]] 239 | name = "bitflags" 240 | version = "1.3.2" 241 | source = "registry+https://github.com/rust-lang/crates.io-index" 242 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 243 | 244 | [[package]] 245 | name = "blackd-client" 246 | version = "0.1.0" 247 | dependencies = [ 248 | "custom_error", 249 | "httpmock", 250 | "minreq", 251 | "pico-args", 252 | "pretty_assertions", 253 | ] 254 | 255 | [[package]] 256 | name = "blocking" 257 | version = "1.2.0" 258 | source = "registry+https://github.com/rust-lang/crates.io-index" 259 | checksum = "c6ccb65d468978a086b69884437ded69a90faab3bbe6e67f242173ea728acccc" 260 | dependencies = [ 261 | "async-channel", 262 | "async-task", 263 | "atomic-waker", 264 | "fastrand", 265 | "futures-lite", 266 | "once_cell", 267 | ] 268 | 269 | [[package]] 270 | name = "bumpalo" 271 | version = "3.11.1" 272 | source = "registry+https://github.com/rust-lang/crates.io-index" 273 | checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" 274 | 275 | [[package]] 276 | name = "bytes" 277 | version = "1.2.1" 278 | source = "registry+https://github.com/rust-lang/crates.io-index" 279 | checksum = "ec8a7b6a70fde80372154c65702f00a0f56f3e1c36abbc6c440484be248856db" 280 | 281 | [[package]] 282 | name = "cache-padded" 283 | version = "1.2.0" 284 | source = "registry+https://github.com/rust-lang/crates.io-index" 285 | checksum = "c1db59621ec70f09c5e9b597b220c7a2b43611f4710dc03ceb8748637775692c" 286 | 287 | [[package]] 288 | name = "castaway" 289 | version = "0.1.2" 290 | source = "registry+https://github.com/rust-lang/crates.io-index" 291 | checksum = "a2698f953def977c68f935bb0dfa959375ad4638570e969e2f1e9f433cbf1af6" 292 | 293 | [[package]] 294 | name = "cc" 295 | version = "1.0.73" 296 | source = "registry+https://github.com/rust-lang/crates.io-index" 297 | checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" 298 | 299 | [[package]] 300 | name = "cfg-if" 301 | version = "1.0.0" 302 | source = "registry+https://github.com/rust-lang/crates.io-index" 303 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 304 | 305 | [[package]] 306 | name = "concurrent-queue" 307 | version = "1.2.4" 308 | source = "registry+https://github.com/rust-lang/crates.io-index" 309 | checksum = "af4780a44ab5696ea9e28294517f1fffb421a83a25af521333c838635509db9c" 310 | dependencies = [ 311 | "cache-padded", 312 | ] 313 | 314 | [[package]] 315 | name = "crossbeam-utils" 316 | version = "0.8.12" 317 | source = "registry+https://github.com/rust-lang/crates.io-index" 318 | checksum = "edbafec5fa1f196ca66527c1b12c2ec4745ca14b50f1ad8f9f6f720b55d11fac" 319 | dependencies = [ 320 | "cfg-if", 321 | ] 322 | 323 | [[package]] 324 | name = "crunchy" 325 | version = "0.2.2" 326 | source = "registry+https://github.com/rust-lang/crates.io-index" 327 | checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" 328 | 329 | [[package]] 330 | name = "ctor" 331 | version = "0.1.26" 332 | source = "registry+https://github.com/rust-lang/crates.io-index" 333 | checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096" 334 | dependencies = [ 335 | "quote", 336 | "syn", 337 | ] 338 | 339 | [[package]] 340 | name = "curl" 341 | version = "0.4.44" 342 | source = "registry+https://github.com/rust-lang/crates.io-index" 343 | checksum = "509bd11746c7ac09ebd19f0b17782eae80aadee26237658a6b4808afb5c11a22" 344 | dependencies = [ 345 | "curl-sys", 346 | "libc", 347 | "openssl-probe", 348 | "openssl-sys", 349 | "schannel", 350 | "socket2", 351 | "winapi", 352 | ] 353 | 354 | [[package]] 355 | name = "curl-sys" 356 | version = "0.4.56+curl-7.83.1" 357 | source = "registry+https://github.com/rust-lang/crates.io-index" 358 | checksum = "6093e169dd4de29e468fa649fbae11cdcd5551c81fe5bf1b0677adad7ef3d26f" 359 | dependencies = [ 360 | "cc", 361 | "libc", 362 | "libnghttp2-sys", 363 | "libz-sys", 364 | "openssl-sys", 365 | "pkg-config", 366 | "vcpkg", 367 | "winapi", 368 | ] 369 | 370 | [[package]] 371 | name = "custom_error" 372 | version = "1.9.2" 373 | source = "registry+https://github.com/rust-lang/crates.io-index" 374 | checksum = "4f8a51dd197fa6ba5b4dc98a990a43cc13693c23eb0089ebb0fcc1f04152bca6" 375 | 376 | [[package]] 377 | name = "diff" 378 | version = "0.1.13" 379 | source = "registry+https://github.com/rust-lang/crates.io-index" 380 | checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" 381 | 382 | [[package]] 383 | name = "difference" 384 | version = "2.0.0" 385 | source = "registry+https://github.com/rust-lang/crates.io-index" 386 | checksum = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" 387 | 388 | [[package]] 389 | name = "dirs-next" 390 | version = "2.0.0" 391 | source = "registry+https://github.com/rust-lang/crates.io-index" 392 | checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" 393 | dependencies = [ 394 | "cfg-if", 395 | "dirs-sys-next", 396 | ] 397 | 398 | [[package]] 399 | name = "dirs-sys-next" 400 | version = "0.1.2" 401 | source = "registry+https://github.com/rust-lang/crates.io-index" 402 | checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" 403 | dependencies = [ 404 | "libc", 405 | "redox_users", 406 | "winapi", 407 | ] 408 | 409 | [[package]] 410 | name = "either" 411 | version = "1.8.0" 412 | source = "registry+https://github.com/rust-lang/crates.io-index" 413 | checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" 414 | 415 | [[package]] 416 | name = "ena" 417 | version = "0.14.0" 418 | source = "registry+https://github.com/rust-lang/crates.io-index" 419 | checksum = "d7402b94a93c24e742487327a7cd839dc9d36fec9de9fb25b09f2dae459f36c3" 420 | dependencies = [ 421 | "log", 422 | ] 423 | 424 | [[package]] 425 | name = "encoding_rs" 426 | version = "0.8.31" 427 | source = "registry+https://github.com/rust-lang/crates.io-index" 428 | checksum = "9852635589dc9f9ea1b6fe9f05b50ef208c85c834a562f0c6abb1c475736ec2b" 429 | dependencies = [ 430 | "cfg-if", 431 | ] 432 | 433 | [[package]] 434 | name = "event-listener" 435 | version = "2.5.3" 436 | source = "registry+https://github.com/rust-lang/crates.io-index" 437 | checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" 438 | 439 | [[package]] 440 | name = "fastrand" 441 | version = "1.8.0" 442 | source = "registry+https://github.com/rust-lang/crates.io-index" 443 | checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" 444 | dependencies = [ 445 | "instant", 446 | ] 447 | 448 | [[package]] 449 | name = "fixedbitset" 450 | version = "0.4.2" 451 | source = "registry+https://github.com/rust-lang/crates.io-index" 452 | checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" 453 | 454 | [[package]] 455 | name = "fnv" 456 | version = "1.0.7" 457 | source = "registry+https://github.com/rust-lang/crates.io-index" 458 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 459 | 460 | [[package]] 461 | name = "form_urlencoded" 462 | version = "1.1.0" 463 | source = "registry+https://github.com/rust-lang/crates.io-index" 464 | checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" 465 | dependencies = [ 466 | "percent-encoding", 467 | ] 468 | 469 | [[package]] 470 | name = "futures-channel" 471 | version = "0.3.25" 472 | source = "registry+https://github.com/rust-lang/crates.io-index" 473 | checksum = "52ba265a92256105f45b719605a571ffe2d1f0fea3807304b522c1d778f79eed" 474 | dependencies = [ 475 | "futures-core", 476 | ] 477 | 478 | [[package]] 479 | name = "futures-core" 480 | version = "0.3.25" 481 | source = "registry+https://github.com/rust-lang/crates.io-index" 482 | checksum = "04909a7a7e4633ae6c4a9ab280aeb86da1236243a77b694a49eacd659a4bd3ac" 483 | 484 | [[package]] 485 | name = "futures-io" 486 | version = "0.3.25" 487 | source = "registry+https://github.com/rust-lang/crates.io-index" 488 | checksum = "00f5fb52a06bdcadeb54e8d3671f8888a39697dcb0b81b23b55174030427f4eb" 489 | 490 | [[package]] 491 | name = "futures-lite" 492 | version = "1.12.0" 493 | source = "registry+https://github.com/rust-lang/crates.io-index" 494 | checksum = "7694489acd39452c77daa48516b894c153f192c3578d5a839b62c58099fcbf48" 495 | dependencies = [ 496 | "fastrand", 497 | "futures-core", 498 | "futures-io", 499 | "memchr", 500 | "parking", 501 | "pin-project-lite", 502 | "waker-fn", 503 | ] 504 | 505 | [[package]] 506 | name = "futures-macro" 507 | version = "0.3.25" 508 | source = "registry+https://github.com/rust-lang/crates.io-index" 509 | checksum = "bdfb8ce053d86b91919aad980c220b1fb8401a9394410e1c289ed7e66b61835d" 510 | dependencies = [ 511 | "proc-macro2", 512 | "quote", 513 | "syn", 514 | ] 515 | 516 | [[package]] 517 | name = "futures-task" 518 | version = "0.3.25" 519 | source = "registry+https://github.com/rust-lang/crates.io-index" 520 | checksum = "2ffb393ac5d9a6eaa9d3fdf37ae2776656b706e200c8e16b1bdb227f5198e6ea" 521 | 522 | [[package]] 523 | name = "futures-util" 524 | version = "0.3.25" 525 | source = "registry+https://github.com/rust-lang/crates.io-index" 526 | checksum = "197676987abd2f9cadff84926f410af1c183608d36641465df73ae8211dc65d6" 527 | dependencies = [ 528 | "futures-core", 529 | "futures-macro", 530 | "futures-task", 531 | "pin-project-lite", 532 | "pin-utils", 533 | "slab", 534 | ] 535 | 536 | [[package]] 537 | name = "getrandom" 538 | version = "0.2.8" 539 | source = "registry+https://github.com/rust-lang/crates.io-index" 540 | checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" 541 | dependencies = [ 542 | "cfg-if", 543 | "libc", 544 | "wasi", 545 | ] 546 | 547 | [[package]] 548 | name = "gloo-timers" 549 | version = "0.2.4" 550 | source = "registry+https://github.com/rust-lang/crates.io-index" 551 | checksum = "5fb7d06c1c8cc2a29bee7ec961009a0b2caa0793ee4900c2ffb348734ba1c8f9" 552 | dependencies = [ 553 | "futures-channel", 554 | "futures-core", 555 | "js-sys", 556 | "wasm-bindgen", 557 | ] 558 | 559 | [[package]] 560 | name = "hashbrown" 561 | version = "0.12.3" 562 | source = "registry+https://github.com/rust-lang/crates.io-index" 563 | checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" 564 | 565 | [[package]] 566 | name = "hermit-abi" 567 | version = "0.1.19" 568 | source = "registry+https://github.com/rust-lang/crates.io-index" 569 | checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" 570 | dependencies = [ 571 | "libc", 572 | ] 573 | 574 | [[package]] 575 | name = "http" 576 | version = "0.2.8" 577 | source = "registry+https://github.com/rust-lang/crates.io-index" 578 | checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" 579 | dependencies = [ 580 | "bytes", 581 | "fnv", 582 | "itoa", 583 | ] 584 | 585 | [[package]] 586 | name = "http-body" 587 | version = "0.4.5" 588 | source = "registry+https://github.com/rust-lang/crates.io-index" 589 | checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" 590 | dependencies = [ 591 | "bytes", 592 | "http", 593 | "pin-project-lite", 594 | ] 595 | 596 | [[package]] 597 | name = "httparse" 598 | version = "1.8.0" 599 | source = "registry+https://github.com/rust-lang/crates.io-index" 600 | checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" 601 | 602 | [[package]] 603 | name = "httpdate" 604 | version = "1.0.2" 605 | source = "registry+https://github.com/rust-lang/crates.io-index" 606 | checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" 607 | 608 | [[package]] 609 | name = "httpmock" 610 | version = "0.5.8" 611 | source = "registry+https://github.com/rust-lang/crates.io-index" 612 | checksum = "b217899bcbe8ad3bdee7a46727bd3754b908831462755567852fb20eac585d46" 613 | dependencies = [ 614 | "assert-json-diff", 615 | "async-object-pool", 616 | "async-trait", 617 | "base64", 618 | "basic-cookies", 619 | "crossbeam-utils", 620 | "difference", 621 | "futures-util", 622 | "hyper", 623 | "isahc", 624 | "lazy_static", 625 | "levenshtein", 626 | "log", 627 | "qstring", 628 | "regex", 629 | "serde", 630 | "serde_json", 631 | "serde_regex", 632 | "tokio", 633 | ] 634 | 635 | [[package]] 636 | name = "hyper" 637 | version = "0.14.20" 638 | source = "registry+https://github.com/rust-lang/crates.io-index" 639 | checksum = "02c929dc5c39e335a03c405292728118860721b10190d98c2a0f0efd5baafbac" 640 | dependencies = [ 641 | "bytes", 642 | "futures-channel", 643 | "futures-core", 644 | "futures-util", 645 | "http", 646 | "http-body", 647 | "httparse", 648 | "httpdate", 649 | "itoa", 650 | "pin-project-lite", 651 | "socket2", 652 | "tokio", 653 | "tower-service", 654 | "tracing", 655 | "want", 656 | ] 657 | 658 | [[package]] 659 | name = "idna" 660 | version = "0.3.0" 661 | source = "registry+https://github.com/rust-lang/crates.io-index" 662 | checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" 663 | dependencies = [ 664 | "unicode-bidi", 665 | "unicode-normalization", 666 | ] 667 | 668 | [[package]] 669 | name = "indexmap" 670 | version = "1.9.1" 671 | source = "registry+https://github.com/rust-lang/crates.io-index" 672 | checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" 673 | dependencies = [ 674 | "autocfg", 675 | "hashbrown", 676 | ] 677 | 678 | [[package]] 679 | name = "instant" 680 | version = "0.1.12" 681 | source = "registry+https://github.com/rust-lang/crates.io-index" 682 | checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" 683 | dependencies = [ 684 | "cfg-if", 685 | ] 686 | 687 | [[package]] 688 | name = "isahc" 689 | version = "1.7.2" 690 | source = "registry+https://github.com/rust-lang/crates.io-index" 691 | checksum = "334e04b4d781f436dc315cb1e7515bd96826426345d498149e4bde36b67f8ee9" 692 | dependencies = [ 693 | "async-channel", 694 | "castaway", 695 | "crossbeam-utils", 696 | "curl", 697 | "curl-sys", 698 | "encoding_rs", 699 | "event-listener", 700 | "futures-lite", 701 | "http", 702 | "log", 703 | "mime", 704 | "once_cell", 705 | "polling", 706 | "slab", 707 | "sluice", 708 | "tracing", 709 | "tracing-futures", 710 | "url", 711 | "waker-fn", 712 | ] 713 | 714 | [[package]] 715 | name = "itertools" 716 | version = "0.10.5" 717 | source = "registry+https://github.com/rust-lang/crates.io-index" 718 | checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" 719 | dependencies = [ 720 | "either", 721 | ] 722 | 723 | [[package]] 724 | name = "itoa" 725 | version = "1.0.4" 726 | source = "registry+https://github.com/rust-lang/crates.io-index" 727 | checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc" 728 | 729 | [[package]] 730 | name = "js-sys" 731 | version = "0.3.60" 732 | source = "registry+https://github.com/rust-lang/crates.io-index" 733 | checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" 734 | dependencies = [ 735 | "wasm-bindgen", 736 | ] 737 | 738 | [[package]] 739 | name = "kv-log-macro" 740 | version = "1.0.7" 741 | source = "registry+https://github.com/rust-lang/crates.io-index" 742 | checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f" 743 | dependencies = [ 744 | "log", 745 | ] 746 | 747 | [[package]] 748 | name = "lalrpop" 749 | version = "0.19.8" 750 | source = "registry+https://github.com/rust-lang/crates.io-index" 751 | checksum = "b30455341b0e18f276fa64540aff54deafb54c589de6aca68659c63dd2d5d823" 752 | dependencies = [ 753 | "ascii-canvas", 754 | "atty", 755 | "bit-set", 756 | "diff", 757 | "ena", 758 | "itertools", 759 | "lalrpop-util", 760 | "petgraph", 761 | "pico-args", 762 | "regex", 763 | "regex-syntax", 764 | "string_cache", 765 | "term", 766 | "tiny-keccak", 767 | "unicode-xid", 768 | ] 769 | 770 | [[package]] 771 | name = "lalrpop-util" 772 | version = "0.19.8" 773 | source = "registry+https://github.com/rust-lang/crates.io-index" 774 | checksum = "bcf796c978e9b4d983414f4caedc9273aa33ee214c5b887bd55fde84c85d2dc4" 775 | dependencies = [ 776 | "regex", 777 | ] 778 | 779 | [[package]] 780 | name = "lazy_static" 781 | version = "1.4.0" 782 | source = "registry+https://github.com/rust-lang/crates.io-index" 783 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 784 | 785 | [[package]] 786 | name = "levenshtein" 787 | version = "1.0.5" 788 | source = "registry+https://github.com/rust-lang/crates.io-index" 789 | checksum = "db13adb97ab515a3691f56e4dbab09283d0b86cb45abd991d8634a9d6f501760" 790 | 791 | [[package]] 792 | name = "libc" 793 | version = "0.2.137" 794 | source = "registry+https://github.com/rust-lang/crates.io-index" 795 | checksum = "fc7fcc620a3bff7cdd7a365be3376c97191aeaccc2a603e600951e452615bf89" 796 | 797 | [[package]] 798 | name = "libnghttp2-sys" 799 | version = "0.1.7+1.45.0" 800 | source = "registry+https://github.com/rust-lang/crates.io-index" 801 | checksum = "57ed28aba195b38d5ff02b9170cbff627e336a20925e43b4945390401c5dc93f" 802 | dependencies = [ 803 | "cc", 804 | "libc", 805 | ] 806 | 807 | [[package]] 808 | name = "libz-sys" 809 | version = "1.1.8" 810 | source = "registry+https://github.com/rust-lang/crates.io-index" 811 | checksum = "9702761c3935f8cc2f101793272e202c72b99da8f4224a19ddcf1279a6450bbf" 812 | dependencies = [ 813 | "cc", 814 | "libc", 815 | "pkg-config", 816 | "vcpkg", 817 | ] 818 | 819 | [[package]] 820 | name = "lock_api" 821 | version = "0.4.9" 822 | source = "registry+https://github.com/rust-lang/crates.io-index" 823 | checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" 824 | dependencies = [ 825 | "autocfg", 826 | "scopeguard", 827 | ] 828 | 829 | [[package]] 830 | name = "log" 831 | version = "0.4.17" 832 | source = "registry+https://github.com/rust-lang/crates.io-index" 833 | checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" 834 | dependencies = [ 835 | "cfg-if", 836 | "value-bag", 837 | ] 838 | 839 | [[package]] 840 | name = "memchr" 841 | version = "2.5.0" 842 | source = "registry+https://github.com/rust-lang/crates.io-index" 843 | checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" 844 | 845 | [[package]] 846 | name = "mime" 847 | version = "0.3.16" 848 | source = "registry+https://github.com/rust-lang/crates.io-index" 849 | checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" 850 | 851 | [[package]] 852 | name = "minreq" 853 | version = "2.6.0" 854 | source = "registry+https://github.com/rust-lang/crates.io-index" 855 | checksum = "4c785bc6027fd359756e538541c8624012ba3776d3d3fe123885643092ed4132" 856 | dependencies = [ 857 | "log", 858 | ] 859 | 860 | [[package]] 861 | name = "mio" 862 | version = "0.8.5" 863 | source = "registry+https://github.com/rust-lang/crates.io-index" 864 | checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" 865 | dependencies = [ 866 | "libc", 867 | "log", 868 | "wasi", 869 | "windows-sys 0.42.0", 870 | ] 871 | 872 | [[package]] 873 | name = "new_debug_unreachable" 874 | version = "1.0.4" 875 | source = "registry+https://github.com/rust-lang/crates.io-index" 876 | checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" 877 | 878 | [[package]] 879 | name = "num_cpus" 880 | version = "1.13.1" 881 | source = "registry+https://github.com/rust-lang/crates.io-index" 882 | checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" 883 | dependencies = [ 884 | "hermit-abi", 885 | "libc", 886 | ] 887 | 888 | [[package]] 889 | name = "once_cell" 890 | version = "1.15.0" 891 | source = "registry+https://github.com/rust-lang/crates.io-index" 892 | checksum = "e82dad04139b71a90c080c8463fe0dc7902db5192d939bd0950f074d014339e1" 893 | 894 | [[package]] 895 | name = "openssl-probe" 896 | version = "0.1.5" 897 | source = "registry+https://github.com/rust-lang/crates.io-index" 898 | checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" 899 | 900 | [[package]] 901 | name = "openssl-sys" 902 | version = "0.9.77" 903 | source = "registry+https://github.com/rust-lang/crates.io-index" 904 | checksum = "b03b84c3b2d099b81f0953422b4d4ad58761589d0229b5506356afca05a3670a" 905 | dependencies = [ 906 | "autocfg", 907 | "cc", 908 | "libc", 909 | "pkg-config", 910 | "vcpkg", 911 | ] 912 | 913 | [[package]] 914 | name = "output_vt100" 915 | version = "0.1.3" 916 | source = "registry+https://github.com/rust-lang/crates.io-index" 917 | checksum = "628223faebab4e3e40667ee0b2336d34a5b960ff60ea743ddfdbcf7770bcfb66" 918 | dependencies = [ 919 | "winapi", 920 | ] 921 | 922 | [[package]] 923 | name = "parking" 924 | version = "2.0.0" 925 | source = "registry+https://github.com/rust-lang/crates.io-index" 926 | checksum = "427c3892f9e783d91cc128285287e70a59e206ca452770ece88a76f7a3eddd72" 927 | 928 | [[package]] 929 | name = "parking_lot" 930 | version = "0.12.1" 931 | source = "registry+https://github.com/rust-lang/crates.io-index" 932 | checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" 933 | dependencies = [ 934 | "lock_api", 935 | "parking_lot_core", 936 | ] 937 | 938 | [[package]] 939 | name = "parking_lot_core" 940 | version = "0.9.4" 941 | source = "registry+https://github.com/rust-lang/crates.io-index" 942 | checksum = "4dc9e0dc2adc1c69d09143aff38d3d30c5c3f0df0dad82e6d25547af174ebec0" 943 | dependencies = [ 944 | "cfg-if", 945 | "libc", 946 | "redox_syscall", 947 | "smallvec", 948 | "windows-sys 0.42.0", 949 | ] 950 | 951 | [[package]] 952 | name = "percent-encoding" 953 | version = "2.2.0" 954 | source = "registry+https://github.com/rust-lang/crates.io-index" 955 | checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" 956 | 957 | [[package]] 958 | name = "petgraph" 959 | version = "0.6.2" 960 | source = "registry+https://github.com/rust-lang/crates.io-index" 961 | checksum = "e6d5014253a1331579ce62aa67443b4a658c5e7dd03d4bc6d302b94474888143" 962 | dependencies = [ 963 | "fixedbitset", 964 | "indexmap", 965 | ] 966 | 967 | [[package]] 968 | name = "phf_shared" 969 | version = "0.10.0" 970 | source = "registry+https://github.com/rust-lang/crates.io-index" 971 | checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" 972 | dependencies = [ 973 | "siphasher", 974 | ] 975 | 976 | [[package]] 977 | name = "pico-args" 978 | version = "0.4.2" 979 | source = "registry+https://github.com/rust-lang/crates.io-index" 980 | checksum = "db8bcd96cb740d03149cbad5518db9fd87126a10ab519c011893b1754134c468" 981 | 982 | [[package]] 983 | name = "pin-project" 984 | version = "1.0.12" 985 | source = "registry+https://github.com/rust-lang/crates.io-index" 986 | checksum = "ad29a609b6bcd67fee905812e544992d216af9d755757c05ed2d0e15a74c6ecc" 987 | dependencies = [ 988 | "pin-project-internal", 989 | ] 990 | 991 | [[package]] 992 | name = "pin-project-internal" 993 | version = "1.0.12" 994 | source = "registry+https://github.com/rust-lang/crates.io-index" 995 | checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" 996 | dependencies = [ 997 | "proc-macro2", 998 | "quote", 999 | "syn", 1000 | ] 1001 | 1002 | [[package]] 1003 | name = "pin-project-lite" 1004 | version = "0.2.9" 1005 | source = "registry+https://github.com/rust-lang/crates.io-index" 1006 | checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" 1007 | 1008 | [[package]] 1009 | name = "pin-utils" 1010 | version = "0.1.0" 1011 | source = "registry+https://github.com/rust-lang/crates.io-index" 1012 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 1013 | 1014 | [[package]] 1015 | name = "pkg-config" 1016 | version = "0.3.26" 1017 | source = "registry+https://github.com/rust-lang/crates.io-index" 1018 | checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" 1019 | 1020 | [[package]] 1021 | name = "polling" 1022 | version = "2.4.0" 1023 | source = "registry+https://github.com/rust-lang/crates.io-index" 1024 | checksum = "ab4609a838d88b73d8238967b60dd115cc08d38e2bbaf51ee1e4b695f89122e2" 1025 | dependencies = [ 1026 | "autocfg", 1027 | "cfg-if", 1028 | "libc", 1029 | "log", 1030 | "wepoll-ffi", 1031 | "winapi", 1032 | ] 1033 | 1034 | [[package]] 1035 | name = "precomputed-hash" 1036 | version = "0.1.1" 1037 | source = "registry+https://github.com/rust-lang/crates.io-index" 1038 | checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" 1039 | 1040 | [[package]] 1041 | name = "pretty_assertions" 1042 | version = "0.7.2" 1043 | source = "registry+https://github.com/rust-lang/crates.io-index" 1044 | checksum = "1cab0e7c02cf376875e9335e0ba1da535775beb5450d21e1dffca068818ed98b" 1045 | dependencies = [ 1046 | "ansi_term", 1047 | "ctor", 1048 | "diff", 1049 | "output_vt100", 1050 | ] 1051 | 1052 | [[package]] 1053 | name = "proc-macro2" 1054 | version = "1.0.47" 1055 | source = "registry+https://github.com/rust-lang/crates.io-index" 1056 | checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" 1057 | dependencies = [ 1058 | "unicode-ident", 1059 | ] 1060 | 1061 | [[package]] 1062 | name = "qstring" 1063 | version = "0.7.2" 1064 | source = "registry+https://github.com/rust-lang/crates.io-index" 1065 | checksum = "d464fae65fff2680baf48019211ce37aaec0c78e9264c84a3e484717f965104e" 1066 | dependencies = [ 1067 | "percent-encoding", 1068 | ] 1069 | 1070 | [[package]] 1071 | name = "quote" 1072 | version = "1.0.21" 1073 | source = "registry+https://github.com/rust-lang/crates.io-index" 1074 | checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" 1075 | dependencies = [ 1076 | "proc-macro2", 1077 | ] 1078 | 1079 | [[package]] 1080 | name = "redox_syscall" 1081 | version = "0.2.16" 1082 | source = "registry+https://github.com/rust-lang/crates.io-index" 1083 | checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" 1084 | dependencies = [ 1085 | "bitflags", 1086 | ] 1087 | 1088 | [[package]] 1089 | name = "redox_users" 1090 | version = "0.4.3" 1091 | source = "registry+https://github.com/rust-lang/crates.io-index" 1092 | checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" 1093 | dependencies = [ 1094 | "getrandom", 1095 | "redox_syscall", 1096 | "thiserror", 1097 | ] 1098 | 1099 | [[package]] 1100 | name = "regex" 1101 | version = "1.6.0" 1102 | source = "registry+https://github.com/rust-lang/crates.io-index" 1103 | checksum = "4c4eb3267174b8c6c2f654116623910a0fef09c4753f8dd83db29c48a0df988b" 1104 | dependencies = [ 1105 | "aho-corasick", 1106 | "memchr", 1107 | "regex-syntax", 1108 | ] 1109 | 1110 | [[package]] 1111 | name = "regex-syntax" 1112 | version = "0.6.27" 1113 | source = "registry+https://github.com/rust-lang/crates.io-index" 1114 | checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244" 1115 | 1116 | [[package]] 1117 | name = "rustversion" 1118 | version = "1.0.9" 1119 | source = "registry+https://github.com/rust-lang/crates.io-index" 1120 | checksum = "97477e48b4cf8603ad5f7aaf897467cf42ab4218a38ef76fb14c2d6773a6d6a8" 1121 | 1122 | [[package]] 1123 | name = "ryu" 1124 | version = "1.0.11" 1125 | source = "registry+https://github.com/rust-lang/crates.io-index" 1126 | checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" 1127 | 1128 | [[package]] 1129 | name = "schannel" 1130 | version = "0.1.20" 1131 | source = "registry+https://github.com/rust-lang/crates.io-index" 1132 | checksum = "88d6731146462ea25d9244b2ed5fd1d716d25c52e4d54aa4fb0f3c4e9854dbe2" 1133 | dependencies = [ 1134 | "lazy_static", 1135 | "windows-sys 0.36.1", 1136 | ] 1137 | 1138 | [[package]] 1139 | name = "scopeguard" 1140 | version = "1.1.0" 1141 | source = "registry+https://github.com/rust-lang/crates.io-index" 1142 | checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" 1143 | 1144 | [[package]] 1145 | name = "serde" 1146 | version = "1.0.147" 1147 | source = "registry+https://github.com/rust-lang/crates.io-index" 1148 | checksum = "d193d69bae983fc11a79df82342761dfbf28a99fc8d203dca4c3c1b590948965" 1149 | dependencies = [ 1150 | "serde_derive", 1151 | ] 1152 | 1153 | [[package]] 1154 | name = "serde_derive" 1155 | version = "1.0.147" 1156 | source = "registry+https://github.com/rust-lang/crates.io-index" 1157 | checksum = "4f1d362ca8fc9c3e3a7484440752472d68a6caa98f1ab81d99b5dfe517cec852" 1158 | dependencies = [ 1159 | "proc-macro2", 1160 | "quote", 1161 | "syn", 1162 | ] 1163 | 1164 | [[package]] 1165 | name = "serde_json" 1166 | version = "1.0.87" 1167 | source = "registry+https://github.com/rust-lang/crates.io-index" 1168 | checksum = "6ce777b7b150d76b9cf60d28b55f5847135a003f7d7350c6be7a773508ce7d45" 1169 | dependencies = [ 1170 | "itoa", 1171 | "ryu", 1172 | "serde", 1173 | ] 1174 | 1175 | [[package]] 1176 | name = "serde_regex" 1177 | version = "1.1.0" 1178 | source = "registry+https://github.com/rust-lang/crates.io-index" 1179 | checksum = "a8136f1a4ea815d7eac4101cfd0b16dc0cb5e1fe1b8609dfd728058656b7badf" 1180 | dependencies = [ 1181 | "regex", 1182 | "serde", 1183 | ] 1184 | 1185 | [[package]] 1186 | name = "signal-hook" 1187 | version = "0.3.14" 1188 | source = "registry+https://github.com/rust-lang/crates.io-index" 1189 | checksum = "a253b5e89e2698464fc26b545c9edceb338e18a89effeeecfea192c3025be29d" 1190 | dependencies = [ 1191 | "libc", 1192 | "signal-hook-registry", 1193 | ] 1194 | 1195 | [[package]] 1196 | name = "signal-hook-registry" 1197 | version = "1.4.0" 1198 | source = "registry+https://github.com/rust-lang/crates.io-index" 1199 | checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0" 1200 | dependencies = [ 1201 | "libc", 1202 | ] 1203 | 1204 | [[package]] 1205 | name = "siphasher" 1206 | version = "0.3.10" 1207 | source = "registry+https://github.com/rust-lang/crates.io-index" 1208 | checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" 1209 | 1210 | [[package]] 1211 | name = "slab" 1212 | version = "0.4.7" 1213 | source = "registry+https://github.com/rust-lang/crates.io-index" 1214 | checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" 1215 | dependencies = [ 1216 | "autocfg", 1217 | ] 1218 | 1219 | [[package]] 1220 | name = "sluice" 1221 | version = "0.5.5" 1222 | source = "registry+https://github.com/rust-lang/crates.io-index" 1223 | checksum = "6d7400c0eff44aa2fcb5e31a5f24ba9716ed90138769e4977a2ba6014ae63eb5" 1224 | dependencies = [ 1225 | "async-channel", 1226 | "futures-core", 1227 | "futures-io", 1228 | ] 1229 | 1230 | [[package]] 1231 | name = "smallvec" 1232 | version = "1.10.0" 1233 | source = "registry+https://github.com/rust-lang/crates.io-index" 1234 | checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" 1235 | 1236 | [[package]] 1237 | name = "socket2" 1238 | version = "0.4.7" 1239 | source = "registry+https://github.com/rust-lang/crates.io-index" 1240 | checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" 1241 | dependencies = [ 1242 | "libc", 1243 | "winapi", 1244 | ] 1245 | 1246 | [[package]] 1247 | name = "string_cache" 1248 | version = "0.8.4" 1249 | source = "registry+https://github.com/rust-lang/crates.io-index" 1250 | checksum = "213494b7a2b503146286049378ce02b482200519accc31872ee8be91fa820a08" 1251 | dependencies = [ 1252 | "new_debug_unreachable", 1253 | "once_cell", 1254 | "parking_lot", 1255 | "phf_shared", 1256 | "precomputed-hash", 1257 | ] 1258 | 1259 | [[package]] 1260 | name = "syn" 1261 | version = "1.0.103" 1262 | source = "registry+https://github.com/rust-lang/crates.io-index" 1263 | checksum = "a864042229133ada95abf3b54fdc62ef5ccabe9515b64717bcb9a1919e59445d" 1264 | dependencies = [ 1265 | "proc-macro2", 1266 | "quote", 1267 | "unicode-ident", 1268 | ] 1269 | 1270 | [[package]] 1271 | name = "term" 1272 | version = "0.7.0" 1273 | source = "registry+https://github.com/rust-lang/crates.io-index" 1274 | checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f" 1275 | dependencies = [ 1276 | "dirs-next", 1277 | "rustversion", 1278 | "winapi", 1279 | ] 1280 | 1281 | [[package]] 1282 | name = "thiserror" 1283 | version = "1.0.37" 1284 | source = "registry+https://github.com/rust-lang/crates.io-index" 1285 | checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e" 1286 | dependencies = [ 1287 | "thiserror-impl", 1288 | ] 1289 | 1290 | [[package]] 1291 | name = "thiserror-impl" 1292 | version = "1.0.37" 1293 | source = "registry+https://github.com/rust-lang/crates.io-index" 1294 | checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb" 1295 | dependencies = [ 1296 | "proc-macro2", 1297 | "quote", 1298 | "syn", 1299 | ] 1300 | 1301 | [[package]] 1302 | name = "tiny-keccak" 1303 | version = "2.0.2" 1304 | source = "registry+https://github.com/rust-lang/crates.io-index" 1305 | checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" 1306 | dependencies = [ 1307 | "crunchy", 1308 | ] 1309 | 1310 | [[package]] 1311 | name = "tinyvec" 1312 | version = "1.6.0" 1313 | source = "registry+https://github.com/rust-lang/crates.io-index" 1314 | checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" 1315 | dependencies = [ 1316 | "tinyvec_macros", 1317 | ] 1318 | 1319 | [[package]] 1320 | name = "tinyvec_macros" 1321 | version = "0.1.0" 1322 | source = "registry+https://github.com/rust-lang/crates.io-index" 1323 | checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" 1324 | 1325 | [[package]] 1326 | name = "tokio" 1327 | version = "1.21.2" 1328 | source = "registry+https://github.com/rust-lang/crates.io-index" 1329 | checksum = "a9e03c497dc955702ba729190dc4aac6f2a0ce97f913e5b1b5912fc5039d9099" 1330 | dependencies = [ 1331 | "autocfg", 1332 | "libc", 1333 | "mio", 1334 | "num_cpus", 1335 | "pin-project-lite", 1336 | "signal-hook-registry", 1337 | "socket2", 1338 | "tokio-macros", 1339 | "winapi", 1340 | ] 1341 | 1342 | [[package]] 1343 | name = "tokio-macros" 1344 | version = "1.8.0" 1345 | source = "registry+https://github.com/rust-lang/crates.io-index" 1346 | checksum = "9724f9a975fb987ef7a3cd9be0350edcbe130698af5b8f7a631e23d42d052484" 1347 | dependencies = [ 1348 | "proc-macro2", 1349 | "quote", 1350 | "syn", 1351 | ] 1352 | 1353 | [[package]] 1354 | name = "tower-service" 1355 | version = "0.3.2" 1356 | source = "registry+https://github.com/rust-lang/crates.io-index" 1357 | checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" 1358 | 1359 | [[package]] 1360 | name = "tracing" 1361 | version = "0.1.37" 1362 | source = "registry+https://github.com/rust-lang/crates.io-index" 1363 | checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" 1364 | dependencies = [ 1365 | "cfg-if", 1366 | "log", 1367 | "pin-project-lite", 1368 | "tracing-attributes", 1369 | "tracing-core", 1370 | ] 1371 | 1372 | [[package]] 1373 | name = "tracing-attributes" 1374 | version = "0.1.23" 1375 | source = "registry+https://github.com/rust-lang/crates.io-index" 1376 | checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" 1377 | dependencies = [ 1378 | "proc-macro2", 1379 | "quote", 1380 | "syn", 1381 | ] 1382 | 1383 | [[package]] 1384 | name = "tracing-core" 1385 | version = "0.1.30" 1386 | source = "registry+https://github.com/rust-lang/crates.io-index" 1387 | checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" 1388 | dependencies = [ 1389 | "once_cell", 1390 | ] 1391 | 1392 | [[package]] 1393 | name = "tracing-futures" 1394 | version = "0.2.5" 1395 | source = "registry+https://github.com/rust-lang/crates.io-index" 1396 | checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" 1397 | dependencies = [ 1398 | "pin-project", 1399 | "tracing", 1400 | ] 1401 | 1402 | [[package]] 1403 | name = "try-lock" 1404 | version = "0.2.3" 1405 | source = "registry+https://github.com/rust-lang/crates.io-index" 1406 | checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" 1407 | 1408 | [[package]] 1409 | name = "unicode-bidi" 1410 | version = "0.3.8" 1411 | source = "registry+https://github.com/rust-lang/crates.io-index" 1412 | checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" 1413 | 1414 | [[package]] 1415 | name = "unicode-ident" 1416 | version = "1.0.5" 1417 | source = "registry+https://github.com/rust-lang/crates.io-index" 1418 | checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" 1419 | 1420 | [[package]] 1421 | name = "unicode-normalization" 1422 | version = "0.1.22" 1423 | source = "registry+https://github.com/rust-lang/crates.io-index" 1424 | checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" 1425 | dependencies = [ 1426 | "tinyvec", 1427 | ] 1428 | 1429 | [[package]] 1430 | name = "unicode-xid" 1431 | version = "0.2.4" 1432 | source = "registry+https://github.com/rust-lang/crates.io-index" 1433 | checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" 1434 | 1435 | [[package]] 1436 | name = "url" 1437 | version = "2.3.1" 1438 | source = "registry+https://github.com/rust-lang/crates.io-index" 1439 | checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" 1440 | dependencies = [ 1441 | "form_urlencoded", 1442 | "idna", 1443 | "percent-encoding", 1444 | ] 1445 | 1446 | [[package]] 1447 | name = "value-bag" 1448 | version = "1.0.0-alpha.9" 1449 | source = "registry+https://github.com/rust-lang/crates.io-index" 1450 | checksum = "2209b78d1249f7e6f3293657c9779fe31ced465df091bbd433a1cf88e916ec55" 1451 | dependencies = [ 1452 | "ctor", 1453 | "version_check", 1454 | ] 1455 | 1456 | [[package]] 1457 | name = "vcpkg" 1458 | version = "0.2.15" 1459 | source = "registry+https://github.com/rust-lang/crates.io-index" 1460 | checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" 1461 | 1462 | [[package]] 1463 | name = "version_check" 1464 | version = "0.9.4" 1465 | source = "registry+https://github.com/rust-lang/crates.io-index" 1466 | checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" 1467 | 1468 | [[package]] 1469 | name = "waker-fn" 1470 | version = "1.1.0" 1471 | source = "registry+https://github.com/rust-lang/crates.io-index" 1472 | checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" 1473 | 1474 | [[package]] 1475 | name = "want" 1476 | version = "0.3.0" 1477 | source = "registry+https://github.com/rust-lang/crates.io-index" 1478 | checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" 1479 | dependencies = [ 1480 | "log", 1481 | "try-lock", 1482 | ] 1483 | 1484 | [[package]] 1485 | name = "wasi" 1486 | version = "0.11.0+wasi-snapshot-preview1" 1487 | source = "registry+https://github.com/rust-lang/crates.io-index" 1488 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 1489 | 1490 | [[package]] 1491 | name = "wasm-bindgen" 1492 | version = "0.2.83" 1493 | source = "registry+https://github.com/rust-lang/crates.io-index" 1494 | checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" 1495 | dependencies = [ 1496 | "cfg-if", 1497 | "wasm-bindgen-macro", 1498 | ] 1499 | 1500 | [[package]] 1501 | name = "wasm-bindgen-backend" 1502 | version = "0.2.83" 1503 | source = "registry+https://github.com/rust-lang/crates.io-index" 1504 | checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" 1505 | dependencies = [ 1506 | "bumpalo", 1507 | "log", 1508 | "once_cell", 1509 | "proc-macro2", 1510 | "quote", 1511 | "syn", 1512 | "wasm-bindgen-shared", 1513 | ] 1514 | 1515 | [[package]] 1516 | name = "wasm-bindgen-futures" 1517 | version = "0.4.33" 1518 | source = "registry+https://github.com/rust-lang/crates.io-index" 1519 | checksum = "23639446165ca5a5de86ae1d8896b737ae80319560fbaa4c2887b7da6e7ebd7d" 1520 | dependencies = [ 1521 | "cfg-if", 1522 | "js-sys", 1523 | "wasm-bindgen", 1524 | "web-sys", 1525 | ] 1526 | 1527 | [[package]] 1528 | name = "wasm-bindgen-macro" 1529 | version = "0.2.83" 1530 | source = "registry+https://github.com/rust-lang/crates.io-index" 1531 | checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" 1532 | dependencies = [ 1533 | "quote", 1534 | "wasm-bindgen-macro-support", 1535 | ] 1536 | 1537 | [[package]] 1538 | name = "wasm-bindgen-macro-support" 1539 | version = "0.2.83" 1540 | source = "registry+https://github.com/rust-lang/crates.io-index" 1541 | checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" 1542 | dependencies = [ 1543 | "proc-macro2", 1544 | "quote", 1545 | "syn", 1546 | "wasm-bindgen-backend", 1547 | "wasm-bindgen-shared", 1548 | ] 1549 | 1550 | [[package]] 1551 | name = "wasm-bindgen-shared" 1552 | version = "0.2.83" 1553 | source = "registry+https://github.com/rust-lang/crates.io-index" 1554 | checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" 1555 | 1556 | [[package]] 1557 | name = "web-sys" 1558 | version = "0.3.60" 1559 | source = "registry+https://github.com/rust-lang/crates.io-index" 1560 | checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f" 1561 | dependencies = [ 1562 | "js-sys", 1563 | "wasm-bindgen", 1564 | ] 1565 | 1566 | [[package]] 1567 | name = "wepoll-ffi" 1568 | version = "0.1.2" 1569 | source = "registry+https://github.com/rust-lang/crates.io-index" 1570 | checksum = "d743fdedc5c64377b5fc2bc036b01c7fd642205a0d96356034ae3404d49eb7fb" 1571 | dependencies = [ 1572 | "cc", 1573 | ] 1574 | 1575 | [[package]] 1576 | name = "winapi" 1577 | version = "0.3.9" 1578 | source = "registry+https://github.com/rust-lang/crates.io-index" 1579 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 1580 | dependencies = [ 1581 | "winapi-i686-pc-windows-gnu", 1582 | "winapi-x86_64-pc-windows-gnu", 1583 | ] 1584 | 1585 | [[package]] 1586 | name = "winapi-i686-pc-windows-gnu" 1587 | version = "0.4.0" 1588 | source = "registry+https://github.com/rust-lang/crates.io-index" 1589 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 1590 | 1591 | [[package]] 1592 | name = "winapi-x86_64-pc-windows-gnu" 1593 | version = "0.4.0" 1594 | source = "registry+https://github.com/rust-lang/crates.io-index" 1595 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 1596 | 1597 | [[package]] 1598 | name = "windows-sys" 1599 | version = "0.36.1" 1600 | source = "registry+https://github.com/rust-lang/crates.io-index" 1601 | checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" 1602 | dependencies = [ 1603 | "windows_aarch64_msvc 0.36.1", 1604 | "windows_i686_gnu 0.36.1", 1605 | "windows_i686_msvc 0.36.1", 1606 | "windows_x86_64_gnu 0.36.1", 1607 | "windows_x86_64_msvc 0.36.1", 1608 | ] 1609 | 1610 | [[package]] 1611 | name = "windows-sys" 1612 | version = "0.42.0" 1613 | source = "registry+https://github.com/rust-lang/crates.io-index" 1614 | checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" 1615 | dependencies = [ 1616 | "windows_aarch64_gnullvm", 1617 | "windows_aarch64_msvc 0.42.0", 1618 | "windows_i686_gnu 0.42.0", 1619 | "windows_i686_msvc 0.42.0", 1620 | "windows_x86_64_gnu 0.42.0", 1621 | "windows_x86_64_gnullvm", 1622 | "windows_x86_64_msvc 0.42.0", 1623 | ] 1624 | 1625 | [[package]] 1626 | name = "windows_aarch64_gnullvm" 1627 | version = "0.42.0" 1628 | source = "registry+https://github.com/rust-lang/crates.io-index" 1629 | checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e" 1630 | 1631 | [[package]] 1632 | name = "windows_aarch64_msvc" 1633 | version = "0.36.1" 1634 | source = "registry+https://github.com/rust-lang/crates.io-index" 1635 | checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" 1636 | 1637 | [[package]] 1638 | name = "windows_aarch64_msvc" 1639 | version = "0.42.0" 1640 | source = "registry+https://github.com/rust-lang/crates.io-index" 1641 | checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4" 1642 | 1643 | [[package]] 1644 | name = "windows_i686_gnu" 1645 | version = "0.36.1" 1646 | source = "registry+https://github.com/rust-lang/crates.io-index" 1647 | checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" 1648 | 1649 | [[package]] 1650 | name = "windows_i686_gnu" 1651 | version = "0.42.0" 1652 | source = "registry+https://github.com/rust-lang/crates.io-index" 1653 | checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7" 1654 | 1655 | [[package]] 1656 | name = "windows_i686_msvc" 1657 | version = "0.36.1" 1658 | source = "registry+https://github.com/rust-lang/crates.io-index" 1659 | checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" 1660 | 1661 | [[package]] 1662 | name = "windows_i686_msvc" 1663 | version = "0.42.0" 1664 | source = "registry+https://github.com/rust-lang/crates.io-index" 1665 | checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246" 1666 | 1667 | [[package]] 1668 | name = "windows_x86_64_gnu" 1669 | version = "0.36.1" 1670 | source = "registry+https://github.com/rust-lang/crates.io-index" 1671 | checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" 1672 | 1673 | [[package]] 1674 | name = "windows_x86_64_gnu" 1675 | version = "0.42.0" 1676 | source = "registry+https://github.com/rust-lang/crates.io-index" 1677 | checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed" 1678 | 1679 | [[package]] 1680 | name = "windows_x86_64_gnullvm" 1681 | version = "0.42.0" 1682 | source = "registry+https://github.com/rust-lang/crates.io-index" 1683 | checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028" 1684 | 1685 | [[package]] 1686 | name = "windows_x86_64_msvc" 1687 | version = "0.36.1" 1688 | source = "registry+https://github.com/rust-lang/crates.io-index" 1689 | checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" 1690 | 1691 | [[package]] 1692 | name = "windows_x86_64_msvc" 1693 | version = "0.42.0" 1694 | source = "registry+https://github.com/rust-lang/crates.io-index" 1695 | checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5" 1696 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "blackd-client" 3 | version = "0.1.0" 4 | authors = ["disrupted "] 5 | categories = ["command-line-utilities"] 6 | edition = "2021" 7 | keywords = ["code-formatter", "cli", "black", "blackd", "python"] 8 | license = "GPL-3.0" 9 | readme = "README.md" 10 | repository = "https://github.com/disrupted/blackd-client" 11 | description = "Blazing fast Python code formatting using Black" 12 | 13 | [dependencies] 14 | custom_error = "1.9.2" 15 | minreq = "2.3.1" 16 | pico-args = { version = "0.4.2", default_features = false } 17 | 18 | [dev-dependencies] 19 | httpmock = "0.5.8" 20 | pretty_assertions = "0.7.2" 21 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # blackd-client 2 | 3 | > Tiny HTTP client for the Black (`blackd`) Python code formatter 4 | 5 | [Black](https://github.com/psf/black) is a brilliant, opinionated formatter for Python. However it can be quite slow when using an editor integration with format on save, since the process is cold-started every time you call it. 6 | 7 | Luckily there's [blackd](https://black.readthedocs.io/en/stable/usage_and_configuration/black_as_a_server.html), which is a small HTTP server that keeps the Black process running in the background so that it can be called directly without the lenghty startup time. 8 | 9 | **blackd-client** is a simple helper that provides a single executable to communicate with Black, mainly for me to learn Rust. 10 | 11 | If you're using Black (or writing Python code in general) I recommend you to check it out! 12 | 13 | ## Install 14 | 15 | 1. Install Black 16 | 17 | ```sh 18 | pip install black 19 | ``` 20 | 21 | or using Homebrew on macOS (preferred) 22 | 23 | ```sh 24 | brew install black 25 | ``` 26 | 27 | 2. Install blackd-client 28 | 29 | - Download binary from https://github.com/disrupted/blackd-client/releases 30 | - Rename to `blackd-client` and put it somewhere on your `PATH` 31 | 32 | Alternatively if you have Rust toolchain installed: 33 | 34 | ```sh 35 | cargo install blackd-client 36 | ``` 37 | 38 | 3. Start blackd daemon 39 | 40 | ```sh 41 | blackd 42 | ``` 43 | 44 | or as a launchd service using Homebrew on macOS (preferred) 45 | 46 | ```sh 47 | sudo brew services start black 48 | ``` 49 | 50 | ## Usage 51 | 52 | pipe file contents to stdin, e.g. 53 | 54 | ```sh 55 | cat main.py | blackd-client 56 | ``` 57 | 58 | output is formatted using Black :sparkles: 59 | 60 | ## Benchmark comparison 61 | 62 | Normal `black --fast` 63 | 64 | ```sh 65 | ❯ hyperfine 'cat subclean/core/parser.py | black --fast -' 66 | Time (mean ± σ): 296.8 ms ± 41.3 ms [User: 228.7 ms, System: 51.1 ms] 67 | Range (min … max): 260.7 ms … 403.6 ms 10 runs 68 | ``` 69 | 70 | Using `blackd-client` 71 | 72 | ```sh 73 | ❯ hyperfine 'cat subclean/core/parser.py | blackd-client' 74 | Time (mean ± σ): 23.7 ms ± 3.7 ms [User: 2.7 ms, System: 4.8 ms] 75 | Range (min … max): 19.2 ms … 35.7 ms 84 runs 76 | ``` 77 | 78 | **Result:** blackd is more than 10x faster! :rocket: 79 | 80 | ## Neovim integration 81 | 82 | Editor integration for Neovim can be done using a general purpose language server. 83 | There are two options to choose from: 84 | 85 | 1. [null-ls](https://github.com/disrupted/dotfiles/blob/1f5d36a195a41b602ca68d7629360e54654e3db2/.config/nvim/lua/plugins/lsp.lua#L33) (what I use) 86 | 87 | 2. [EFM](https://github.com/disrupted/dotfiles/blob/253dc440ed954a4289a72dad885c71c16d0f90a4/.config/nvim/lua/efm/blackd.lua) 88 | -------------------------------------------------------------------------------- /lefthook.yml: -------------------------------------------------------------------------------- 1 | fmt: 2 | commands: 3 | fmt: 4 | glob: "*.rs" 5 | run: cargo fmt -- --check {all_files} 6 | 7 | clippy: 8 | commands: 9 | clippy: 10 | run: cargo clippy -q --no-deps -- -D warnings 11 | 12 | pre-commit: 13 | parallel: true 14 | commands: 15 | fmt: 16 | glob: "*.rs" 17 | run: cargo fmt -- --check {staged_files} 18 | clippy: 19 | run: cargo clippy -q --no-deps -- -D warnings 20 | -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | use custom_error::custom_error; 2 | use std::{io, io::prelude::*}; 3 | 4 | const VERSION: &str = env!("CARGO_PKG_VERSION"); 5 | const DEFAULT_URL: &str = "http://localhost:45484"; 6 | 7 | const HELP: &str = "\ 8 | Tiny HTTP client for the Black (blackd) Python code formatter 9 | 10 | USAGE: 11 | blackd-client [OPTIONS] 12 | 13 | OPTIONS: 14 | -h, --help Print help information 15 | --url URL of blackd server [default: http://localhost:45484] 16 | --line-length Custom max-line-length 17 | -V, --version Print version information 18 | "; 19 | 20 | #[derive(Debug)] 21 | struct AppArgs { 22 | url: String, 23 | line_length: Option, 24 | } 25 | 26 | fn parse_args() -> Result { 27 | let mut pargs = pico_args::Arguments::from_env(); 28 | 29 | if pargs.contains(["-h", "--help"]) { 30 | print!("{}", HELP); 31 | std::process::exit(0); 32 | } 33 | 34 | if pargs.contains(["-V", "--version"]) { 35 | println!("blackd-client v{}", VERSION); 36 | std::process::exit(0); 37 | } 38 | 39 | let args = AppArgs { 40 | url: pargs 41 | .opt_value_from_str("--url")? 42 | .unwrap_or_else(|| DEFAULT_URL.to_string()), 43 | line_length: pargs.opt_value_from_str("--line-length")?, 44 | }; 45 | 46 | let remaining = pargs.finish(); 47 | if !remaining.is_empty() { 48 | eprintln!("Error: unrecognized arguments: {:?}", remaining); 49 | std::process::exit(1); 50 | } 51 | 52 | Ok(args) 53 | } 54 | 55 | custom_error! {BlackdError 56 | Minreq{source: minreq::Error} = "{source}", 57 | Syntax{details: String} = "Syntax Error: {details}", 58 | Formatting{details: String} = "Formatting Error: {details}", 59 | Unknown{status_code: i32, body: String} = "Unknown Error {status_code}: {body}", 60 | } 61 | 62 | fn main() { 63 | let args = match parse_args() { 64 | Ok(v) => v, 65 | Err(e) => { 66 | eprintln!("Error: {}.", e); 67 | std::process::exit(1); 68 | } 69 | }; 70 | 71 | let stdin = read_stdin(); 72 | let result = format(&args, &stdin.unwrap_or_default()); 73 | match result { 74 | Ok(v) => write_stdout(v.as_bytes()).unwrap(), 75 | Err(e) => { 76 | eprint!("Error formatting with blackd-client: {}", e); 77 | std::process::exit(1); 78 | } 79 | } 80 | } 81 | 82 | fn write_stdout(buf: &[u8]) -> io::Result<()> { 83 | let stdout = io::stdout(); 84 | let mut writer = io::BufWriter::new(stdout.lock()); 85 | writer.write_all(buf)?; 86 | Ok(()) 87 | } 88 | 89 | fn read_stdin() -> Result> { 90 | let mut buffer = String::new(); 91 | let stdin = io::stdin(); 92 | { 93 | let mut stdin_lock = stdin.lock(); 94 | stdin_lock.read_to_string(&mut buffer)?; 95 | } 96 | Ok(buffer) 97 | } 98 | 99 | fn format(args: &AppArgs, stdin: &str) -> Result { 100 | let mut req = minreq::post(&args.url) 101 | .with_header("X-Fast-Or-Safe", "fast") 102 | .with_header("Content-Type", "text/plain; charset=utf-8") 103 | .with_body(stdin); 104 | 105 | if let Some(line_length) = &args.line_length { 106 | req = req.with_header("X-Line-Length", line_length.to_string()); 107 | } 108 | 109 | let resp = req.send()?; 110 | 111 | let body = resp.as_str()?.to_string(); 112 | match resp.status_code { 113 | 200 => Ok(body), // input was reformatted by Black 114 | 204 => Ok(stdin.to_string()), // input is already well-formatted 115 | 400 => Err(BlackdError::Syntax { details: body }), 116 | 500 => Err(BlackdError::Formatting { details: body }), 117 | _ => Err(BlackdError::Unknown { 118 | status_code: resp.status_code, 119 | body, 120 | }), 121 | } 122 | } 123 | 124 | #[cfg(test)] 125 | mod tests { 126 | use super::*; 127 | use httpmock::MockServer; 128 | use pretty_assertions::assert_eq; 129 | 130 | #[test] 131 | fn test_format_success() { 132 | let server = MockServer::start(); 133 | let body = "print(\"Hello World!\")"; 134 | let mock = server.mock(|when, then| { 135 | when.method("POST") 136 | .path("/") 137 | .header("X-Fast-Or-Safe", "fast"); 138 | then.status(200).body(body); 139 | }); 140 | 141 | let args = AppArgs { 142 | url: server.url(""), 143 | line_length: None, 144 | }; 145 | let result = format(&args, "print('Hello World!')"); 146 | 147 | mock.assert(); 148 | assert!(result.is_ok()); 149 | assert_eq!(result.unwrap(), body); 150 | } 151 | 152 | #[test] 153 | fn test_format_line_length() { 154 | let server = MockServer::start(); 155 | let body = "print(\"Hello World!\")"; 156 | let mock = server.mock(|when, then| { 157 | when.method("POST") 158 | .path("/") 159 | .header("X-Fast-Or-Safe", "fast") 160 | .header("X-Line-Length", "120"); 161 | then.status(200).body(body); 162 | }); 163 | 164 | let args = AppArgs { 165 | url: server.url(""), 166 | line_length: Some(120), 167 | }; 168 | let result = format(&args, "print('Hello World!')"); 169 | 170 | mock.assert(); 171 | assert!(result.is_ok()); 172 | assert_eq!(result.unwrap(), body); 173 | } 174 | 175 | #[test] 176 | fn test_format_unchanged() { 177 | let server = MockServer::start(); 178 | let body = "print(\"Already formatted\")"; 179 | let mock = server.mock(|when, then| { 180 | when.method("POST") 181 | .path("/") 182 | .header("X-Fast-Or-Safe", "fast"); 183 | then.status(204); 184 | }); 185 | 186 | let args = AppArgs { 187 | url: server.url(""), 188 | line_length: None, 189 | }; 190 | let result = format(&args, body); 191 | 192 | mock.assert(); 193 | assert!(result.is_ok()); 194 | assert_eq!(result.unwrap(), body); 195 | } 196 | 197 | #[test] 198 | fn test_syntax_error() { 199 | let server = MockServer::start(); 200 | let mock = server.mock(|when, then| { 201 | when.method("POST"); 202 | then.status(400) 203 | .body("Cannot parse: 1:6: print('bad syntax'))"); 204 | }); 205 | 206 | let args = AppArgs { 207 | url: server.url(""), 208 | line_length: None, 209 | }; 210 | let result = format(&args, "print('bad syntax'))"); 211 | 212 | mock.assert(); 213 | assert!(result.is_err()); 214 | assert_eq!( 215 | result.unwrap_err().to_string(), 216 | "Syntax Error: Cannot parse: 1:6: print('bad syntax'))" 217 | ); 218 | } 219 | 220 | #[test] 221 | fn test_formatting_error() { 222 | let server = MockServer::start(); 223 | let mock = server.mock(|when, then| { 224 | when.method("POST"); 225 | then.status(500) 226 | .body("('EOF in multi-line statement', (2, 0))"); 227 | }); 228 | 229 | let args = AppArgs { 230 | url: server.url(""), 231 | line_length: None, 232 | }; 233 | let result = format(&args, "print(('bad syntax')"); 234 | 235 | mock.assert(); 236 | assert!(result.is_err()); 237 | assert_eq!( 238 | result.unwrap_err().to_string(), 239 | "Formatting Error: ('EOF in multi-line statement', (2, 0))" 240 | ); 241 | } 242 | 243 | #[test] 244 | fn test_unknown_error() { 245 | let server = MockServer::start(); 246 | let mock = server.mock(|when, then| { 247 | when.method("POST"); 248 | then.status(418).body("message"); 249 | }); 250 | 251 | let args = AppArgs { 252 | url: server.url(""), 253 | line_length: None, 254 | }; 255 | let result = format(&args, ""); 256 | 257 | mock.assert(); 258 | assert!(result.is_err()); 259 | assert_eq!( 260 | result.unwrap_err().to_string(), 261 | "Unknown Error 418: message" 262 | ); 263 | } 264 | } 265 | --------------------------------------------------------------------------------