diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 00000000..d29d6c33 --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,3 @@ +[target.x86_64-unknown-linux-gnu] +linker = "clang" +rustflags = ["-C", "link-arg=-fuse-ld=mold"] diff --git a/.woodpecker/debug.yaml b/.woodpecker/debug.yaml index 4dc7d3c9..0076feda 100644 --- a/.woodpecker/debug.yaml +++ b/.woodpecker/debug.yaml @@ -1,6 +1,3 @@ -labels: - nix: "enabled" - when: event: - push @@ -12,33 +9,39 @@ when: steps: - name: check formatting - image: nixpkgs/nix:nixos-24.05 + image: nixpkgs/nix:nixos-22.05 commands: - - nix-build -j4 --attr flakePackages.fmt + - nix-shell --attr devShell --run "cargo fmt -- --check" - name: build - image: nixpkgs/nix:nixos-24.05 + image: nixpkgs/nix:nixos-22.05 commands: - - nix-build -j4 --attr flakePackages.dev + - nix-build --no-build-output --attr clippy.amd64 --argstr git_version ${CI_COMMIT_TAG:-$CI_COMMIT_SHA} - - name: unit + func tests (lmdb) - image: nixpkgs/nix:nixos-24.05 + - name: unit + func tests + image: nixpkgs/nix:nixos-22.05 + environment: + GARAGE_TEST_INTEGRATION_EXE: result-bin/bin/garage + GARAGE_TEST_INTEGRATION_PATH: tmp-garage-integration commands: - - nix-build -j4 --attr flakePackages.tests-lmdb - - - name: unit + func tests (sqlite) - image: nixpkgs/nix:nixos-24.05 - commands: - - nix-build -j4 --attr flakePackages.tests-sqlite - - - name: unit + func tests (fjall) - image: nixpkgs/nix:nixos-24.05 - commands: - - nix-build -j4 --attr flakePackages.tests-fjall + - nix-build --no-build-output --attr clippy.amd64 --argstr git_version ${CI_COMMIT_TAG:-$CI_COMMIT_SHA} + - nix-build --no-build-output --attr test.amd64 + - ./result/bin/garage_db-* + - ./result/bin/garage_api-* + - ./result/bin/garage_model-* + - ./result/bin/garage_rpc-* + - ./result/bin/garage_table-* + - ./result/bin/garage_util-* + - ./result/bin/garage_web-* + - ./result/bin/garage-* + - GARAGE_TEST_INTEGRATION_DB_ENGINE=lmdb ./result/bin/integration-* || (cat tmp-garage-integration/stderr.log; false) + - nix-shell --attr ci --run "killall -9 garage" || true + - GARAGE_TEST_INTEGRATION_DB_ENGINE=sqlite ./result/bin/integration-* || (cat tmp-garage-integration/stderr.log; false) + - rm result + - rm -rv tmp-garage-integration - name: integration tests - image: nixpkgs/nix:nixos-24.05 + image: nixpkgs/nix:nixos-22.05 commands: - - nix-build -j4 --attr flakePackages.dev + - nix-build --no-build-output --attr clippy.amd64 --argstr git_version ${CI_COMMIT_TAG:-$CI_COMMIT_SHA} - nix-shell --attr ci --run ./script/test-smoke.sh || (cat /tmp/garage.log; false) - depends_on: [ build ] diff --git a/.woodpecker/publish.yaml b/.woodpecker/publish.yaml index 8f3b482f..739af2c4 100644 --- a/.woodpecker/publish.yaml +++ b/.woodpecker/publish.yaml @@ -1,6 +1,3 @@ -labels: - nix: "enabled" - when: event: - deployment @@ -11,21 +8,20 @@ depends_on: steps: - name: refresh-index - image: nixpkgs/nix:nixos-24.05 - environment: - AWS_ACCESS_KEY_ID: - from_secret: garagehq_aws_access_key_id - AWS_SECRET_ACCESS_KEY: - from_secret: garagehq_aws_secret_access_key + image: nixpkgs/nix:nixos-22.05 + secrets: + - source: garagehq_aws_access_key_id + target: AWS_ACCESS_KEY_ID + - source: garagehq_aws_secret_access_key + target: AWS_SECRET_ACCESS_KEY commands: - mkdir -p /etc/nix && cp nix/nix.conf /etc/nix/nix.conf - nix-shell --attr ci --run "refresh_index" - name: multiarch-docker - image: nixpkgs/nix:nixos-24.05 - environment: - DOCKER_AUTH: - from_secret: docker_auth + image: nixpkgs/nix:nixos-22.05 + secrets: + - docker_auth commands: - mkdir -p /root/.docker - echo $DOCKER_AUTH > /root/.docker/config.json diff --git a/.woodpecker/release.yaml b/.woodpecker/release.yaml index a94a9ccf..c57d7272 100644 --- a/.woodpecker/release.yaml +++ b/.woodpecker/release.yaml @@ -1,6 +1,3 @@ -labels: - nix: "enabled" - when: event: - deployment @@ -19,17 +16,18 @@ matrix: steps: - name: build - image: nixpkgs/nix:nixos-24.05 + image: nixpkgs/nix:nixos-22.05 commands: - - nix-build --attr releasePackages.${ARCH} --argstr git_version ${CI_COMMIT_TAG:-$CI_COMMIT_SHA} + - nix-build --no-build-output --attr pkgs.${ARCH}.release --argstr git_version ${CI_COMMIT_TAG:-$CI_COMMIT_SHA} - name: check is static binary - image: nixpkgs/nix:nixos-24.05 + image: nixpkgs/nix:nixos-22.05 commands: - - nix-shell --attr ci --run "./script/not-dynamic.sh result/bin/garage" + - nix-build --no-build-output --attr pkgs.${ARCH}.release --argstr git_version ${CI_COMMIT_TAG:-$CI_COMMIT_SHA} + - nix-shell --attr ci --run "./script/not-dynamic.sh result-bin/bin/garage" - name: integration tests - image: nixpkgs/nix:nixos-24.05 + image: nixpkgs/nix:nixos-22.05 commands: - nix-shell --attr ci --run ./script/test-smoke.sh || (cat /tmp/garage.log; false) when: @@ -39,7 +37,7 @@ steps: ARCH: i386 - name: upgrade tests - image: nixpkgs/nix:nixos-24.05 + image: nixpkgs/nix:nixos-22.05 commands: - nix-shell --attr ci --run "./script/test-upgrade.sh v0.8.4 x86_64-unknown-linux-musl" || (cat /tmp/garage.log; false) when: @@ -47,23 +45,24 @@ steps: ARCH: amd64 - name: push static binary - image: nixpkgs/nix:nixos-24.05 + image: nixpkgs/nix:nixos-22.05 environment: TARGET: "${TARGET}" - AWS_ACCESS_KEY_ID: - from_secret: garagehq_aws_access_key_id - AWS_SECRET_ACCESS_KEY: - from_secret: garagehq_aws_secret_access_key + secrets: + - source: garagehq_aws_access_key_id + target: AWS_ACCESS_KEY_ID + - source: garagehq_aws_secret_access_key + target: AWS_SECRET_ACCESS_KEY commands: - nix-shell --attr ci --run "to_s3" - name: docker build and publish - image: nixpkgs/nix:nixos-24.05 + image: nixpkgs/nix:nixos-22.05 environment: DOCKER_PLATFORM: "linux/${ARCH}" CONTAINER_NAME: "dxflrs/${ARCH}_garage" - DOCKER_AUTH: - from_secret: docker_auth + secrets: + - docker_auth commands: - mkdir -p /root/.docker - echo $DOCKER_AUTH > /root/.docker/config.json diff --git a/Cargo.lock b/Cargo.lock index 7473d9af..384dda91 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,21 +1,21 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 4 +version = 3 [[package]] name = "addr2line" -version = "0.25.1" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5d307320b3181d6d7954e663bd7c774a838b8220fe0593c86d9fb09f498b4b" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" dependencies = [ "gimli", ] [[package]] -name = "adler2" -version = "2.0.1" +name = "adler" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "aead" @@ -54,12 +54,12 @@ dependencies = [ [[package]] name = "ahash" -version = "0.8.12" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" +checksum = "77c3a9648d43b9cd48db467b3f87fdd6e146bcc88ab0180006cef2179fe11d01" dependencies = [ "cfg-if", - "getrandom 0.3.4", + "getrandom", "once_cell", "version_check", "zerocopy", @@ -67,18 +67,24 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.1.4" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" dependencies = [ "memchr", ] [[package]] name = "allocator-api2" -version = "0.2.21" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" +checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" + +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" [[package]] name = "android_system_properties" @@ -91,68 +97,63 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.21" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a" +checksum = "6e2e1ebcb11de5c03c67de28a7df593d32191b44939c482e97702baaaa6ab6a5" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", - "is_terminal_polyfill", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.13" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" +checksum = "2faccea4cc4ab4a667ce676a30e8ec13922a692c99bb8f5b11f1502c72e04220" [[package]] name = "anstyle-parse" -version = "0.2.7" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" +checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.5" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" +checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.11" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" +checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" dependencies = [ "anstyle", - "once_cell_polyfill", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] name = "anyhow" -version = "1.0.100" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" +checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" [[package]] name = "arc-swap" -version = "1.8.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d03449bb8ca2cc2ef70869af31463d1ae5ccc8fa3e334b307203fbf815207e" -dependencies = [ - "rustversion", -] +checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" [[package]] name = "argon2" @@ -184,21 +185,23 @@ dependencies = [ [[package]] name = "async-compression" -version = "0.4.37" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d10e4f991a553474232bc0a31799f6d24b034a84c0971d80d2e2f78b2e576e40" +checksum = "a116f46a969224200a0a97f29cfd4c50e7534e4b4826bd23ea2c3c533039c82c" dependencies = [ - "compression-codecs", - "compression-core", + "futures-core", + "memchr", "pin-project-lite", "tokio", + "zstd", + "zstd-safe", ] [[package]] name = "async-stream" -version = "0.3.6" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" +checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" dependencies = [ "async-stream-impl", "futures-core", @@ -207,43 +210,67 @@ dependencies = [ [[package]] name = "async-stream-impl" -version = "0.3.6" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" +checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.48", ] [[package]] name = "async-trait" -version = "0.1.89" +version = "0.1.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" +checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.48", ] [[package]] -name = "atomic-waker" -version = "1.1.2" +name = "autocfg" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] -name = "autocfg" -version = "1.5.0" +name = "aws-config" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" +checksum = "8b30c39ebe61f75d1b3785362b1586b41991873c9ab3e317a9181c246fb71d82" +dependencies = [ + "aws-credential-types", + "aws-runtime", + "aws-sdk-sso", + "aws-sdk-ssooidc", + "aws-sdk-sts", + "aws-smithy-async", + "aws-smithy-http", + "aws-smithy-json", + "aws-smithy-runtime", + "aws-smithy-runtime-api", + "aws-smithy-types", + "aws-types", + "bytes", + "fastrand", + "hex", + "http 0.2.11", + "hyper 0.14.28", + "ring", + "time", + "tokio", + "tracing", + "zeroize", +] [[package]] name = "aws-credential-types" -version = "1.2.11" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cd362783681b15d136480ad555a099e82ecd8e2d10a841e14dfd0078d67fee3" +checksum = "33cc49dcdd31c8b6e79850a179af4c367669150c7ac0135f176c61bec81a70f7" dependencies = [ "aws-smithy-async", "aws-smithy-runtime-api", @@ -253,22 +280,21 @@ dependencies = [ [[package]] name = "aws-runtime" -version = "1.5.18" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "959dab27ce613e6c9658eb3621064d0e2027e5f2acb65bc526a43577facea557" +checksum = "eb031bff99877c26c28895766f7bb8484a05e24547e370768d6cc9db514662aa" dependencies = [ "aws-credential-types", "aws-sigv4", "aws-smithy-async", "aws-smithy-eventstream", "aws-smithy-http", - "aws-smithy-runtime", "aws-smithy-runtime-api", "aws-smithy-types", "aws-types", "bytes", "fastrand", - "http 0.2.12", + "http 0.2.11", "http-body 0.4.6", "percent-encoding", "pin-project-lite", @@ -278,32 +304,31 @@ dependencies = [ [[package]] name = "aws-sdk-config" -version = "1.99.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67e62e5ffb669e13f084c4e1d89d687604e001187f61503606a7f8cc7a411995" +checksum = "4af4f5b0f64563ada272e009cc95027effb546110ed85d014611420ac0d97858" dependencies = [ "aws-credential-types", "aws-runtime", "aws-smithy-async", "aws-smithy-http", "aws-smithy-json", - "aws-smithy-observability", "aws-smithy-runtime", "aws-smithy-runtime-api", "aws-smithy-types", "aws-types", "bytes", - "fastrand", - "http 0.2.12", + "http 0.2.11", + "once_cell", "regex-lite", "tracing", ] [[package]] name = "aws-sdk-s3" -version = "1.120.0" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06673901e961f20fa8d7da907da48f7ad6c1b383e3726c22bd418900f015abe1" +checksum = "951f7730f51a2155c711c85c79f337fbc02a577fa99d2a0a8059acfce5392113" dependencies = [ "aws-credential-types", "aws-runtime", @@ -313,32 +338,93 @@ dependencies = [ "aws-smithy-eventstream", "aws-smithy-http", "aws-smithy-json", - "aws-smithy-observability", "aws-smithy-runtime", "aws-smithy-runtime-api", "aws-smithy-types", "aws-smithy-xml", "aws-types", "bytes", - "fastrand", - "hex", - "hmac", - "http 0.2.12", - "http 1.4.0", + "http 0.2.11", "http-body 0.4.6", - "lru", + "once_cell", "percent-encoding", "regex-lite", - "sha2", "tracing", "url", ] [[package]] -name = "aws-sigv4" -version = "1.3.7" +name = "aws-sdk-sso" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69e523e1c4e8e7e8ff219d732988e22bfeae8a1cafdbe6d9eca1546fa080be7c" +checksum = "f486420a66caad72635bc2ce0ff6581646e0d32df02aa39dc983bfe794955a5b" +dependencies = [ + "aws-credential-types", + "aws-runtime", + "aws-smithy-async", + "aws-smithy-http", + "aws-smithy-json", + "aws-smithy-runtime", + "aws-smithy-runtime-api", + "aws-smithy-types", + "aws-types", + "bytes", + "http 0.2.11", + "once_cell", + "regex-lite", + "tracing", +] + +[[package]] +name = "aws-sdk-ssooidc" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39ddccf01d82fce9b4a15c8ae8608211ee7db8ed13a70b514bbfe41df3d24841" +dependencies = [ + "aws-credential-types", + "aws-runtime", + "aws-smithy-async", + "aws-smithy-http", + "aws-smithy-json", + "aws-smithy-runtime", + "aws-smithy-runtime-api", + "aws-smithy-types", + "aws-types", + "bytes", + "http 0.2.11", + "once_cell", + "regex-lite", + "tracing", +] + +[[package]] +name = "aws-sdk-sts" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a591f8c7e6a621a501b2b5d2e88e1697fcb6274264523a6ad4d5959889a41ce" +dependencies = [ + "aws-credential-types", + "aws-runtime", + "aws-smithy-async", + "aws-smithy-http", + "aws-smithy-json", + "aws-smithy-query", + "aws-smithy-runtime", + "aws-smithy-runtime-api", + "aws-smithy-types", + "aws-smithy-xml", + "aws-types", + "http 0.2.11", + "once_cell", + "regex-lite", + "tracing", +] + +[[package]] +name = "aws-sigv4" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c371c6b0ac54d4605eb6f016624fb5c7c2925d315fdf600ac1bf21b19d5f1742" dependencies = [ "aws-credential-types", "aws-smithy-eventstream", @@ -346,22 +432,28 @@ dependencies = [ "aws-smithy-runtime-api", "aws-smithy-types", "bytes", + "crypto-bigint 0.5.5", "form_urlencoded", "hex", "hmac", - "http 0.2.12", - "http 1.4.0", + "http 0.2.11", + "http 1.0.0", + "once_cell", + "p256", "percent-encoding", + "ring", "sha2", + "subtle", "time", "tracing", + "zeroize", ] [[package]] name = "aws-smithy-async" -version = "1.2.7" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ee19095c7c4dda59f1697d028ce704c24b2d33c6718790c7f1d5a3015b4107c" +checksum = "72ee2d09cce0ef3ae526679b522835d63e75fb427aca5413cd371e490d52dcc6" dependencies = [ "futures-util", "pin-project-lite", @@ -370,16 +462,17 @@ dependencies = [ [[package]] name = "aws-smithy-checksums" -version = "0.63.13" +version = "0.60.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23374b9170cbbcc6f5df8dc5ebb9b6c5c28a3c8f599f0e8b8b10eb6f4a5c6e74" +checksum = "be2acd1b9c6ae5859999250ed5a62423aedc5cf69045b844432de15fa2f31f2b" dependencies = [ "aws-smithy-http", "aws-smithy-types", "bytes", - "crc-fast", + "crc32c", + "crc32fast", "hex", - "http 0.2.12", + "http 0.2.11", "http-body 0.4.6", "md-5", "pin-project-lite", @@ -390,9 +483,9 @@ dependencies = [ [[package]] name = "aws-smithy-eventstream" -version = "0.60.14" +version = "0.60.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc12f8b310e38cad85cf3bef45ad236f470717393c613266ce0a89512286b650" +checksum = "e6363078f927f612b970edf9d1903ef5cef9a64d1e8423525ebb1f0a1633c858" dependencies = [ "aws-smithy-types", "bytes", @@ -401,9 +494,9 @@ dependencies = [ [[package]] name = "aws-smithy-http" -version = "0.62.6" +version = "0.60.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "826141069295752372f8203c17f28e30c464d22899a43a0c9fd9c458d469c88b" +checksum = "dab56aea3cd9e1101a0a999447fb346afb680ab1406cebc44b32346e25b4117d" dependencies = [ "aws-smithy-eventstream", "aws-smithy-runtime-api", @@ -411,91 +504,69 @@ dependencies = [ "bytes", "bytes-utils", "futures-core", - "futures-util", - "http 0.2.12", - "http 1.4.0", + "http 0.2.11", "http-body 0.4.6", + "once_cell", "percent-encoding", "pin-project-lite", "pin-utils", "tracing", ] -[[package]] -name = "aws-smithy-http-client" -version = "1.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59e62db736db19c488966c8d787f52e6270be565727236fd5579eaa301e7bc4a" -dependencies = [ - "aws-smithy-async", - "aws-smithy-runtime-api", - "aws-smithy-types", - "h2 0.3.27", - "h2 0.4.13", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.32", - "hyper-rustls 0.24.2", - "pin-project-lite", - "rustls 0.21.12", - "rustls-native-certs 0.8.3", - "tokio", - "tracing", -] - [[package]] name = "aws-smithy-json" -version = "0.61.9" +version = "0.60.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49fa1213db31ac95288d981476f78d05d9cbb0353d22cdf3472cc05bb02f6551" +checksum = "fd3898ca6518f9215f62678870064398f00031912390efd03f1f6ef56d83aa8e" dependencies = [ "aws-smithy-types", ] [[package]] -name = "aws-smithy-observability" -version = "0.2.0" +name = "aws-smithy-query" +version = "0.60.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef1fcbefc7ece1d70dcce29e490f269695dfca2d2bacdeaf9e5c3f799e4e6a42" +checksum = "bda4b1dfc9810e35fba8a620e900522cd1bd4f9578c446e82f49d1ce41d2e9f9" dependencies = [ - "aws-smithy-runtime-api", + "aws-smithy-types", + "urlencoding", ] [[package]] name = "aws-smithy-runtime" -version = "1.9.8" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb5b6167fcdf47399024e81ac08e795180c576a20e4d4ce67949f9a88ae37dc1" +checksum = "fafdab38f40ad7816e7da5dec279400dd505160780083759f01441af1bbb10ea" dependencies = [ "aws-smithy-async", "aws-smithy-http", - "aws-smithy-http-client", - "aws-smithy-observability", "aws-smithy-runtime-api", "aws-smithy-types", "bytes", "fastrand", - "http 0.2.12", - "http 1.4.0", + "h2 0.3.24", + "http 0.2.11", "http-body 0.4.6", - "http-body 1.0.1", + "hyper 0.14.28", + "hyper-rustls 0.24.2", + "once_cell", "pin-project-lite", "pin-utils", + "rustls 0.21.10", "tokio", "tracing", ] [[package]] name = "aws-smithy-runtime-api" -version = "1.10.0" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efce7aaaf59ad53c5412f14fc19b2d5c6ab2c3ec688d272fd31f76ec12f44fb0" +checksum = "c18276dd28852f34b3bf501f4f3719781f4999a51c7bff1a5c6dc8c4529adc29" dependencies = [ "aws-smithy-async", "aws-smithy-types", "bytes", - "http 0.2.12", - "http 1.4.0", + "http 0.2.11", "pin-project-lite", "tokio", "tracing", @@ -504,19 +575,16 @@ dependencies = [ [[package]] name = "aws-smithy-types" -version = "1.3.6" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65f172bcb02424eb94425db8aed1b6d583b5104d4d5ddddf22402c661a320048" +checksum = "bb3e134004170d3303718baa2a4eb4ca64ee0a1c0a7041dca31b38be0fb414f3" dependencies = [ "base64-simd", "bytes", "bytes-utils", "futures-core", - "http 0.2.12", - "http 1.4.0", + "http 0.2.11", "http-body 0.4.6", - "http-body 1.0.1", - "http-body-util", "itoa", "num-integer", "pin-project-lite", @@ -525,28 +593,29 @@ dependencies = [ "serde", "time", "tokio", - "tokio-util 0.7.18", + "tokio-util 0.7.10", ] [[package]] name = "aws-smithy-xml" -version = "0.60.13" +version = "0.60.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11b2f670422ff42bf7065031e72b45bc52a3508bd089f743ea90731ca2b6ea57" +checksum = "8604a11b25e9ecaf32f9aa56b9fe253c5e2f606a3477f0071e96d3155a5ed218" dependencies = [ "xmlparser", ] [[package]] name = "aws-types" -version = "1.3.11" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d980627d2dd7bfc32a3c025685a033eeab8d365cc840c631ef59d1b8f428164" +checksum = "789bbe008e65636fe1b6dbbb374c40c8960d1232b96af5ff4aec349f9c4accf4" dependencies = [ "aws-credential-types", "aws-smithy-async", "aws-smithy-runtime-api", "aws-smithy-types", + "http 0.2.11", "rustc_version", "tracing", ] @@ -557,26 +626,32 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b62ddb9cb1ec0a098ad4bbf9344d0713fa193ae1a80af55febcff2627b6a00c1" dependencies = [ - "getrandom 0.2.17", + "getrandom", "instant", "rand", ] [[package]] name = "backtrace" -version = "0.3.76" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb531853791a215d7c62a30daf0dde835f381ab5de4589cfe7c649d2cbe92bd6" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" dependencies = [ "addr2line", + "cc", "cfg-if", "libc", "miniz_oxide", "object", "rustc-demangle", - "windows-link", ] +[[package]] +name = "base16ct" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" + [[package]] name = "base64" version = "0.13.1" @@ -589,12 +664,6 @@ version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" -[[package]] -name = "base64" -version = "0.22.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" - [[package]] name = "base64-simd" version = "0.8.0" @@ -607,9 +676,9 @@ dependencies = [ [[package]] name = "base64ct" -version = "1.8.3" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" [[package]] name = "bincode" @@ -628,9 +697,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.10.0" +version = "2.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" +checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" [[package]] name = "blake2" @@ -652,15 +721,15 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.19.1" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dd9dc738b7a8311c7ade152424974d8115f2cdad61e8dab8dac9f2362298510" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" [[package]] name = "bytemuck" -version = "1.24.0" +version = "1.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fbdf580320f38b612e485521afda1ee26d10cc9884efaaa750d383e13e3c5f4" +checksum = "ed2490600f404f2b94c167e31d3ed1d5f3c225a0f3b80230053b3e0b7b962bd9" [[package]] name = "byteorder" @@ -670,9 +739,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.11.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" [[package]] name = "bytes-utils" @@ -686,33 +755,25 @@ dependencies = [ [[package]] name = "bytesize" -version = "1.3.3" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e93abca9e28e0a1b9877922aacb20576e05d4679ffa78c3d6dc22a26a216659" - -[[package]] -name = "byteview" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6236364b88b9b6d0bc181ba374cf1ab55ba3ef97a1cb6f8cddad48a273767fb5" +checksum = "a3e368af43e418a04d52505cf3dbc23dda4e3407ae2fa99fd0e4f308ce546acc" [[package]] name = "cc" -version = "1.2.54" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6354c81bbfd62d9cfa9cb3c773c2b7b2a3a482d569de977fd0e961f6e7c00583" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" dependencies = [ - "find-msvc-tools", "jobserver", "libc", - "shlex", ] [[package]] name = "cfg-if" -version = "1.0.4" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "cfg_aliases" @@ -720,24 +781,19 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" -[[package]] -name = "cfg_aliases" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" - [[package]] name = "chrono" -version = "0.4.43" +version = "0.4.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fac4744fb15ae8337dc853fee7fb3f4e48c0fbaa23d0afe49c447b4fab126118" +checksum = "9f13690e35a5e4ace198e7beea2895d29f3a9cc55015fcebe6336bd2010af9eb" dependencies = [ + "android-tzdata", "iana-time-zone", "js-sys", "num-traits", "serde", "wasm-bindgen", - "windows-link", + "windows-targets 0.52.0", ] [[package]] @@ -763,9 +819,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.54" +version = "4.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6e6ff9dcd79cff5cd969a17a545d79e84ab086e444102a591e288a8aa3ce394" +checksum = "1e578d6ec4194633722ccf9544794b71b1385c3c027efe0c55db226fc880865c" dependencies = [ "clap_builder", "clap_derive", @@ -773,9 +829,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.54" +version = "4.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa42cf4d2b7a41bc8f663a7cab4031ebafa1bf3875705bfaf8466dc60ab52c00" +checksum = "4df4df40ec50c46000231c914968278b1eb05098cf8f1b3a518a95030e71d1c7" dependencies = [ "anstream", "anstyle", @@ -785,50 +841,33 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.49" +version = "4.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a0b5487afeab2deb2ff4e03a807ad1a03ac532ff5a2cee5d86884440c7f7671" +checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" dependencies = [ - "heck 0.5.0", + "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.48", ] [[package]] name = "clap_lex" -version = "0.7.7" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3e64b0cc0439b12df2fa678eae89a1c56a529fd067a9115f7827f1fffd22b32" +checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" [[package]] name = "colorchoice" -version = "1.0.4" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" +checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" [[package]] -name = "compare" -version = "0.0.6" +name = "const-oid" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea0095f6103c2a8b44acd6fd15960c801dafebf02e21940360833e0673f48ba7" - -[[package]] -name = "compression-codecs" -version = "0.4.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00828ba6fd27b45a448e57dbfe84f1029d4c9f26b368157e9a448a5f49a2ec2a" -dependencies = [ - "compression-core", - "zstd", - "zstd-safe", -] - -[[package]] -name = "compression-core" -version = "0.4.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75984efb6ed102a0d42db99afb6c1948f0380d1d91808d5529916e6c08b49d8d" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" [[package]] name = "core-foundation" @@ -840,124 +879,90 @@ dependencies = [ "libc", ] -[[package]] -name = "core-foundation" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" -dependencies = [ - "core-foundation-sys", - "libc", -] - [[package]] name = "core-foundation-sys" -version = "0.8.7" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] name = "cpufeatures" -version = "0.2.17" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" dependencies = [ "libc", ] -[[package]] -name = "crc" -version = "3.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9710d3b3739c2e349eb44fe848ad0b7c8cb1e42bd87ee49371df2f7acaf3e675" -dependencies = [ - "crc-catalog", -] - -[[package]] -name = "crc-catalog" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" - -[[package]] -name = "crc-fast" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fd92aca2c6001b1bf5ba0ff84ee74ec8501b52bbef0cac80bf25a6c1d87a83d" -dependencies = [ - "crc", - "digest", - "rustversion", - "spin 0.10.0", -] - [[package]] name = "crc32c" -version = "0.6.8" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a47af21622d091a8f0fb295b88bc886ac74efcc613efc19f5d0b21de5c89e47" +checksum = "d8f48d60e5b4d2c53d5c2b1d8a58c849a70ae5e5509b08a48d047e3b65714a74" dependencies = [ "rustc_version", ] [[package]] name = "crc32fast" -version = "1.5.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" +checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" dependencies = [ "cfg-if", ] [[package]] name = "crossbeam-channel" -version = "0.5.15" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82b8f8f868b36967f9606790d1903570de9ceaf870a7bf9fbbd3016d636a2cb2" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +checksum = "176dc175b78f56c0f321911d9c8eb2b77a78a4860b9c19db83835fea1a46649b" dependencies = [ "crossbeam-utils", ] [[package]] name = "crossbeam-queue" -version = "0.3.12" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f58bbc28f91df819d0aa2a2c00cd19754769c2fad90579b3592b1c9ba7a3115" +checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" dependencies = [ "crossbeam-utils", ] -[[package]] -name = "crossbeam-skiplist" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df29de440c58ca2cc6e587ec3d22347551a32435fbde9d2bff64e78a9ffa151b" -dependencies = [ - "crossbeam-epoch", - "crossbeam-utils", -] - [[package]] name = "crossbeam-utils" -version = "0.8.21" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" +checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" + +[[package]] +name = "crypto-bigint" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" +dependencies = [ + "generic-array", + "rand_core", + "subtle", + "zeroize", +] + +[[package]] +name = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "rand_core", + "subtle", +] [[package]] name = "crypto-common" -version = "0.1.7" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array", "rand_core", @@ -975,9 +980,9 @@ dependencies = [ [[package]] name = "darling" -version = "0.20.11" +version = "0.20.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee" +checksum = "fc5d6b04b3fd0ba9926f945895de7d806260a2d7431ba82e7edaecb043c4c6b8" dependencies = [ "darling_core", "darling_macro", @@ -985,27 +990,27 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.11" +version = "0.20.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e" +checksum = "04e48a959bcd5c761246f5d090ebc2fbf7b9cd527a492b07a67510c108f1e7e3" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", "strsim", - "syn 2.0.114", + "syn 2.0.48", ] [[package]] name = "darling_macro" -version = "0.20.11" +version = "0.20.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" +checksum = "1d1545d67a2149e1d93b7e5c7752dce5a7426eb5d1357ddcfd89336b94444f77" dependencies = [ "darling_core", "quote", - "syn 2.0.114", + "syn 2.0.48", ] [[package]] @@ -1019,24 +1024,20 @@ dependencies = [ ] [[package]] -name = "dashmap" -version = "6.1.0" +name = "der" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf" +checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" dependencies = [ - "cfg-if", - "crossbeam-utils", - "hashbrown 0.14.5", - "lock_api", - "once_cell", - "parking_lot_core", + "const-oid", + "zeroize", ] [[package]] name = "deranged" -version = "0.5.5" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ececcb659e7ba858fb4f10388c250a7252eb0a27373f1a72b8748afdd248e587" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" dependencies = [ "powerfmt", ] @@ -1063,54 +1064,57 @@ dependencies = [ "subtle", ] -[[package]] -name = "displaydoc" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.114", -] - -[[package]] -name = "double-ended-peekable" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0d05e1c0dbad51b52c38bda7adceef61b9efc2baf04acfe8726a8c4630a6f57" - [[package]] name = "dyn-clone" -version = "1.0.20" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" +checksum = "545b22097d44f8a9581187cdf93de7a71e4722bf51200cfaba810865b49a495d" + +[[package]] +name = "ecdsa" +version = "0.14.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" +dependencies = [ + "der", + "elliptic-curve", + "rfc6979", + "signature", +] [[package]] name = "either" -version = "1.15.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] -name = "encoding_rs" -version = "0.8.35" +name = "elliptic-curve" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" +checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" dependencies = [ - "cfg-if", + "base16ct", + "crypto-bigint 0.4.9", + "der", + "digest", + "ff", + "generic-array", + "group", + "pkcs8", + "rand_core", + "sec1", + "subtle", + "zeroize", ] [[package]] -name = "enum_dispatch" -version = "0.3.13" +name = "encoding_rs" +version = "0.8.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa18ce2bc66555b3218614519ac839ddb759a7d6720732f979ef8d13be147ecd" +checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" dependencies = [ - "once_cell", - "proc-macro2", - "quote", - "syn 2.0.114", + "cfg-if", ] [[package]] @@ -1128,18 +1132,32 @@ dependencies = [ [[package]] name = "equivalent" -version = "1.0.2" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "err-derive" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c34a887c8df3ed90498c1c437ce21f211c8e27672921a8ffa293cb8d6d4caa9e" +dependencies = [ + "proc-macro-error", + "proc-macro2", + "quote", + "rustversion", + "syn 1.0.109", + "synstructure", +] [[package]] name = "errno" -version = "0.3.14" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -1156,15 +1174,19 @@ checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a" [[package]] name = "fastrand" -version = "2.3.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" [[package]] -name = "find-msvc-tools" -version = "0.1.8" +name = "ff" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8591b0bcc8a98a64310a2fae1bb3e9b8564dd10e381e6e28010fde8e8e8568db" +checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" +dependencies = [ + "rand_core", + "subtle", +] [[package]] name = "fixedbitset" @@ -1172,46 +1194,17 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" -[[package]] -name = "fjall" -version = "2.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b25ad44cd4360a0448a9b5a0a6f1c7a621101cca4578706d43c9a821418aebc" -dependencies = [ - "byteorder", - "byteview", - "dashmap 6.1.0", - "log", - "lsm-tree", - "path-absolutize", - "std-semaphore", - "tempfile", - "xxhash-rust", -] - [[package]] name = "fnv" version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" -[[package]] -name = "foldhash" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" - -[[package]] -name = "foldhash" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" - [[package]] name = "form_urlencoded" -version = "1.2.2" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ "percent-encoding", ] @@ -1222,9 +1215,9 @@ version = "0.1.1" [[package]] name = "futures" -version = "0.3.31" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" dependencies = [ "futures-channel", "futures-core", @@ -1237,9 +1230,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.31" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" dependencies = [ "futures-core", "futures-sink", @@ -1247,15 +1240,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.31" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" [[package]] name = "futures-executor" -version = "0.3.31" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" dependencies = [ "futures-core", "futures-task", @@ -1264,38 +1257,38 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.31" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" [[package]] name = "futures-macro" -version = "0.3.31" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.48", ] [[package]] name = "futures-sink" -version = "0.3.31" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" [[package]] name = "futures-task" -version = "0.3.31" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] name = "futures-util" -version = "0.3.31" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ "futures-channel", "futures-core", @@ -1311,24 +1304,21 @@ dependencies = [ [[package]] name = "garage" -version = "1.3.1" +version = "1.0.0" dependencies = [ "assert-json-diff", "async-trait", + "aws-config", "aws-sdk-s3", - "aws-smithy-runtime", "backtrace", "base64 0.21.7", "bytes", "bytesize", "chrono", - "crc32fast", "format_table", "futures", - "garage_api_admin", - "garage_api_common", - "garage_api_k2v", - "garage_api_s3", + "futures-util", + "garage_api", "garage_block", "garage_db", "garage_model", @@ -1340,9 +1330,9 @@ dependencies = [ "git-version", "hex", "hmac", - "http 1.4.0", + "http 1.0.0", "http-body-util", - "hyper 1.8.1", + "hyper 1.1.0", "hyper-util", "k2v-client", "kuska-sodiumoxide", @@ -1351,7 +1341,10 @@ dependencies = [ "opentelemetry-otlp", "opentelemetry-prometheus", "parse_duration", + "prometheus", + "rand", "serde", + "serde_bytes", "serde_json", "sha1", "sha2", @@ -1360,108 +1353,29 @@ dependencies = [ "syslog-tracing", "timeago", "tokio", + "toml", "tracing", - "tracing-journald", "tracing-subscriber", ] [[package]] -name = "garage_api_admin" -version = "1.3.1" +name = "garage_api" +version = "1.0.0" dependencies = [ + "aes-gcm", "argon2", + "async-compression", "async-trait", - "futures", - "garage_api_common", - "garage_model", - "garage_rpc", - "garage_table", - "garage_util", - "hex", - "http 1.4.0", - "hyper 1.8.1", - "opentelemetry", - "opentelemetry-prometheus", - "prometheus", - "serde", - "serde_json", - "thiserror 2.0.18", - "tokio", - "tracing", - "url", -] - -[[package]] -name = "garage_api_common" -version = "1.3.1" -dependencies = [ "base64 0.21.7", "bytes", "chrono", "crc32c", "crc32fast", "crypto-common", - "futures", - "garage_model", - "garage_table", - "garage_util", - "hex", - "hmac", - "http 1.4.0", - "http-body-util", - "hyper 1.8.1", - "hyper-util", - "md-5", - "nom", - "opentelemetry", - "pin-project", - "serde", - "serde_json", - "sha1", - "sha2", - "thiserror 2.0.18", - "tokio", - "tracing", - "url", -] - -[[package]] -name = "garage_api_k2v" -version = "1.3.1" -dependencies = [ - "base64 0.21.7", - "futures", - "garage_api_common", - "garage_model", - "garage_table", - "garage_util", - "http 1.4.0", - "http-body-util", - "hyper 1.8.1", - "opentelemetry", - "percent-encoding", - "serde", - "serde_json", - "thiserror 2.0.18", - "tokio", - "tracing", - "url", -] - -[[package]] -name = "garage_api_s3" -version = "1.3.1" -dependencies = [ - "aes-gcm", - "async-compression", - "base64 0.21.7", - "bytes", - "chrono", - "crc32c", - "crc32fast", + "err-derive", "form_urlencoded", "futures", - "garage_api_common", + "futures-util", "garage_block", "garage_model", "garage_net", @@ -1469,33 +1383,39 @@ dependencies = [ "garage_table", "garage_util", "hex", - "http 1.4.0", + "hmac", + "http 1.0.0", "http-body-util", "http-range", "httpdate", - "hyper 1.8.1", + "hyper 1.1.0", + "hyper-util", + "idna", "md-5", "multer", + "nom", "opentelemetry", + "opentelemetry-prometheus", "percent-encoding", "pin-project", + "prometheus", "quick-xml", "roxmltree", "serde", + "serde_bytes", "serde_json", "sha1", "sha2", - "thiserror 2.0.18", "tokio", "tokio-stream", - "tokio-util 0.7.18", + "tokio-util 0.7.10", "tracing", "url", ] [[package]] name = "garage_block" -version = "1.3.1" +version = "1.0.0" dependencies = [ "arc-swap", "async-compression", @@ -1503,6 +1423,7 @@ dependencies = [ "bytes", "bytesize", "futures", + "futures-util", "garage_db", "garage_net", "garage_rpc", @@ -1512,36 +1433,40 @@ dependencies = [ "opentelemetry", "rand", "serde", + "serde_bytes", "tokio", - "tokio-util 0.7.18", + "tokio-util 0.7.10", "tracing", "zstd", ] [[package]] name = "garage_db" -version = "1.3.1" +version = "1.0.0" dependencies = [ - "fjall", + "err-derive", "heed", + "hexdump", "mktemp", - "parking_lot", + "opentelemetry", "r2d2", "r2d2_sqlite", "rusqlite", - "thiserror 2.0.18", "tracing", ] [[package]] name = "garage_model" -version = "1.3.1" +version = "1.0.0" dependencies = [ + "arc-swap", "async-trait", "base64 0.21.7", "blake2", "chrono", + "err-derive", "futures", + "futures-util", "garage_block", "garage_db", "garage_net", @@ -1549,12 +1474,12 @@ dependencies = [ "garage_table", "garage_util", "hex", - "http 1.4.0", + "http 1.0.0", + "opentelemetry", "parse_duration", "rand", "serde", "serde_bytes", - "thiserror 2.0.18", "tokio", "tracing", "zstd", @@ -1562,11 +1487,13 @@ dependencies = [ [[package]] name = "garage_net" -version = "1.3.1" +version = "1.0.0" dependencies = [ "arc-swap", + "async-trait", "bytes", "cfg-if", + "err-derive", "futures", "hex", "kuska-handshake", @@ -1579,21 +1506,24 @@ dependencies = [ "rand", "rmp-serde", "serde", - "thiserror 2.0.18", "tokio", "tokio-stream", - "tokio-util 0.7.18", + "tokio-util 0.7.10", ] [[package]] name = "garage_rpc" -version = "1.3.1" +version = "1.0.0" dependencies = [ "arc-swap", "async-trait", + "bytes", "bytesize", + "err-derive", "format_table", "futures", + "futures-util", + "garage_db", "garage_net", "garage_util", "gethostname", @@ -1612,17 +1542,18 @@ dependencies = [ "serde", "serde_bytes", "serde_json", - "thiserror 2.0.18", "tokio", + "tokio-stream", "tracing", ] [[package]] name = "garage_table" -version = "1.3.1" +version = "1.0.0" dependencies = [ "arc-swap", "async-trait", + "bytes", "futures", "futures-util", "garage_db", @@ -1640,20 +1571,23 @@ dependencies = [ [[package]] name = "garage_util" -version = "1.3.1" +version = "1.0.0" dependencies = [ "arc-swap", "async-trait", "blake2", + "bytes", "bytesize", "chrono", + "digest", + "err-derive", "futures", "garage_db", "garage_net", "hex", "hexdump", - "http 1.4.0", - "hyper 1.8.1", + "http 1.0.0", + "hyper 1.1.0", "lazy_static", "mktemp", "opentelemetry", @@ -1663,7 +1597,6 @@ dependencies = [ "serde", "serde_json", "sha2", - "thiserror 2.0.18", "tokio", "toml", "tracing", @@ -1672,19 +1605,20 @@ dependencies = [ [[package]] name = "garage_web" -version = "1.3.1" +version = "1.0.0" dependencies = [ - "garage_api_common", - "garage_api_s3", + "err-derive", + "futures", + "garage_api", "garage_model", "garage_table", "garage_util", - "http 1.4.0", + "http 1.0.0", "http-body-util", - "hyper 1.8.1", + "hyper 1.1.0", + "hyper-util", "opentelemetry", "percent-encoding", - "thiserror 2.0.18", "tokio", "tracing", ] @@ -1711,27 +1645,15 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.17" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" +checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" dependencies = [ "cfg-if", "libc", "wasi", ] -[[package]] -name = "getrandom" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" -dependencies = [ - "cfg-if", - "libc", - "r-efi", - "wasip2", -] - [[package]] name = "ghash" version = "0.5.1" @@ -1744,9 +1666,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.32.3" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e629b9b98ef3dd8afe6ca2bd0f89306cec16d43d907889945bc5d6687f2f13c7" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" [[package]] name = "git-version" @@ -1765,50 +1687,55 @@ checksum = "53010ccb100b96a67bc32c0175f0ed1426b31b655d562898e57325f81c023ac0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.48", ] [[package]] -name = "guardian" -version = "1.3.0" +name = "group" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17e2ac29387b1aa07a1e448f7bb4f35b500787971e965b02842b900afa5c8f6f" +checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" +dependencies = [ + "ff", + "rand_core", + "subtle", +] [[package]] name = "h2" -version = "0.3.27" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0beca50380b1fc32983fc1cb4587bfa4bb9e78fc259aad4a0032d2080309222d" +checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" dependencies = [ "bytes", "fnv", "futures-core", "futures-sink", "futures-util", - "http 0.2.12", - "indexmap 2.13.0", + "http 0.2.11", + "indexmap 2.2.2", "slab", "tokio", - "tokio-util 0.7.18", + "tokio-util 0.7.10", "tracing", ] [[package]] name = "h2" -version = "0.4.13" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f44da3a8150a6703ed5d34e164b875fd14c2cdab9af1252a9a1020bde2bdc54" +checksum = "31d030e59af851932b72ceebadf4a2b5986dba4c3b99dd2493f8273a0f151943" dependencies = [ - "atomic-waker", "bytes", "fnv", "futures-core", "futures-sink", - "http 1.4.0", - "indexmap 2.13.0", + "futures-util", + "http 1.0.0", + "indexmap 2.2.2", "slab", "tokio", - "tokio-util 0.7.18", + "tokio-util 0.7.10", "tracing", ] @@ -1820,41 +1747,21 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "hashbrown" -version = "0.14.5" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" dependencies = [ "ahash", "allocator-api2", ] -[[package]] -name = "hashbrown" -version = "0.15.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" -dependencies = [ - "foldhash 0.1.5", -] - -[[package]] -name = "hashbrown" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" -dependencies = [ - "allocator-api2", - "equivalent", - "foldhash 0.2.0", -] - [[package]] name = "hashlink" -version = "0.10.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7382cf6263419f2d8df38c55d7da83da5c18aef87fc7a7fc1fb1e344edfe14c1" +checksum = "692eaaf7f7607518dd3cef090f1474b61edc5301d8012f09579920df68b725ee" dependencies = [ - "hashbrown 0.15.5", + "hashbrown 0.14.3", ] [[package]] @@ -1868,9 +1775,9 @@ dependencies = [ [[package]] name = "heck" -version = "0.5.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "heed" @@ -1912,9 +1819,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.5.2" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" +checksum = "5d3d0e0f38255e7fa3cf31335b3a56f05febd18025f4db5ef7a0cfb4f8da651f" [[package]] name = "hex" @@ -1924,11 +1831,12 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hexdump" -version = "0.1.2" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf31ab66ed8145a1c7427bd8e9b42a6131bd74ccf444f69b9e620c2e73ded832" +checksum = "e40283dadb02f3af778878be1d717b17b4e4ab92e1d935ab03a730b0542905f2" dependencies = [ "arrayvec", + "itertools 0.4.19", ] [[package]] @@ -1942,18 +1850,18 @@ dependencies = [ [[package]] name = "home" -version = "0.5.12" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc627f471c528ff0c4a49e1d5e60450c8f6461dd6d10ba9dcd3a61d3dff7728d" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] name = "http" -version = "0.2.12" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" dependencies = [ "bytes", "fnv", @@ -1962,11 +1870,12 @@ dependencies = [ [[package]] name = "http" -version = "1.4.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a" +checksum = "b32afd38673a8016f7c9ae69e5af41a58f81b1d31689040f2f1959594ce194ea" dependencies = [ "bytes", + "fnv", "itoa", ] @@ -1977,30 +1886,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", - "http 0.2.12", + "http 0.2.11", "pin-project-lite", ] [[package]] name = "http-body" -version = "1.0.1" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" dependencies = [ "bytes", - "http 1.4.0", + "http 1.0.0", ] [[package]] name = "http-body-util" -version = "0.1.3" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" +checksum = "41cb79eb393015dadd30fc252023adb0b2400a0caee0fa2a077e6e21a551e840" dependencies = [ "bytes", - "futures-core", - "http 1.4.0", - "http-body 1.0.1", + "futures-util", + "http 1.0.0", + "http-body 1.0.0", "pin-project-lite", ] @@ -2018,9 +1927,9 @@ checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" [[package]] name = "httparse" -version = "1.10.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "httpdate" @@ -2030,28 +1939,28 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "humantime" -version = "2.3.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "135b12329e5e3ce057a9f972339ea52bc954fe1e9358ef27f95e89716fbc5424" +checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.32" +version = "0.14.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41dfc780fdec9373c01bae43289ea34c972e40ee3c9f6b3c8801a35f35586ce7" +checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" dependencies = [ "bytes", "futures-channel", "futures-core", "futures-util", - "h2 0.3.27", - "http 0.2.12", + "h2 0.3.24", + "http 0.2.11", "http-body 0.4.6", "httparse", "httpdate", "itoa", "pin-project-lite", - "socket2 0.5.10", + "socket2", "tokio", "tower-service", "tracing", @@ -2060,23 +1969,20 @@ dependencies = [ [[package]] name = "hyper" -version = "1.8.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ab2d4f250c3d7b1c9fcdff1cece94ea4e2dfbec68614f7b87cb205f24ca9d11" +checksum = "fb5aa53871fc917b1a9ed87b683a5d86db645e23acb32c2e0785a353e522fb75" dependencies = [ - "atomic-waker", "bytes", "futures-channel", - "futures-core", - "h2 0.4.13", - "http 1.4.0", - "http-body 1.0.1", + "futures-util", + "h2 0.4.2", + "http 1.0.0", + "http-body 1.0.0", "httparse", "httpdate", "itoa", "pin-project-lite", - "pin-utils", - "smallvec", "tokio", "want", ] @@ -2088,10 +1994,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", - "http 0.2.12", - "hyper 0.14.32", + "http 0.2.11", + "hyper 0.14.28", "log", - "rustls 0.21.12", + "rustls 0.21.10", "rustls-native-certs 0.6.3", "tokio", "tokio-rustls 0.24.1", @@ -2104,11 +2010,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0bea761b46ae2b24eb4aef630d8d1c398157b6fc29e6350ecf090a0b70c952c" dependencies = [ "futures-util", - "http 1.4.0", - "hyper 1.8.1", + "http 1.0.0", + "hyper 1.1.0", "hyper-util", - "rustls 0.22.4", - "rustls-native-certs 0.7.3", + "log", + "rustls 0.22.2", + "rustls-native-certs 0.7.0", "rustls-pki-types", "tokio", "tokio-rustls 0.25.0", @@ -2121,7 +2028,7 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" dependencies = [ - "hyper 0.14.32", + "hyper 0.14.28", "pin-project-lite", "tokio", "tokio-io-timeout", @@ -2129,42 +2036,34 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.19" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "727805d60e7938b76b826a6ef209eb70eaa1812794f9424d4a4e2d740662df5f" +checksum = "ca38ef113da30126bbff9cd1705f9273e15d45498615d138b0c20279ac7a76aa" dependencies = [ - "base64 0.22.1", "bytes", "futures-channel", - "futures-core", "futures-util", - "http 1.4.0", - "http-body 1.0.1", - "hyper 1.8.1", - "ipnet", - "libc", - "percent-encoding", + "http 1.0.0", + "http-body 1.0.0", + "hyper 1.1.0", "pin-project-lite", - "socket2 0.6.2", - "system-configuration 0.6.1", + "socket2", "tokio", - "tower-layer", + "tower", "tower-service", "tracing", - "windows-registry", ] [[package]] name = "iana-time-zone" -version = "0.1.64" +version = "0.1.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33e57f83510bb73707521ebaffa789ec8caf86f9657cad665b092b581d40e9fb" +checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", - "log", "wasm-bindgen", "windows-core", ] @@ -2178,87 +2077,6 @@ dependencies = [ "cc", ] -[[package]] -name = "icu_collections" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43" -dependencies = [ - "displaydoc", - "potential_utf", - "yoke", - "zerofrom", - "zerovec", -] - -[[package]] -name = "icu_locale_core" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6" -dependencies = [ - "displaydoc", - "litemap", - "tinystr", - "writeable", - "zerovec", -] - -[[package]] -name = "icu_normalizer" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599" -dependencies = [ - "icu_collections", - "icu_normalizer_data", - "icu_properties", - "icu_provider", - "smallvec", - "zerovec", -] - -[[package]] -name = "icu_normalizer_data" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a" - -[[package]] -name = "icu_properties" -version = "2.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec" -dependencies = [ - "icu_collections", - "icu_locale_core", - "icu_properties_data", - "icu_provider", - "zerotrie", - "zerovec", -] - -[[package]] -name = "icu_properties_data" -version = "2.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af" - -[[package]] -name = "icu_provider" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614" -dependencies = [ - "displaydoc", - "icu_locale_core", - "writeable", - "yoke", - "zerofrom", - "zerotrie", - "zerovec", -] - [[package]] name = "ident_case" version = "1.0.1" @@ -2267,23 +2085,12 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "1.1.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" dependencies = [ - "idna_adapter", - "smallvec", - "utf8_iter", -] - -[[package]] -name = "idna_adapter" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" -dependencies = [ - "icu_normalizer", - "icu_properties", + "unicode-bidi", + "unicode-normalization", ] [[package]] @@ -2298,46 +2105,37 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.13.0" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" +checksum = "824b2ae422412366ba479e8111fd301f7b5faece8149317bb81925979a53f520" dependencies = [ "equivalent", - "hashbrown 0.16.1", + "hashbrown 0.14.3", ] [[package]] name = "inout" -version = "0.1.4" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01" +checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" dependencies = [ "generic-array", ] [[package]] name = "instant" -version = "0.1.13" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ "cfg-if", ] -[[package]] -name = "interval-heap" -version = "0.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11274e5e8e89b8607cfedc2910b6626e998779b48a019151c7604d0adcb86ac6" -dependencies = [ - "compare", -] - [[package]] name = "ipnet" -version = "2.11.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "ipnetwork" @@ -2350,20 +2148,20 @@ dependencies = [ [[package]] name = "is-terminal" -version = "0.4.17" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3640c1c38b8e4e43584d8df18be5fc6b0aa314ce6ebf51b53313d4306cca8e46" +checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" dependencies = [ "hermit-abi", "libc", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] -name = "is_terminal_polyfill" -version = "1.70.2" +name = "itertools" +version = "0.4.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" +checksum = "c4a9b56eb56058f43dc66e58f40a214b2ccbc9f3df51861b63d51dec7b65bc3f" [[package]] name = "itertools" @@ -2385,39 +2183,38 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.17" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "jobserver" -version = "0.1.34" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" +checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" dependencies = [ - "getrandom 0.3.4", "libc", ] [[package]] name = "js-sys" -version = "0.3.85" +version = "0.3.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c942ebf8e95485ca0d52d97da7c5a2c387d0e7f0ba4c35e93bfcaee045955b3" +checksum = "9a1d36f1235bc969acba30b7f5990b864423a6068a10f7c90ae8f0112e3a59d1" dependencies = [ - "once_cell", "wasm-bindgen", ] [[package]] name = "json-patch" -version = "1.4.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec9ad60d674508f3ca8f380a928cfe7b096bc729c4e2dbfe3852bc45da3ab30b" +checksum = "55ff1e1486799e3f64129f8ccad108b38290df9cd7015cd31bed17239f0789d6" dependencies = [ "serde", "serde_json", - "thiserror 1.0.69", + "thiserror", + "treediff", ] [[package]] @@ -2430,7 +2227,7 @@ dependencies = [ "pest_derive", "regex", "serde_json", - "thiserror 1.0.69", + "thiserror", ] [[package]] @@ -2440,12 +2237,12 @@ dependencies = [ "aws-sdk-config", "aws-sigv4", "base64 0.21.7", - "clap 4.5.54", + "clap 4.4.18", "format_table", "hex", - "http 1.4.0", + "http 1.0.0", "http-body-util", - "hyper 1.8.1", + "hyper 1.1.0", "hyper-rustls 0.26.0", "hyper-util", "log", @@ -2453,16 +2250,17 @@ dependencies = [ "serde", "serde_json", "sha2", - "thiserror 2.0.18", + "thiserror", "tokio", + "tracing", "tracing-subscriber", ] [[package]] name = "k8s-openapi" -version = "0.21.1" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "550f99d93aa4c2b25de527bce492d772caf5e21d7ac9bd4b508ba781c8d91e30" +checksum = "301f367a36090b7dfdaac248ee3ed4f14a6a8292e7bec0f1c5e6e2e1f181cd33" dependencies = [ "base64 0.21.7", "chrono", @@ -2496,9 +2294,9 @@ dependencies = [ "either", "futures", "home", - "http 0.2.12", + "http 0.2.11", "http-body 0.4.6", - "hyper 0.14.32", + "hyper 0.14.28", "hyper-rustls 0.24.2", "hyper-timeout", "jsonpath-rust", @@ -2506,15 +2304,15 @@ dependencies = [ "kube-core", "pem", "pin-project", - "rustls 0.21.12", + "rustls 0.21.10", "rustls-pemfile 1.0.4", "secrecy", "serde", "serde_json", "serde_yaml", - "thiserror 1.0.69", + "thiserror", "tokio", - "tokio-util 0.7.18", + "tokio-util 0.7.10", "tower", "tower-http", "tracing", @@ -2528,14 +2326,14 @@ checksum = "a6b42844e9172f631b8263ea9ce003b9251da13beb1401580937ad206dd82f4c" dependencies = [ "chrono", "form_urlencoded", - "http 0.2.12", + "http 0.2.11", "json-patch", "k8s-openapi", "once_cell", "schemars", "serde", "serde_json", - "thiserror 1.0.69", + "thiserror", ] [[package]] @@ -2548,7 +2346,7 @@ dependencies = [ "proc-macro2", "quote", "serde_json", - "syn 2.0.114", + "syn 2.0.48", ] [[package]] @@ -2562,18 +2360,18 @@ dependencies = [ "backoff", "derivative", "futures", - "hashbrown 0.14.5", + "hashbrown 0.14.3", "json-patch", "k8s-openapi", "kube-client", - "parking_lot", + "parking_lot 0.12.1", "pin-project", "serde", "serde_json", "smallvec", - "thiserror 1.0.69", + "thiserror", "tokio", - "tokio-util 0.7.18", + "tokio-util 0.7.10", "tracing", ] @@ -2587,7 +2385,7 @@ dependencies = [ "hex", "kuska-sodiumoxide", "log", - "thiserror 1.0.69", + "thiserror", ] [[package]] @@ -2603,15 +2401,15 @@ dependencies = [ [[package]] name = "lazy_static" -version = "1.5.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.180" +version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcc35a38544a891a5f7c865aca548a982ccb3b8650a5b06d0fd33a10283c56fc" +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "libsodium-sys" @@ -2627,9 +2425,9 @@ dependencies = [ [[package]] name = "libsqlite3-sys" -version = "0.35.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "133c182a6a2c87864fe97778797e46c7e999672690dc9fa3ee8e241aa4a9c13f" +checksum = "0c10584274047cb335c23d3e61bcef8e323adae7c5c8c760540f73610177fc3f" dependencies = [ "cc", "pkg-config", @@ -2638,21 +2436,9 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.4.15" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" - -[[package]] -name = "linux-raw-sys" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" - -[[package]] -name = "litemap" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" [[package]] name = "lmdb-rkv-sys" @@ -2667,65 +2453,27 @@ dependencies = [ [[package]] name = "lock_api" -version = "0.4.14" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" dependencies = [ + "autocfg", "scopeguard", ] [[package]] name = "log" -version = "0.4.29" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" - -[[package]] -name = "lru" -version = "0.16.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1dc47f592c06f33f8e3aea9591776ec7c9f9e4124778ff8a3c3b87159f7e593" -dependencies = [ - "hashbrown 0.16.1", -] - -[[package]] -name = "lsm-tree" -version = "2.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "799399117a2bfb37660e08be33f470958babb98386b04185288d829df362ea15" -dependencies = [ - "byteorder", - "crossbeam-skiplist", - "double-ended-peekable", - "enum_dispatch", - "guardian", - "interval-heap", - "log", - "lz4_flex", - "path-absolutize", - "quick_cache", - "rustc-hash", - "self_cell", - "tempfile", - "value-log", - "varint-rs", - "xxhash-rust", -] - -[[package]] -name = "lz4_flex" -version = "0.11.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08ab2867e3eeeca90e844d1940eab391c9dc5228783db2ed999acbc0a9ed375a" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "matchers" -version = "0.2.0" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" dependencies = [ - "regex-automata", + "regex-automata 0.1.10", ] [[package]] @@ -2740,9 +2488,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.6" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" +checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" [[package]] name = "mime" @@ -2758,22 +2506,22 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.8.9" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" +checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" dependencies = [ - "adler2", + "adler", ] [[package]] name = "mio" -version = "1.1.1" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc" +checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" dependencies = [ "libc", "wasi", - "windows-sys 0.61.2", + "windows-sys 0.48.0", ] [[package]] @@ -2787,18 +2535,19 @@ dependencies = [ [[package]] name = "multer" -version = "3.1.0" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83e87776546dc87511aa5ee218730c92b666d7264ab6ed41f9d215af9cd5224b" +checksum = "a15d522be0a9c3e46fd2632e272d178f56387bdb5c9fbb3a36c649062e9b5219" dependencies = [ "bytes", "encoding_rs", "futures-util", - "http 1.4.0", + "http 1.0.0", "httparse", + "log", "memchr", "mime", - "spin 0.9.8", + "spin", "version_check", ] @@ -2810,13 +2559,12 @@ checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" [[package]] name = "nix" -version = "0.29.0" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" +checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.4.2", "cfg-if", - "cfg_aliases 0.2.1", "libc", ] @@ -2838,11 +2586,12 @@ dependencies = [ [[package]] name = "nu-ansi-term" -version = "0.50.3" +version = "0.46.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" dependencies = [ - "windows-sys 0.61.2", + "overload", + "winapi", ] [[package]] @@ -2882,24 +2631,25 @@ dependencies = [ [[package]] name = "num-conv" -version = "0.2.0" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf97ec579c3c42f953ef76dbf8d55ac91fb219dde70e49aa4a6b7d74e9919050" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" [[package]] name = "num-integer" -version = "0.1.46" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" dependencies = [ + "autocfg", "num-traits", ] [[package]] name = "num-iter" -version = "0.1.45" +version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" +checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" dependencies = [ "autocfg", "num-integer", @@ -2920,18 +2670,18 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.19" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" dependencies = [ "autocfg", ] [[package]] name = "num_cpus" -version = "1.17.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91df4bbde75afed763b708b7eee1e8e7651e02d97f6d5dd763e89367e957b23b" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ "hermit-abi", "libc", @@ -2939,24 +2689,18 @@ dependencies = [ [[package]] name = "object" -version = "0.37.3" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff76201f031d8863c38aa7f905eca4f53abbfa15f609db4277d44cd8938f33fe" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.21.3" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" - -[[package]] -name = "once_cell_polyfill" -version = "1.70.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "opaque-debug" @@ -2966,15 +2710,9 @@ checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "openssl-probe" -version = "0.1.6" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" - -[[package]] -name = "openssl-probe" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "opentelemetry" @@ -2984,7 +2722,7 @@ checksum = "6105e89802af13fdf48c49d7646d3b533a70e536d818aae7e78ba0433d01acb8" dependencies = [ "async-trait", "crossbeam-channel", - "dashmap 4.0.2", + "dashmap", "fnv", "futures-channel", "futures-executor", @@ -2994,7 +2732,7 @@ dependencies = [ "percent-encoding", "pin-project", "rand", - "thiserror 1.0.69", + "thiserror", "tokio", "tokio-stream", ] @@ -3018,10 +2756,10 @@ dependencies = [ "async-trait", "futures", "futures-util", - "http 0.2.12", + "http 0.2.11", "opentelemetry", "prost", - "thiserror 1.0.69", + "thiserror", "tokio", "tonic", "tonic-build", @@ -3049,9 +2787,26 @@ dependencies = [ [[package]] name = "outref" -version = "0.5.2" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a80800c0488c3a21695ea981a54918fbb37abf04f4d0720c453632255e2ff0e" +checksum = "4030760ffd992bef45b0ae3f10ce1aba99e33464c90d14dd7c039884963ddc7a" + +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + +[[package]] +name = "p256" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51f44edd08f51e2ade572f141051021c5af22677e42b7dd28a88155151c33594" +dependencies = [ + "ecdsa", + "elliptic-curve", + "sha2", +] [[package]] name = "page_size" @@ -3065,25 +2820,50 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.12.5" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" +checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" +dependencies = [ + "instant", + "lock_api", + "parking_lot_core 0.8.6", +] + +[[package]] +name = "parking_lot" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", - "parking_lot_core", + "parking_lot_core 0.9.9", ] [[package]] name = "parking_lot_core" -version = "0.9.12" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" +checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" +dependencies = [ + "cfg-if", + "instant", + "libc", + "redox_syscall 0.2.16", + "smallvec", + "winapi", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" dependencies = [ "cfg-if", "libc", - "redox_syscall", + "redox_syscall 0.4.1", "smallvec", - "windows-link", + "windows-targets 0.48.5", ] [[package]] @@ -3109,54 +2889,43 @@ dependencies = [ ] [[package]] -name = "path-absolutize" -version = "3.1.1" +name = "paste" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4af381fe79fa195b4909485d99f73a80792331df0625188e707854f0b3383f5" -dependencies = [ - "path-dedot", -] - -[[package]] -name = "path-dedot" -version = "3.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07ba0ad7e047712414213ff67533e6dd477af0a4e1d14fb52343e53d30ea9397" -dependencies = [ - "once_cell", -] +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" [[package]] name = "pem" -version = "3.0.6" +version = "3.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d30c53c26bc5b31a98cd02d20f25a7c8567146caf63ed593a9d87b2775291be" +checksum = "1b8fcc794035347fb64beda2d3b462595dd2753e3f268d89c5aae77e8cf2c310" dependencies = [ - "base64 0.22.1", - "serde_core", + "base64 0.21.7", + "serde", ] [[package]] name = "percent-encoding" -version = "2.3.2" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.8.5" +version = "2.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c9eb05c21a464ea704b53158d358a31e6425db2f63a1a7312268b05fe2b75f7" +checksum = "219c0dcc30b6a27553f9cc242972b67f75b60eb0db71f0b5462f38b058c41546" dependencies = [ "memchr", + "thiserror", "ucd-trie", ] [[package]] name = "pest_derive" -version = "2.8.5" +version = "2.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f9dbced329c441fa79d80472764b1a2c7e57123553b8519b36663a2fb234ed" +checksum = "22e1288dbd7786462961e69bfd4df7848c1e37e8b74303dbdab82c3a9cdd2809" dependencies = [ "pest", "pest_generator", @@ -3164,62 +2933,63 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.8.5" +version = "2.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bb96d5051a78f44f43c8f712d8e810adb0ebf923fc9ed2655a7f66f63ba8ee5" +checksum = "1381c29a877c6d34b8c176e734f35d7f7f5b3adaefe940cb4d1bb7af94678e2e" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.48", ] [[package]] name = "pest_meta" -version = "2.8.5" +version = "2.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "602113b5b5e8621770cfd490cfd90b9f84ab29bd2b0e49ad83eb6d186cef2365" +checksum = "d0934d6907f148c22a3acbda520c7eed243ad7487a30f51f6ce52b58b7077a8a" dependencies = [ + "once_cell", "pest", "sha2", ] [[package]] name = "petgraph" -version = "0.6.5" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" +checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ "fixedbitset", - "indexmap 2.13.0", + "indexmap 2.2.2", ] [[package]] name = "pin-project" -version = "1.1.10" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a" +checksum = "0302c4a0442c456bd56f841aee5c3bfd17967563f6fadc9ceb9f9c23cf3807e0" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.10" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" +checksum = "266c042b60c9c76b8d53061e52b2e0d1116abc57cefc8c5cd671619a56ac3690" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.48", ] [[package]] name = "pin-project-lite" -version = "0.2.16" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pin-utils" @@ -3228,10 +2998,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] -name = "pkg-config" -version = "0.3.32" +name = "pkcs8" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" +checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" +dependencies = [ + "der", + "spki", +] + +[[package]] +name = "pkg-config" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb" [[package]] name = "pnet_base" @@ -3277,15 +3057,6 @@ dependencies = [ "universal-hash", ] -[[package]] -name = "potential_utf" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77" -dependencies = [ - "zerovec", -] - [[package]] name = "powerfmt" version = "0.2.0" @@ -3294,12 +3065,9 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.21" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" -dependencies = [ - "zerocopy", -] +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "pretty_env_logger" @@ -3337,26 +3105,26 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.106" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" +checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" dependencies = [ "unicode-ident", ] [[package]] name = "prometheus" -version = "0.13.4" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d33c28a30771f7f96db69893f78b857f7450d7e0237e9c8fc6427a81bae7ed1" +checksum = "449811d15fbdf5ceb5c1144416066429cf82316e2ec8ce0c1f6f8a02e7bbcf8c" dependencies = [ "cfg-if", "fnv", "lazy_static", "memchr", - "parking_lot", + "parking_lot 0.12.1", "protobuf", - "thiserror 1.0.69", + "thiserror", ] [[package]] @@ -3428,31 +3196,15 @@ dependencies = [ "serde", ] -[[package]] -name = "quick_cache" -version = "0.6.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ada44a88ef953a3294f6eb55d2007ba44646015e18613d2f213016379203ef3" -dependencies = [ - "equivalent", - "hashbrown 0.16.1", -] - [[package]] name = "quote" -version = "1.0.44" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ "proc-macro2", ] -[[package]] -name = "r-efi" -version = "5.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" - [[package]] name = "r2d2" version = "0.8.10" @@ -3460,15 +3212,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51de85fb3fb6524929c8a2eb85e6b6d363de4e8c48f9e2c2eac4944abc181c93" dependencies = [ "log", - "parking_lot", + "parking_lot 0.12.1", "scheduled-thread-pool", ] [[package]] name = "r2d2_sqlite" -version = "0.31.0" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63417e83dc891797eea3ad379f52a5986da4bca0d6ef28baf4d14034dd111b0c" +checksum = "6a982edf65c129796dba72f8775b292ef482b40d035e827a9825b3bc07ccc5f2" dependencies = [ "r2d2", "rusqlite", @@ -3502,68 +3254,92 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.17", + "getrandom", ] [[package]] name = "redox_syscall" -version = "0.5.18" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ - "bitflags 2.10.0", + "bitflags 1.3.2", +] + +[[package]] +name = "redox_syscall" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", ] [[package]] name = "regex" -version = "1.12.2" +version = "1.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4" +checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" dependencies = [ "aho-corasick", "memchr", - "regex-automata", - "regex-syntax", + "regex-automata 0.4.5", + "regex-syntax 0.8.2", ] [[package]] name = "regex-automata" -version = "0.4.13" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax 0.6.29", +] + +[[package]] +name = "regex-automata" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" dependencies = [ "aho-corasick", "memchr", - "regex-syntax", + "regex-syntax 0.8.2", ] [[package]] name = "regex-lite" -version = "0.1.8" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d942b98df5e658f56f20d592c7f868833fe38115e65c33003d8cd224b0155da" +checksum = "30b661b2f27137bdbc16f00eda72866a92bb28af1753ffbd56744fb6e2e9cd8e" [[package]] name = "regex-syntax" -version = "0.8.8" +version = "0.6.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" + +[[package]] +name = "regex-syntax" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "reqwest" -version = "0.11.27" +version = "0.11.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" +checksum = "c6920094eb85afde5e4a138be3f2de8bbdf28000f0029e72c45025a56b042251" dependencies = [ "base64 0.21.7", "bytes", "encoding_rs", "futures-core", "futures-util", - "h2 0.3.27", - "http 0.2.12", + "h2 0.3.24", + "http 0.2.11", "http-body 0.4.6", - "hyper 0.14.32", + "hyper 0.14.28", "hyper-rustls 0.24.2", "ipnet", "js-sys", @@ -3572,13 +3348,13 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls 0.21.12", + "rustls 0.21.10", "rustls-pemfile 1.0.4", "serde", "serde_json", "serde_urlencoded", "sync_wrapper", - "system-configuration 0.5.1", + "system-configuration", "tokio", "tokio-rustls 0.24.1", "tower-service", @@ -3590,34 +3366,48 @@ dependencies = [ ] [[package]] -name = "ring" -version = "0.17.14" +name = "rfc6979" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" +checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" +dependencies = [ + "crypto-bigint 0.4.9", + "hmac", + "zeroize", +] + +[[package]] +name = "ring" +version = "0.17.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" dependencies = [ "cc", - "cfg-if", - "getrandom 0.2.17", + "getrandom", "libc", + "spin", "untrusted", - "windows-sys 0.52.0", + "windows-sys 0.48.0", ] [[package]] name = "rmp" -version = "0.8.15" +version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ba8be72d372b2c9b35542551678538b562e7cf86c3315773cae48dfbfe7790c" +checksum = "7f9860a6cc38ed1da53456442089b4dfa35e7cedaa326df63017af88385e6b20" dependencies = [ + "byteorder", "num-traits", + "paste", ] [[package]] name = "rmp-serde" -version = "1.3.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72f81bee8c8ef9b577d1681a70ebbc962c232461e397b22c208c43c04b67a155" +checksum = "bffea85eea980d8a74453e5d02a8d93028f3c34725de143085a844ebe953258a" dependencies = [ + "byteorder", "rmp", "serde", ] @@ -3630,11 +3420,11 @@ checksum = "3cd14fd5e3b777a7422cca79358c57a8f6e3a703d9ac187448d0daf220c2407f" [[package]] name = "rusqlite" -version = "0.37.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "165ca6e57b20e1351573e3729b958bc62f0e48025386970b6e4d29e7a7e71f3f" +checksum = "b838eba278d213a8beaf485bd313fd580ca4505a00d5871caeb1457c55322cae" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.4.2", "fallible-iterator", "fallible-streaming-iterator", "hashlink", @@ -3644,56 +3434,37 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.27" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b50b8869d9fc858ce7266cce0194bd74df58b9d0e3f6df3a9fc8eb470d95c09d" - -[[package]] -name = "rustc-hash" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" [[package]] name = "rustc_version" -version = "0.4.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ "semver", ] [[package]] name = "rustix" -version = "0.38.44" +version = "0.38.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" +checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.4.2", "errno", "libc", - "linux-raw-sys 0.4.15", - "windows-sys 0.59.0", -] - -[[package]] -name = "rustix" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "146c9e247ccc180c1f61615433868c99f3de3ae256a30a43b49f67c2d9171f34" -dependencies = [ - "bitflags 2.10.0", - "errno", - "libc", - "linux-raw-sys 0.11.0", - "windows-sys 0.61.2", + "linux-raw-sys", + "windows-sys 0.52.0", ] [[package]] name = "rustls" -version = "0.21.12" +version = "0.21.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" +checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" dependencies = [ "log", "ring", @@ -3703,13 +3474,14 @@ dependencies = [ [[package]] name = "rustls" -version = "0.22.4" +version = "0.22.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" +checksum = "e87c9956bd9807afa1f77e0f7594af32566e830e088a5576d27c5b6f30f49d41" dependencies = [ + "log", "ring", "rustls-pki-types", - "rustls-webpki 0.102.8", + "rustls-webpki 0.102.2", "subtle", "zeroize", ] @@ -3720,35 +3492,23 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" dependencies = [ - "openssl-probe 0.1.6", + "openssl-probe", "rustls-pemfile 1.0.4", "schannel", - "security-framework 2.11.1", + "security-framework", ] [[package]] name = "rustls-native-certs" -version = "0.7.3" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5bfb394eeed242e909609f56089eecfe5fda225042e8b171791b9c95f5931e5" +checksum = "8f1fb85efa936c42c6d5fc28d2629bb51e4b2f4b8a5211e297d599cc5a093792" dependencies = [ - "openssl-probe 0.1.6", - "rustls-pemfile 2.2.0", + "openssl-probe", + "rustls-pemfile 2.0.0", "rustls-pki-types", "schannel", - "security-framework 2.11.1", -] - -[[package]] -name = "rustls-native-certs" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "612460d5f7bea540c490b2b6395d8e34a953e52b491accd6c86c8164c5932a63" -dependencies = [ - "openssl-probe 0.2.1", - "rustls-pki-types", - "schannel", - "security-framework 3.5.1", + "security-framework", ] [[package]] @@ -3762,21 +3522,19 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "2.2.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" +checksum = "35e4980fa29e4c4b212ffb3db068a564cbf560e51d3944b7c88bd8bf5bec64f4" dependencies = [ + "base64 0.21.7", "rustls-pki-types", ] [[package]] name = "rustls-pki-types" -version = "1.14.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be040f8b0a225e40375822a563fa9524378b9d63112f53e19ffff34df5d33fdd" -dependencies = [ - "zeroize", -] +checksum = "0a716eb65e3158e90e17cd93d855216e27bde02745ab842f2cab4a39dba1bacf" [[package]] name = "rustls-webpki" @@ -3790,9 +3548,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.102.8" +version = "0.102.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" +checksum = "faaa0a62740bedb9b2ef5afa303da42764c012f743917351dc9a237ea1663610" dependencies = [ "ring", "rustls-pki-types", @@ -3801,15 +3559,15 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.22" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "ryu" -version = "1.0.22" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a50f4cf475b65d88e057964e0e9bb1f0aa9bbb2036dc65c64596b42932536984" +checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" [[package]] name = "same-file" @@ -3822,11 +3580,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.28" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "891d81b926048e76efe18581bf793546b4c0eaf8448d72be8de2bbee5fd166e1" +checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -3835,14 +3593,14 @@ version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3cbc66816425a074528352f5789333ecff06ca41b36b0b0efdfbb29edc391a19" dependencies = [ - "parking_lot", + "parking_lot 0.12.1", ] [[package]] name = "schemars" -version = "0.8.22" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fbf2ae1b8bc8e02df939598064d22402220cd5bbcca1c76f7d6a310974d5615" +checksum = "45a28f4c49489add4ce10783f7911893516f15afe45d015608d41faca6bc4d29" dependencies = [ "dyn-clone", "schemars_derive", @@ -3852,14 +3610,14 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.22" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32e265784ad618884abaea0600a9adf15393368d840e0222d101a072f3f7534d" +checksum = "c767fd6fa65d9ccf9cf026122c1b555f2ef9a4f0cea69da4d7dbc3e258d30967" dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.114", + "syn 1.0.109", ] [[package]] @@ -3878,6 +3636,20 @@ dependencies = [ "untrusted", ] +[[package]] +name = "sec1" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" +dependencies = [ + "base16ct", + "der", + "generic-array", + "pkcs8", + "subtle", + "zeroize", +] + [[package]] name = "secrecy" version = "0.8.0" @@ -3890,25 +3662,12 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.11.1" +version = "2.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" +checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" dependencies = [ - "bitflags 2.10.0", - "core-foundation 0.9.4", - "core-foundation-sys", - "libc", - "security-framework-sys", -] - -[[package]] -name = "security-framework" -version = "3.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3297343eaf830f66ede390ea39da1d462b6b0c1b000f420d0a83f898bbbe6ef" -dependencies = [ - "bitflags 2.10.0", - "core-foundation 0.10.1", + "bitflags 1.3.2", + "core-foundation", "core-foundation-sys", "libc", "security-framework-sys", @@ -3916,33 +3675,26 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.15.0" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc1f0cbffaac4852523ce30d8bd3c5cdc873501d96ff467ca09b6767bb8cd5c0" +checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" dependencies = [ "core-foundation-sys", "libc", ] -[[package]] -name = "self_cell" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b12e76d157a900eb52e81bc6e9f3069344290341720e9178cde2407113ac8d89" - [[package]] name = "semver" -version = "1.0.27" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" +checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" [[package]] name = "serde" -version = "1.0.228" +version = "1.0.196" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" dependencies = [ - "serde_core", "serde_derive", ] @@ -3958,63 +3710,51 @@ dependencies = [ [[package]] name = "serde_bytes" -version = "0.11.19" +version = "0.11.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5d440709e79d88e51ac01c4b72fc6cb7314017bb7da9eeff678aa94c10e3ea8" +checksum = "8b8497c313fd43ab992087548117643f6fcd935cbf36f176ffda0aacf9591734" dependencies = [ "serde", - "serde_core", -] - -[[package]] -name = "serde_core" -version = "1.0.228" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" -dependencies = [ - "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.228" +version = "1.0.196" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" +checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.48", ] [[package]] name = "serde_derive_internals" -version = "0.29.1" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" +checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 1.0.109", ] [[package]] name = "serde_json" -version = "1.0.149" +version = "1.0.113" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" +checksum = "69801b70b1c3dac963ecb03a364ba0ceda9cf60c71cfe475e99864759c8b8a79" dependencies = [ "itoa", - "memchr", + "ryu", "serde", - "serde_core", - "zmij", ] [[package]] name = "serde_spanned" -version = "0.6.9" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" +checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" dependencies = [ "serde", ] @@ -4033,11 +3773,11 @@ dependencies = [ [[package]] name = "serde_yaml" -version = "0.9.34+deprecated" +version = "0.9.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" +checksum = "adf8a49373e98a4c5f0ceb5d05aa7c648d75f63774981ed95b7c7443bbd50c6e" dependencies = [ - "indexmap 2.13.0", + "indexmap 2.2.2", "itoa", "ryu", "serde", @@ -4057,9 +3797,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.9" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", @@ -4076,51 +3816,47 @@ dependencies = [ ] [[package]] -name = "shlex" -version = "1.3.0" +name = "signal-hook-registry" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" +checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +dependencies = [ + "libc", +] [[package]] -name = "signal-hook-registry" -version = "1.4.8" +name = "signature" +version = "1.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" +checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" dependencies = [ - "errno", - "libc", + "digest", + "rand_core", ] [[package]] name = "slab" -version = "0.4.11" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" - -[[package]] -name = "smallvec" -version = "1.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" - -[[package]] -name = "socket2" -version = "0.5.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ - "libc", - "windows-sys 0.52.0", + "autocfg", ] [[package]] -name = "socket2" -version = "0.6.2" +name = "smallvec" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86f4aa3ad99f2088c990dfa82d367e19cb29268ed67c574d10d0a4bfe71f07e0" +checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" + +[[package]] +name = "socket2" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" dependencies = [ "libc", - "windows-sys 0.60.2", + "windows-sys 0.48.0", ] [[package]] @@ -4130,56 +3866,48 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" [[package]] -name = "spin" -version = "0.10.0" +name = "spki" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5fe4ccb98d9c292d56fec89a5e07da7fc4cf0dc11e156b41793132775d3e591" - -[[package]] -name = "stable_deref_trait" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" +checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" +dependencies = [ + "base64ct", + "der", +] [[package]] name = "static_init" -version = "1.0.4" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bae1df58c5fea7502e8e352ec26b5579f6178e1fdb311e088580c980dee25ed" +checksum = "8a2a1c578e98c1c16fc3b8ec1328f7659a500737d7a0c6d625e73e830ff9c1f6" dependencies = [ "bitflags 1.3.2", - "cfg_aliases 0.2.1", + "cfg_aliases", "libc", - "parking_lot", - "parking_lot_core", + "parking_lot 0.11.2", + "parking_lot_core 0.8.6", "static_init_macro", "winapi", ] [[package]] name = "static_init_macro" -version = "1.0.4" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1389c88ddd739ec6d3f8f83343764a0e944cd23cfbf126a9796a714b0b6edd6f" +checksum = "70a2595fc3aa78f2d0e45dd425b22282dd863273761cc77780914b2cf3003acf" dependencies = [ - "cfg_aliases 0.1.1", + "cfg_aliases", "memchr", "proc-macro2", "quote", "syn 1.0.109", ] -[[package]] -name = "std-semaphore" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ae9eec00137a8eed469fb4148acd9fc6ac8c3f9b110f52cd34698c8b5bfa0e" - [[package]] name = "strsim" -version = "0.11.1" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "structopt" @@ -4207,9 +3935,9 @@ dependencies = [ [[package]] name = "subtle" -version = "2.6.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" [[package]] name = "syn" @@ -4224,9 +3952,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.114" +version = "2.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4d107df263a3013ef9b1879b0df87d706ff80f65a86ea879bd9c31f9b307c2a" +checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" dependencies = [ "proc-macro2", "quote", @@ -4250,20 +3978,21 @@ dependencies = [ [[package]] name = "synstructure" -version = "0.13.2" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 1.0.109", + "unicode-xid", ] [[package]] name = "syslog-tracing" -version = "0.3.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d349bc2df408b4bf656709a29643641cef7f1795d708f88b105c626a8f64f6e4" +checksum = "340b1540dcdb6b066bc2966e7974f977ab1a38f21b2be189014ffb0cc2405768" dependencies = [ "libc", "tracing-core", @@ -4277,19 +4006,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" dependencies = [ "bitflags 1.3.2", - "core-foundation 0.9.4", - "system-configuration-sys 0.5.0", -] - -[[package]] -name = "system-configuration" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" -dependencies = [ - "bitflags 2.10.0", - "core-foundation 0.9.4", - "system-configuration-sys 0.6.0", + "core-foundation", + "system-configuration-sys", ] [[package]] @@ -4302,27 +4020,17 @@ dependencies = [ "libc", ] -[[package]] -name = "system-configuration-sys" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" -dependencies = [ - "core-foundation-sys", - "libc", -] - [[package]] name = "tempfile" -version = "3.24.0" +version = "3.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "655da9c7eb6305c55742045d5a8d2037996d61d8de95806335c7c86ce0f82e9c" +checksum = "01ce4141aa927a6d1bd34a041795abd0db1cccba5d5f24b009f694bdf3a1f3fa" dependencies = [ + "cfg-if", "fastrand", - "getrandom 0.3.4", - "once_cell", - "rustix 1.1.3", - "windows-sys 0.61.2", + "redox_syscall 0.4.1", + "rustix", + "windows-sys 0.52.0", ] [[package]] @@ -4345,78 +4053,59 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.69" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +checksum = "d54378c645627613241d077a3a79db965db602882668f9136ac42af9ecb730ad" dependencies = [ - "thiserror-impl 1.0.69", -] - -[[package]] -name = "thiserror" -version = "2.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" -dependencies = [ - "thiserror-impl 2.0.18", + "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.69" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", -] - -[[package]] -name = "thiserror-impl" -version = "2.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.114", + "syn 2.0.48", ] [[package]] name = "thread_local" -version = "1.1.9" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" +checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" dependencies = [ "cfg-if", + "once_cell", ] [[package]] name = "time" -version = "0.3.46" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9da98b7d9b7dad93488a84b8248efc35352b0b2657397d4167e7ad67e5d535e5" +checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" dependencies = [ "deranged", "num-conv", "powerfmt", - "serde_core", + "serde", "time-core", "time-macros", ] [[package]] name = "time-core" -version = "0.1.8" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.26" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78cc610bac2dcee56805c99642447d4c5dbde4d01f752ffea0199aee1f601dc4" +checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774" dependencies = [ "num-conv", "time-core", @@ -4429,37 +4118,44 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1710e589de0a76aaf295cd47a6699f6405737dbfd3cf2b75c92d000b548d0e6" [[package]] -name = "tinystr" -version = "0.8.2" +name = "tinyvec" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" dependencies = [ - "displaydoc", - "zerovec", + "tinyvec_macros", ] [[package]] -name = "tokio" -version = "1.49.0" +name = "tinyvec_macros" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72a2903cd7736441aac9df9d7688bd0ce48edccaadf181c3b90be801e81d3d86" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931" dependencies = [ + "backtrace", "bytes", "libc", "mio", - "parking_lot", + "num_cpus", + "parking_lot 0.12.1", "pin-project-lite", "signal-hook-registry", - "socket2 0.6.2", + "socket2", "tokio-macros", - "windows-sys 0.61.2", + "windows-sys 0.48.0", ] [[package]] name = "tokio-io-timeout" -version = "1.2.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bd86198d9ee903fedd2f9a2e72014287c0d9167e4ae43b5853007205dda1b76" +checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" dependencies = [ "pin-project-lite", "tokio", @@ -4467,13 +4163,13 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.6.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.48", ] [[package]] @@ -4482,7 +4178,7 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls 0.21.12", + "rustls 0.21.10", "tokio", ] @@ -4492,16 +4188,16 @@ version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" dependencies = [ - "rustls 0.22.4", + "rustls 0.22.2", "rustls-pki-types", "tokio", ] [[package]] name = "tokio-stream" -version = "0.1.18" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32da49809aab5c3bc678af03902d4ccddea2a87d028d86392a4b1560c6906c70" +checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" dependencies = [ "futures-core", "pin-project-lite", @@ -4524,9 +4220,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.18" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ae9cec805b01e8fc3fd2fe289f89149a9b66dd16786abd8b19cfa7b48cb0098" +checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" dependencies = [ "bytes", "futures-core", @@ -4535,13 +4231,14 @@ dependencies = [ "pin-project-lite", "slab", "tokio", + "tracing", ] [[package]] name = "toml" -version = "0.8.23" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" +checksum = "9a9aad4a3066010876e8dcf5a8a06e70a558751117a145c6ce2b82c2e2054290" dependencies = [ "serde", "serde_spanned", @@ -4551,20 +4248,20 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.11" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.22.27" +version = "0.22.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" +checksum = "99e68c159e8f5ba8a28c4eb7b0c0c190d77bb479047ca713270048145a9ad28a" dependencies = [ - "indexmap 2.13.0", + "indexmap 2.2.2", "serde", "serde_spanned", "toml_datetime", @@ -4583,10 +4280,10 @@ dependencies = [ "bytes", "futures-core", "futures-util", - "h2 0.3.27", - "http 0.2.12", + "h2 0.3.24", + "http 0.2.11", "http-body 0.4.6", - "hyper 0.14.32", + "hyper 0.14.28", "hyper-timeout", "percent-encoding", "pin-project", @@ -4628,7 +4325,7 @@ dependencies = [ "rand", "slab", "tokio", - "tokio-util 0.7.18", + "tokio-util 0.7.10", "tower-layer", "tower-service", "tracing", @@ -4641,11 +4338,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140" dependencies = [ "base64 0.21.7", - "bitflags 2.10.0", + "bitflags 2.4.2", "bytes", "futures-core", "futures-util", - "http 0.2.12", + "http 0.2.11", "http-body 0.4.6", "http-range-header", "mime", @@ -4657,21 +4354,21 @@ dependencies = [ [[package]] name = "tower-layer" -version = "0.3.3" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" +checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" [[package]] name = "tower-service" -version = "0.3.3" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" -version = "0.1.44" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ "log", "pin-project-lite", @@ -4681,20 +4378,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.31" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.48", ] [[package]] name = "tracing-core" -version = "0.1.36" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", "valuable", @@ -4710,17 +4407,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "tracing-journald" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d3a81ed245bfb62592b1e2bc153e77656d94ee6a0497683a65a12ccaf2438d0" -dependencies = [ - "libc", - "tracing-core", - "tracing-subscriber", -] - [[package]] name = "tracing-log" version = "0.2.0" @@ -4734,14 +4420,14 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.22" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f30143827ddab0d256fd843b7a66d164e9f271cfa0dde49142c5ca0ca291f1e" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" dependencies = [ "matchers", "nu-ansi-term", "once_cell", - "regex-automata", + "regex", "sharded-slab", "smallvec", "thread_local", @@ -4750,6 +4436,15 @@ dependencies = [ "tracing-log", ] +[[package]] +name = "treediff" +version = "4.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d127780145176e2b5d16611cc25a900150e86e9fd79d3bde6ff3a37359c9cb5" +dependencies = [ + "serde_json", +] + [[package]] name = "try-lock" version = "0.2.5" @@ -4758,33 +4453,54 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "typenum" -version = "1.19.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "ucd-trie" -version = "0.1.7" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" +checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" + +[[package]] +name = "unicode-bidi" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-ident" -version = "1.0.22" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "unicode-normalization" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +dependencies = [ + "tinyvec", +] [[package]] name = "unicode-segmentation" -version = "1.12.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" +checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" [[package]] name = "unicode-width" -version = "0.1.14" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" +checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" + +[[package]] +name = "unicode-xid" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" [[package]] name = "universal-hash" @@ -4798,9 +4514,9 @@ dependencies = [ [[package]] name = "unsafe-libyaml" -version = "0.2.11" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" +checksum = "ab4c90930b95a82d00dc9e9ac071b4991924390d46cbd0dfe566148667605e4b" [[package]] name = "untrusted" @@ -4810,27 +4526,26 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.8" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" dependencies = [ "form_urlencoded", "idna", "percent-encoding", - "serde", ] [[package]] -name = "utf8_iter" -version = "1.0.4" +name = "urlencoding" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" +checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" [[package]] name = "utf8parse" -version = "0.2.2" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" [[package]] name = "uuid" @@ -4838,38 +4553,15 @@ version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "79daa5ed5740825c40b389c5e50312b9c86df53fccd33f281df655642b43869d" dependencies = [ - "getrandom 0.2.17", + "getrandom", "rand", ] [[package]] name = "valuable" -version = "0.1.1" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" - -[[package]] -name = "value-log" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62fc7c4ce161f049607ecea654dca3f2d727da5371ae85e2e4f14ce2b98ed67c" -dependencies = [ - "byteorder", - "byteview", - "interval-heap", - "log", - "path-absolutize", - "rustc-hash", - "tempfile", - "varint-rs", - "xxhash-rust", -] - -[[package]] -name = "varint-rs" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f54a172d0620933a27a4360d3db3e2ae0dd6cceae9730751a036bbf182c4b23" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" [[package]] name = "vcpkg" @@ -4879,9 +4571,9 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "version_check" -version = "0.9.5" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "vsimd" @@ -4891,9 +4583,9 @@ checksum = "5c3082ca00d5a5ef149bb8b555a72ae84c9c59f7250f013ac822ac2e49b19c64" [[package]] name = "walkdir" -version = "2.5.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" dependencies = [ "same-file", "winapi-util", @@ -4910,51 +4602,52 @@ dependencies = [ [[package]] name = "wasi" -version = "0.11.1+wasi-snapshot-preview1" +version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" - -[[package]] -name = "wasip2" -version = "1.0.2+wasi-0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5" -dependencies = [ - "wit-bindgen", -] +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.108" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64024a30ec1e37399cf85a7ffefebdb72205ca1c972291c51512360d90bd8566" +checksum = "b1223296a201415c7fad14792dbefaace9bd52b62d33453ade1c5b5f07555406" dependencies = [ "cfg-if", - "once_cell", - "rustversion", "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.90" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcdc935b63408d58a32f8cc9738a0bffd8f05cc7c002086c6ef20b7312ad9dcd" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.48", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.58" +version = "0.4.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70a6e77fd0ae8029c9ea0063f87c46fde723e7d887703d74ad2616d792e51e6f" +checksum = "bde2032aeb86bdfaecc8b261eef3cba735cc426c1f3a3416d1e0791be95fc461" dependencies = [ "cfg-if", - "futures-util", "js-sys", - "once_cell", "wasm-bindgen", "web-sys", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.108" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "008b239d9c740232e71bd39e8ef6429d27097518b6b30bdf9086833bd5b6d608" +checksum = "3e4c238561b2d428924c49815533a8b9121c664599558a5d9ec51f8a1740a999" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -4962,31 +4655,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.108" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5256bae2d58f54820e6490f9839c49780dff84c65aeab9e772f15d5f0e913a55" +checksum = "bae1abb6806dc1ad9e560ed242107c0f6c84335f1749dd4e8ddb012ebd5e25a7" dependencies = [ - "bumpalo", "proc-macro2", "quote", - "syn 2.0.114", + "syn 2.0.48", + "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.108" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f01b580c9ac74c8d8f0c0e4afb04eeef2acf145458e52c03845ee9cd23e3d12" -dependencies = [ - "unicode-ident", -] +checksum = "4d91413b1c31d7539ba5ef2451af3f0b833a005eb27a631cec32bc0635a8602b" [[package]] name = "web-sys" -version = "0.3.85" +version = "0.3.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "312e32e551d92129218ea9a2452120f4aabc03529ef03e4d0d82fb2780608598" +checksum = "58cd2333b6e0be7a39605f0e255892fd7418a682d8da8fe042fe25128794d2ed" dependencies = [ "js-sys", "wasm-bindgen", @@ -5001,7 +4691,7 @@ dependencies = [ "either", "home", "once_cell", - "rustix 0.38.44", + "rustix", ] [[package]] @@ -5022,11 +4712,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.11" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ - "windows-sys 0.61.2", + "winapi", ] [[package]] @@ -5037,72 +4727,11 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows-core" -version = "0.62.2" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-implement", - "windows-interface", - "windows-link", - "windows-result", - "windows-strings", -] - -[[package]] -name = "windows-implement" -version = "0.60.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.114", -] - -[[package]] -name = "windows-interface" -version = "0.59.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.114", -] - -[[package]] -name = "windows-link" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" - -[[package]] -name = "windows-registry" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02752bf7fbdcce7f2a27a742f798510f3e5ad88dbe84871e5168e2120c3d5720" -dependencies = [ - "windows-link", - "windows-result", - "windows-strings", -] - -[[package]] -name = "windows-result" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" -dependencies = [ - "windows-link", -] - -[[package]] -name = "windows-strings" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" -dependencies = [ - "windows-link", + "windows-targets 0.52.0", ] [[package]] @@ -5120,34 +4749,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-sys" -version = "0.59.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" -dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-sys" -version = "0.60.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" -dependencies = [ - "windows-targets 0.53.5", -] - -[[package]] -name = "windows-sys" -version = "0.61.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" -dependencies = [ - "windows-link", + "windows-targets 0.52.0", ] [[package]] @@ -5167,35 +4769,17 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.6" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" dependencies = [ - "windows_aarch64_gnullvm 0.52.6", - "windows_aarch64_msvc 0.52.6", - "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm 0.52.6", - "windows_i686_msvc 0.52.6", - "windows_x86_64_gnu 0.52.6", - "windows_x86_64_gnullvm 0.52.6", - "windows_x86_64_msvc 0.52.6", -] - -[[package]] -name = "windows-targets" -version = "0.53.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" -dependencies = [ - "windows-link", - "windows_aarch64_gnullvm 0.53.1", - "windows_aarch64_msvc 0.53.1", - "windows_i686_gnu 0.53.1", - "windows_i686_gnullvm 0.53.1", - "windows_i686_msvc 0.53.1", - "windows_x86_64_gnu 0.53.1", - "windows_x86_64_gnullvm 0.53.1", - "windows_x86_64_msvc 0.53.1", + "windows_aarch64_gnullvm 0.52.0", + "windows_aarch64_msvc 0.52.0", + "windows_i686_gnu 0.52.0", + "windows_i686_msvc 0.52.0", + "windows_x86_64_gnu 0.52.0", + "windows_x86_64_gnullvm 0.52.0", + "windows_x86_64_msvc 0.52.0", ] [[package]] @@ -5206,15 +4790,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.6" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" [[package]] name = "windows_aarch64_msvc" @@ -5224,15 +4802,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.6" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" [[package]] name = "windows_i686_gnu" @@ -5242,27 +4814,9 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.6" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" - -[[package]] -name = "windows_i686_gnu" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" [[package]] name = "windows_i686_msvc" @@ -5272,15 +4826,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.6" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" - -[[package]] -name = "windows_i686_msvc" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" [[package]] name = "windows_x86_64_gnu" @@ -5290,15 +4838,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.6" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" [[package]] name = "windows_x86_64_gnullvm" @@ -5308,15 +4850,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.6" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" [[package]] name = "windows_x86_64_msvc" @@ -5326,21 +4862,15 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.6" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" [[package]] name = "winnow" -version = "0.7.14" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a5364e9d77fcdeeaa6062ced926ee3381faa2ee02d3eb83a5c27a8825540829" +checksum = "d90f4e0f530c4c69f62b80d839e9ef3855edc9cba471a160c4d692deed62b401" dependencies = [ "memchr", ] @@ -5355,18 +4885,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "wit-bindgen" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" - -[[package]] -name = "writeable" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" - [[package]] name = "xmlparser" version = "0.13.6" @@ -5375,142 +4893,59 @@ checksum = "66fee0b777b0f5ac1c69bb06d361268faafa61cd4682ae064a171c16c433e9e4" [[package]] name = "xxhash-rust" -version = "0.8.15" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdd20c5420375476fbd4394763288da7eb0cc0b8c11deed431a91562af7335d3" - -[[package]] -name = "yoke" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954" -dependencies = [ - "stable_deref_trait", - "yoke-derive", - "zerofrom", -] - -[[package]] -name = "yoke-derive" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.114", - "synstructure", -] +checksum = "53be06678ed9e83edb1745eb72efc0bbcd7b5c3c35711a860906aed827a13d61" [[package]] name = "zerocopy" -version = "0.8.33" +version = "0.7.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "668f5168d10b9ee831de31933dc111a459c97ec93225beb307aed970d1372dfd" +checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.33" +version = "0.7.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c7962b26b0a8685668b671ee4b54d007a67d4eaf05fda79ac0ecf41e32270f1" +checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.114", -] - -[[package]] -name = "zerofrom" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" -dependencies = [ - "zerofrom-derive", -] - -[[package]] -name = "zerofrom-derive" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.114", - "synstructure", + "syn 2.0.48", ] [[package]] name = "zeroize" -version = "1.8.2" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" - -[[package]] -name = "zerotrie" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851" -dependencies = [ - "displaydoc", - "yoke", - "zerofrom", -] - -[[package]] -name = "zerovec" -version = "0.11.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002" -dependencies = [ - "yoke", - "zerofrom", - "zerovec-derive", -] - -[[package]] -name = "zerovec-derive" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.114", -] - -[[package]] -name = "zmij" -version = "1.0.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfcd145825aace48cff44a8844de64bf75feec3080e0aa5cdbde72961ae51a65" +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" [[package]] name = "zstd" -version = "0.13.3" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91ee311a569c327171651566e07972200e76fcfe2242a4fa446149a3881c08a" +checksum = "bffb3309596d527cfcba7dfc6ed6052f1d39dfbd7c867aa2e865e4a449c10110" dependencies = [ "zstd-safe", ] [[package]] name = "zstd-safe" -version = "7.2.4" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f49c4d5f0abb602a93fb8736af2a4f4dd9512e36f7f570d66e65ff867ed3b9d" +checksum = "43747c7422e2924c11144d5229878b98180ef8b06cca4ab5af37afc8a8d8ea3e" dependencies = [ "zstd-sys", ] [[package]] name = "zstd-sys" -version = "2.0.16+zstd.1.5.7" +version = "2.0.9+zstd.1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e19ebc2adc8f83e43039e79776e3fda8ca919132d68a1fed6a5faca2683748" +checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" dependencies = [ "cc", "pkg-config", diff --git a/Cargo.nix b/Cargo.nix new file mode 100644 index 00000000..a791fecd --- /dev/null +++ b/Cargo.nix @@ -0,0 +1,7102 @@ +# This file was @generated by cargo2nix 0.11.0. +# It is not intended to be manually edited. + +args@{ + release ? true, + rootFeatures ? [ + "garage_db/default" + "garage_util/default" + "garage_net/default" + "garage_rpc/default" + "format_table/default" + "garage_table/default" + "garage_block/default" + "garage_model/default" + "garage_api/default" + "garage_web/default" + "garage/default" + "k2v-client/default" + ], + rustPackages, + buildRustPackages, + hostPlatform, + hostPlatformCpu ? null, + hostPlatformFeatures ? [], + target ? null, + codegenOpts ? null, + profileOpts ? null, + rustcLinkFlags ? null, + rustcBuildFlags ? null, + mkRustCrate, + rustLib, + lib, + workspaceSrc, + ignoreLockHash, +}: +let + nixifiedLockHash = "5826893fb6082581d96992c846c892c623f3b1b17cefba3b6b8ca10c9f45c589"; + workspaceSrc = if args.workspaceSrc == null then ./. else args.workspaceSrc; + currentLockHash = builtins.hashFile "sha256" (workspaceSrc + /Cargo.lock); + lockHashIgnored = if ignoreLockHash + then builtins.trace "Ignoring lock hash" ignoreLockHash + else ignoreLockHash; +in if !lockHashIgnored && (nixifiedLockHash != currentLockHash) then + throw ("Cargo.nix ${nixifiedLockHash} is out of sync with Cargo.lock ${currentLockHash}") +else let + inherit (rustLib) fetchCratesIo fetchCrateLocal fetchCrateGit fetchCrateAlternativeRegistry expandFeatures decideProfile genDrvsByProfile; + profilesByName = { + dev = builtins.fromTOML "lto = \"off\"\n"; + release = builtins.fromTOML "codegen-units = 1\nlto = true\nopt-level = \"s\"\nstrip = true\n"; + }; + rootFeatures' = expandFeatures rootFeatures; + overridableMkRustCrate = f: + let + drvs = genDrvsByProfile profilesByName ({ profile, profileName }: mkRustCrate ({ inherit release profile hostPlatformCpu hostPlatformFeatures target profileOpts codegenOpts rustcLinkFlags rustcBuildFlags; } // (f profileName))); + in { compileMode ? null, profileName ? decideProfile compileMode release }: + let drv = drvs.${profileName}; in if compileMode == null then drv else drv.override { inherit compileMode; }; +in +{ + cargo2nixVersion = "0.11.0"; + workspace = { + garage_db = rustPackages.unknown.garage_db."1.0.0"; + garage_util = rustPackages.unknown.garage_util."1.0.0"; + garage_net = rustPackages.unknown.garage_net."1.0.0"; + garage_rpc = rustPackages.unknown.garage_rpc."1.0.0"; + format_table = rustPackages.unknown.format_table."0.1.1"; + garage_table = rustPackages.unknown.garage_table."1.0.0"; + garage_block = rustPackages.unknown.garage_block."1.0.0"; + garage_model = rustPackages.unknown.garage_model."1.0.0"; + garage_api = rustPackages.unknown.garage_api."1.0.0"; + garage_web = rustPackages.unknown.garage_web."1.0.0"; + garage = rustPackages.unknown.garage."1.0.0"; + k2v-client = rustPackages.unknown.k2v-client."0.0.4"; + }; + "registry+https://github.com/rust-lang/crates.io-index".addr2line."0.21.0" = overridableMkRustCrate (profileName: rec { + name = "addr2line"; + version = "0.21.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb"; }; + dependencies = { + gimli = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".gimli."0.28.1" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".adler."1.0.2" = overridableMkRustCrate (profileName: rec { + name = "adler"; + version = "1.0.2"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".aead."0.5.2" = overridableMkRustCrate (profileName: rec { + name = "aead"; + version = "0.5.2"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0"; }; + features = builtins.concatLists [ + [ "alloc" ] + [ "getrandom" ] + [ "rand_core" ] + [ "stream" ] + ]; + dependencies = { + crypto_common = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".crypto-common."0.1.6" { inherit profileName; }).out; + generic_array = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".generic-array."0.14.7" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".aes."0.8.4" = overridableMkRustCrate (profileName: rec { + name = "aes"; + version = "0.8.4"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0"; }; + dependencies = { + cfg_if = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."1.0.0" { inherit profileName; }).out; + cipher = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".cipher."0.4.4" { inherit profileName; }).out; + ${ if hostPlatform.parsed.cpu.name == "aarch64" || hostPlatform.parsed.cpu.name == "x86_64" || hostPlatform.parsed.cpu.name == "i686" then "cpufeatures" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".cpufeatures."0.2.12" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".aes-gcm."0.10.3" = overridableMkRustCrate (profileName: rec { + name = "aes-gcm"; + version = "0.10.3"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1"; }; + features = builtins.concatLists [ + [ "aes" ] + [ "alloc" ] + [ "default" ] + [ "getrandom" ] + [ "rand_core" ] + [ "stream" ] + ]; + dependencies = { + aead = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aead."0.5.2" { inherit profileName; }).out; + aes = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aes."0.8.4" { inherit profileName; }).out; + cipher = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".cipher."0.4.4" { inherit profileName; }).out; + ctr = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".ctr."0.9.2" { inherit profileName; }).out; + ghash = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".ghash."0.5.1" { inherit profileName; }).out; + subtle = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".subtle."2.5.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".ahash."0.8.7" = overridableMkRustCrate (profileName: rec { + name = "ahash"; + version = "0.8.7"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "77c3a9648d43b9cd48db467b3f87fdd6e146bcc88ab0180006cef2179fe11d01"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "default") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "getrandom") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "runtime-rng") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "std") + ]; + dependencies = { + ${ if rootFeatures' ? "garage/bundled-libs" || rootFeatures' ? "garage/default" || rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage/sqlite" || rootFeatures' ? "garage_db/bundled-libs" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/r2d2_sqlite" || rootFeatures' ? "garage_db/rusqlite" || rootFeatures' ? "garage_db/sqlite" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/sqlite" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "cfg_if" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."1.0.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "getrandom" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".getrandom."0.2.12" { inherit profileName; }).out; + ${ if (rootFeatures' ? "garage/bundled-libs" || rootFeatures' ? "garage/default" || rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage/sqlite" || rootFeatures' ? "garage_db/bundled-libs" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/r2d2_sqlite" || rootFeatures' ? "garage_db/rusqlite" || rootFeatures' ? "garage_db/sqlite" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/sqlite" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") && !((hostPlatform.parsed.cpu.name == "armv6l" || hostPlatform.parsed.cpu.name == "armv7l") && hostPlatform.parsed.kernel.name == "none") then "once_cell" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.19.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/bundled-libs" || rootFeatures' ? "garage/default" || rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage/sqlite" || rootFeatures' ? "garage_db/bundled-libs" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/r2d2_sqlite" || rootFeatures' ? "garage_db/rusqlite" || rootFeatures' ? "garage_db/sqlite" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/sqlite" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "zerocopy" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".zerocopy."0.7.32" { inherit profileName; }).out; + }; + buildDependencies = { + ${ if rootFeatures' ? "garage/bundled-libs" || rootFeatures' ? "garage/default" || rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage/sqlite" || rootFeatures' ? "garage_db/bundled-libs" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/r2d2_sqlite" || rootFeatures' ? "garage_db/rusqlite" || rootFeatures' ? "garage_db/sqlite" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/sqlite" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "version_check" else null } = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".version_check."0.9.4" { profileName = "__noProfile"; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".aho-corasick."1.1.2" = overridableMkRustCrate (profileName: rec { + name = "aho-corasick"; + version = "1.1.2"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0"; }; + features = builtins.concatLists [ + [ "perf-literal" ] + [ "std" ] + ]; + dependencies = { + memchr = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".memchr."2.7.1" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".allocator-api2."0.2.16" = overridableMkRustCrate (profileName: rec { + name = "allocator-api2"; + version = "0.2.16"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/bundled-libs" || rootFeatures' ? "garage/default" || rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage/sqlite" || rootFeatures' ? "garage_db/bundled-libs" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/r2d2_sqlite" || rootFeatures' ? "garage_db/rusqlite" || rootFeatures' ? "garage_db/sqlite" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/sqlite" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "alloc") + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".android-tzdata."0.1.1" = overridableMkRustCrate (profileName: rec { + name = "android-tzdata"; + version = "0.1.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".android_system_properties."0.1.5" = overridableMkRustCrate (profileName: rec { + name = "android_system_properties"; + version = "0.1.5"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"; }; + dependencies = { + libc = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".anstream."0.6.11" = overridableMkRustCrate (profileName: rec { + name = "anstream"; + version = "0.6.11"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "6e2e1ebcb11de5c03c67de28a7df593d32191b44939c482e97702baaaa6ab6a5"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "k2v-client/clap" || rootFeatures' ? "k2v-client/cli") "auto") + (lib.optional (rootFeatures' ? "k2v-client/clap" || rootFeatures' ? "k2v-client/cli") "default") + (lib.optional (rootFeatures' ? "k2v-client/clap" || rootFeatures' ? "k2v-client/cli") "wincon") + ]; + dependencies = { + ${ if rootFeatures' ? "k2v-client/clap" || rootFeatures' ? "k2v-client/cli" then "anstyle" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".anstyle."1.0.5" { inherit profileName; }).out; + ${ if rootFeatures' ? "k2v-client/clap" || rootFeatures' ? "k2v-client/cli" then "anstyle_parse" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".anstyle-parse."0.2.3" { inherit profileName; }).out; + ${ if rootFeatures' ? "k2v-client/clap" || rootFeatures' ? "k2v-client/cli" then "anstyle_query" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".anstyle-query."1.0.2" { inherit profileName; }).out; + ${ if (rootFeatures' ? "k2v-client/clap" || rootFeatures' ? "k2v-client/cli") && hostPlatform.isWindows then "anstyle_wincon" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".anstyle-wincon."3.0.2" { inherit profileName; }).out; + ${ if rootFeatures' ? "k2v-client/clap" || rootFeatures' ? "k2v-client/cli" then "colorchoice" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".colorchoice."1.0.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "k2v-client/clap" || rootFeatures' ? "k2v-client/cli" then "utf8parse" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".utf8parse."0.2.1" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".anstyle."1.0.5" = overridableMkRustCrate (profileName: rec { + name = "anstyle"; + version = "1.0.5"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "2faccea4cc4ab4a667ce676a30e8ec13922a692c99bb8f5b11f1502c72e04220"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "k2v-client/clap" || rootFeatures' ? "k2v-client/cli") "default") + (lib.optional (rootFeatures' ? "k2v-client/clap" || rootFeatures' ? "k2v-client/cli") "std") + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".anstyle-parse."0.2.3" = overridableMkRustCrate (profileName: rec { + name = "anstyle-parse"; + version = "0.2.3"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "k2v-client/clap" || rootFeatures' ? "k2v-client/cli") "default") + (lib.optional (rootFeatures' ? "k2v-client/clap" || rootFeatures' ? "k2v-client/cli") "utf8") + ]; + dependencies = { + ${ if rootFeatures' ? "k2v-client/clap" || rootFeatures' ? "k2v-client/cli" then "utf8parse" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".utf8parse."0.2.1" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".anstyle-query."1.0.2" = overridableMkRustCrate (profileName: rec { + name = "anstyle-query"; + version = "1.0.2"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648"; }; + dependencies = { + ${ if (rootFeatures' ? "k2v-client/clap" || rootFeatures' ? "k2v-client/cli") && hostPlatform.isWindows then "windows_sys" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows-sys."0.52.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".anstyle-wincon."3.0.2" = overridableMkRustCrate (profileName: rec { + name = "anstyle-wincon"; + version = "3.0.2"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7"; }; + dependencies = { + ${ if rootFeatures' ? "k2v-client/clap" || rootFeatures' ? "k2v-client/cli" then "anstyle" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".anstyle."1.0.5" { inherit profileName; }).out; + ${ if (rootFeatures' ? "k2v-client/clap" || rootFeatures' ? "k2v-client/cli") && hostPlatform.isWindows then "windows_sys" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows-sys."0.52.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".anyhow."1.0.79" = overridableMkRustCrate (profileName: rec { + name = "anyhow"; + version = "1.0.79"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "default") + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "std") + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".arc-swap."1.6.0" = overridableMkRustCrate (profileName: rec { + name = "arc-swap"; + version = "1.6.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".argon2."0.5.3" = overridableMkRustCrate (profileName: rec { + name = "argon2"; + version = "0.5.3"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "3c3610892ee6e0cbce8ae2700349fcf8f98adb0dbfbee85aec3c9179d29cc072"; }; + features = builtins.concatLists [ + [ "alloc" ] + [ "default" ] + [ "password-hash" ] + [ "rand" ] + ]; + dependencies = { + base64ct = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".base64ct."1.6.0" { inherit profileName; }).out; + blake2 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".blake2."0.10.6" { inherit profileName; }).out; + ${ if hostPlatform.parsed.cpu.name == "i686" || hostPlatform.parsed.cpu.name == "x86_64" then "cpufeatures" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".cpufeatures."0.2.12" { inherit profileName; }).out; + password_hash = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".password-hash."0.5.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".arrayvec."0.5.2" = overridableMkRustCrate (profileName: rec { + name = "arrayvec"; + version = "0.5.2"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b"; }; + features = builtins.concatLists [ + [ "default" ] + [ "std" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".assert-json-diff."2.0.2" = overridableMkRustCrate (profileName: rec { + name = "assert-json-diff"; + version = "2.0.2"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "47e4f2b81832e72834d7518d8487a0396a28cc408186a2e8854c0f98011faf12"; }; + dependencies = { + serde = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }).out; + serde_json = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_json."1.0.113" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".async-compression."0.4.6" = overridableMkRustCrate (profileName: rec { + name = "async-compression"; + version = "0.4.6"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "a116f46a969224200a0a97f29cfd4c50e7534e4b4826bd23ea2c3c533039c82c"; }; + features = builtins.concatLists [ + [ "libzstd" ] + [ "tokio" ] + [ "zstd" ] + [ "zstd-safe" ] + ]; + dependencies = { + futures_core = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.30" { inherit profileName; }).out; + memchr = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".memchr."2.7.1" { inherit profileName; }).out; + pin_project_lite = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.13" { inherit profileName; }).out; + tokio = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }).out; + libzstd = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".zstd."0.13.0" { inherit profileName; }).out; + zstd_safe = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".zstd-safe."7.0.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".async-stream."0.3.5" = overridableMkRustCrate (profileName: rec { + name = "async-stream"; + version = "0.3.5"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51"; }; + dependencies = { + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "async_stream_impl" else null } = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".async-stream-impl."0.3.5" { profileName = "__noProfile"; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "futures_core" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.30" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "pin_project_lite" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.13" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".async-stream-impl."0.3.5" = overridableMkRustCrate (profileName: rec { + name = "async-stream-impl"; + version = "0.3.5"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193"; }; + dependencies = { + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "proc_macro2" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "quote" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "syn" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."2.0.48" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".async-trait."0.1.77" = overridableMkRustCrate (profileName: rec { + name = "async-trait"; + version = "0.1.77"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9"; }; + dependencies = { + proc_macro2 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }).out; + quote = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }).out; + syn = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."2.0.48" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".autocfg."1.1.0" = overridableMkRustCrate (profileName: rec { + name = "autocfg"; + version = "1.1.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".aws-config."1.1.4" = overridableMkRustCrate (profileName: rec { + name = "aws-config"; + version = "1.1.4"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "8b30c39ebe61f75d1b3785362b1586b41991873c9ab3e317a9181c246fb71d82"; }; + features = builtins.concatLists [ + [ "client-hyper" ] + [ "credentials-process" ] + [ "default" ] + [ "rt-tokio" ] + [ "rustls" ] + [ "sso" ] + ]; + dependencies = { + aws_credential_types = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-credential-types."1.1.4" { inherit profileName; }).out; + aws_runtime = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-runtime."1.1.4" { inherit profileName; }).out; + aws_sdk_sso = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-sdk-sso."1.12.0" { inherit profileName; }).out; + aws_sdk_ssooidc = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-sdk-ssooidc."1.12.0" { inherit profileName; }).out; + aws_sdk_sts = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-sdk-sts."1.12.0" { inherit profileName; }).out; + aws_smithy_async = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-async."1.1.4" { inherit profileName; }).out; + aws_smithy_http = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-http."0.60.4" { inherit profileName; }).out; + aws_smithy_json = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-json."0.60.4" { inherit profileName; }).out; + aws_smithy_runtime = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-runtime."1.1.4" { inherit profileName; }).out; + aws_smithy_runtime_api = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-runtime-api."1.1.4" { inherit profileName; }).out; + aws_smithy_types = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-types."1.1.4" { inherit profileName; }).out; + aws_types = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-types."1.1.4" { inherit profileName; }).out; + bytes = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }).out; + fastrand = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".fastrand."2.0.1" { inherit profileName; }).out; + hex = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".hex."0.4.3" { inherit profileName; }).out; + http = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.11" { inherit profileName; }).out; + hyper = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".hyper."0.14.28" { inherit profileName; }).out; + ring = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".ring."0.17.7" { inherit profileName; }).out; + time = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".time."0.3.34" { inherit profileName; }).out; + tokio = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }).out; + tracing = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }).out; + zeroize = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".zeroize."1.7.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".aws-credential-types."1.1.4" = overridableMkRustCrate (profileName: rec { + name = "aws-credential-types"; + version = "1.1.4"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "33cc49dcdd31c8b6e79850a179af4c367669150c7ac0135f176c61bec81a70f7"; }; + features = builtins.concatLists [ + [ "test-util" ] + ]; + dependencies = { + aws_smithy_async = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-async."1.1.4" { inherit profileName; }).out; + aws_smithy_runtime_api = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-runtime-api."1.1.4" { inherit profileName; }).out; + aws_smithy_types = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-types."1.1.4" { inherit profileName; }).out; + zeroize = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".zeroize."1.7.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".aws-runtime."1.1.4" = overridableMkRustCrate (profileName: rec { + name = "aws-runtime"; + version = "1.1.4"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "eb031bff99877c26c28895766f7bb8484a05e24547e370768d6cc9db514662aa"; }; + features = builtins.concatLists [ + [ "event-stream" ] + [ "http-02x" ] + [ "sigv4a" ] + ]; + dependencies = { + aws_credential_types = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-credential-types."1.1.4" { inherit profileName; }).out; + aws_sigv4 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-sigv4."1.1.4" { inherit profileName; }).out; + aws_smithy_async = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-async."1.1.4" { inherit profileName; }).out; + aws_smithy_eventstream = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-eventstream."0.60.4" { inherit profileName; }).out; + aws_smithy_http = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-http."0.60.4" { inherit profileName; }).out; + aws_smithy_runtime_api = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-runtime-api."1.1.4" { inherit profileName; }).out; + aws_smithy_types = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-types."1.1.4" { inherit profileName; }).out; + aws_types = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-types."1.1.4" { inherit profileName; }).out; + bytes = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }).out; + fastrand = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".fastrand."2.0.1" { inherit profileName; }).out; + http = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.11" { inherit profileName; }).out; + http_body = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".http-body."0.4.6" { inherit profileName; }).out; + percent_encoding = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".percent-encoding."2.3.1" { inherit profileName; }).out; + pin_project_lite = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.13" { inherit profileName; }).out; + tracing = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }).out; + uuid = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".uuid."1.4.1" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".aws-sdk-config."1.13.0" = overridableMkRustCrate (profileName: rec { + name = "aws-sdk-config"; + version = "1.13.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "4af4f5b0f64563ada272e009cc95027effb546110ed85d014611420ac0d97858"; }; + features = builtins.concatLists [ + [ "default" ] + [ "rt-tokio" ] + [ "rustls" ] + ]; + dependencies = { + aws_credential_types = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-credential-types."1.1.4" { inherit profileName; }).out; + aws_runtime = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-runtime."1.1.4" { inherit profileName; }).out; + aws_smithy_async = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-async."1.1.4" { inherit profileName; }).out; + aws_smithy_http = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-http."0.60.4" { inherit profileName; }).out; + aws_smithy_json = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-json."0.60.4" { inherit profileName; }).out; + aws_smithy_runtime = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-runtime."1.1.4" { inherit profileName; }).out; + aws_smithy_runtime_api = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-runtime-api."1.1.4" { inherit profileName; }).out; + aws_smithy_types = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-types."1.1.4" { inherit profileName; }).out; + aws_types = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-types."1.1.4" { inherit profileName; }).out; + bytes = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }).out; + http = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.11" { inherit profileName; }).out; + once_cell = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.19.0" { inherit profileName; }).out; + regex_lite = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".regex-lite."0.1.5" { inherit profileName; }).out; + tracing = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".aws-sdk-s3."1.14.0" = overridableMkRustCrate (profileName: rec { + name = "aws-sdk-s3"; + version = "1.14.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "951f7730f51a2155c711c85c79f337fbc02a577fa99d2a0a8059acfce5392113"; }; + features = builtins.concatLists [ + [ "default" ] + [ "rt-tokio" ] + [ "rustls" ] + [ "sigv4a" ] + ]; + dependencies = { + aws_credential_types = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-credential-types."1.1.4" { inherit profileName; }).out; + aws_runtime = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-runtime."1.1.4" { inherit profileName; }).out; + aws_sigv4 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-sigv4."1.1.4" { inherit profileName; }).out; + aws_smithy_async = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-async."1.1.4" { inherit profileName; }).out; + aws_smithy_checksums = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-checksums."0.60.4" { inherit profileName; }).out; + aws_smithy_eventstream = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-eventstream."0.60.4" { inherit profileName; }).out; + aws_smithy_http = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-http."0.60.4" { inherit profileName; }).out; + aws_smithy_json = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-json."0.60.4" { inherit profileName; }).out; + aws_smithy_runtime = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-runtime."1.1.4" { inherit profileName; }).out; + aws_smithy_runtime_api = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-runtime-api."1.1.4" { inherit profileName; }).out; + aws_smithy_types = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-types."1.1.4" { inherit profileName; }).out; + aws_smithy_xml = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-xml."0.60.4" { inherit profileName; }).out; + aws_types = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-types."1.1.4" { inherit profileName; }).out; + bytes = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }).out; + http = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.11" { inherit profileName; }).out; + http_body = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".http-body."0.4.6" { inherit profileName; }).out; + once_cell = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.19.0" { inherit profileName; }).out; + percent_encoding = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".percent-encoding."2.3.1" { inherit profileName; }).out; + regex_lite = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".regex-lite."0.1.5" { inherit profileName; }).out; + tracing = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }).out; + url = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".url."2.5.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".aws-sdk-sso."1.12.0" = overridableMkRustCrate (profileName: rec { + name = "aws-sdk-sso"; + version = "1.12.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "f486420a66caad72635bc2ce0ff6581646e0d32df02aa39dc983bfe794955a5b"; }; + dependencies = { + aws_credential_types = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-credential-types."1.1.4" { inherit profileName; }).out; + aws_runtime = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-runtime."1.1.4" { inherit profileName; }).out; + aws_smithy_async = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-async."1.1.4" { inherit profileName; }).out; + aws_smithy_http = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-http."0.60.4" { inherit profileName; }).out; + aws_smithy_json = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-json."0.60.4" { inherit profileName; }).out; + aws_smithy_runtime = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-runtime."1.1.4" { inherit profileName; }).out; + aws_smithy_runtime_api = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-runtime-api."1.1.4" { inherit profileName; }).out; + aws_smithy_types = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-types."1.1.4" { inherit profileName; }).out; + aws_types = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-types."1.1.4" { inherit profileName; }).out; + bytes = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }).out; + http = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.11" { inherit profileName; }).out; + once_cell = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.19.0" { inherit profileName; }).out; + regex_lite = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".regex-lite."0.1.5" { inherit profileName; }).out; + tracing = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".aws-sdk-ssooidc."1.12.0" = overridableMkRustCrate (profileName: rec { + name = "aws-sdk-ssooidc"; + version = "1.12.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "39ddccf01d82fce9b4a15c8ae8608211ee7db8ed13a70b514bbfe41df3d24841"; }; + dependencies = { + aws_credential_types = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-credential-types."1.1.4" { inherit profileName; }).out; + aws_runtime = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-runtime."1.1.4" { inherit profileName; }).out; + aws_smithy_async = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-async."1.1.4" { inherit profileName; }).out; + aws_smithy_http = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-http."0.60.4" { inherit profileName; }).out; + aws_smithy_json = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-json."0.60.4" { inherit profileName; }).out; + aws_smithy_runtime = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-runtime."1.1.4" { inherit profileName; }).out; + aws_smithy_runtime_api = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-runtime-api."1.1.4" { inherit profileName; }).out; + aws_smithy_types = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-types."1.1.4" { inherit profileName; }).out; + aws_types = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-types."1.1.4" { inherit profileName; }).out; + bytes = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }).out; + http = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.11" { inherit profileName; }).out; + once_cell = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.19.0" { inherit profileName; }).out; + regex_lite = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".regex-lite."0.1.5" { inherit profileName; }).out; + tracing = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".aws-sdk-sts."1.12.0" = overridableMkRustCrate (profileName: rec { + name = "aws-sdk-sts"; + version = "1.12.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "1a591f8c7e6a621a501b2b5d2e88e1697fcb6274264523a6ad4d5959889a41ce"; }; + dependencies = { + aws_credential_types = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-credential-types."1.1.4" { inherit profileName; }).out; + aws_runtime = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-runtime."1.1.4" { inherit profileName; }).out; + aws_smithy_async = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-async."1.1.4" { inherit profileName; }).out; + aws_smithy_http = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-http."0.60.4" { inherit profileName; }).out; + aws_smithy_json = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-json."0.60.4" { inherit profileName; }).out; + aws_smithy_query = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-query."0.60.4" { inherit profileName; }).out; + aws_smithy_runtime = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-runtime."1.1.4" { inherit profileName; }).out; + aws_smithy_runtime_api = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-runtime-api."1.1.4" { inherit profileName; }).out; + aws_smithy_types = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-types."1.1.4" { inherit profileName; }).out; + aws_smithy_xml = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-xml."0.60.4" { inherit profileName; }).out; + aws_types = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-types."1.1.4" { inherit profileName; }).out; + http = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.11" { inherit profileName; }).out; + once_cell = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.19.0" { inherit profileName; }).out; + regex_lite = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".regex-lite."0.1.5" { inherit profileName; }).out; + tracing = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".aws-sigv4."1.1.4" = overridableMkRustCrate (profileName: rec { + name = "aws-sigv4"; + version = "1.1.4"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "c371c6b0ac54d4605eb6f016624fb5c7c2925d315fdf600ac1bf21b19d5f1742"; }; + features = builtins.concatLists [ + [ "default" ] + [ "http0-compat" ] + [ "http1" ] + [ "sign-eventstream" ] + [ "sign-http" ] + [ "sigv4a" ] + ]; + dependencies = { + aws_credential_types = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-credential-types."1.1.4" { inherit profileName; }).out; + aws_smithy_eventstream = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-eventstream."0.60.4" { inherit profileName; }).out; + aws_smithy_http = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-http."0.60.4" { inherit profileName; }).out; + aws_smithy_runtime_api = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-runtime-api."1.1.4" { inherit profileName; }).out; + aws_smithy_types = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-types."1.1.4" { inherit profileName; }).out; + bytes = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }).out; + crypto_bigint = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".crypto-bigint."0.5.5" { inherit profileName; }).out; + form_urlencoded = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".form_urlencoded."1.2.1" { inherit profileName; }).out; + hex = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".hex."0.4.3" { inherit profileName; }).out; + hmac = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".hmac."0.12.1" { inherit profileName; }).out; + http0 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.11" { inherit profileName; }).out; + http = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."1.0.0" { inherit profileName; }).out; + once_cell = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.19.0" { inherit profileName; }).out; + p256 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".p256."0.11.1" { inherit profileName; }).out; + percent_encoding = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".percent-encoding."2.3.1" { inherit profileName; }).out; + ring = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".ring."0.17.7" { inherit profileName; }).out; + sha2 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".sha2."0.10.8" { inherit profileName; }).out; + subtle = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".subtle."2.5.0" { inherit profileName; }).out; + time = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".time."0.3.34" { inherit profileName; }).out; + tracing = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }).out; + zeroize = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".zeroize."1.7.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".aws-smithy-async."1.1.4" = overridableMkRustCrate (profileName: rec { + name = "aws-smithy-async"; + version = "1.1.4"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "72ee2d09cce0ef3ae526679b522835d63e75fb427aca5413cd371e490d52dcc6"; }; + features = builtins.concatLists [ + [ "rt-tokio" ] + ]; + dependencies = { + futures_util = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.30" { inherit profileName; }).out; + pin_project_lite = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.13" { inherit profileName; }).out; + tokio = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".aws-smithy-checksums."0.60.4" = overridableMkRustCrate (profileName: rec { + name = "aws-smithy-checksums"; + version = "0.60.4"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "be2acd1b9c6ae5859999250ed5a62423aedc5cf69045b844432de15fa2f31f2b"; }; + dependencies = { + aws_smithy_http = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-http."0.60.4" { inherit profileName; }).out; + aws_smithy_types = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-types."1.1.4" { inherit profileName; }).out; + bytes = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }).out; + crc32c = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".crc32c."0.6.4" { inherit profileName; }).out; + crc32fast = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".crc32fast."1.4.0" { inherit profileName; }).out; + hex = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".hex."0.4.3" { inherit profileName; }).out; + http = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.11" { inherit profileName; }).out; + http_body = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".http-body."0.4.6" { inherit profileName; }).out; + md5 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".md-5."0.10.6" { inherit profileName; }).out; + pin_project_lite = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.13" { inherit profileName; }).out; + sha1 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".sha1."0.10.6" { inherit profileName; }).out; + sha2 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".sha2."0.10.8" { inherit profileName; }).out; + tracing = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".aws-smithy-eventstream."0.60.4" = overridableMkRustCrate (profileName: rec { + name = "aws-smithy-eventstream"; + version = "0.60.4"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "e6363078f927f612b970edf9d1903ef5cef9a64d1e8423525ebb1f0a1633c858"; }; + dependencies = { + aws_smithy_types = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-types."1.1.4" { inherit profileName; }).out; + bytes = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }).out; + crc32fast = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".crc32fast."1.4.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".aws-smithy-http."0.60.4" = overridableMkRustCrate (profileName: rec { + name = "aws-smithy-http"; + version = "0.60.4"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "dab56aea3cd9e1101a0a999447fb346afb680ab1406cebc44b32346e25b4117d"; }; + features = builtins.concatLists [ + [ "aws-smithy-eventstream" ] + [ "event-stream" ] + ]; + dependencies = { + aws_smithy_eventstream = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-eventstream."0.60.4" { inherit profileName; }).out; + aws_smithy_runtime_api = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-runtime-api."1.1.4" { inherit profileName; }).out; + aws_smithy_types = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-types."1.1.4" { inherit profileName; }).out; + bytes = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }).out; + bytes_utils = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes-utils."0.1.4" { inherit profileName; }).out; + futures_core = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.30" { inherit profileName; }).out; + http = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.11" { inherit profileName; }).out; + http_body = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".http-body."0.4.6" { inherit profileName; }).out; + once_cell = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.19.0" { inherit profileName; }).out; + percent_encoding = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".percent-encoding."2.3.1" { inherit profileName; }).out; + pin_project_lite = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.13" { inherit profileName; }).out; + pin_utils = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-utils."0.1.0" { inherit profileName; }).out; + tracing = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".aws-smithy-json."0.60.4" = overridableMkRustCrate (profileName: rec { + name = "aws-smithy-json"; + version = "0.60.4"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "fd3898ca6518f9215f62678870064398f00031912390efd03f1f6ef56d83aa8e"; }; + dependencies = { + aws_smithy_types = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-types."1.1.4" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".aws-smithy-query."0.60.4" = overridableMkRustCrate (profileName: rec { + name = "aws-smithy-query"; + version = "0.60.4"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "bda4b1dfc9810e35fba8a620e900522cd1bd4f9578c446e82f49d1ce41d2e9f9"; }; + dependencies = { + aws_smithy_types = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-types."1.1.4" { inherit profileName; }).out; + urlencoding = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".urlencoding."2.1.3" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".aws-smithy-runtime."1.1.4" = overridableMkRustCrate (profileName: rec { + name = "aws-smithy-runtime"; + version = "1.1.4"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "fafdab38f40ad7816e7da5dec279400dd505160780083759f01441af1bbb10ea"; }; + features = builtins.concatLists [ + [ "client" ] + [ "connector-hyper-0-14-x" ] + [ "rt-tokio" ] + [ "tls-rustls" ] + ]; + dependencies = { + aws_smithy_async = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-async."1.1.4" { inherit profileName; }).out; + aws_smithy_http = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-http."0.60.4" { inherit profileName; }).out; + aws_smithy_runtime_api = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-runtime-api."1.1.4" { inherit profileName; }).out; + aws_smithy_types = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-types."1.1.4" { inherit profileName; }).out; + bytes = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }).out; + fastrand = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".fastrand."2.0.1" { inherit profileName; }).out; + h2 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".h2."0.3.24" { inherit profileName; }).out; + http = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.11" { inherit profileName; }).out; + http_body_0_4 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".http-body."0.4.6" { inherit profileName; }).out; + hyper_0_14 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".hyper."0.14.28" { inherit profileName; }).out; + hyper_rustls = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".hyper-rustls."0.24.2" { inherit profileName; }).out; + once_cell = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.19.0" { inherit profileName; }).out; + pin_project_lite = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.13" { inherit profileName; }).out; + pin_utils = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-utils."0.1.0" { inherit profileName; }).out; + rustls = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".rustls."0.21.10" { inherit profileName; }).out; + tokio = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }).out; + tracing = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".aws-smithy-runtime-api."1.1.4" = overridableMkRustCrate (profileName: rec { + name = "aws-smithy-runtime-api"; + version = "1.1.4"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "c18276dd28852f34b3bf501f4f3719781f4999a51c7bff1a5c6dc8c4529adc29"; }; + features = builtins.concatLists [ + [ "client" ] + [ "default" ] + [ "http-02x" ] + [ "http-auth" ] + ]; + dependencies = { + aws_smithy_async = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-async."1.1.4" { inherit profileName; }).out; + aws_smithy_types = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-types."1.1.4" { inherit profileName; }).out; + bytes = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }).out; + http = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.11" { inherit profileName; }).out; + pin_project_lite = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.13" { inherit profileName; }).out; + tokio = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }).out; + tracing = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }).out; + zeroize = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".zeroize."1.7.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".aws-smithy-types."1.1.4" = overridableMkRustCrate (profileName: rec { + name = "aws-smithy-types"; + version = "1.1.4"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "bb3e134004170d3303718baa2a4eb4ca64ee0a1c0a7041dca31b38be0fb414f3"; }; + features = builtins.concatLists [ + [ "byte-stream-poll-next" ] + [ "http-body-0-4-x" ] + [ "rt-tokio" ] + ]; + dependencies = { + base64_simd = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".base64-simd."0.8.0" { inherit profileName; }).out; + bytes = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }).out; + bytes_utils = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes-utils."0.1.4" { inherit profileName; }).out; + futures_core = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.30" { inherit profileName; }).out; + http = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.11" { inherit profileName; }).out; + http_body_0_4 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".http-body."0.4.6" { inherit profileName; }).out; + itoa = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".itoa."1.0.10" { inherit profileName; }).out; + num_integer = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-integer."0.1.45" { inherit profileName; }).out; + pin_project_lite = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.13" { inherit profileName; }).out; + pin_utils = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-utils."0.1.0" { inherit profileName; }).out; + ryu = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".ryu."1.0.16" { inherit profileName; }).out; + ${ if false then "serde" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }).out; + time = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".time."0.3.34" { inherit profileName; }).out; + tokio = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }).out; + tokio_util = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-util."0.7.10" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".aws-smithy-xml."0.60.4" = overridableMkRustCrate (profileName: rec { + name = "aws-smithy-xml"; + version = "0.60.4"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "8604a11b25e9ecaf32f9aa56b9fe253c5e2f606a3477f0071e96d3155a5ed218"; }; + dependencies = { + xmlparser = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".xmlparser."0.13.6" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".aws-types."1.1.4" = overridableMkRustCrate (profileName: rec { + name = "aws-types"; + version = "1.1.4"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "789bbe008e65636fe1b6dbbb374c40c8960d1232b96af5ff4aec349f9c4accf4"; }; + dependencies = { + aws_credential_types = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-credential-types."1.1.4" { inherit profileName; }).out; + aws_smithy_async = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-async."1.1.4" { inherit profileName; }).out; + aws_smithy_runtime_api = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-runtime-api."1.1.4" { inherit profileName; }).out; + aws_smithy_types = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-smithy-types."1.1.4" { inherit profileName; }).out; + http = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.11" { inherit profileName; }).out; + tracing = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }).out; + }; + buildDependencies = { + rustc_version = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".rustc_version."0.4.0" { profileName = "__noProfile"; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".backoff."0.4.0" = overridableMkRustCrate (profileName: rec { + name = "backoff"; + version = "0.4.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "b62ddb9cb1ec0a098ad4bbf9344d0713fa193ae1a80af55febcff2627b6a00c1"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "default") + ]; + dependencies = { + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "getrandom" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".getrandom."0.2.12" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "instant" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".instant."0.1.12" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "rand" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".rand."0.8.5" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".backtrace."0.3.69" = overridableMkRustCrate (profileName: rec { + name = "backtrace"; + version = "0.3.69"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837"; }; + features = builtins.concatLists [ + [ "default" ] + [ "std" ] + ]; + dependencies = { + ${ if !(hostPlatform.isWindows && hostPlatform.parsed.abi.name == "msvc" && !(hostPlatform.parsed.vendor.name == "uwp")) then "addr2line" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".addr2line."0.21.0" { inherit profileName; }).out; + cfg_if = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."1.0.0" { inherit profileName; }).out; + ${ if !(hostPlatform.isWindows && hostPlatform.parsed.abi.name == "msvc" && !(hostPlatform.parsed.vendor.name == "uwp")) then "libc" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }).out; + ${ if !(hostPlatform.isWindows && hostPlatform.parsed.abi.name == "msvc" && !(hostPlatform.parsed.vendor.name == "uwp")) then "miniz_oxide" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".miniz_oxide."0.7.2" { inherit profileName; }).out; + ${ if !(hostPlatform.isWindows && hostPlatform.parsed.abi.name == "msvc" && !(hostPlatform.parsed.vendor.name == "uwp")) then "object" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".object."0.32.2" { inherit profileName; }).out; + rustc_demangle = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".rustc-demangle."0.1.23" { inherit profileName; }).out; + }; + buildDependencies = { + cc = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".cc."1.0.83" { profileName = "__noProfile"; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".base16ct."0.1.1" = overridableMkRustCrate (profileName: rec { + name = "base16ct"; + version = "0.1.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce"; }; + features = builtins.concatLists [ + [ "alloc" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".base64."0.13.1" = overridableMkRustCrate (profileName: rec { + name = "base64"; + version = "0.13.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "default") + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "std") + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".base64."0.21.7" = overridableMkRustCrate (profileName: rec { + name = "base64"; + version = "0.21.7"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567"; }; + features = builtins.concatLists [ + [ "alloc" ] + [ "default" ] + [ "std" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".base64-simd."0.8.0" = overridableMkRustCrate (profileName: rec { + name = "base64-simd"; + version = "0.8.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "339abbe78e73178762e23bea9dfd08e697eb3f3301cd4be981c0f78ba5859195"; }; + features = builtins.concatLists [ + [ "alloc" ] + [ "default" ] + [ "detect" ] + [ "std" ] + ]; + dependencies = { + outref = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".outref."0.5.1" { inherit profileName; }).out; + vsimd = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".vsimd."0.8.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".base64ct."1.6.0" = overridableMkRustCrate (profileName: rec { + name = "base64ct"; + version = "1.6.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b"; }; + features = builtins.concatLists [ + [ "alloc" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".bincode."1.3.3" = overridableMkRustCrate (profileName: rec { + name = "bincode"; + version = "1.3.3"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad"; }; + dependencies = { + ${ if rootFeatures' ? "garage/default" || rootFeatures' ? "garage/lmdb" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/heed" || rootFeatures' ? "garage_db/lmdb" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/lmdb" then "serde" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".bitflags."1.3.2" = overridableMkRustCrate (profileName: rec { + name = "bitflags"; + version = "1.3.2"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"; }; + features = builtins.concatLists [ + [ "default" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".bitflags."2.4.2" = overridableMkRustCrate (profileName: rec { + name = "bitflags"; + version = "2.4.2"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "std") + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".blake2."0.10.6" = overridableMkRustCrate (profileName: rec { + name = "blake2"; + version = "0.10.6"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe"; }; + features = builtins.concatLists [ + [ "default" ] + [ "std" ] + ]; + dependencies = { + digest = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".digest."0.10.7" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".block-buffer."0.10.4" = overridableMkRustCrate (profileName: rec { + name = "block-buffer"; + version = "0.10.4"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"; }; + dependencies = { + generic_array = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".generic-array."0.14.7" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".bumpalo."3.14.0" = overridableMkRustCrate (profileName: rec { + name = "bumpalo"; + version = "3.14.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec"; }; + features = builtins.concatLists [ + [ "default" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".bytemuck."1.14.1" = overridableMkRustCrate (profileName: rec { + name = "bytemuck"; + version = "1.14.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "ed2490600f404f2b94c167e31d3ed1d5f3c225a0f3b80230053b3e0b7b962bd9"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/default" || rootFeatures' ? "garage/lmdb" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/heed" || rootFeatures' ? "garage_db/lmdb" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/lmdb") "extern_crate_alloc") + (lib.optional (rootFeatures' ? "garage/default" || rootFeatures' ? "garage/lmdb" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/heed" || rootFeatures' ? "garage_db/lmdb" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/lmdb") "extern_crate_std") + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".byteorder."1.5.0" = overridableMkRustCrate (profileName: rec { + name = "byteorder"; + version = "1.5.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"; }; + features = builtins.concatLists [ + [ "default" ] + [ "std" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" = overridableMkRustCrate (profileName: rec { + name = "bytes"; + version = "1.5.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223"; }; + features = builtins.concatLists [ + [ "default" ] + [ "std" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".bytes-utils."0.1.4" = overridableMkRustCrate (profileName: rec { + name = "bytes-utils"; + version = "0.1.4"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "7dafe3a8757b027e2be6e4e5601ed563c55989fcf1546e933c66c8eb3a058d35"; }; + features = builtins.concatLists [ + [ "default" ] + [ "std" ] + ]; + dependencies = { + bytes = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }).out; + either = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".either."1.9.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".bytesize."1.3.0" = overridableMkRustCrate (profileName: rec { + name = "bytesize"; + version = "1.3.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "a3e368af43e418a04d52505cf3dbc23dda4e3407ae2fa99fd0e4f308ce546acc"; }; + features = builtins.concatLists [ + [ "default" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".cc."1.0.83" = overridableMkRustCrate (profileName: rec { + name = "cc"; + version = "1.0.83"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0"; }; + features = builtins.concatLists [ + [ "jobserver" ] + [ "parallel" ] + ]; + dependencies = { + jobserver = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".jobserver."0.1.27" { inherit profileName; }).out; + ${ if hostPlatform.isUnix then "libc" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".cfg-if."1.0.0" = overridableMkRustCrate (profileName: rec { + name = "cfg-if"; + version = "1.0.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".cfg_aliases."0.1.1" = overridableMkRustCrate (profileName: rec { + name = "cfg_aliases"; + version = "0.1.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".chrono."0.4.33" = overridableMkRustCrate (profileName: rec { + name = "chrono"; + version = "0.4.33"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "9f13690e35a5e4ace198e7beea2895d29f3a9cc55015fcebe6336bd2010af9eb"; }; + features = builtins.concatLists [ + [ "alloc" ] + [ "android-tzdata" ] + [ "clock" ] + [ "default" ] + [ "iana-time-zone" ] + [ "js-sys" ] + [ "now" ] + [ "oldtime" ] + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/k8s-openapi" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "serde") + [ "std" ] + [ "wasm-bindgen" ] + [ "wasmbind" ] + [ "winapi" ] + [ "windows-targets" ] + ]; + dependencies = { + ${ if hostPlatform.parsed.kernel.name == "android" then "android_tzdata" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".android-tzdata."0.1.1" { inherit profileName; }).out; + ${ if hostPlatform.isUnix then "iana_time_zone" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".iana-time-zone."0.1.60" { inherit profileName; }).out; + ${ if hostPlatform.parsed.cpu.name == "wasm32" && !(hostPlatform.parsed.kernel.name == "emscripten" || hostPlatform.parsed.kernel.name == "wasi") then "js_sys" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".js-sys."0.3.67" { inherit profileName; }).out; + num_traits = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-traits."0.2.17" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/k8s-openapi" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "serde" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }).out; + ${ if hostPlatform.parsed.cpu.name == "wasm32" && !(hostPlatform.parsed.kernel.name == "emscripten" || hostPlatform.parsed.kernel.name == "wasi") then "wasm_bindgen" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen."0.2.90" { inherit profileName; }).out; + ${ if hostPlatform.isWindows then "windows_targets" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows-targets."0.52.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".cipher."0.4.4" = overridableMkRustCrate (profileName: rec { + name = "cipher"; + version = "0.4.4"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad"; }; + dependencies = { + crypto_common = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".crypto-common."0.1.6" { inherit profileName; }).out; + inout = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".inout."0.1.3" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".clap."2.34.0" = overridableMkRustCrate (profileName: rec { + name = "clap"; + version = "2.34.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c"; }; + dependencies = { + bitflags = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bitflags."1.3.2" { inherit profileName; }).out; + textwrap = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".textwrap."0.11.0" { inherit profileName; }).out; + unicode_width = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".unicode-width."0.1.11" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".clap."4.4.18" = overridableMkRustCrate (profileName: rec { + name = "clap"; + version = "4.4.18"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "1e578d6ec4194633722ccf9544794b71b1385c3c027efe0c55db226fc880865c"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "k2v-client/clap" || rootFeatures' ? "k2v-client/cli") "color") + (lib.optional (rootFeatures' ? "k2v-client/clap" || rootFeatures' ? "k2v-client/cli") "default") + (lib.optional (rootFeatures' ? "k2v-client/clap" || rootFeatures' ? "k2v-client/cli") "derive") + (lib.optional (rootFeatures' ? "k2v-client/clap" || rootFeatures' ? "k2v-client/cli") "env") + (lib.optional (rootFeatures' ? "k2v-client/clap" || rootFeatures' ? "k2v-client/cli") "error-context") + (lib.optional (rootFeatures' ? "k2v-client/clap" || rootFeatures' ? "k2v-client/cli") "help") + (lib.optional (rootFeatures' ? "k2v-client/clap" || rootFeatures' ? "k2v-client/cli") "std") + (lib.optional (rootFeatures' ? "k2v-client/clap" || rootFeatures' ? "k2v-client/cli") "suggestions") + (lib.optional (rootFeatures' ? "k2v-client/clap" || rootFeatures' ? "k2v-client/cli") "usage") + ]; + dependencies = { + ${ if rootFeatures' ? "k2v-client/clap" || rootFeatures' ? "k2v-client/cli" then "clap_builder" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".clap_builder."4.4.18" { inherit profileName; }).out; + ${ if rootFeatures' ? "k2v-client/clap" || rootFeatures' ? "k2v-client/cli" then "clap_derive" else null } = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".clap_derive."4.4.7" { profileName = "__noProfile"; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".clap_builder."4.4.18" = overridableMkRustCrate (profileName: rec { + name = "clap_builder"; + version = "4.4.18"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "4df4df40ec50c46000231c914968278b1eb05098cf8f1b3a518a95030e71d1c7"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "k2v-client/clap" || rootFeatures' ? "k2v-client/cli") "color") + (lib.optional (rootFeatures' ? "k2v-client/clap" || rootFeatures' ? "k2v-client/cli") "env") + (lib.optional (rootFeatures' ? "k2v-client/clap" || rootFeatures' ? "k2v-client/cli") "error-context") + (lib.optional (rootFeatures' ? "k2v-client/clap" || rootFeatures' ? "k2v-client/cli") "help") + (lib.optional (rootFeatures' ? "k2v-client/clap" || rootFeatures' ? "k2v-client/cli") "std") + (lib.optional (rootFeatures' ? "k2v-client/clap" || rootFeatures' ? "k2v-client/cli") "suggestions") + (lib.optional (rootFeatures' ? "k2v-client/clap" || rootFeatures' ? "k2v-client/cli") "usage") + ]; + dependencies = { + ${ if rootFeatures' ? "k2v-client/clap" || rootFeatures' ? "k2v-client/cli" then "anstream" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".anstream."0.6.11" { inherit profileName; }).out; + ${ if rootFeatures' ? "k2v-client/clap" || rootFeatures' ? "k2v-client/cli" then "anstyle" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".anstyle."1.0.5" { inherit profileName; }).out; + ${ if rootFeatures' ? "k2v-client/clap" || rootFeatures' ? "k2v-client/cli" then "clap_lex" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".clap_lex."0.6.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "k2v-client/clap" || rootFeatures' ? "k2v-client/cli" then "strsim" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".strsim."0.10.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".clap_derive."4.4.7" = overridableMkRustCrate (profileName: rec { + name = "clap_derive"; + version = "4.4.7"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "k2v-client/clap" || rootFeatures' ? "k2v-client/cli") "default") + ]; + dependencies = { + ${ if rootFeatures' ? "k2v-client/clap" || rootFeatures' ? "k2v-client/cli" then "heck" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".heck."0.4.1" { inherit profileName; }).out; + ${ if rootFeatures' ? "k2v-client/clap" || rootFeatures' ? "k2v-client/cli" then "proc_macro2" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }).out; + ${ if rootFeatures' ? "k2v-client/clap" || rootFeatures' ? "k2v-client/cli" then "quote" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }).out; + ${ if rootFeatures' ? "k2v-client/clap" || rootFeatures' ? "k2v-client/cli" then "syn" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."2.0.48" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".clap_lex."0.6.0" = overridableMkRustCrate (profileName: rec { + name = "clap_lex"; + version = "0.6.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".colorchoice."1.0.0" = overridableMkRustCrate (profileName: rec { + name = "colorchoice"; + version = "1.0.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".const-oid."0.9.6" = overridableMkRustCrate (profileName: rec { + name = "const-oid"; + version = "0.9.6"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".core-foundation."0.9.4" = overridableMkRustCrate (profileName: rec { + name = "core-foundation"; + version = "0.9.4"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f"; }; + features = builtins.concatLists [ + [ "default" ] + [ "link" ] + ]; + dependencies = { + core_foundation_sys = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".core-foundation-sys."0.8.6" { inherit profileName; }).out; + libc = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".core-foundation-sys."0.8.6" = overridableMkRustCrate (profileName: rec { + name = "core-foundation-sys"; + version = "0.8.6"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f"; }; + features = builtins.concatLists [ + [ "default" ] + [ "link" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".cpufeatures."0.2.12" = overridableMkRustCrate (profileName: rec { + name = "cpufeatures"; + version = "0.2.12"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504"; }; + dependencies = { + ${ if hostPlatform.config == "aarch64-linux-android" || hostPlatform.parsed.cpu.name == "aarch64" && hostPlatform.parsed.kernel.name == "linux" || hostPlatform.parsed.cpu.name == "aarch64" && hostPlatform.parsed.vendor.name == "apple" || hostPlatform.parsed.cpu.name == "loongarch64" && hostPlatform.parsed.kernel.name == "linux" then "libc" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".crc32c."0.6.4" = overridableMkRustCrate (profileName: rec { + name = "crc32c"; + version = "0.6.4"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "d8f48d60e5b4d2c53d5c2b1d8a58c849a70ae5e5509b08a48d047e3b65714a74"; }; + buildDependencies = { + rustc_version = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".rustc_version."0.4.0" { profileName = "__noProfile"; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".crc32fast."1.4.0" = overridableMkRustCrate (profileName: rec { + name = "crc32fast"; + version = "1.4.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa"; }; + features = builtins.concatLists [ + [ "default" ] + [ "std" ] + ]; + dependencies = { + cfg_if = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."1.0.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".crossbeam-channel."0.5.11" = overridableMkRustCrate (profileName: rec { + name = "crossbeam-channel"; + version = "0.5.11"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "176dc175b78f56c0f321911d9c8eb2b77a78a4860b9c19db83835fea1a46649b"; }; + features = builtins.concatLists [ + [ "default" ] + [ "std" ] + ]; + dependencies = { + crossbeam_utils = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".crossbeam-utils."0.8.19" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".crossbeam-queue."0.3.11" = overridableMkRustCrate (profileName: rec { + name = "crossbeam-queue"; + version = "0.3.11"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/default" || rootFeatures' ? "garage/lmdb" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/heed" || rootFeatures' ? "garage_db/lmdb" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/lmdb") "alloc") + (lib.optional (rootFeatures' ? "garage/default" || rootFeatures' ? "garage/lmdb" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/heed" || rootFeatures' ? "garage_db/lmdb" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/lmdb") "default") + (lib.optional (rootFeatures' ? "garage/default" || rootFeatures' ? "garage/lmdb" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/heed" || rootFeatures' ? "garage_db/lmdb" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/lmdb") "std") + ]; + dependencies = { + ${ if rootFeatures' ? "garage/default" || rootFeatures' ? "garage/lmdb" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/heed" || rootFeatures' ? "garage_db/lmdb" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/lmdb" then "crossbeam_utils" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".crossbeam-utils."0.8.19" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".crossbeam-utils."0.8.19" = overridableMkRustCrate (profileName: rec { + name = "crossbeam-utils"; + version = "0.8.19"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345"; }; + features = builtins.concatLists [ + [ "std" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".crypto-bigint."0.4.9" = overridableMkRustCrate (profileName: rec { + name = "crypto-bigint"; + version = "0.4.9"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef"; }; + features = builtins.concatLists [ + [ "generic-array" ] + [ "rand_core" ] + [ "zeroize" ] + ]; + dependencies = { + generic_array = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".generic-array."0.14.7" { inherit profileName; }).out; + rand_core = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".rand_core."0.6.4" { inherit profileName; }).out; + subtle = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".subtle."2.5.0" { inherit profileName; }).out; + zeroize = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".zeroize."1.7.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".crypto-bigint."0.5.5" = overridableMkRustCrate (profileName: rec { + name = "crypto-bigint"; + version = "0.5.5"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76"; }; + features = builtins.concatLists [ + [ "default" ] + [ "rand" ] + [ "rand_core" ] + ]; + dependencies = { + rand_core = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".rand_core."0.6.4" { inherit profileName; }).out; + subtle = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".subtle."2.5.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".crypto-common."0.1.6" = overridableMkRustCrate (profileName: rec { + name = "crypto-common"; + version = "0.1.6"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3"; }; + features = builtins.concatLists [ + [ "getrandom" ] + [ "rand_core" ] + [ "std" ] + ]; + dependencies = { + generic_array = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".generic-array."0.14.7" { inherit profileName; }).out; + rand_core = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".rand_core."0.6.4" { inherit profileName; }).out; + typenum = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".typenum."1.17.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".ctr."0.9.2" = overridableMkRustCrate (profileName: rec { + name = "ctr"; + version = "0.9.2"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835"; }; + dependencies = { + cipher = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".cipher."0.4.4" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".darling."0.20.5" = overridableMkRustCrate (profileName: rec { + name = "darling"; + version = "0.20.5"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "fc5d6b04b3fd0ba9926f945895de7d806260a2d7431ba82e7edaecb043c4c6b8"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "default") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "suggestions") + ]; + dependencies = { + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "darling_core" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".darling_core."0.20.5" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "darling_macro" else null } = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".darling_macro."0.20.5" { profileName = "__noProfile"; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".darling_core."0.20.5" = overridableMkRustCrate (profileName: rec { + name = "darling_core"; + version = "0.20.5"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "04e48a959bcd5c761246f5d090ebc2fbf7b9cd527a492b07a67510c108f1e7e3"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "strsim") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "suggestions") + ]; + dependencies = { + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "fnv" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".fnv."1.0.7" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "ident_case" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".ident_case."1.0.1" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "proc_macro2" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "quote" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "strsim" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".strsim."0.10.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "syn" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."2.0.48" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".darling_macro."0.20.5" = overridableMkRustCrate (profileName: rec { + name = "darling_macro"; + version = "0.20.5"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "1d1545d67a2149e1d93b7e5c7752dce5a7426eb5d1357ddcfd89336b94444f77"; }; + dependencies = { + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "darling_core" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".darling_core."0.20.5" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "quote" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "syn" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."2.0.48" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".dashmap."4.0.2" = overridableMkRustCrate (profileName: rec { + name = "dashmap"; + version = "4.0.2"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "e77a43b28d0668df09411cb0bc9a8c2adc40f9a048afe863e05fd43251e8e39c"; }; + features = builtins.concatLists [ + [ "default" ] + ]; + dependencies = { + cfg_if = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."1.0.0" { inherit profileName; }).out; + num_cpus = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".num_cpus."1.16.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".der."0.6.1" = overridableMkRustCrate (profileName: rec { + name = "der"; + version = "0.6.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de"; }; + features = builtins.concatLists [ + [ "alloc" ] + [ "const-oid" ] + [ "oid" ] + [ "zeroize" ] + ]; + dependencies = { + const_oid = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".const-oid."0.9.6" { inherit profileName; }).out; + zeroize = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".zeroize."1.7.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".deranged."0.3.11" = overridableMkRustCrate (profileName: rec { + name = "deranged"; + version = "0.3.11"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4"; }; + features = builtins.concatLists [ + [ "alloc" ] + [ "powerfmt" ] + [ "std" ] + ]; + dependencies = { + powerfmt = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".powerfmt."0.2.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".derivative."2.2.0" = overridableMkRustCrate (profileName: rec { + name = "derivative"; + version = "2.2.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b"; }; + dependencies = { + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "proc_macro2" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "quote" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "syn" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.109" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".digest."0.10.7" = overridableMkRustCrate (profileName: rec { + name = "digest"; + version = "0.10.7"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"; }; + features = builtins.concatLists [ + [ "alloc" ] + [ "block-buffer" ] + [ "core-api" ] + [ "default" ] + [ "mac" ] + [ "std" ] + [ "subtle" ] + ]; + dependencies = { + block_buffer = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".block-buffer."0.10.4" { inherit profileName; }).out; + crypto_common = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".crypto-common."0.1.6" { inherit profileName; }).out; + subtle = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".subtle."2.5.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".dyn-clone."1.0.16" = overridableMkRustCrate (profileName: rec { + name = "dyn-clone"; + version = "1.0.16"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "545b22097d44f8a9581187cdf93de7a71e4722bf51200cfaba810865b49a495d"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".ecdsa."0.14.8" = overridableMkRustCrate (profileName: rec { + name = "ecdsa"; + version = "0.14.8"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c"; }; + features = builtins.concatLists [ + [ "alloc" ] + [ "arithmetic" ] + [ "der" ] + [ "digest" ] + [ "hazmat" ] + [ "pkcs8" ] + [ "rfc6979" ] + [ "sign" ] + [ "std" ] + [ "verify" ] + ]; + dependencies = { + der = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".der."0.6.1" { inherit profileName; }).out; + elliptic_curve = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".elliptic-curve."0.12.3" { inherit profileName; }).out; + rfc6979 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".rfc6979."0.3.1" { inherit profileName; }).out; + signature = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".signature."1.6.4" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".either."1.9.0" = overridableMkRustCrate (profileName: rec { + name = "either"; + version = "1.9.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "default") + [ "use_std" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".elliptic-curve."0.12.3" = overridableMkRustCrate (profileName: rec { + name = "elliptic-curve"; + version = "0.12.3"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3"; }; + features = builtins.concatLists [ + [ "alloc" ] + [ "arithmetic" ] + [ "digest" ] + [ "ff" ] + [ "group" ] + [ "hazmat" ] + [ "pkcs8" ] + [ "sec1" ] + [ "std" ] + ]; + dependencies = { + base16ct = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".base16ct."0.1.1" { inherit profileName; }).out; + crypto_bigint = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".crypto-bigint."0.4.9" { inherit profileName; }).out; + der = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".der."0.6.1" { inherit profileName; }).out; + digest = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".digest."0.10.7" { inherit profileName; }).out; + ff = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".ff."0.12.1" { inherit profileName; }).out; + generic_array = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".generic-array."0.14.7" { inherit profileName; }).out; + group = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".group."0.12.1" { inherit profileName; }).out; + pkcs8 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".pkcs8."0.9.0" { inherit profileName; }).out; + rand_core = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".rand_core."0.6.4" { inherit profileName; }).out; + sec1 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".sec1."0.3.0" { inherit profileName; }).out; + subtle = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".subtle."2.5.0" { inherit profileName; }).out; + zeroize = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".zeroize."1.7.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".encoding_rs."0.8.33" = overridableMkRustCrate (profileName: rec { + name = "encoding_rs"; + version = "0.8.33"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1"; }; + features = builtins.concatLists [ + [ "alloc" ] + [ "default" ] + ]; + dependencies = { + cfg_if = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."1.0.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".env_logger."0.10.2" = overridableMkRustCrate (profileName: rec { + name = "env_logger"; + version = "0.10.2"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580"; }; + features = builtins.concatLists [ + [ "auto-color" ] + [ "color" ] + [ "default" ] + [ "humantime" ] + [ "regex" ] + ]; + dependencies = { + humantime = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".humantime."2.1.0" { inherit profileName; }).out; + is_terminal = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".is-terminal."0.4.12" { inherit profileName; }).out; + log = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.20" { inherit profileName; }).out; + regex = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".regex."1.10.3" { inherit profileName; }).out; + termcolor = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".termcolor."1.4.1" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".equivalent."1.0.1" = overridableMkRustCrate (profileName: rec { + name = "equivalent"; + version = "1.0.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".err-derive."0.3.1" = overridableMkRustCrate (profileName: rec { + name = "err-derive"; + version = "0.3.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "c34a887c8df3ed90498c1c437ce21f211c8e27672921a8ffa293cb8d6d4caa9e"; }; + features = builtins.concatLists [ + [ "default" ] + [ "std" ] + ]; + dependencies = { + proc_macro_error = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro-error."1.0.4" { inherit profileName; }).out; + proc_macro2 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }).out; + quote = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }).out; + syn = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.109" { inherit profileName; }).out; + synstructure = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".synstructure."0.12.6" { inherit profileName; }).out; + }; + buildDependencies = { + rustversion = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".rustversion."1.0.14" { profileName = "__noProfile"; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".errno."0.3.8" = overridableMkRustCrate (profileName: rec { + name = "errno"; + version = "0.3.8"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "std") + ]; + dependencies = { + ${ if (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") && (hostPlatform.isUnix || hostPlatform.parsed.kernel.name == "hermit" || hostPlatform.parsed.kernel.name == "wasi") then "libc" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }).out; + ${ if (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") && hostPlatform.isWindows then "windows_sys" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows-sys."0.52.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".fallible-iterator."0.3.0" = overridableMkRustCrate (profileName: rec { + name = "fallible-iterator"; + version = "0.3.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/bundled-libs" || rootFeatures' ? "garage/default" || rootFeatures' ? "garage/sqlite" || rootFeatures' ? "garage_db/bundled-libs" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/r2d2_sqlite" || rootFeatures' ? "garage_db/rusqlite" || rootFeatures' ? "garage_db/sqlite" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/sqlite") "alloc") + (lib.optional (rootFeatures' ? "garage/bundled-libs" || rootFeatures' ? "garage/default" || rootFeatures' ? "garage/sqlite" || rootFeatures' ? "garage_db/bundled-libs" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/r2d2_sqlite" || rootFeatures' ? "garage_db/rusqlite" || rootFeatures' ? "garage_db/sqlite" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/sqlite") "default") + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".fallible-streaming-iterator."0.1.9" = overridableMkRustCrate (profileName: rec { + name = "fallible-streaming-iterator"; + version = "0.1.9"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".fastrand."2.0.1" = overridableMkRustCrate (profileName: rec { + name = "fastrand"; + version = "2.0.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5"; }; + features = builtins.concatLists [ + [ "alloc" ] + [ "default" ] + [ "std" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".ff."0.12.1" = overridableMkRustCrate (profileName: rec { + name = "ff"; + version = "0.12.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160"; }; + dependencies = { + rand_core = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".rand_core."0.6.4" { inherit profileName; }).out; + subtle = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".subtle."2.5.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".fixedbitset."0.4.2" = overridableMkRustCrate (profileName: rec { + name = "fixedbitset"; + version = "0.4.2"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".fnv."1.0.7" = overridableMkRustCrate (profileName: rec { + name = "fnv"; + version = "1.0.7"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"; }; + features = builtins.concatLists [ + [ "default" ] + [ "std" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".form_urlencoded."1.2.1" = overridableMkRustCrate (profileName: rec { + name = "form_urlencoded"; + version = "1.2.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456"; }; + features = builtins.concatLists [ + [ "alloc" ] + [ "default" ] + [ "std" ] + ]; + dependencies = { + percent_encoding = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".percent-encoding."2.3.1" { inherit profileName; }).out; + }; + }); + + "unknown".format_table."0.1.1" = overridableMkRustCrate (profileName: rec { + name = "format_table"; + version = "0.1.1"; + registry = "unknown"; + src = fetchCrateLocal (workspaceSrc + "/src/format-table"); + }); + + "registry+https://github.com/rust-lang/crates.io-index".futures."0.3.30" = overridableMkRustCrate (profileName: rec { + name = "futures"; + version = "0.3.30"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0"; }; + features = builtins.concatLists [ + [ "alloc" ] + [ "async-await" ] + [ "default" ] + [ "executor" ] + [ "futures-executor" ] + [ "std" ] + ]; + dependencies = { + futures_channel = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-channel."0.3.30" { inherit profileName; }).out; + futures_core = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.30" { inherit profileName; }).out; + futures_executor = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-executor."0.3.30" { inherit profileName; }).out; + futures_io = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-io."0.3.30" { inherit profileName; }).out; + futures_sink = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-sink."0.3.30" { inherit profileName; }).out; + futures_task = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-task."0.3.30" { inherit profileName; }).out; + futures_util = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.30" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".futures-channel."0.3.30" = overridableMkRustCrate (profileName: rec { + name = "futures-channel"; + version = "0.3.30"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78"; }; + features = builtins.concatLists [ + [ "alloc" ] + [ "default" ] + [ "futures-sink" ] + [ "sink" ] + [ "std" ] + ]; + dependencies = { + futures_core = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.30" { inherit profileName; }).out; + futures_sink = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-sink."0.3.30" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.30" = overridableMkRustCrate (profileName: rec { + name = "futures-core"; + version = "0.3.30"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d"; }; + features = builtins.concatLists [ + [ "alloc" ] + [ "default" ] + [ "std" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".futures-executor."0.3.30" = overridableMkRustCrate (profileName: rec { + name = "futures-executor"; + version = "0.3.30"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d"; }; + features = builtins.concatLists [ + [ "default" ] + [ "std" ] + ]; + dependencies = { + futures_core = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.30" { inherit profileName; }).out; + futures_task = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-task."0.3.30" { inherit profileName; }).out; + futures_util = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.30" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".futures-io."0.3.30" = overridableMkRustCrate (profileName: rec { + name = "futures-io"; + version = "0.3.30"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1"; }; + features = builtins.concatLists [ + [ "default" ] + [ "std" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".futures-macro."0.3.30" = overridableMkRustCrate (profileName: rec { + name = "futures-macro"; + version = "0.3.30"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac"; }; + dependencies = { + proc_macro2 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }).out; + quote = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }).out; + syn = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."2.0.48" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".futures-sink."0.3.30" = overridableMkRustCrate (profileName: rec { + name = "futures-sink"; + version = "0.3.30"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5"; }; + features = builtins.concatLists [ + [ "alloc" ] + [ "default" ] + [ "std" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".futures-task."0.3.30" = overridableMkRustCrate (profileName: rec { + name = "futures-task"; + version = "0.3.30"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004"; }; + features = builtins.concatLists [ + [ "alloc" ] + [ "std" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.30" = overridableMkRustCrate (profileName: rec { + name = "futures-util"; + version = "0.3.30"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48"; }; + features = builtins.concatLists [ + [ "alloc" ] + [ "async-await" ] + [ "async-await-macro" ] + [ "channel" ] + [ "default" ] + [ "futures-channel" ] + [ "futures-io" ] + [ "futures-macro" ] + [ "futures-sink" ] + [ "io" ] + [ "memchr" ] + [ "sink" ] + [ "slab" ] + [ "std" ] + ]; + dependencies = { + futures_channel = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-channel."0.3.30" { inherit profileName; }).out; + futures_core = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.30" { inherit profileName; }).out; + futures_io = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-io."0.3.30" { inherit profileName; }).out; + futures_macro = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-macro."0.3.30" { profileName = "__noProfile"; }).out; + futures_sink = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-sink."0.3.30" { inherit profileName; }).out; + futures_task = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-task."0.3.30" { inherit profileName; }).out; + memchr = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".memchr."2.7.1" { inherit profileName; }).out; + pin_project_lite = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.13" { inherit profileName; }).out; + pin_utils = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-utils."0.1.0" { inherit profileName; }).out; + slab = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".slab."0.4.9" { inherit profileName; }).out; + }; + }); + + "unknown".garage."1.0.0" = overridableMkRustCrate (profileName: rec { + name = "garage"; + version = "1.0.0"; + registry = "unknown"; + src = fetchCrateLocal (workspaceSrc + "/src/garage"); + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/bundled-libs" || rootFeatures' ? "garage/default") "bundled-libs") + (lib.optional (rootFeatures' ? "garage/consul-discovery") "consul-discovery") + (lib.optional (rootFeatures' ? "garage/default") "default") + (lib.optional (rootFeatures' ? "garage/default" || rootFeatures' ? "garage/k2v") "k2v") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery") "kubernetes-discovery") + (lib.optional (rootFeatures' ? "garage/default" || rootFeatures' ? "garage/lmdb") "lmdb") + (lib.optional (rootFeatures' ? "garage/default" || rootFeatures' ? "garage/metrics") "metrics") + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "opentelemetry-otlp") + (lib.optional (rootFeatures' ? "garage/default" || rootFeatures' ? "garage/metrics" || rootFeatures' ? "garage/opentelemetry-prometheus") "opentelemetry-prometheus") + (lib.optional (rootFeatures' ? "garage/default" || rootFeatures' ? "garage/metrics" || rootFeatures' ? "garage/prometheus") "prometheus") + (lib.optional (rootFeatures' ? "garage/default" || rootFeatures' ? "garage/sqlite") "sqlite") + (lib.optional (rootFeatures' ? "garage/syslog") "syslog") + (lib.optional (rootFeatures' ? "garage/syslog" || rootFeatures' ? "garage/syslog-tracing") "syslog-tracing") + (lib.optional (rootFeatures' ? "garage/system-libs") "system-libs") + (lib.optional (rootFeatures' ? "garage/telemetry-otlp") "telemetry-otlp") + ]; + dependencies = { + async_trait = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".async-trait."0.1.77" { profileName = "__noProfile"; }).out; + backtrace = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".backtrace."0.3.69" { inherit profileName; }).out; + bytes = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }).out; + bytesize = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytesize."1.3.0" { inherit profileName; }).out; + format_table = (rustPackages."unknown".format_table."0.1.1" { inherit profileName; }).out; + futures = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures."0.3.30" { inherit profileName; }).out; + futures_util = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.30" { inherit profileName; }).out; + garage_api = (rustPackages."unknown".garage_api."1.0.0" { inherit profileName; }).out; + garage_block = (rustPackages."unknown".garage_block."1.0.0" { inherit profileName; }).out; + garage_db = (rustPackages."unknown".garage_db."1.0.0" { inherit profileName; }).out; + garage_model = (rustPackages."unknown".garage_model."1.0.0" { inherit profileName; }).out; + garage_net = (rustPackages."unknown".garage_net."1.0.0" { inherit profileName; }).out; + garage_rpc = (rustPackages."unknown".garage_rpc."1.0.0" { inherit profileName; }).out; + garage_table = (rustPackages."unknown".garage_table."1.0.0" { inherit profileName; }).out; + garage_util = (rustPackages."unknown".garage_util."1.0.0" { inherit profileName; }).out; + garage_web = (rustPackages."unknown".garage_web."1.0.0" { inherit profileName; }).out; + git_version = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".git-version."0.3.9" { inherit profileName; }).out; + hex = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".hex."0.4.3" { inherit profileName; }).out; + sodiumoxide = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".kuska-sodiumoxide."0.2.5-0" { inherit profileName; }).out; + opentelemetry = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".opentelemetry."0.17.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "opentelemetry_otlp" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".opentelemetry-otlp."0.10.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/default" || rootFeatures' ? "garage/metrics" || rootFeatures' ? "garage/opentelemetry-prometheus" then "opentelemetry_prometheus" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".opentelemetry-prometheus."0.10.0" { inherit profileName; }).out; + parse_duration = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".parse_duration."2.1.1" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/default" || rootFeatures' ? "garage/metrics" || rootFeatures' ? "garage/prometheus" then "prometheus" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".prometheus."0.13.3" { inherit profileName; }).out; + rand = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".rand."0.8.5" { inherit profileName; }).out; + serde = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }).out; + serde_bytes = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_bytes."0.11.14" { inherit profileName; }).out; + sha1 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".sha1."0.10.6" { inherit profileName; }).out; + structopt = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".structopt."0.3.26" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/syslog" || rootFeatures' ? "garage/syslog-tracing" then "syslog_tracing" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".syslog-tracing."0.3.0" { inherit profileName; }).out; + timeago = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".timeago."0.4.2" { inherit profileName; }).out; + tokio = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }).out; + toml = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".toml."0.8.10" { inherit profileName; }).out; + tracing = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }).out; + tracing_subscriber = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing-subscriber."0.3.18" { inherit profileName; }).out; + }; + devDependencies = { + assert_json_diff = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".assert-json-diff."2.0.2" { inherit profileName; }).out; + aws_config = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-config."1.1.4" { inherit profileName; }).out; + aws_sdk_s3 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-sdk-s3."1.14.0" { inherit profileName; }).out; + base64 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".base64."0.21.7" { inherit profileName; }).out; + chrono = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".chrono."0.4.33" { inherit profileName; }).out; + hmac = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".hmac."0.12.1" { inherit profileName; }).out; + http = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."1.0.0" { inherit profileName; }).out; + http_body_util = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".http-body-util."0.1.0" { inherit profileName; }).out; + hyper = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".hyper."1.1.0" { inherit profileName; }).out; + hyper_util = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".hyper-util."0.1.3" { inherit profileName; }).out; + k2v_client = (rustPackages."unknown".k2v-client."0.0.4" { inherit profileName; }).out; + mktemp = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".mktemp."0.5.1" { inherit profileName; }).out; + serde_json = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_json."1.0.113" { inherit profileName; }).out; + sha2 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".sha2."0.10.8" { inherit profileName; }).out; + static_init = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".static_init."1.0.3" { inherit profileName; }).out; + }; + }); + + "unknown".garage_api."1.0.0" = overridableMkRustCrate (profileName: rec { + name = "garage_api"; + version = "1.0.0"; + registry = "unknown"; + src = fetchCrateLocal (workspaceSrc + "/src/api"); + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/default" || rootFeatures' ? "garage/k2v" || rootFeatures' ? "garage_api/k2v") "k2v") + (lib.optional (rootFeatures' ? "garage/default" || rootFeatures' ? "garage/metrics" || rootFeatures' ? "garage_api/metrics") "metrics") + (lib.optional (rootFeatures' ? "garage/default" || rootFeatures' ? "garage/metrics" || rootFeatures' ? "garage_api/metrics" || rootFeatures' ? "garage_api/opentelemetry-prometheus") "opentelemetry-prometheus") + (lib.optional (rootFeatures' ? "garage/default" || rootFeatures' ? "garage/metrics" || rootFeatures' ? "garage_api/metrics" || rootFeatures' ? "garage_api/prometheus") "prometheus") + ]; + dependencies = { + aes_gcm = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aes-gcm."0.10.3" { inherit profileName; }).out; + argon2 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".argon2."0.5.3" { inherit profileName; }).out; + async_compression = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".async-compression."0.4.6" { inherit profileName; }).out; + async_trait = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".async-trait."0.1.77" { profileName = "__noProfile"; }).out; + base64 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".base64."0.21.7" { inherit profileName; }).out; + bytes = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }).out; + chrono = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".chrono."0.4.33" { inherit profileName; }).out; + crc32c = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".crc32c."0.6.4" { inherit profileName; }).out; + crc32fast = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".crc32fast."1.4.0" { inherit profileName; }).out; + crypto_common = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".crypto-common."0.1.6" { inherit profileName; }).out; + err_derive = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".err-derive."0.3.1" { profileName = "__noProfile"; }).out; + form_urlencoded = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".form_urlencoded."1.2.1" { inherit profileName; }).out; + futures = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures."0.3.30" { inherit profileName; }).out; + futures_util = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.30" { inherit profileName; }).out; + garage_block = (rustPackages."unknown".garage_block."1.0.0" { inherit profileName; }).out; + garage_model = (rustPackages."unknown".garage_model."1.0.0" { inherit profileName; }).out; + garage_net = (rustPackages."unknown".garage_net."1.0.0" { inherit profileName; }).out; + garage_rpc = (rustPackages."unknown".garage_rpc."1.0.0" { inherit profileName; }).out; + garage_table = (rustPackages."unknown".garage_table."1.0.0" { inherit profileName; }).out; + garage_util = (rustPackages."unknown".garage_util."1.0.0" { inherit profileName; }).out; + hex = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".hex."0.4.3" { inherit profileName; }).out; + hmac = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".hmac."0.12.1" { inherit profileName; }).out; + http = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."1.0.0" { inherit profileName; }).out; + http_body_util = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".http-body-util."0.1.0" { inherit profileName; }).out; + http_range = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".http-range."0.1.5" { inherit profileName; }).out; + httpdate = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".httpdate."1.0.3" { inherit profileName; }).out; + hyper = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".hyper."1.1.0" { inherit profileName; }).out; + hyper_util = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".hyper-util."0.1.3" { inherit profileName; }).out; + idna = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".idna."0.5.0" { inherit profileName; }).out; + md5 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".md-5."0.10.6" { inherit profileName; }).out; + multer = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".multer."3.0.0" { inherit profileName; }).out; + nom = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".nom."7.1.3" { inherit profileName; }).out; + opentelemetry = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".opentelemetry."0.17.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/default" || rootFeatures' ? "garage/metrics" || rootFeatures' ? "garage_api/metrics" || rootFeatures' ? "garage_api/opentelemetry-prometheus" then "opentelemetry_prometheus" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".opentelemetry-prometheus."0.10.0" { inherit profileName; }).out; + percent_encoding = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".percent-encoding."2.3.1" { inherit profileName; }).out; + pin_project = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project."1.1.4" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/default" || rootFeatures' ? "garage/metrics" || rootFeatures' ? "garage_api/metrics" || rootFeatures' ? "garage_api/prometheus" then "prometheus" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".prometheus."0.13.3" { inherit profileName; }).out; + quick_xml = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".quick-xml."0.26.0" { inherit profileName; }).out; + roxmltree = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".roxmltree."0.19.0" { inherit profileName; }).out; + serde = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }).out; + serde_bytes = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_bytes."0.11.14" { inherit profileName; }).out; + serde_json = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_json."1.0.113" { inherit profileName; }).out; + sha1 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".sha1."0.10.6" { inherit profileName; }).out; + sha2 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".sha2."0.10.8" { inherit profileName; }).out; + tokio = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }).out; + tokio_stream = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-stream."0.1.14" { inherit profileName; }).out; + tokio_util = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-util."0.7.10" { inherit profileName; }).out; + tracing = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }).out; + url = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".url."2.5.0" { inherit profileName; }).out; + }; + }); + + "unknown".garage_block."1.0.0" = overridableMkRustCrate (profileName: rec { + name = "garage_block"; + version = "1.0.0"; + registry = "unknown"; + src = fetchCrateLocal (workspaceSrc + "/src/block"); + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/system-libs" || rootFeatures' ? "garage_block/system-libs") "system-libs") + ]; + dependencies = { + arc_swap = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".arc-swap."1.6.0" { inherit profileName; }).out; + async_compression = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".async-compression."0.4.6" { inherit profileName; }).out; + async_trait = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".async-trait."0.1.77" { profileName = "__noProfile"; }).out; + bytes = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }).out; + bytesize = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytesize."1.3.0" { inherit profileName; }).out; + futures = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures."0.3.30" { inherit profileName; }).out; + futures_util = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.30" { inherit profileName; }).out; + garage_db = (rustPackages."unknown".garage_db."1.0.0" { inherit profileName; }).out; + garage_net = (rustPackages."unknown".garage_net."1.0.0" { inherit profileName; }).out; + garage_rpc = (rustPackages."unknown".garage_rpc."1.0.0" { inherit profileName; }).out; + garage_table = (rustPackages."unknown".garage_table."1.0.0" { inherit profileName; }).out; + garage_util = (rustPackages."unknown".garage_util."1.0.0" { inherit profileName; }).out; + hex = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".hex."0.4.3" { inherit profileName; }).out; + opentelemetry = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".opentelemetry."0.17.0" { inherit profileName; }).out; + rand = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".rand."0.8.5" { inherit profileName; }).out; + serde = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }).out; + serde_bytes = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_bytes."0.11.14" { inherit profileName; }).out; + tokio = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }).out; + tokio_util = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-util."0.7.10" { inherit profileName; }).out; + tracing = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }).out; + zstd = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".zstd."0.13.0" { inherit profileName; }).out; + }; + }); + + "unknown".garage_db."1.0.0" = overridableMkRustCrate (profileName: rec { + name = "garage_db"; + version = "1.0.0"; + registry = "unknown"; + src = fetchCrateLocal (workspaceSrc + "/src/db"); + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/bundled-libs" || rootFeatures' ? "garage/default" || rootFeatures' ? "garage_db/bundled-libs") "bundled-libs") + (lib.optional (rootFeatures' ? "garage_db/default") "default") + (lib.optional (rootFeatures' ? "garage/default" || rootFeatures' ? "garage/lmdb" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/heed" || rootFeatures' ? "garage_db/lmdb" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/lmdb") "heed") + (lib.optional (rootFeatures' ? "garage/default" || rootFeatures' ? "garage/lmdb" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/lmdb" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/lmdb") "lmdb") + (lib.optional (rootFeatures' ? "garage/default" || rootFeatures' ? "garage/sqlite" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/r2d2" || rootFeatures' ? "garage_db/sqlite" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/sqlite") "r2d2") + (lib.optional (rootFeatures' ? "garage/default" || rootFeatures' ? "garage/sqlite" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/r2d2_sqlite" || rootFeatures' ? "garage_db/sqlite" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/sqlite") "r2d2_sqlite") + (lib.optional (rootFeatures' ? "garage/default" || rootFeatures' ? "garage/sqlite" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/rusqlite" || rootFeatures' ? "garage_db/sqlite" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/sqlite") "rusqlite") + (lib.optional (rootFeatures' ? "garage/default" || rootFeatures' ? "garage/sqlite" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/sqlite" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/sqlite") "sqlite") + ]; + dependencies = { + err_derive = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".err-derive."0.3.1" { profileName = "__noProfile"; }).out; + ${ if rootFeatures' ? "garage/default" || rootFeatures' ? "garage/lmdb" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/heed" || rootFeatures' ? "garage_db/lmdb" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/lmdb" then "heed" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".heed."0.11.0" { inherit profileName; }).out; + hexdump = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".hexdump."0.1.1" { inherit profileName; }).out; + opentelemetry = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".opentelemetry."0.17.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/default" || rootFeatures' ? "garage/sqlite" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/r2d2" || rootFeatures' ? "garage_db/sqlite" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/sqlite" then "r2d2" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".r2d2."0.8.10" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/default" || rootFeatures' ? "garage/sqlite" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/r2d2_sqlite" || rootFeatures' ? "garage_db/sqlite" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/sqlite" then "r2d2_sqlite" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".r2d2_sqlite."0.24.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/bundled-libs" || rootFeatures' ? "garage/default" || rootFeatures' ? "garage/sqlite" || rootFeatures' ? "garage_db/bundled-libs" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/rusqlite" || rootFeatures' ? "garage_db/sqlite" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/sqlite" then "rusqlite" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".rusqlite."0.31.0" { inherit profileName; }).out; + tracing = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }).out; + }; + devDependencies = { + mktemp = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".mktemp."0.5.1" { inherit profileName; }).out; + }; + }); + + "unknown".garage_model."1.0.0" = overridableMkRustCrate (profileName: rec { + name = "garage_model"; + version = "1.0.0"; + registry = "unknown"; + src = fetchCrateLocal (workspaceSrc + "/src/model"); + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage_model/default") "default") + (lib.optional (rootFeatures' ? "garage/default" || rootFeatures' ? "garage/k2v" || rootFeatures' ? "garage_api/k2v" || rootFeatures' ? "garage_model/k2v") "k2v") + (lib.optional (rootFeatures' ? "garage/default" || rootFeatures' ? "garage/lmdb" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/lmdb") "lmdb") + (lib.optional (rootFeatures' ? "garage/default" || rootFeatures' ? "garage/sqlite" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/sqlite") "sqlite") + ]; + dependencies = { + arc_swap = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".arc-swap."1.6.0" { inherit profileName; }).out; + async_trait = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".async-trait."0.1.77" { profileName = "__noProfile"; }).out; + base64 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".base64."0.21.7" { inherit profileName; }).out; + blake2 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".blake2."0.10.6" { inherit profileName; }).out; + chrono = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".chrono."0.4.33" { inherit profileName; }).out; + err_derive = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".err-derive."0.3.1" { profileName = "__noProfile"; }).out; + futures = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures."0.3.30" { inherit profileName; }).out; + futures_util = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.30" { inherit profileName; }).out; + garage_block = (rustPackages."unknown".garage_block."1.0.0" { inherit profileName; }).out; + garage_db = (rustPackages."unknown".garage_db."1.0.0" { inherit profileName; }).out; + garage_net = (rustPackages."unknown".garage_net."1.0.0" { inherit profileName; }).out; + garage_rpc = (rustPackages."unknown".garage_rpc."1.0.0" { inherit profileName; }).out; + garage_table = (rustPackages."unknown".garage_table."1.0.0" { inherit profileName; }).out; + garage_util = (rustPackages."unknown".garage_util."1.0.0" { inherit profileName; }).out; + hex = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".hex."0.4.3" { inherit profileName; }).out; + http = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."1.0.0" { inherit profileName; }).out; + opentelemetry = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".opentelemetry."0.17.0" { inherit profileName; }).out; + parse_duration = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".parse_duration."2.1.1" { inherit profileName; }).out; + rand = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".rand."0.8.5" { inherit profileName; }).out; + serde = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }).out; + serde_bytes = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_bytes."0.11.14" { inherit profileName; }).out; + tokio = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }).out; + tracing = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }).out; + zstd = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".zstd."0.13.0" { inherit profileName; }).out; + }; + }); + + "unknown".garage_net."1.0.0" = overridableMkRustCrate (profileName: rec { + name = "garage_net"; + version = "1.0.0"; + registry = "unknown"; + src = fetchCrateLocal (workspaceSrc + "/src/net"); + features = builtins.concatLists [ + [ "default" ] + (lib.optional (rootFeatures' ? "garage_net/opentelemetry" || rootFeatures' ? "garage_net/telemetry") "opentelemetry") + (lib.optional (rootFeatures' ? "garage_net/opentelemetry-contrib" || rootFeatures' ? "garage_net/telemetry") "opentelemetry-contrib") + (lib.optional (rootFeatures' ? "garage_net/telemetry") "telemetry") + ]; + dependencies = { + arc_swap = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".arc-swap."1.6.0" { inherit profileName; }).out; + async_trait = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".async-trait."0.1.77" { profileName = "__noProfile"; }).out; + bytes = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }).out; + cfg_if = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."1.0.0" { inherit profileName; }).out; + err_derive = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".err-derive."0.3.1" { profileName = "__noProfile"; }).out; + futures = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures."0.3.30" { inherit profileName; }).out; + hex = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".hex."0.4.3" { inherit profileName; }).out; + kuska_handshake = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".kuska-handshake."0.2.0" { inherit profileName; }).out; + sodiumoxide = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".kuska-sodiumoxide."0.2.5-0" { inherit profileName; }).out; + log = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.20" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage_net/opentelemetry" || rootFeatures' ? "garage_net/telemetry" then "opentelemetry" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".opentelemetry."0.17.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage_net/opentelemetry-contrib" || rootFeatures' ? "garage_net/telemetry" then "opentelemetry_contrib" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".opentelemetry-contrib."0.9.0" { inherit profileName; }).out; + pin_project = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project."1.1.4" { inherit profileName; }).out; + rand = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".rand."0.8.5" { inherit profileName; }).out; + rmp_serde = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".rmp-serde."1.1.2" { inherit profileName; }).out; + serde = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }).out; + tokio = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }).out; + tokio_stream = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-stream."0.1.14" { inherit profileName; }).out; + tokio_util = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-util."0.7.10" { inherit profileName; }).out; + }; + devDependencies = { + pretty_env_logger = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".pretty_env_logger."0.5.0" { inherit profileName; }).out; + }; + }); + + "unknown".garage_rpc."1.0.0" = overridableMkRustCrate (profileName: rec { + name = "garage_rpc"; + version = "1.0.0"; + registry = "unknown"; + src = fetchCrateLocal (workspaceSrc + "/src/rpc"); + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery") "consul-discovery") + (lib.optional (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/err-derive") "err-derive") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/k8s-openapi" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "k8s-openapi") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "kube") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "kubernetes-discovery") + (lib.optional (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest") "reqwest") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kubernetes-discovery" || rootFeatures' ? "garage_rpc/schemars") "schemars") + (lib.optional (rootFeatures' ? "garage/system-libs" || rootFeatures' ? "garage_rpc/system-libs") "system-libs") + ]; + dependencies = { + arc_swap = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".arc-swap."1.6.0" { inherit profileName; }).out; + async_trait = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".async-trait."0.1.77" { profileName = "__noProfile"; }).out; + bytes = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }).out; + bytesize = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytesize."1.3.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/err-derive" then "err_derive" else null } = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".err-derive."0.3.1" { profileName = "__noProfile"; }).out; + format_table = (rustPackages."unknown".format_table."0.1.1" { inherit profileName; }).out; + futures = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures."0.3.30" { inherit profileName; }).out; + futures_util = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.30" { inherit profileName; }).out; + garage_db = (rustPackages."unknown".garage_db."1.0.0" { inherit profileName; }).out; + garage_net = (rustPackages."unknown".garage_net."1.0.0" { inherit profileName; }).out; + garage_util = (rustPackages."unknown".garage_util."1.0.0" { inherit profileName; }).out; + gethostname = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".gethostname."0.4.3" { inherit profileName; }).out; + hex = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".hex."0.4.3" { inherit profileName; }).out; + ipnet = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".ipnet."2.9.0" { inherit profileName; }).out; + itertools = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".itertools."0.12.1" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/k8s-openapi" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "k8s_openapi" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".k8s-openapi."0.21.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "kube" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".kube."0.88.1" { inherit profileName; }).out; + sodiumoxide = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".kuska-sodiumoxide."0.2.5-0" { inherit profileName; }).out; + nix = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".nix."0.27.1" { inherit profileName; }).out; + opentelemetry = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".opentelemetry."0.17.0" { inherit profileName; }).out; + pnet_datalink = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".pnet_datalink."0.34.0" { inherit profileName; }).out; + rand = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".rand."0.8.5" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest" then "reqwest" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".reqwest."0.11.24" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kubernetes-discovery" || rootFeatures' ? "garage_rpc/schemars" then "schemars" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".schemars."0.8.16" { inherit profileName; }).out; + serde = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }).out; + serde_bytes = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_bytes."0.11.14" { inherit profileName; }).out; + serde_json = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_json."1.0.113" { inherit profileName; }).out; + tokio = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }).out; + tokio_stream = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-stream."0.1.14" { inherit profileName; }).out; + tracing = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }).out; + }; + }); + + "unknown".garage_table."1.0.0" = overridableMkRustCrate (profileName: rec { + name = "garage_table"; + version = "1.0.0"; + registry = "unknown"; + src = fetchCrateLocal (workspaceSrc + "/src/table"); + dependencies = { + arc_swap = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".arc-swap."1.6.0" { inherit profileName; }).out; + async_trait = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".async-trait."0.1.77" { profileName = "__noProfile"; }).out; + bytes = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }).out; + futures = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures."0.3.30" { inherit profileName; }).out; + futures_util = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.30" { inherit profileName; }).out; + garage_db = (rustPackages."unknown".garage_db."1.0.0" { inherit profileName; }).out; + garage_rpc = (rustPackages."unknown".garage_rpc."1.0.0" { inherit profileName; }).out; + garage_util = (rustPackages."unknown".garage_util."1.0.0" { inherit profileName; }).out; + hex = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".hex."0.4.3" { inherit profileName; }).out; + hexdump = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".hexdump."0.1.1" { inherit profileName; }).out; + opentelemetry = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".opentelemetry."0.17.0" { inherit profileName; }).out; + rand = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".rand."0.8.5" { inherit profileName; }).out; + serde = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }).out; + serde_bytes = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_bytes."0.11.14" { inherit profileName; }).out; + tokio = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }).out; + tracing = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }).out; + }; + }); + + "unknown".garage_util."1.0.0" = overridableMkRustCrate (profileName: rec { + name = "garage_util"; + version = "1.0.0"; + registry = "unknown"; + src = fetchCrateLocal (workspaceSrc + "/src/util"); + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/default" || rootFeatures' ? "garage/k2v" || rootFeatures' ? "garage_api/k2v" || rootFeatures' ? "garage_model/k2v" || rootFeatures' ? "garage_util/k2v") "k2v") + ]; + dependencies = { + arc_swap = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".arc-swap."1.6.0" { inherit profileName; }).out; + async_trait = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".async-trait."0.1.77" { profileName = "__noProfile"; }).out; + blake2 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".blake2."0.10.6" { inherit profileName; }).out; + bytes = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }).out; + bytesize = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytesize."1.3.0" { inherit profileName; }).out; + chrono = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".chrono."0.4.33" { inherit profileName; }).out; + digest = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".digest."0.10.7" { inherit profileName; }).out; + err_derive = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".err-derive."0.3.1" { profileName = "__noProfile"; }).out; + futures = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures."0.3.30" { inherit profileName; }).out; + garage_db = (rustPackages."unknown".garage_db."1.0.0" { inherit profileName; }).out; + garage_net = (rustPackages."unknown".garage_net."1.0.0" { inherit profileName; }).out; + hex = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".hex."0.4.3" { inherit profileName; }).out; + hexdump = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".hexdump."0.1.1" { inherit profileName; }).out; + http = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."1.0.0" { inherit profileName; }).out; + hyper = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".hyper."1.1.0" { inherit profileName; }).out; + lazy_static = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".lazy_static."1.4.0" { inherit profileName; }).out; + opentelemetry = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".opentelemetry."0.17.0" { inherit profileName; }).out; + rand = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".rand."0.8.5" { inherit profileName; }).out; + rmp_serde = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".rmp-serde."1.1.2" { inherit profileName; }).out; + serde = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }).out; + serde_json = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_json."1.0.113" { inherit profileName; }).out; + sha2 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".sha2."0.10.8" { inherit profileName; }).out; + tokio = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }).out; + toml = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".toml."0.8.10" { inherit profileName; }).out; + tracing = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }).out; + xxhash_rust = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".xxhash-rust."0.8.8" { inherit profileName; }).out; + }; + devDependencies = { + mktemp = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".mktemp."0.5.1" { inherit profileName; }).out; + }; + buildDependencies = { + rustc_version = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".rustc_version."0.4.0" { profileName = "__noProfile"; }).out; + }; + }); + + "unknown".garage_web."1.0.0" = overridableMkRustCrate (profileName: rec { + name = "garage_web"; + version = "1.0.0"; + registry = "unknown"; + src = fetchCrateLocal (workspaceSrc + "/src/web"); + dependencies = { + err_derive = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".err-derive."0.3.1" { profileName = "__noProfile"; }).out; + futures = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures."0.3.30" { inherit profileName; }).out; + garage_api = (rustPackages."unknown".garage_api."1.0.0" { inherit profileName; }).out; + garage_model = (rustPackages."unknown".garage_model."1.0.0" { inherit profileName; }).out; + garage_table = (rustPackages."unknown".garage_table."1.0.0" { inherit profileName; }).out; + garage_util = (rustPackages."unknown".garage_util."1.0.0" { inherit profileName; }).out; + http = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."1.0.0" { inherit profileName; }).out; + http_body_util = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".http-body-util."0.1.0" { inherit profileName; }).out; + hyper = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".hyper."1.1.0" { inherit profileName; }).out; + hyper_util = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".hyper-util."0.1.3" { inherit profileName; }).out; + opentelemetry = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".opentelemetry."0.17.0" { inherit profileName; }).out; + percent_encoding = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".percent-encoding."2.3.1" { inherit profileName; }).out; + tokio = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }).out; + tracing = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".generic-array."0.14.7" = overridableMkRustCrate (profileName: rec { + name = "generic-array"; + version = "0.14.7"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"; }; + features = builtins.concatLists [ + [ "more_lengths" ] + ]; + dependencies = { + typenum = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".typenum."1.17.0" { inherit profileName; }).out; + }; + buildDependencies = { + version_check = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".version_check."0.9.4" { profileName = "__noProfile"; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".gethostname."0.4.3" = overridableMkRustCrate (profileName: rec { + name = "gethostname"; + version = "0.4.3"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "0176e0459c2e4a1fe232f984bca6890e681076abb9934f6cea7c326f3fc47818"; }; + dependencies = { + ${ if !hostPlatform.isWindows then "libc" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }).out; + ${ if hostPlatform.isWindows then "windows_targets" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows-targets."0.48.5" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".getrandom."0.2.12" = overridableMkRustCrate (profileName: rec { + name = "getrandom"; + version = "0.2.12"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5"; }; + features = builtins.concatLists [ + [ "std" ] + ]; + dependencies = { + cfg_if = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."1.0.0" { inherit profileName; }).out; + ${ if hostPlatform.isUnix then "libc" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }).out; + ${ if hostPlatform.parsed.kernel.name == "wasi" then "wasi" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasi."0.11.0+wasi-snapshot-preview1" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".ghash."0.5.1" = overridableMkRustCrate (profileName: rec { + name = "ghash"; + version = "0.5.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1"; }; + dependencies = { + opaque_debug = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".opaque-debug."0.3.1" { inherit profileName; }).out; + polyval = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".polyval."0.6.2" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".gimli."0.28.1" = overridableMkRustCrate (profileName: rec { + name = "gimli"; + version = "0.28.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253"; }; + features = builtins.concatLists [ + [ "read" ] + [ "read-core" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".git-version."0.3.9" = overridableMkRustCrate (profileName: rec { + name = "git-version"; + version = "0.3.9"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "1ad568aa3db0fcbc81f2f116137f263d7304f512a1209b35b85150d3ef88ad19"; }; + dependencies = { + git_version_macro = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".git-version-macro."0.3.9" { profileName = "__noProfile"; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".git-version-macro."0.3.9" = overridableMkRustCrate (profileName: rec { + name = "git-version-macro"; + version = "0.3.9"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "53010ccb100b96a67bc32c0175f0ed1426b31b655d562898e57325f81c023ac0"; }; + dependencies = { + proc_macro2 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }).out; + quote = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }).out; + syn = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."2.0.48" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".group."0.12.1" = overridableMkRustCrate (profileName: rec { + name = "group"; + version = "0.12.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7"; }; + dependencies = { + ff = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".ff."0.12.1" { inherit profileName; }).out; + rand_core = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".rand_core."0.6.4" { inherit profileName; }).out; + subtle = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".subtle."2.5.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".h2."0.3.24" = overridableMkRustCrate (profileName: rec { + name = "h2"; + version = "0.3.24"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9"; }; + dependencies = { + bytes = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }).out; + fnv = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".fnv."1.0.7" { inherit profileName; }).out; + futures_core = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.30" { inherit profileName; }).out; + futures_sink = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-sink."0.3.30" { inherit profileName; }).out; + futures_util = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.30" { inherit profileName; }).out; + http = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.11" { inherit profileName; }).out; + indexmap = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".indexmap."2.2.2" { inherit profileName; }).out; + slab = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".slab."0.4.9" { inherit profileName; }).out; + tokio = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }).out; + tokio_util = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-util."0.7.10" { inherit profileName; }).out; + tracing = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".h2."0.4.2" = overridableMkRustCrate (profileName: rec { + name = "h2"; + version = "0.4.2"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "31d030e59af851932b72ceebadf4a2b5986dba4c3b99dd2493f8273a0f151943"; }; + dependencies = { + bytes = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }).out; + fnv = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".fnv."1.0.7" { inherit profileName; }).out; + futures_core = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.30" { inherit profileName; }).out; + futures_sink = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-sink."0.3.30" { inherit profileName; }).out; + futures_util = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.30" { inherit profileName; }).out; + http = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."1.0.0" { inherit profileName; }).out; + indexmap = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".indexmap."2.2.2" { inherit profileName; }).out; + slab = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".slab."0.4.9" { inherit profileName; }).out; + tokio = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }).out; + tokio_util = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-util."0.7.10" { inherit profileName; }).out; + tracing = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".hashbrown."0.12.3" = overridableMkRustCrate (profileName: rec { + name = "hashbrown"; + version = "0.12.3"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "raw") + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".hashbrown."0.14.3" = overridableMkRustCrate (profileName: rec { + name = "hashbrown"; + version = "0.14.3"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/bundled-libs" || rootFeatures' ? "garage/default" || rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage/sqlite" || rootFeatures' ? "garage_db/bundled-libs" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/r2d2_sqlite" || rootFeatures' ? "garage_db/rusqlite" || rootFeatures' ? "garage_db/sqlite" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/sqlite" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "ahash") + (lib.optional (rootFeatures' ? "garage/bundled-libs" || rootFeatures' ? "garage/default" || rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage/sqlite" || rootFeatures' ? "garage_db/bundled-libs" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/r2d2_sqlite" || rootFeatures' ? "garage_db/rusqlite" || rootFeatures' ? "garage_db/sqlite" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/sqlite" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "allocator-api2") + (lib.optional (rootFeatures' ? "garage/bundled-libs" || rootFeatures' ? "garage/default" || rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage/sqlite" || rootFeatures' ? "garage_db/bundled-libs" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/r2d2_sqlite" || rootFeatures' ? "garage_db/rusqlite" || rootFeatures' ? "garage_db/sqlite" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/sqlite" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "default") + (lib.optional (rootFeatures' ? "garage/bundled-libs" || rootFeatures' ? "garage/default" || rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage/sqlite" || rootFeatures' ? "garage_db/bundled-libs" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/r2d2_sqlite" || rootFeatures' ? "garage_db/rusqlite" || rootFeatures' ? "garage_db/sqlite" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/sqlite" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "inline-more") + [ "raw" ] + ]; + dependencies = { + ${ if rootFeatures' ? "garage/bundled-libs" || rootFeatures' ? "garage/default" || rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage/sqlite" || rootFeatures' ? "garage_db/bundled-libs" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/r2d2_sqlite" || rootFeatures' ? "garage_db/rusqlite" || rootFeatures' ? "garage_db/sqlite" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/sqlite" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "ahash" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".ahash."0.8.7" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/bundled-libs" || rootFeatures' ? "garage/default" || rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage/sqlite" || rootFeatures' ? "garage_db/bundled-libs" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/r2d2_sqlite" || rootFeatures' ? "garage_db/rusqlite" || rootFeatures' ? "garage_db/sqlite" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/sqlite" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "allocator_api2" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".allocator-api2."0.2.16" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".hashlink."0.9.0" = overridableMkRustCrate (profileName: rec { + name = "hashlink"; + version = "0.9.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "692eaaf7f7607518dd3cef090f1474b61edc5301d8012f09579920df68b725ee"; }; + dependencies = { + ${ if rootFeatures' ? "garage/bundled-libs" || rootFeatures' ? "garage/default" || rootFeatures' ? "garage/sqlite" || rootFeatures' ? "garage_db/bundled-libs" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/r2d2_sqlite" || rootFeatures' ? "garage_db/rusqlite" || rootFeatures' ? "garage_db/sqlite" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/sqlite" then "hashbrown" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".hashbrown."0.14.3" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".heck."0.3.3" = overridableMkRustCrate (profileName: rec { + name = "heck"; + version = "0.3.3"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c"; }; + dependencies = { + unicode_segmentation = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".unicode-segmentation."1.10.1" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".heck."0.4.1" = overridableMkRustCrate (profileName: rec { + name = "heck"; + version = "0.4.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "k2v-client/clap" || rootFeatures' ? "k2v-client/cli") "default") + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".heed."0.11.0" = overridableMkRustCrate (profileName: rec { + name = "heed"; + version = "0.11.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "269c7486ed6def5d7b59a427cec3e87b4d4dd4381d01e21c8c9f2d3985688392"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/default" || rootFeatures' ? "garage/lmdb" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/heed" || rootFeatures' ? "garage_db/lmdb" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/lmdb") "lmdb") + (lib.optional (rootFeatures' ? "garage/default" || rootFeatures' ? "garage/lmdb" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/heed" || rootFeatures' ? "garage_db/lmdb" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/lmdb") "lmdb-rkv-sys") + ]; + dependencies = { + ${ if rootFeatures' ? "garage/default" || rootFeatures' ? "garage/lmdb" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/heed" || rootFeatures' ? "garage_db/lmdb" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/lmdb" then "bytemuck" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytemuck."1.14.1" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/default" || rootFeatures' ? "garage/lmdb" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/heed" || rootFeatures' ? "garage_db/lmdb" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/lmdb" then "byteorder" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".byteorder."1.5.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/default" || rootFeatures' ? "garage/lmdb" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/heed" || rootFeatures' ? "garage_db/lmdb" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/lmdb" then "heed_traits" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".heed-traits."0.8.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/default" || rootFeatures' ? "garage/lmdb" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/heed" || rootFeatures' ? "garage_db/lmdb" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/lmdb" then "heed_types" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".heed-types."0.8.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/default" || rootFeatures' ? "garage/lmdb" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/heed" || rootFeatures' ? "garage_db/lmdb" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/lmdb" then "libc" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/default" || rootFeatures' ? "garage/lmdb" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/heed" || rootFeatures' ? "garage_db/lmdb" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/lmdb" then "lmdb_sys" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".lmdb-rkv-sys."0.11.2" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/default" || rootFeatures' ? "garage/lmdb" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/heed" || rootFeatures' ? "garage_db/lmdb" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/lmdb" then "once_cell" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.19.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/default" || rootFeatures' ? "garage/lmdb" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/heed" || rootFeatures' ? "garage_db/lmdb" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/lmdb" then "page_size" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".page_size."0.4.2" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/default" || rootFeatures' ? "garage/lmdb" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/heed" || rootFeatures' ? "garage_db/lmdb" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/lmdb" then "synchronoise" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".synchronoise."1.0.1" { inherit profileName; }).out; + ${ if (rootFeatures' ? "garage/default" || rootFeatures' ? "garage/lmdb" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/heed" || rootFeatures' ? "garage_db/lmdb" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/lmdb") && hostPlatform.isWindows then "url" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".url."2.5.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".heed-traits."0.8.0" = overridableMkRustCrate (profileName: rec { + name = "heed-traits"; + version = "0.8.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "a53a94e5b2fd60417e83ffdfe136c39afacff0d4ac1d8d01cd66928ac610e1a2"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".heed-types."0.8.0" = overridableMkRustCrate (profileName: rec { + name = "heed-types"; + version = "0.8.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "9a6cf0a6952fcedc992602d5cddd1e3fff091fbe87d38636e3ec23a31f32acbd"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/default" || rootFeatures' ? "garage/lmdb" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/heed" || rootFeatures' ? "garage_db/lmdb" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/lmdb") "bincode") + (lib.optional (rootFeatures' ? "garage/default" || rootFeatures' ? "garage/lmdb" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/heed" || rootFeatures' ? "garage_db/lmdb" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/lmdb") "default") + (lib.optional (rootFeatures' ? "garage/default" || rootFeatures' ? "garage/lmdb" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/heed" || rootFeatures' ? "garage_db/lmdb" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/lmdb") "serde") + (lib.optional (rootFeatures' ? "garage/default" || rootFeatures' ? "garage/lmdb" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/heed" || rootFeatures' ? "garage_db/lmdb" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/lmdb") "serde-bincode") + (lib.optional (rootFeatures' ? "garage/default" || rootFeatures' ? "garage/lmdb" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/heed" || rootFeatures' ? "garage_db/lmdb" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/lmdb") "serde-json") + (lib.optional (rootFeatures' ? "garage/default" || rootFeatures' ? "garage/lmdb" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/heed" || rootFeatures' ? "garage_db/lmdb" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/lmdb") "serde_json") + ]; + dependencies = { + ${ if rootFeatures' ? "garage/default" || rootFeatures' ? "garage/lmdb" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/heed" || rootFeatures' ? "garage_db/lmdb" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/lmdb" then "bincode" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bincode."1.3.3" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/default" || rootFeatures' ? "garage/lmdb" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/heed" || rootFeatures' ? "garage_db/lmdb" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/lmdb" then "bytemuck" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytemuck."1.14.1" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/default" || rootFeatures' ? "garage/lmdb" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/heed" || rootFeatures' ? "garage_db/lmdb" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/lmdb" then "byteorder" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".byteorder."1.5.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/default" || rootFeatures' ? "garage/lmdb" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/heed" || rootFeatures' ? "garage_db/lmdb" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/lmdb" then "heed_traits" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".heed-traits."0.8.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/default" || rootFeatures' ? "garage/lmdb" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/heed" || rootFeatures' ? "garage_db/lmdb" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/lmdb" then "serde" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/default" || rootFeatures' ? "garage/lmdb" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/heed" || rootFeatures' ? "garage_db/lmdb" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/lmdb" then "serde_json" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_json."1.0.113" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".hermit-abi."0.3.4" = overridableMkRustCrate (profileName: rec { + name = "hermit-abi"; + version = "0.3.4"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "5d3d0e0f38255e7fa3cf31335b3a56f05febd18025f4db5ef7a0cfb4f8da651f"; }; + features = builtins.concatLists [ + [ "default" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".hex."0.4.3" = overridableMkRustCrate (profileName: rec { + name = "hex"; + version = "0.4.3"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"; }; + features = builtins.concatLists [ + [ "alloc" ] + [ "default" ] + [ "std" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".hexdump."0.1.1" = overridableMkRustCrate (profileName: rec { + name = "hexdump"; + version = "0.1.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "e40283dadb02f3af778878be1d717b17b4e4ab92e1d935ab03a730b0542905f2"; }; + dependencies = { + arrayvec = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".arrayvec."0.5.2" { inherit profileName; }).out; + itertools = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".itertools."0.4.19" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".hmac."0.12.1" = overridableMkRustCrate (profileName: rec { + name = "hmac"; + version = "0.12.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e"; }; + features = builtins.concatLists [ + [ "reset" ] + ]; + dependencies = { + digest = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".digest."0.10.7" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".home."0.5.9" = overridableMkRustCrate (profileName: rec { + name = "home"; + version = "0.5.9"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5"; }; + dependencies = { + ${ if (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") && hostPlatform.isWindows then "windows_sys" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows-sys."0.52.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".http."0.2.11" = overridableMkRustCrate (profileName: rec { + name = "http"; + version = "0.2.11"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb"; }; + dependencies = { + bytes = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }).out; + fnv = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".fnv."1.0.7" { inherit profileName; }).out; + itoa = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".itoa."1.0.10" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".http."1.0.0" = overridableMkRustCrate (profileName: rec { + name = "http"; + version = "1.0.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "b32afd38673a8016f7c9ae69e5af41a58f81b1d31689040f2f1959594ce194ea"; }; + features = builtins.concatLists [ + [ "default" ] + [ "std" ] + ]; + dependencies = { + bytes = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }).out; + fnv = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".fnv."1.0.7" { inherit profileName; }).out; + itoa = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".itoa."1.0.10" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".http-body."0.4.6" = overridableMkRustCrate (profileName: rec { + name = "http-body"; + version = "0.4.6"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2"; }; + dependencies = { + bytes = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }).out; + http = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.11" { inherit profileName; }).out; + pin_project_lite = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.13" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".http-body."1.0.0" = overridableMkRustCrate (profileName: rec { + name = "http-body"; + version = "1.0.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643"; }; + dependencies = { + bytes = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }).out; + http = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."1.0.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".http-body-util."0.1.0" = overridableMkRustCrate (profileName: rec { + name = "http-body-util"; + version = "0.1.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "41cb79eb393015dadd30fc252023adb0b2400a0caee0fa2a077e6e21a551e840"; }; + dependencies = { + bytes = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }).out; + futures_util = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.30" { inherit profileName; }).out; + http = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."1.0.0" { inherit profileName; }).out; + http_body = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".http-body."1.0.0" { inherit profileName; }).out; + pin_project_lite = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.13" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".http-range."0.1.5" = overridableMkRustCrate (profileName: rec { + name = "http-range"; + version = "0.1.5"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "21dec9db110f5f872ed9699c3ecf50cf16f423502706ba5c72462e28d3157573"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".http-range-header."0.3.1" = overridableMkRustCrate (profileName: rec { + name = "http-range-header"; + version = "0.3.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".httparse."1.8.0" = overridableMkRustCrate (profileName: rec { + name = "httparse"; + version = "1.8.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904"; }; + features = builtins.concatLists [ + [ "default" ] + [ "std" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".httpdate."1.0.3" = overridableMkRustCrate (profileName: rec { + name = "httpdate"; + version = "1.0.3"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".humantime."2.1.0" = overridableMkRustCrate (profileName: rec { + name = "humantime"; + version = "2.1.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".hyper."0.14.28" = overridableMkRustCrate (profileName: rec { + name = "hyper"; + version = "0.14.28"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80"; }; + features = builtins.concatLists [ + [ "client" ] + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "default") + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "full") + [ "h2" ] + [ "http1" ] + [ "http2" ] + [ "runtime" ] + [ "server" ] + [ "socket2" ] + [ "stream" ] + [ "tcp" ] + ]; + dependencies = { + bytes = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }).out; + futures_channel = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-channel."0.3.30" { inherit profileName; }).out; + futures_core = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.30" { inherit profileName; }).out; + futures_util = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.30" { inherit profileName; }).out; + h2 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".h2."0.3.24" { inherit profileName; }).out; + http = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.11" { inherit profileName; }).out; + http_body = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".http-body."0.4.6" { inherit profileName; }).out; + httparse = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".httparse."1.8.0" { inherit profileName; }).out; + httpdate = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".httpdate."1.0.3" { inherit profileName; }).out; + itoa = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".itoa."1.0.10" { inherit profileName; }).out; + pin_project_lite = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.13" { inherit profileName; }).out; + socket2 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".socket2."0.5.5" { inherit profileName; }).out; + tokio = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }).out; + tower_service = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tower-service."0.3.2" { inherit profileName; }).out; + tracing = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }).out; + want = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".want."0.3.1" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".hyper."1.1.0" = overridableMkRustCrate (profileName: rec { + name = "hyper"; + version = "1.1.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "fb5aa53871fc917b1a9ed87b683a5d86db645e23acb32c2e0785a353e522fb75"; }; + features = builtins.concatLists [ + [ "client" ] + [ "default" ] + [ "http1" ] + [ "http2" ] + [ "server" ] + ]; + dependencies = { + bytes = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }).out; + futures_channel = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-channel."0.3.30" { inherit profileName; }).out; + futures_util = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.30" { inherit profileName; }).out; + h2 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".h2."0.4.2" { inherit profileName; }).out; + http = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."1.0.0" { inherit profileName; }).out; + http_body = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".http-body."1.0.0" { inherit profileName; }).out; + httparse = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".httparse."1.8.0" { inherit profileName; }).out; + httpdate = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".httpdate."1.0.3" { inherit profileName; }).out; + itoa = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".itoa."1.0.10" { inherit profileName; }).out; + pin_project_lite = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.13" { inherit profileName; }).out; + tokio = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }).out; + want = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".want."0.3.1" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".hyper-rustls."0.24.2" = overridableMkRustCrate (profileName: rec { + name = "hyper-rustls"; + version = "0.24.2"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590"; }; + features = builtins.concatLists [ + [ "acceptor" ] + [ "default" ] + [ "http1" ] + [ "http2" ] + [ "log" ] + [ "logging" ] + [ "native-tokio" ] + [ "rustls-native-certs" ] + [ "tls12" ] + [ "tokio-runtime" ] + ]; + dependencies = { + futures_util = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.30" { inherit profileName; }).out; + http = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.11" { inherit profileName; }).out; + hyper = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".hyper."0.14.28" { inherit profileName; }).out; + log = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.20" { inherit profileName; }).out; + rustls = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".rustls."0.21.10" { inherit profileName; }).out; + rustls_native_certs = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".rustls-native-certs."0.6.3" { inherit profileName; }).out; + tokio = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }).out; + tokio_rustls = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-rustls."0.24.1" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".hyper-rustls."0.26.0" = overridableMkRustCrate (profileName: rec { + name = "hyper-rustls"; + version = "0.26.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "a0bea761b46ae2b24eb4aef630d8d1c398157b6fc29e6350ecf090a0b70c952c"; }; + features = builtins.concatLists [ + [ "default" ] + [ "http1" ] + [ "http2" ] + [ "log" ] + [ "logging" ] + [ "native-tokio" ] + [ "ring" ] + [ "rustls-native-certs" ] + [ "tls12" ] + ]; + dependencies = { + futures_util = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.30" { inherit profileName; }).out; + http = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."1.0.0" { inherit profileName; }).out; + hyper = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".hyper."1.1.0" { inherit profileName; }).out; + hyper_util = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".hyper-util."0.1.3" { inherit profileName; }).out; + log = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.20" { inherit profileName; }).out; + rustls = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".rustls."0.22.2" { inherit profileName; }).out; + rustls_native_certs = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".rustls-native-certs."0.7.0" { inherit profileName; }).out; + pki_types = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".rustls-pki-types."1.2.0" { inherit profileName; }).out; + tokio = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }).out; + tokio_rustls = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-rustls."0.25.0" { inherit profileName; }).out; + tower_service = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tower-service."0.3.2" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".hyper-timeout."0.4.1" = overridableMkRustCrate (profileName: rec { + name = "hyper-timeout"; + version = "0.4.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1"; }; + dependencies = { + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "hyper" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".hyper."0.14.28" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "pin_project_lite" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.13" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "tokio" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "tokio_io_timeout" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-io-timeout."1.2.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".hyper-util."0.1.3" = overridableMkRustCrate (profileName: rec { + name = "hyper-util"; + version = "0.1.3"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "ca38ef113da30126bbff9cd1705f9273e15d45498615d138b0c20279ac7a76aa"; }; + features = builtins.concatLists [ + [ "client" ] + [ "client-legacy" ] + [ "default" ] + [ "full" ] + [ "http1" ] + [ "http2" ] + [ "server" ] + [ "server-auto" ] + [ "service" ] + [ "tokio" ] + ]; + dependencies = { + bytes = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }).out; + futures_channel = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-channel."0.3.30" { inherit profileName; }).out; + futures_util = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.30" { inherit profileName; }).out; + http = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."1.0.0" { inherit profileName; }).out; + http_body = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".http-body."1.0.0" { inherit profileName; }).out; + hyper = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".hyper."1.1.0" { inherit profileName; }).out; + pin_project_lite = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.13" { inherit profileName; }).out; + socket2 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".socket2."0.5.5" { inherit profileName; }).out; + tokio = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }).out; + tower = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tower."0.4.13" { inherit profileName; }).out; + tower_service = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tower-service."0.3.2" { inherit profileName; }).out; + tracing = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".iana-time-zone."0.1.60" = overridableMkRustCrate (profileName: rec { + name = "iana-time-zone"; + version = "0.1.60"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141"; }; + features = builtins.concatLists [ + [ "fallback" ] + ]; + dependencies = { + ${ if hostPlatform.parsed.kernel.name == "android" then "android_system_properties" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".android_system_properties."0.1.5" { inherit profileName; }).out; + ${ if hostPlatform.parsed.kernel.name == "darwin" || hostPlatform.parsed.kernel.name == "ios" then "core_foundation_sys" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".core-foundation-sys."0.8.6" { inherit profileName; }).out; + ${ if hostPlatform.parsed.kernel.name == "haiku" then "iana_time_zone_haiku" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".iana-time-zone-haiku."0.1.2" { inherit profileName; }).out; + ${ if hostPlatform.parsed.cpu.name == "wasm32" then "js_sys" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".js-sys."0.3.67" { inherit profileName; }).out; + ${ if hostPlatform.parsed.cpu.name == "wasm32" then "wasm_bindgen" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen."0.2.90" { inherit profileName; }).out; + ${ if hostPlatform.parsed.kernel.name == "windows" then "windows_core" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows-core."0.52.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".iana-time-zone-haiku."0.1.2" = overridableMkRustCrate (profileName: rec { + name = "iana-time-zone-haiku"; + version = "0.1.2"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"; }; + buildDependencies = { + cc = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".cc."1.0.83" { profileName = "__noProfile"; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".ident_case."1.0.1" = overridableMkRustCrate (profileName: rec { + name = "ident_case"; + version = "1.0.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".idna."0.5.0" = overridableMkRustCrate (profileName: rec { + name = "idna"; + version = "0.5.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6"; }; + features = builtins.concatLists [ + [ "alloc" ] + [ "default" ] + [ "std" ] + ]; + dependencies = { + unicode_bidi = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".unicode-bidi."0.3.15" { inherit profileName; }).out; + unicode_normalization = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".unicode-normalization."0.1.22" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".indexmap."1.9.3" = overridableMkRustCrate (profileName: rec { + name = "indexmap"; + version = "1.9.3"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99"; }; + dependencies = { + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "hashbrown" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".hashbrown."0.12.3" { inherit profileName; }).out; + }; + buildDependencies = { + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "autocfg" else null } = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".autocfg."1.1.0" { profileName = "__noProfile"; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".indexmap."2.2.2" = overridableMkRustCrate (profileName: rec { + name = "indexmap"; + version = "2.2.2"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "824b2ae422412366ba479e8111fd301f7b5faece8149317bb81925979a53f520"; }; + features = builtins.concatLists [ + [ "default" ] + [ "std" ] + ]; + dependencies = { + equivalent = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".equivalent."1.0.1" { inherit profileName; }).out; + hashbrown = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".hashbrown."0.14.3" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".inout."0.1.3" = overridableMkRustCrate (profileName: rec { + name = "inout"; + version = "0.1.3"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5"; }; + dependencies = { + generic_array = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".generic-array."0.14.7" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".instant."0.1.12" = overridableMkRustCrate (profileName: rec { + name = "instant"; + version = "0.1.12"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c"; }; + dependencies = { + cfg_if = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."1.0.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".ipnet."2.9.0" = overridableMkRustCrate (profileName: rec { + name = "ipnet"; + version = "2.9.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3"; }; + features = builtins.concatLists [ + [ "default" ] + [ "std" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".ipnetwork."0.20.0" = overridableMkRustCrate (profileName: rec { + name = "ipnetwork"; + version = "0.20.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "bf466541e9d546596ee94f9f69590f89473455f88372423e0008fc1a7daf100e"; }; + features = builtins.concatLists [ + [ "default" ] + [ "serde" ] + ]; + dependencies = { + serde = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".is-terminal."0.4.12" = overridableMkRustCrate (profileName: rec { + name = "is-terminal"; + version = "0.4.12"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b"; }; + dependencies = { + ${ if hostPlatform.parsed.kernel.name == "hermit" then "hermit_abi" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".hermit-abi."0.3.4" { inherit profileName; }).out; + ${ if hostPlatform.isUnix || hostPlatform.parsed.kernel.name == "wasi" then "libc" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }).out; + ${ if hostPlatform.isWindows then "windows_sys" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows-sys."0.52.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".itertools."0.4.19" = overridableMkRustCrate (profileName: rec { + name = "itertools"; + version = "0.4.19"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "c4a9b56eb56058f43dc66e58f40a214b2ccbc9f3df51861b63d51dec7b65bc3f"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".itertools."0.10.5" = overridableMkRustCrate (profileName: rec { + name = "itertools"; + version = "0.10.5"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "default") + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "use_alloc") + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "use_std") + ]; + dependencies = { + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "either" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".either."1.9.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".itertools."0.12.1" = overridableMkRustCrate (profileName: rec { + name = "itertools"; + version = "0.12.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569"; }; + features = builtins.concatLists [ + [ "default" ] + [ "use_alloc" ] + [ "use_std" ] + ]; + dependencies = { + either = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".either."1.9.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".itoa."1.0.10" = overridableMkRustCrate (profileName: rec { + name = "itoa"; + version = "1.0.10"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".jobserver."0.1.27" = overridableMkRustCrate (profileName: rec { + name = "jobserver"; + version = "0.1.27"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d"; }; + dependencies = { + ${ if hostPlatform.isUnix then "libc" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".js-sys."0.3.67" = overridableMkRustCrate (profileName: rec { + name = "js-sys"; + version = "0.3.67"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "9a1d36f1235bc969acba30b7f5990b864423a6068a10f7c90ae8f0112e3a59d1"; }; + dependencies = { + wasm_bindgen = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen."0.2.90" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".json-patch."1.2.0" = overridableMkRustCrate (profileName: rec { + name = "json-patch"; + version = "1.2.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "55ff1e1486799e3f64129f8ccad108b38290df9cd7015cd31bed17239f0789d6"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "default") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "diff") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "treediff") + ]; + dependencies = { + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "serde" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "serde_json" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_json."1.0.113" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "thiserror" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".thiserror."1.0.56" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "treediff" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".treediff."4.0.3" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".jsonpath-rust."0.4.0" = overridableMkRustCrate (profileName: rec { + name = "jsonpath-rust"; + version = "0.4.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "96acbc6188d3bd83519d053efec756aa4419de62ec47be7f28dec297f7dc9eb0"; }; + dependencies = { + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "pest" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".pest."2.7.7" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "pest_derive" else null } = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".pest_derive."2.7.7" { profileName = "__noProfile"; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "regex" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".regex."1.10.3" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "serde_json" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_json."1.0.113" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "thiserror" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".thiserror."1.0.56" { inherit profileName; }).out; + }; + }); + + "unknown".k2v-client."0.0.4" = overridableMkRustCrate (profileName: rec { + name = "k2v-client"; + version = "0.0.4"; + registry = "unknown"; + src = fetchCrateLocal (workspaceSrc + "/src/k2v-client"); + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "k2v-client/clap" || rootFeatures' ? "k2v-client/cli") "clap") + (lib.optional (rootFeatures' ? "k2v-client/cli") "cli") + (lib.optional (rootFeatures' ? "k2v-client/cli" || rootFeatures' ? "k2v-client/format_table") "format_table") + (lib.optional (rootFeatures' ? "k2v-client/cli" || rootFeatures' ? "k2v-client/tracing") "tracing") + (lib.optional (rootFeatures' ? "k2v-client/cli" || rootFeatures' ? "k2v-client/tracing-subscriber") "tracing-subscriber") + ]; + dependencies = { + aws_sdk_config = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-sdk-config."1.13.0" { inherit profileName; }).out; + aws_sigv4 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aws-sigv4."1.1.4" { inherit profileName; }).out; + base64 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".base64."0.21.7" { inherit profileName; }).out; + ${ if rootFeatures' ? "k2v-client/clap" || rootFeatures' ? "k2v-client/cli" then "clap" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".clap."4.4.18" { inherit profileName; }).out; + ${ if rootFeatures' ? "k2v-client/cli" || rootFeatures' ? "k2v-client/format_table" then "format_table" else null } = (rustPackages."unknown".format_table."0.1.1" { inherit profileName; }).out; + hex = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".hex."0.4.3" { inherit profileName; }).out; + http = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."1.0.0" { inherit profileName; }).out; + http_body_util = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".http-body-util."0.1.0" { inherit profileName; }).out; + hyper = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".hyper."1.1.0" { inherit profileName; }).out; + hyper_rustls = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".hyper-rustls."0.26.0" { inherit profileName; }).out; + hyper_util = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".hyper-util."0.1.3" { inherit profileName; }).out; + log = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.20" { inherit profileName; }).out; + percent_encoding = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".percent-encoding."2.3.1" { inherit profileName; }).out; + serde = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }).out; + serde_json = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_json."1.0.113" { inherit profileName; }).out; + sha2 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".sha2."0.10.8" { inherit profileName; }).out; + thiserror = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".thiserror."1.0.56" { inherit profileName; }).out; + tokio = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "k2v-client/cli" || rootFeatures' ? "k2v-client/tracing" then "tracing" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }).out; + ${ if rootFeatures' ? "k2v-client/cli" || rootFeatures' ? "k2v-client/tracing-subscriber" then "tracing_subscriber" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing-subscriber."0.3.18" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".k8s-openapi."0.21.0" = overridableMkRustCrate (profileName: rec { + name = "k8s-openapi"; + version = "0.21.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "301f367a36090b7dfdaac248ee3ed4f14a6a8292e7bec0f1c5e6e2e1f181cd33"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/k8s-openapi" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "v1_24") + ]; + dependencies = { + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/k8s-openapi" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "base64" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".base64."0.21.7" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/k8s-openapi" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "chrono" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".chrono."0.4.33" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/k8s-openapi" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "serde" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/k8s-openapi" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "serde_value" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde-value."0.7.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/k8s-openapi" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "serde_json" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_json."1.0.113" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".kube."0.88.1" = overridableMkRustCrate (profileName: rec { + name = "kube"; + version = "0.88.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "462fe330a0617b276ec864c2255810adcdf519ecb6844253c54074b2086a97bc"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "client") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "config") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "derive") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "kube-client") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "kube-derive") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "kube-runtime") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "runtime") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "rustls-tls") + ]; + dependencies = { + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "k8s_openapi" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".k8s-openapi."0.21.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "kube_client" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".kube-client."0.88.1" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "kube_core" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".kube-core."0.88.1" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "kube_derive" else null } = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".kube-derive."0.88.1" { profileName = "__noProfile"; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "kube_runtime" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".kube-runtime."0.88.1" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".kube-client."0.88.1" = overridableMkRustCrate (profileName: rec { + name = "kube-client"; + version = "0.88.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "7fe0d65dd6f3adba29cfb84f19dfe55449c7f6c35425f9d8294bec40313e0b64"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "__non_core") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "base64") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "bytes") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "chrono") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "client") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "config") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "either") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "futures") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "home") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "http-body") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "hyper") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "hyper-rustls") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "hyper-timeout") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "jsonpatch") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "jsonpath-rust") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "pem") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "pin-project") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "rustls") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "rustls-pemfile") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "rustls-tls") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "serde_yaml") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "tokio") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "tokio-util") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "tower") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "tower-http") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "tracing") + ]; + dependencies = { + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "base64" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".base64."0.21.7" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "bytes" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "chrono" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".chrono."0.4.33" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "either" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".either."1.9.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "futures" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures."0.3.30" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "home" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".home."0.5.9" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "http" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.11" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "http_body" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".http-body."0.4.6" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "hyper" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".hyper."0.14.28" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "hyper_rustls" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".hyper-rustls."0.24.2" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "hyper_timeout" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".hyper-timeout."0.4.1" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "jsonpath_rust" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".jsonpath-rust."0.4.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "k8s_openapi" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".k8s-openapi."0.21.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "kube_core" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".kube-core."0.88.1" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "pem" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".pem."3.0.3" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "pin_project" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project."1.1.4" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "rustls" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".rustls."0.21.10" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "rustls_pemfile" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".rustls-pemfile."1.0.4" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "secrecy" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".secrecy."0.8.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "serde" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "serde_json" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_json."1.0.113" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "serde_yaml" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_yaml."0.9.31" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "thiserror" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".thiserror."1.0.56" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "tokio" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "tokio_util" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-util."0.7.10" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "tower" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tower."0.4.13" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "tower_http" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tower-http."0.4.4" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "tracing" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".kube-core."0.88.1" = overridableMkRustCrate (profileName: rec { + name = "kube-core"; + version = "0.88.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "a6b42844e9172f631b8263ea9ce003b9251da13beb1401580937ad206dd82f4c"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "json-patch") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "jsonpatch") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "schema") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "schemars") + ]; + dependencies = { + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "chrono" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".chrono."0.4.33" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "form_urlencoded" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".form_urlencoded."1.2.1" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "http" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.11" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "json_patch" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".json-patch."1.2.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "k8s_openapi" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".k8s-openapi."0.21.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "once_cell" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.19.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "schemars" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".schemars."0.8.16" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "serde" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "serde_json" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_json."1.0.113" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "thiserror" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".thiserror."1.0.56" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".kube-derive."0.88.1" = overridableMkRustCrate (profileName: rec { + name = "kube-derive"; + version = "0.88.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "f5b5a111ee287bd237b8190b8c39543ea9fd22f79e9c32a36c24e08234bcda22"; }; + dependencies = { + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "darling" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".darling."0.20.5" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "proc_macro2" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "quote" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "serde_json" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_json."1.0.113" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "syn" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."2.0.48" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".kube-runtime."0.88.1" = overridableMkRustCrate (profileName: rec { + name = "kube-runtime"; + version = "0.88.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "2bc06275064c81056fbb28ea876b3fb339d970e8132282119359afca0835c0ea"; }; + dependencies = { + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "ahash" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".ahash."0.8.7" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "async_trait" else null } = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".async-trait."0.1.77" { profileName = "__noProfile"; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "backoff" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".backoff."0.4.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "derivative" else null } = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".derivative."2.2.0" { profileName = "__noProfile"; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "futures" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures."0.3.30" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "hashbrown" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".hashbrown."0.14.3" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "json_patch" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".json-patch."1.2.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "k8s_openapi" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".k8s-openapi."0.21.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "kube_client" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".kube-client."0.88.1" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "parking_lot" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".parking_lot."0.12.1" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "pin_project" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project."1.1.4" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "serde" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "serde_json" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_json."1.0.113" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "smallvec" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".smallvec."1.13.1" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "thiserror" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".thiserror."1.0.56" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "tokio" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "tokio_util" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-util."0.7.10" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "tracing" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".kuska-handshake."0.2.0" = overridableMkRustCrate (profileName: rec { + name = "kuska-handshake"; + version = "0.2.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "e33da4b69f23c2ece0b3e729d079cebdc2c0206e493e42f510f500ad81c631d5"; }; + features = builtins.concatLists [ + [ "async_std" ] + [ "default" ] + [ "futures" ] + ]; + dependencies = { + futures = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures."0.3.30" { inherit profileName; }).out; + hex = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".hex."0.4.3" { inherit profileName; }).out; + sodiumoxide = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".kuska-sodiumoxide."0.2.5-0" { inherit profileName; }).out; + log = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.20" { inherit profileName; }).out; + thiserror = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".thiserror."1.0.56" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".kuska-sodiumoxide."0.2.5-0" = overridableMkRustCrate (profileName: rec { + name = "kuska-sodiumoxide"; + version = "0.2.5-0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "ae0f8eafdd240b722243787b51fdaf8df6693fb8621d0f7061cdba574214cf88"; }; + features = builtins.concatLists [ + [ "default" ] + [ "serde" ] + [ "std" ] + (lib.optional (rootFeatures' ? "garage/system-libs" || rootFeatures' ? "garage_rpc/system-libs") "use-pkg-config") + ]; + dependencies = { + libc = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }).out; + libsodium_sys = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libsodium-sys."0.2.7" { inherit profileName; }).out; + serde = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".lazy_static."1.4.0" = overridableMkRustCrate (profileName: rec { + name = "lazy_static"; + version = "1.4.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" = overridableMkRustCrate (profileName: rec { + name = "libc"; + version = "0.2.153"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd"; }; + features = builtins.concatLists [ + [ "default" ] + [ "extra_traits" ] + [ "std" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".libsodium-sys."0.2.7" = overridableMkRustCrate (profileName: rec { + name = "libsodium-sys"; + version = "0.2.7"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "6b779387cd56adfbc02ea4a668e704f729be8d6a6abd2c27ca5ee537849a92fd"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/system-libs" || rootFeatures' ? "garage_rpc/system-libs") "use-pkg-config") + ]; + dependencies = { + libc = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }).out; + }; + buildDependencies = { + ${ if !(hostPlatform.parsed.abi.name == "msvc") then "cc" else null } = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".cc."1.0.83" { profileName = "__noProfile"; }).out; + ${ if hostPlatform.parsed.abi.name == "msvc" then "libc" else null } = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { profileName = "__noProfile"; }).out; + pkg_config = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".pkg-config."0.3.29" { profileName = "__noProfile"; }).out; + walkdir = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".walkdir."2.4.0" { profileName = "__noProfile"; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".libsqlite3-sys."0.28.0" = overridableMkRustCrate (profileName: rec { + name = "libsqlite3-sys"; + version = "0.28.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "0c10584274047cb335c23d3e61bcef8e323adae7c5c8c760540f73610177fc3f"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/bundled-libs" || rootFeatures' ? "garage/default" || rootFeatures' ? "garage_db/bundled-libs") "bundled") + (lib.optional (rootFeatures' ? "garage/bundled-libs" || rootFeatures' ? "garage/default" || rootFeatures' ? "garage_db/bundled-libs") "bundled_bindings") + (lib.optional (rootFeatures' ? "garage/bundled-libs" || rootFeatures' ? "garage/default" || rootFeatures' ? "garage_db/bundled-libs") "cc") + (lib.optional (rootFeatures' ? "garage/bundled-libs" || rootFeatures' ? "garage/default" || rootFeatures' ? "garage/sqlite" || rootFeatures' ? "garage_db/bundled-libs" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/r2d2_sqlite" || rootFeatures' ? "garage_db/rusqlite" || rootFeatures' ? "garage_db/sqlite" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/sqlite") "default") + (lib.optional (rootFeatures' ? "garage/bundled-libs" || rootFeatures' ? "garage/default" || rootFeatures' ? "garage/sqlite" || rootFeatures' ? "garage_db/bundled-libs" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/r2d2_sqlite" || rootFeatures' ? "garage_db/rusqlite" || rootFeatures' ? "garage_db/sqlite" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/sqlite") "min_sqlite_version_3_14_0") + (lib.optional (rootFeatures' ? "garage/bundled-libs" || rootFeatures' ? "garage/default" || rootFeatures' ? "garage/sqlite" || rootFeatures' ? "garage_db/bundled-libs" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/r2d2_sqlite" || rootFeatures' ? "garage_db/rusqlite" || rootFeatures' ? "garage_db/sqlite" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/sqlite") "pkg-config") + (lib.optional (rootFeatures' ? "garage/bundled-libs" || rootFeatures' ? "garage/default" || rootFeatures' ? "garage/sqlite" || rootFeatures' ? "garage_db/bundled-libs" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/r2d2_sqlite" || rootFeatures' ? "garage_db/rusqlite" || rootFeatures' ? "garage_db/sqlite" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/sqlite") "vcpkg") + ]; + buildDependencies = { + ${ if rootFeatures' ? "garage/bundled-libs" || rootFeatures' ? "garage/default" || rootFeatures' ? "garage_db/bundled-libs" then "cc" else null } = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".cc."1.0.83" { profileName = "__noProfile"; }).out; + ${ if rootFeatures' ? "garage/bundled-libs" || rootFeatures' ? "garage/default" || rootFeatures' ? "garage/sqlite" || rootFeatures' ? "garage_db/bundled-libs" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/r2d2_sqlite" || rootFeatures' ? "garage_db/rusqlite" || rootFeatures' ? "garage_db/sqlite" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/sqlite" then "pkg_config" else null } = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".pkg-config."0.3.29" { profileName = "__noProfile"; }).out; + ${ if rootFeatures' ? "garage/bundled-libs" || rootFeatures' ? "garage/default" || rootFeatures' ? "garage/sqlite" || rootFeatures' ? "garage_db/bundled-libs" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/r2d2_sqlite" || rootFeatures' ? "garage_db/rusqlite" || rootFeatures' ? "garage_db/sqlite" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/sqlite" then "vcpkg" else null } = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".vcpkg."0.2.15" { profileName = "__noProfile"; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".linux-raw-sys."0.4.13" = overridableMkRustCrate (profileName: rec { + name = "linux-raw-sys"; + version = "0.4.13"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "elf") + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "errno") + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "general") + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "ioctl") + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "no_std") + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".lmdb-rkv-sys."0.11.2" = overridableMkRustCrate (profileName: rec { + name = "lmdb-rkv-sys"; + version = "0.11.2"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "61b9ce6b3be08acefa3003c57b7565377432a89ec24476bbe72e11d101f852fe"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/default" || rootFeatures' ? "garage/lmdb" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/heed" || rootFeatures' ? "garage_db/lmdb" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/lmdb") "default") + ]; + dependencies = { + ${ if rootFeatures' ? "garage/default" || rootFeatures' ? "garage/lmdb" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/heed" || rootFeatures' ? "garage_db/lmdb" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/lmdb" then "libc" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }).out; + }; + buildDependencies = { + ${ if rootFeatures' ? "garage/default" || rootFeatures' ? "garage/lmdb" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/heed" || rootFeatures' ? "garage_db/lmdb" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/lmdb" then "cc" else null } = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".cc."1.0.83" { profileName = "__noProfile"; }).out; + ${ if rootFeatures' ? "garage/default" || rootFeatures' ? "garage/lmdb" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/heed" || rootFeatures' ? "garage_db/lmdb" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/lmdb" then "pkg_config" else null } = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".pkg-config."0.3.29" { profileName = "__noProfile"; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".lock_api."0.4.11" = overridableMkRustCrate (profileName: rec { + name = "lock_api"; + version = "0.4.11"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45"; }; + features = builtins.concatLists [ + [ "atomic_usize" ] + [ "default" ] + ]; + dependencies = { + scopeguard = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".scopeguard."1.2.0" { inherit profileName; }).out; + }; + buildDependencies = { + autocfg = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".autocfg."1.1.0" { profileName = "__noProfile"; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".log."0.4.20" = overridableMkRustCrate (profileName: rec { + name = "log"; + version = "0.4.20"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f"; }; + features = builtins.concatLists [ + [ "std" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".matchers."0.1.0" = overridableMkRustCrate (profileName: rec { + name = "matchers"; + version = "0.1.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558"; }; + dependencies = { + regex_automata = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".regex-automata."0.1.10" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".md-5."0.10.6" = overridableMkRustCrate (profileName: rec { + name = "md-5"; + version = "0.10.6"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf"; }; + features = builtins.concatLists [ + [ "default" ] + [ "std" ] + ]; + dependencies = { + cfg_if = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."1.0.0" { inherit profileName; }).out; + digest = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".digest."0.10.7" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".memchr."2.7.1" = overridableMkRustCrate (profileName: rec { + name = "memchr"; + version = "2.7.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149"; }; + features = builtins.concatLists [ + [ "alloc" ] + [ "default" ] + [ "std" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".mime."0.3.17" = overridableMkRustCrate (profileName: rec { + name = "mime"; + version = "0.3.17"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".minimal-lexical."0.2.1" = overridableMkRustCrate (profileName: rec { + name = "minimal-lexical"; + version = "0.2.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"; }; + features = builtins.concatLists [ + [ "std" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".miniz_oxide."0.7.2" = overridableMkRustCrate (profileName: rec { + name = "miniz_oxide"; + version = "0.7.2"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7"; }; + dependencies = { + adler = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".adler."1.0.2" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".mio."0.8.10" = overridableMkRustCrate (profileName: rec { + name = "mio"; + version = "0.8.10"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09"; }; + features = builtins.concatLists [ + [ "net" ] + [ "os-ext" ] + [ "os-poll" ] + ]; + dependencies = { + ${ if hostPlatform.isUnix || hostPlatform.parsed.kernel.name == "wasi" then "libc" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }).out; + ${ if hostPlatform.parsed.kernel.name == "wasi" then "wasi" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasi."0.11.0+wasi-snapshot-preview1" { inherit profileName; }).out; + ${ if hostPlatform.isWindows then "windows_sys" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows-sys."0.48.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".mktemp."0.5.1" = overridableMkRustCrate (profileName: rec { + name = "mktemp"; + version = "0.5.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "69fed8fbcd01affec44ac226784c6476a6006d98d13e33bc0ca7977aaf046bd8"; }; + dependencies = { + uuid = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".uuid."1.4.1" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".multer."3.0.0" = overridableMkRustCrate (profileName: rec { + name = "multer"; + version = "3.0.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "a15d522be0a9c3e46fd2632e272d178f56387bdb5c9fbb3a36c649062e9b5219"; }; + features = builtins.concatLists [ + [ "default" ] + ]; + dependencies = { + bytes = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }).out; + encoding_rs = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".encoding_rs."0.8.33" { inherit profileName; }).out; + futures_util = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.30" { inherit profileName; }).out; + http = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."1.0.0" { inherit profileName; }).out; + httparse = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".httparse."1.8.0" { inherit profileName; }).out; + log = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.20" { inherit profileName; }).out; + memchr = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".memchr."2.7.1" { inherit profileName; }).out; + mime = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".mime."0.3.17" { inherit profileName; }).out; + spin = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".spin."0.9.8" { inherit profileName; }).out; + }; + buildDependencies = { + version_check = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".version_check."0.9.4" { profileName = "__noProfile"; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".multimap."0.8.3" = overridableMkRustCrate (profileName: rec { + name = "multimap"; + version = "0.8.3"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".nix."0.27.1" = overridableMkRustCrate (profileName: rec { + name = "nix"; + version = "0.27.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053"; }; + features = builtins.concatLists [ + [ "fs" ] + ]; + dependencies = { + bitflags = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bitflags."2.4.2" { inherit profileName; }).out; + cfg_if = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."1.0.0" { inherit profileName; }).out; + libc = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".no-std-net."0.6.0" = overridableMkRustCrate (profileName: rec { + name = "no-std-net"; + version = "0.6.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "43794a0ace135be66a25d3ae77d41b91615fb68ae937f904090203e81f755b65"; }; + features = builtins.concatLists [ + [ "std" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".nom."7.1.3" = overridableMkRustCrate (profileName: rec { + name = "nom"; + version = "7.1.3"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"; }; + features = builtins.concatLists [ + [ "alloc" ] + [ "default" ] + [ "std" ] + ]; + dependencies = { + memchr = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".memchr."2.7.1" { inherit profileName; }).out; + minimal_lexical = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".minimal-lexical."0.2.1" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".nu-ansi-term."0.46.0" = overridableMkRustCrate (profileName: rec { + name = "nu-ansi-term"; + version = "0.46.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84"; }; + dependencies = { + overload = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".overload."0.1.1" { inherit profileName; }).out; + ${ if hostPlatform.parsed.kernel.name == "windows" then "winapi" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".winapi."0.3.9" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".num."0.2.1" = overridableMkRustCrate (profileName: rec { + name = "num"; + version = "0.2.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "b8536030f9fea7127f841b45bb6243b27255787fb4eb83958aa1ef9d2fdc0c36"; }; + features = builtins.concatLists [ + [ "default" ] + [ "num-bigint" ] + [ "std" ] + ]; + dependencies = { + num_bigint = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-bigint."0.2.6" { inherit profileName; }).out; + num_complex = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-complex."0.2.4" { inherit profileName; }).out; + num_integer = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-integer."0.1.45" { inherit profileName; }).out; + num_iter = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-iter."0.1.43" { inherit profileName; }).out; + num_rational = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-rational."0.2.4" { inherit profileName; }).out; + num_traits = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-traits."0.2.17" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".num-bigint."0.2.6" = overridableMkRustCrate (profileName: rec { + name = "num-bigint"; + version = "0.2.6"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304"; }; + features = builtins.concatLists [ + [ "std" ] + ]; + dependencies = { + num_integer = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-integer."0.1.45" { inherit profileName; }).out; + num_traits = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-traits."0.2.17" { inherit profileName; }).out; + }; + buildDependencies = { + autocfg = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".autocfg."1.1.0" { profileName = "__noProfile"; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".num-complex."0.2.4" = overridableMkRustCrate (profileName: rec { + name = "num-complex"; + version = "0.2.4"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "b6b19411a9719e753aff12e5187b74d60d3dc449ec3f4dc21e3989c3f554bc95"; }; + features = builtins.concatLists [ + [ "std" ] + ]; + dependencies = { + num_traits = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-traits."0.2.17" { inherit profileName; }).out; + }; + buildDependencies = { + autocfg = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".autocfg."1.1.0" { profileName = "__noProfile"; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".num-conv."0.1.0" = overridableMkRustCrate (profileName: rec { + name = "num-conv"; + version = "0.1.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".num-integer."0.1.45" = overridableMkRustCrate (profileName: rec { + name = "num-integer"; + version = "0.1.45"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9"; }; + features = builtins.concatLists [ + [ "default" ] + [ "std" ] + ]; + dependencies = { + num_traits = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-traits."0.2.17" { inherit profileName; }).out; + }; + buildDependencies = { + autocfg = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".autocfg."1.1.0" { profileName = "__noProfile"; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".num-iter."0.1.43" = overridableMkRustCrate (profileName: rec { + name = "num-iter"; + version = "0.1.43"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252"; }; + features = builtins.concatLists [ + [ "std" ] + ]; + dependencies = { + num_integer = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-integer."0.1.45" { inherit profileName; }).out; + num_traits = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-traits."0.2.17" { inherit profileName; }).out; + }; + buildDependencies = { + autocfg = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".autocfg."1.1.0" { profileName = "__noProfile"; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".num-rational."0.2.4" = overridableMkRustCrate (profileName: rec { + name = "num-rational"; + version = "0.2.4"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef"; }; + features = builtins.concatLists [ + [ "bigint" ] + [ "num-bigint" ] + [ "std" ] + ]; + dependencies = { + num_bigint = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-bigint."0.2.6" { inherit profileName; }).out; + num_integer = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-integer."0.1.45" { inherit profileName; }).out; + num_traits = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-traits."0.2.17" { inherit profileName; }).out; + }; + buildDependencies = { + autocfg = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".autocfg."1.1.0" { profileName = "__noProfile"; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".num-traits."0.2.17" = overridableMkRustCrate (profileName: rec { + name = "num-traits"; + version = "0.2.17"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c"; }; + features = builtins.concatLists [ + [ "std" ] + ]; + buildDependencies = { + autocfg = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".autocfg."1.1.0" { profileName = "__noProfile"; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".num_cpus."1.16.0" = overridableMkRustCrate (profileName: rec { + name = "num_cpus"; + version = "1.16.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43"; }; + dependencies = { + ${ if hostPlatform.parsed.kernel.name == "hermit" then "hermit_abi" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".hermit-abi."0.3.4" { inherit profileName; }).out; + ${ if !hostPlatform.isWindows then "libc" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".object."0.32.2" = overridableMkRustCrate (profileName: rec { + name = "object"; + version = "0.32.2"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441"; }; + features = builtins.concatLists [ + [ "archive" ] + [ "coff" ] + [ "elf" ] + [ "macho" ] + [ "pe" ] + [ "read_core" ] + [ "unaligned" ] + ]; + dependencies = { + memchr = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".memchr."2.7.1" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".once_cell."1.19.0" = overridableMkRustCrate (profileName: rec { + name = "once_cell"; + version = "1.19.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92"; }; + features = builtins.concatLists [ + [ "alloc" ] + [ "default" ] + [ "race" ] + [ "std" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".opaque-debug."0.3.1" = overridableMkRustCrate (profileName: rec { + name = "opaque-debug"; + version = "0.3.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".openssl-probe."0.1.5" = overridableMkRustCrate (profileName: rec { + name = "openssl-probe"; + version = "0.1.5"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".opentelemetry."0.17.0" = overridableMkRustCrate (profileName: rec { + name = "opentelemetry"; + version = "0.17.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "6105e89802af13fdf48c49d7646d3b533a70e536d818aae7e78ba0433d01acb8"; }; + features = builtins.concatLists [ + [ "async-trait" ] + [ "crossbeam-channel" ] + [ "dashmap" ] + [ "default" ] + [ "fnv" ] + [ "metrics" ] + [ "percent-encoding" ] + [ "pin-project" ] + [ "rand" ] + [ "rt-tokio" ] + [ "tokio" ] + [ "tokio-stream" ] + [ "trace" ] + ]; + dependencies = { + async_trait = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".async-trait."0.1.77" { profileName = "__noProfile"; }).out; + crossbeam_channel = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".crossbeam-channel."0.5.11" { inherit profileName; }).out; + dashmap = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".dashmap."4.0.2" { inherit profileName; }).out; + fnv = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".fnv."1.0.7" { inherit profileName; }).out; + futures_channel = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-channel."0.3.30" { inherit profileName; }).out; + futures_executor = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-executor."0.3.30" { inherit profileName; }).out; + futures_util = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.30" { inherit profileName; }).out; + ${ if hostPlatform.parsed.cpu.name == "wasm32" then "js_sys" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".js-sys."0.3.67" { inherit profileName; }).out; + lazy_static = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".lazy_static."1.4.0" { inherit profileName; }).out; + percent_encoding = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".percent-encoding."2.3.1" { inherit profileName; }).out; + pin_project = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project."1.1.4" { inherit profileName; }).out; + rand = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".rand."0.8.5" { inherit profileName; }).out; + thiserror = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".thiserror."1.0.56" { inherit profileName; }).out; + tokio = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }).out; + tokio_stream = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-stream."0.1.14" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".opentelemetry-contrib."0.9.0" = overridableMkRustCrate (profileName: rec { + name = "opentelemetry-contrib"; + version = "0.9.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "85637add8f60bb4cac673469c14f47a329c6cec7365c72d72cd32f2d104a721a"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage_net/opentelemetry-contrib" || rootFeatures' ? "garage_net/telemetry") "default") + ]; + dependencies = { + ${ if rootFeatures' ? "garage_net/opentelemetry-contrib" || rootFeatures' ? "garage_net/telemetry" then "lazy_static" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".lazy_static."1.4.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage_net/opentelemetry-contrib" || rootFeatures' ? "garage_net/telemetry" then "opentelemetry" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".opentelemetry."0.17.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".opentelemetry-otlp."0.10.0" = overridableMkRustCrate (profileName: rec { + name = "opentelemetry-otlp"; + version = "0.10.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "9d1a6ca9de4c8b00aa7f1a153bd76cb263287155cec642680d79d98706f3d28a"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "default") + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "prost") + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "tokio") + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "tonic") + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "tonic-build") + ]; + dependencies = { + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "async_trait" else null } = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".async-trait."0.1.77" { profileName = "__noProfile"; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "futures" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures."0.3.30" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "futures_util" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.30" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "http" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.11" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "opentelemetry" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".opentelemetry."0.17.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "prost" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".prost."0.9.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "thiserror" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".thiserror."1.0.56" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "tokio" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "tonic" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tonic."0.6.2" { inherit profileName; }).out; + }; + buildDependencies = { + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "tonic_build" else null } = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".tonic-build."0.6.2" { profileName = "__noProfile"; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".opentelemetry-prometheus."0.10.0" = overridableMkRustCrate (profileName: rec { + name = "opentelemetry-prometheus"; + version = "0.10.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "9328977e479cebe12ce0d3fcecdaea4721d234895a9440c5b5dfd113f0594ac6"; }; + dependencies = { + ${ if rootFeatures' ? "garage/default" || rootFeatures' ? "garage/metrics" || rootFeatures' ? "garage/opentelemetry-prometheus" || rootFeatures' ? "garage_api/metrics" || rootFeatures' ? "garage_api/opentelemetry-prometheus" then "opentelemetry" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".opentelemetry."0.17.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/default" || rootFeatures' ? "garage/metrics" || rootFeatures' ? "garage/opentelemetry-prometheus" || rootFeatures' ? "garage_api/metrics" || rootFeatures' ? "garage_api/opentelemetry-prometheus" then "prometheus" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".prometheus."0.13.3" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/default" || rootFeatures' ? "garage/metrics" || rootFeatures' ? "garage/opentelemetry-prometheus" || rootFeatures' ? "garage_api/metrics" || rootFeatures' ? "garage_api/opentelemetry-prometheus" then "protobuf" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".protobuf."2.28.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".ordered-float."2.10.1" = overridableMkRustCrate (profileName: rec { + name = "ordered-float"; + version = "2.10.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "68f19d67e5a2795c94e73e0bb1cc1a7edeb2e28efd39e2e1c9b7a40c1108b11c"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/k8s-openapi" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "default") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/k8s-openapi" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "std") + ]; + dependencies = { + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/k8s-openapi" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "num_traits" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-traits."0.2.17" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".outref."0.5.1" = overridableMkRustCrate (profileName: rec { + name = "outref"; + version = "0.5.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "4030760ffd992bef45b0ae3f10ce1aba99e33464c90d14dd7c039884963ddc7a"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".overload."0.1.1" = overridableMkRustCrate (profileName: rec { + name = "overload"; + version = "0.1.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".p256."0.11.1" = overridableMkRustCrate (profileName: rec { + name = "p256"; + version = "0.11.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "51f44edd08f51e2ade572f141051021c5af22677e42b7dd28a88155151c33594"; }; + features = builtins.concatLists [ + [ "arithmetic" ] + [ "default" ] + [ "digest" ] + [ "ecdsa" ] + [ "ecdsa-core" ] + [ "pkcs8" ] + [ "sha2" ] + [ "sha256" ] + [ "std" ] + ]; + dependencies = { + ecdsa_core = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".ecdsa."0.14.8" { inherit profileName; }).out; + elliptic_curve = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".elliptic-curve."0.12.3" { inherit profileName; }).out; + sha2 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".sha2."0.10.8" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".page_size."0.4.2" = overridableMkRustCrate (profileName: rec { + name = "page_size"; + version = "0.4.2"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "eebde548fbbf1ea81a99b128872779c437752fb99f217c45245e1a61dcd9edcd"; }; + dependencies = { + ${ if (rootFeatures' ? "garage/default" || rootFeatures' ? "garage/lmdb" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/heed" || rootFeatures' ? "garage_db/lmdb" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/lmdb") && hostPlatform.isUnix then "libc" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }).out; + ${ if (rootFeatures' ? "garage/default" || rootFeatures' ? "garage/lmdb" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/heed" || rootFeatures' ? "garage_db/lmdb" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/lmdb") && hostPlatform.isWindows then "winapi" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".winapi."0.3.9" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".parking_lot."0.11.2" = overridableMkRustCrate (profileName: rec { + name = "parking_lot"; + version = "0.11.2"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99"; }; + features = builtins.concatLists [ + [ "default" ] + ]; + dependencies = { + instant = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".instant."0.1.12" { inherit profileName; }).out; + lock_api = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".lock_api."0.4.11" { inherit profileName; }).out; + parking_lot_core = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".parking_lot_core."0.8.6" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".parking_lot."0.12.1" = overridableMkRustCrate (profileName: rec { + name = "parking_lot"; + version = "0.12.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/default" || rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage/metrics" || rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/opentelemetry-prometheus" || rootFeatures' ? "garage/prometheus" || rootFeatures' ? "garage/sqlite" || rootFeatures' ? "garage/telemetry-otlp" || rootFeatures' ? "garage_api/metrics" || rootFeatures' ? "garage_api/opentelemetry-prometheus" || rootFeatures' ? "garage_api/prometheus" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/r2d2" || rootFeatures' ? "garage_db/r2d2_sqlite" || rootFeatures' ? "garage_db/sqlite" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/sqlite" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "default") + ]; + dependencies = { + ${ if rootFeatures' ? "garage/default" || rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage/metrics" || rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/opentelemetry-prometheus" || rootFeatures' ? "garage/prometheus" || rootFeatures' ? "garage/sqlite" || rootFeatures' ? "garage/telemetry-otlp" || rootFeatures' ? "garage_api/metrics" || rootFeatures' ? "garage_api/opentelemetry-prometheus" || rootFeatures' ? "garage_api/prometheus" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/r2d2" || rootFeatures' ? "garage_db/r2d2_sqlite" || rootFeatures' ? "garage_db/sqlite" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/sqlite" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "lock_api" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".lock_api."0.4.11" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/default" || rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage/metrics" || rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/opentelemetry-prometheus" || rootFeatures' ? "garage/prometheus" || rootFeatures' ? "garage/sqlite" || rootFeatures' ? "garage/telemetry-otlp" || rootFeatures' ? "garage_api/metrics" || rootFeatures' ? "garage_api/opentelemetry-prometheus" || rootFeatures' ? "garage_api/prometheus" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/r2d2" || rootFeatures' ? "garage_db/r2d2_sqlite" || rootFeatures' ? "garage_db/sqlite" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/sqlite" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "parking_lot_core" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".parking_lot_core."0.9.9" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".parking_lot_core."0.8.6" = overridableMkRustCrate (profileName: rec { + name = "parking_lot_core"; + version = "0.8.6"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc"; }; + dependencies = { + cfg_if = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."1.0.0" { inherit profileName; }).out; + instant = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".instant."0.1.12" { inherit profileName; }).out; + ${ if hostPlatform.isUnix then "libc" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }).out; + ${ if hostPlatform.parsed.kernel.name == "redox" then "syscall" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".redox_syscall."0.2.16" { inherit profileName; }).out; + smallvec = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".smallvec."1.13.1" { inherit profileName; }).out; + ${ if hostPlatform.isWindows then "winapi" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".winapi."0.3.9" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".parking_lot_core."0.9.9" = overridableMkRustCrate (profileName: rec { + name = "parking_lot_core"; + version = "0.9.9"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e"; }; + dependencies = { + ${ if rootFeatures' ? "garage/default" || rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage/metrics" || rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/opentelemetry-prometheus" || rootFeatures' ? "garage/prometheus" || rootFeatures' ? "garage/sqlite" || rootFeatures' ? "garage/telemetry-otlp" || rootFeatures' ? "garage_api/metrics" || rootFeatures' ? "garage_api/opentelemetry-prometheus" || rootFeatures' ? "garage_api/prometheus" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/r2d2" || rootFeatures' ? "garage_db/r2d2_sqlite" || rootFeatures' ? "garage_db/sqlite" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/sqlite" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "cfg_if" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."1.0.0" { inherit profileName; }).out; + ${ if (rootFeatures' ? "garage/default" || rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage/metrics" || rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/opentelemetry-prometheus" || rootFeatures' ? "garage/prometheus" || rootFeatures' ? "garage/sqlite" || rootFeatures' ? "garage/telemetry-otlp" || rootFeatures' ? "garage_api/metrics" || rootFeatures' ? "garage_api/opentelemetry-prometheus" || rootFeatures' ? "garage_api/prometheus" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/r2d2" || rootFeatures' ? "garage_db/r2d2_sqlite" || rootFeatures' ? "garage_db/sqlite" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/sqlite" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") && hostPlatform.isUnix then "libc" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }).out; + ${ if (rootFeatures' ? "garage/default" || rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage/metrics" || rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/opentelemetry-prometheus" || rootFeatures' ? "garage/prometheus" || rootFeatures' ? "garage/sqlite" || rootFeatures' ? "garage/telemetry-otlp" || rootFeatures' ? "garage_api/metrics" || rootFeatures' ? "garage_api/opentelemetry-prometheus" || rootFeatures' ? "garage_api/prometheus" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/r2d2" || rootFeatures' ? "garage_db/r2d2_sqlite" || rootFeatures' ? "garage_db/sqlite" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/sqlite" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") && hostPlatform.parsed.kernel.name == "redox" then "syscall" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".redox_syscall."0.4.1" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/default" || rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage/metrics" || rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/opentelemetry-prometheus" || rootFeatures' ? "garage/prometheus" || rootFeatures' ? "garage/sqlite" || rootFeatures' ? "garage/telemetry-otlp" || rootFeatures' ? "garage_api/metrics" || rootFeatures' ? "garage_api/opentelemetry-prometheus" || rootFeatures' ? "garage_api/prometheus" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/r2d2" || rootFeatures' ? "garage_db/r2d2_sqlite" || rootFeatures' ? "garage_db/sqlite" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/sqlite" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "smallvec" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".smallvec."1.13.1" { inherit profileName; }).out; + ${ if (rootFeatures' ? "garage/default" || rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage/metrics" || rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/opentelemetry-prometheus" || rootFeatures' ? "garage/prometheus" || rootFeatures' ? "garage/sqlite" || rootFeatures' ? "garage/telemetry-otlp" || rootFeatures' ? "garage_api/metrics" || rootFeatures' ? "garage_api/opentelemetry-prometheus" || rootFeatures' ? "garage_api/prometheus" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/r2d2" || rootFeatures' ? "garage_db/r2d2_sqlite" || rootFeatures' ? "garage_db/sqlite" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/sqlite" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") && hostPlatform.isWindows then "windows_targets" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows-targets."0.48.5" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".parse_duration."2.1.1" = overridableMkRustCrate (profileName: rec { + name = "parse_duration"; + version = "2.1.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "7037e5e93e0172a5a96874380bf73bc6ecef022e26fa25f2be26864d6b3ba95d"; }; + dependencies = { + lazy_static = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".lazy_static."1.4.0" { inherit profileName; }).out; + num = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".num."0.2.1" { inherit profileName; }).out; + regex = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".regex."1.10.3" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".password-hash."0.5.0" = overridableMkRustCrate (profileName: rec { + name = "password-hash"; + version = "0.5.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "346f04948ba92c43e8469c1ee6736c7563d71012b17d40745260fe106aac2166"; }; + features = builtins.concatLists [ + [ "alloc" ] + [ "default" ] + [ "rand_core" ] + ]; + dependencies = { + base64ct = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".base64ct."1.6.0" { inherit profileName; }).out; + rand_core = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".rand_core."0.6.4" { inherit profileName; }).out; + subtle = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".subtle."2.5.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".paste."1.0.14" = overridableMkRustCrate (profileName: rec { + name = "paste"; + version = "1.0.14"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".pem."3.0.3" = overridableMkRustCrate (profileName: rec { + name = "pem"; + version = "3.0.3"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "1b8fcc794035347fb64beda2d3b462595dd2753e3f268d89c5aae77e8cf2c310"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "default") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "std") + ]; + dependencies = { + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "base64" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".base64."0.21.7" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "serde" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".percent-encoding."2.3.1" = overridableMkRustCrate (profileName: rec { + name = "percent-encoding"; + version = "2.3.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e"; }; + features = builtins.concatLists [ + [ "alloc" ] + [ "default" ] + [ "std" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".pest."2.7.7" = overridableMkRustCrate (profileName: rec { + name = "pest"; + version = "2.7.7"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "219c0dcc30b6a27553f9cc242972b67f75b60eb0db71f0b5462f38b058c41546"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "default") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "memchr") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "std") + ]; + dependencies = { + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "memchr" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".memchr."2.7.1" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "thiserror" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".thiserror."1.0.56" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "ucd_trie" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".ucd-trie."0.1.6" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".pest_derive."2.7.7" = overridableMkRustCrate (profileName: rec { + name = "pest_derive"; + version = "2.7.7"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "22e1288dbd7786462961e69bfd4df7848c1e37e8b74303dbdab82c3a9cdd2809"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "default") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "std") + ]; + dependencies = { + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "pest" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".pest."2.7.7" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "pest_generator" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".pest_generator."2.7.7" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".pest_generator."2.7.7" = overridableMkRustCrate (profileName: rec { + name = "pest_generator"; + version = "2.7.7"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "1381c29a877c6d34b8c176e734f35d7f7f5b3adaefe940cb4d1bb7af94678e2e"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "std") + ]; + dependencies = { + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "pest" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".pest."2.7.7" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "pest_meta" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".pest_meta."2.7.7" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "proc_macro2" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "quote" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "syn" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."2.0.48" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".pest_meta."2.7.7" = overridableMkRustCrate (profileName: rec { + name = "pest_meta"; + version = "2.7.7"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "d0934d6907f148c22a3acbda520c7eed243ad7487a30f51f6ce52b58b7077a8a"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "default") + ]; + dependencies = { + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "once_cell" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.19.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "pest" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".pest."2.7.7" { inherit profileName; }).out; + }; + buildDependencies = { + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "sha2" else null } = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".sha2."0.10.8" { profileName = "__noProfile"; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".petgraph."0.6.4" = overridableMkRustCrate (profileName: rec { + name = "petgraph"; + version = "0.6.4"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9"; }; + dependencies = { + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "fixedbitset" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".fixedbitset."0.4.2" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "indexmap" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".indexmap."2.2.2" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".pin-project."1.1.4" = overridableMkRustCrate (profileName: rec { + name = "pin-project"; + version = "1.1.4"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "0302c4a0442c456bd56f841aee5c3bfd17967563f6fadc9ceb9f9c23cf3807e0"; }; + dependencies = { + pin_project_internal = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-internal."1.1.4" { profileName = "__noProfile"; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".pin-project-internal."1.1.4" = overridableMkRustCrate (profileName: rec { + name = "pin-project-internal"; + version = "1.1.4"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "266c042b60c9c76b8d53061e52b2e0d1116abc57cefc8c5cd671619a56ac3690"; }; + dependencies = { + proc_macro2 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }).out; + quote = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }).out; + syn = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."2.0.48" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.13" = overridableMkRustCrate (profileName: rec { + name = "pin-project-lite"; + version = "0.2.13"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".pin-utils."0.1.0" = overridableMkRustCrate (profileName: rec { + name = "pin-utils"; + version = "0.1.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".pkcs8."0.9.0" = overridableMkRustCrate (profileName: rec { + name = "pkcs8"; + version = "0.9.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba"; }; + features = builtins.concatLists [ + [ "alloc" ] + ]; + dependencies = { + der = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".der."0.6.1" { inherit profileName; }).out; + spki = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".spki."0.6.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".pkg-config."0.3.29" = overridableMkRustCrate (profileName: rec { + name = "pkg-config"; + version = "0.3.29"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".pnet_base."0.34.0" = overridableMkRustCrate (profileName: rec { + name = "pnet_base"; + version = "0.34.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "fe4cf6fb3ab38b68d01ab2aea03ed3d1132b4868fa4e06285f29f16da01c5f4c"; }; + features = builtins.concatLists [ + [ "std" ] + ]; + dependencies = { + no_std_net = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".no-std-net."0.6.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".pnet_datalink."0.34.0" = overridableMkRustCrate (profileName: rec { + name = "pnet_datalink"; + version = "0.34.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "ad5854abf0067ebbd3967f7d45ebc8976ff577ff0c7bd101c4973ae3c70f98fe"; }; + features = builtins.concatLists [ + [ "default" ] + [ "std" ] + ]; + dependencies = { + ipnetwork = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".ipnetwork."0.20.0" { inherit profileName; }).out; + libc = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }).out; + pnet_base = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".pnet_base."0.34.0" { inherit profileName; }).out; + pnet_sys = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".pnet_sys."0.34.0" { inherit profileName; }).out; + ${ if hostPlatform.isWindows then "winapi" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".winapi."0.3.9" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".pnet_sys."0.34.0" = overridableMkRustCrate (profileName: rec { + name = "pnet_sys"; + version = "0.34.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "417c0becd1b573f6d544f73671070b039051e5ad819cc64aa96377b536128d00"; }; + dependencies = { + libc = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }).out; + ${ if hostPlatform.isWindows then "winapi" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".winapi."0.3.9" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".polyval."0.6.2" = overridableMkRustCrate (profileName: rec { + name = "polyval"; + version = "0.6.2"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25"; }; + dependencies = { + cfg_if = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."1.0.0" { inherit profileName; }).out; + ${ if hostPlatform.parsed.cpu.name == "aarch64" || hostPlatform.parsed.cpu.name == "x86_64" || hostPlatform.parsed.cpu.name == "i686" then "cpufeatures" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".cpufeatures."0.2.12" { inherit profileName; }).out; + opaque_debug = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".opaque-debug."0.3.1" { inherit profileName; }).out; + universal_hash = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".universal-hash."0.5.1" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".powerfmt."0.2.0" = overridableMkRustCrate (profileName: rec { + name = "powerfmt"; + version = "0.2.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".ppv-lite86."0.2.17" = overridableMkRustCrate (profileName: rec { + name = "ppv-lite86"; + version = "0.2.17"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"; }; + features = builtins.concatLists [ + [ "simd" ] + [ "std" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".pretty_env_logger."0.5.0" = overridableMkRustCrate (profileName: rec { + name = "pretty_env_logger"; + version = "0.5.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "865724d4dbe39d9f3dd3b52b88d859d66bcb2d6a0acfd5ea68a65fb66d4bdc1c"; }; + dependencies = { + env_logger = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".env_logger."0.10.2" { inherit profileName; }).out; + log = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.20" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".proc-macro-error."1.0.4" = overridableMkRustCrate (profileName: rec { + name = "proc-macro-error"; + version = "1.0.4"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"; }; + features = builtins.concatLists [ + [ "default" ] + [ "syn" ] + [ "syn-error" ] + ]; + dependencies = { + proc_macro_error_attr = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro-error-attr."1.0.4" { profileName = "__noProfile"; }).out; + proc_macro2 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }).out; + quote = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }).out; + syn = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.109" { inherit profileName; }).out; + }; + buildDependencies = { + version_check = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".version_check."0.9.4" { profileName = "__noProfile"; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".proc-macro-error-attr."1.0.4" = overridableMkRustCrate (profileName: rec { + name = "proc-macro-error-attr"; + version = "1.0.4"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"; }; + dependencies = { + proc_macro2 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }).out; + quote = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }).out; + }; + buildDependencies = { + version_check = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".version_check."0.9.4" { profileName = "__noProfile"; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" = overridableMkRustCrate (profileName: rec { + name = "proc-macro2"; + version = "1.0.78"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae"; }; + features = builtins.concatLists [ + [ "default" ] + [ "proc-macro" ] + ]; + dependencies = { + unicode_ident = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".unicode-ident."1.0.12" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".prometheus."0.13.3" = overridableMkRustCrate (profileName: rec { + name = "prometheus"; + version = "0.13.3"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "449811d15fbdf5ceb5c1144416066429cf82316e2ec8ce0c1f6f8a02e7bbcf8c"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/default" || rootFeatures' ? "garage/metrics" || rootFeatures' ? "garage/opentelemetry-prometheus" || rootFeatures' ? "garage/prometheus" || rootFeatures' ? "garage_api/metrics" || rootFeatures' ? "garage_api/opentelemetry-prometheus" || rootFeatures' ? "garage_api/prometheus") "default") + (lib.optional (rootFeatures' ? "garage/default" || rootFeatures' ? "garage/metrics" || rootFeatures' ? "garage/opentelemetry-prometheus" || rootFeatures' ? "garage/prometheus" || rootFeatures' ? "garage_api/metrics" || rootFeatures' ? "garage_api/opentelemetry-prometheus" || rootFeatures' ? "garage_api/prometheus") "protobuf") + ]; + dependencies = { + ${ if rootFeatures' ? "garage/default" || rootFeatures' ? "garage/metrics" || rootFeatures' ? "garage/opentelemetry-prometheus" || rootFeatures' ? "garage/prometheus" || rootFeatures' ? "garage_api/metrics" || rootFeatures' ? "garage_api/opentelemetry-prometheus" || rootFeatures' ? "garage_api/prometheus" then "cfg_if" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."1.0.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/default" || rootFeatures' ? "garage/metrics" || rootFeatures' ? "garage/opentelemetry-prometheus" || rootFeatures' ? "garage/prometheus" || rootFeatures' ? "garage_api/metrics" || rootFeatures' ? "garage_api/opentelemetry-prometheus" || rootFeatures' ? "garage_api/prometheus" then "fnv" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".fnv."1.0.7" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/default" || rootFeatures' ? "garage/metrics" || rootFeatures' ? "garage/opentelemetry-prometheus" || rootFeatures' ? "garage/prometheus" || rootFeatures' ? "garage_api/metrics" || rootFeatures' ? "garage_api/opentelemetry-prometheus" || rootFeatures' ? "garage_api/prometheus" then "lazy_static" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".lazy_static."1.4.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/default" || rootFeatures' ? "garage/metrics" || rootFeatures' ? "garage/opentelemetry-prometheus" || rootFeatures' ? "garage/prometheus" || rootFeatures' ? "garage_api/metrics" || rootFeatures' ? "garage_api/opentelemetry-prometheus" || rootFeatures' ? "garage_api/prometheus" then "memchr" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".memchr."2.7.1" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/default" || rootFeatures' ? "garage/metrics" || rootFeatures' ? "garage/opentelemetry-prometheus" || rootFeatures' ? "garage/prometheus" || rootFeatures' ? "garage_api/metrics" || rootFeatures' ? "garage_api/opentelemetry-prometheus" || rootFeatures' ? "garage_api/prometheus" then "parking_lot" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".parking_lot."0.12.1" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/default" || rootFeatures' ? "garage/metrics" || rootFeatures' ? "garage/opentelemetry-prometheus" || rootFeatures' ? "garage/prometheus" || rootFeatures' ? "garage_api/metrics" || rootFeatures' ? "garage_api/opentelemetry-prometheus" || rootFeatures' ? "garage_api/prometheus" then "protobuf" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".protobuf."2.28.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/default" || rootFeatures' ? "garage/metrics" || rootFeatures' ? "garage/opentelemetry-prometheus" || rootFeatures' ? "garage/prometheus" || rootFeatures' ? "garage_api/metrics" || rootFeatures' ? "garage_api/opentelemetry-prometheus" || rootFeatures' ? "garage_api/prometheus" then "thiserror" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".thiserror."1.0.56" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".prost."0.9.0" = overridableMkRustCrate (profileName: rec { + name = "prost"; + version = "0.9.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "444879275cb4fd84958b1a1d5420d15e6fcf7c235fe47f053c9c2a80aceb6001"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "default") + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "prost-derive") + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "std") + ]; + dependencies = { + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "bytes" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "prost_derive" else null } = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".prost-derive."0.9.0" { profileName = "__noProfile"; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".prost-build."0.9.0" = overridableMkRustCrate (profileName: rec { + name = "prost-build"; + version = "0.9.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "62941722fb675d463659e49c4f3fe1fe792ff24fe5bbaa9c08cd3b98a1c354f5"; }; + dependencies = { + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "bytes" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "heck" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".heck."0.3.3" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "itertools" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".itertools."0.10.5" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "lazy_static" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".lazy_static."1.4.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "log" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.20" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "multimap" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".multimap."0.8.3" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "petgraph" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".petgraph."0.6.4" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "prost" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".prost."0.9.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "prost_types" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".prost-types."0.9.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "regex" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".regex."1.10.3" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "tempfile" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tempfile."3.9.0" { inherit profileName; }).out; + }; + buildDependencies = { + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "which" else null } = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".which."4.4.2" { profileName = "__noProfile"; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".prost-derive."0.9.0" = overridableMkRustCrate (profileName: rec { + name = "prost-derive"; + version = "0.9.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "f9cc1a3263e07e0bf68e96268f37665207b49560d98739662cdfaae215c720fe"; }; + dependencies = { + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "anyhow" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".anyhow."1.0.79" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "itertools" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".itertools."0.10.5" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "proc_macro2" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "quote" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "syn" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.109" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".prost-types."0.9.0" = overridableMkRustCrate (profileName: rec { + name = "prost-types"; + version = "0.9.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "534b7a0e836e3c482d2693070f982e39e7611da9695d4d1f5a4b186b51faef0a"; }; + dependencies = { + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "bytes" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "prost" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".prost."0.9.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".protobuf."2.28.0" = overridableMkRustCrate (profileName: rec { + name = "protobuf"; + version = "2.28.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "106dd99e98437432fed6519dedecfade6a06a73bb7b2a1e019fdd2bee5778d94"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".quick-xml."0.26.0" = overridableMkRustCrate (profileName: rec { + name = "quick-xml"; + version = "0.26.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "7f50b1c63b38611e7d4d7f68b82d3ad0cc71a2ad2e7f61fc10f1328d917c93cd"; }; + features = builtins.concatLists [ + [ "default" ] + [ "serde" ] + [ "serialize" ] + ]; + dependencies = { + memchr = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".memchr."2.7.1" { inherit profileName; }).out; + serde = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" = overridableMkRustCrate (profileName: rec { + name = "quote"; + version = "1.0.35"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef"; }; + features = builtins.concatLists [ + [ "default" ] + [ "proc-macro" ] + ]; + dependencies = { + proc_macro2 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".r2d2."0.8.10" = overridableMkRustCrate (profileName: rec { + name = "r2d2"; + version = "0.8.10"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "51de85fb3fb6524929c8a2eb85e6b6d363de4e8c48f9e2c2eac4944abc181c93"; }; + dependencies = { + ${ if rootFeatures' ? "garage/default" || rootFeatures' ? "garage/sqlite" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/r2d2" || rootFeatures' ? "garage_db/r2d2_sqlite" || rootFeatures' ? "garage_db/sqlite" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/sqlite" then "log" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.20" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/default" || rootFeatures' ? "garage/sqlite" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/r2d2" || rootFeatures' ? "garage_db/r2d2_sqlite" || rootFeatures' ? "garage_db/sqlite" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/sqlite" then "parking_lot" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".parking_lot."0.12.1" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/default" || rootFeatures' ? "garage/sqlite" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/r2d2" || rootFeatures' ? "garage_db/r2d2_sqlite" || rootFeatures' ? "garage_db/sqlite" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/sqlite" then "scheduled_thread_pool" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".scheduled-thread-pool."0.2.7" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".r2d2_sqlite."0.24.0" = overridableMkRustCrate (profileName: rec { + name = "r2d2_sqlite"; + version = "0.24.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "6a982edf65c129796dba72f8775b292ef482b40d035e827a9825b3bc07ccc5f2"; }; + dependencies = { + ${ if rootFeatures' ? "garage/default" || rootFeatures' ? "garage/sqlite" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/r2d2_sqlite" || rootFeatures' ? "garage_db/sqlite" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/sqlite" then "r2d2" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".r2d2."0.8.10" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/default" || rootFeatures' ? "garage/sqlite" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/r2d2_sqlite" || rootFeatures' ? "garage_db/sqlite" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/sqlite" then "rusqlite" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".rusqlite."0.31.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/default" || rootFeatures' ? "garage/sqlite" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/r2d2_sqlite" || rootFeatures' ? "garage_db/sqlite" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/sqlite" then "uuid" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".uuid."1.4.1" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".rand."0.8.5" = overridableMkRustCrate (profileName: rec { + name = "rand"; + version = "0.8.5"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"; }; + features = builtins.concatLists [ + [ "alloc" ] + [ "default" ] + [ "getrandom" ] + [ "libc" ] + [ "rand_chacha" ] + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "small_rng") + [ "std" ] + [ "std_rng" ] + ]; + dependencies = { + ${ if hostPlatform.isUnix then "libc" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }).out; + rand_chacha = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".rand_chacha."0.3.1" { inherit profileName; }).out; + rand_core = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".rand_core."0.6.4" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".rand_chacha."0.3.1" = overridableMkRustCrate (profileName: rec { + name = "rand_chacha"; + version = "0.3.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"; }; + features = builtins.concatLists [ + [ "std" ] + ]; + dependencies = { + ppv_lite86 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".ppv-lite86."0.2.17" { inherit profileName; }).out; + rand_core = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".rand_core."0.6.4" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".rand_core."0.6.4" = overridableMkRustCrate (profileName: rec { + name = "rand_core"; + version = "0.6.4"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"; }; + features = builtins.concatLists [ + [ "alloc" ] + [ "getrandom" ] + [ "std" ] + ]; + dependencies = { + getrandom = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".getrandom."0.2.12" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".redox_syscall."0.2.16" = overridableMkRustCrate (profileName: rec { + name = "redox_syscall"; + version = "0.2.16"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a"; }; + dependencies = { + bitflags = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bitflags."1.3.2" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".redox_syscall."0.4.1" = overridableMkRustCrate (profileName: rec { + name = "redox_syscall"; + version = "0.4.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa"; }; + dependencies = { + ${ if rootFeatures' ? "garage/default" || rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage/metrics" || rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/opentelemetry-prometheus" || rootFeatures' ? "garage/prometheus" || rootFeatures' ? "garage/sqlite" || rootFeatures' ? "garage/telemetry-otlp" || rootFeatures' ? "garage_api/metrics" || rootFeatures' ? "garage_api/opentelemetry-prometheus" || rootFeatures' ? "garage_api/prometheus" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/r2d2" || rootFeatures' ? "garage_db/r2d2_sqlite" || rootFeatures' ? "garage_db/sqlite" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/sqlite" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "bitflags" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bitflags."1.3.2" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".regex."1.10.3" = overridableMkRustCrate (profileName: rec { + name = "regex"; + version = "1.10.3"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15"; }; + features = builtins.concatLists [ + [ "default" ] + [ "perf" ] + [ "perf-backtrack" ] + [ "perf-cache" ] + [ "perf-dfa" ] + [ "perf-inline" ] + [ "perf-literal" ] + [ "perf-onepass" ] + [ "std" ] + [ "unicode" ] + [ "unicode-age" ] + [ "unicode-bool" ] + [ "unicode-case" ] + [ "unicode-gencat" ] + [ "unicode-perl" ] + [ "unicode-script" ] + [ "unicode-segment" ] + ]; + dependencies = { + aho_corasick = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aho-corasick."1.1.2" { inherit profileName; }).out; + memchr = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".memchr."2.7.1" { inherit profileName; }).out; + regex_automata = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".regex-automata."0.4.5" { inherit profileName; }).out; + regex_syntax = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".regex-syntax."0.8.2" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".regex-automata."0.1.10" = overridableMkRustCrate (profileName: rec { + name = "regex-automata"; + version = "0.1.10"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132"; }; + features = builtins.concatLists [ + [ "default" ] + [ "regex-syntax" ] + [ "std" ] + ]; + dependencies = { + regex_syntax = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".regex-syntax."0.6.29" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".regex-automata."0.4.5" = overridableMkRustCrate (profileName: rec { + name = "regex-automata"; + version = "0.4.5"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd"; }; + features = builtins.concatLists [ + [ "alloc" ] + [ "dfa-onepass" ] + [ "hybrid" ] + [ "meta" ] + [ "nfa-backtrack" ] + [ "nfa-pikevm" ] + [ "nfa-thompson" ] + [ "perf-inline" ] + [ "perf-literal" ] + [ "perf-literal-multisubstring" ] + [ "perf-literal-substring" ] + [ "std" ] + [ "syntax" ] + [ "unicode" ] + [ "unicode-age" ] + [ "unicode-bool" ] + [ "unicode-case" ] + [ "unicode-gencat" ] + [ "unicode-perl" ] + [ "unicode-script" ] + [ "unicode-segment" ] + [ "unicode-word-boundary" ] + ]; + dependencies = { + aho_corasick = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".aho-corasick."1.1.2" { inherit profileName; }).out; + memchr = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".memchr."2.7.1" { inherit profileName; }).out; + regex_syntax = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".regex-syntax."0.8.2" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".regex-lite."0.1.5" = overridableMkRustCrate (profileName: rec { + name = "regex-lite"; + version = "0.1.5"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "30b661b2f27137bdbc16f00eda72866a92bb28af1753ffbd56744fb6e2e9cd8e"; }; + features = builtins.concatLists [ + [ "default" ] + [ "std" ] + [ "string" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".regex-syntax."0.6.29" = overridableMkRustCrate (profileName: rec { + name = "regex-syntax"; + version = "0.6.29"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1"; }; + features = builtins.concatLists [ + [ "default" ] + [ "unicode" ] + [ "unicode-age" ] + [ "unicode-bool" ] + [ "unicode-case" ] + [ "unicode-gencat" ] + [ "unicode-perl" ] + [ "unicode-script" ] + [ "unicode-segment" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".regex-syntax."0.8.2" = overridableMkRustCrate (profileName: rec { + name = "regex-syntax"; + version = "0.8.2"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f"; }; + features = builtins.concatLists [ + [ "default" ] + [ "std" ] + [ "unicode" ] + [ "unicode-age" ] + [ "unicode-bool" ] + [ "unicode-case" ] + [ "unicode-gencat" ] + [ "unicode-perl" ] + [ "unicode-script" ] + [ "unicode-segment" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".reqwest."0.11.24" = overridableMkRustCrate (profileName: rec { + name = "reqwest"; + version = "0.11.24"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "c6920094eb85afde5e4a138be3f2de8bbdf28000f0029e72c45025a56b042251"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest") "__rustls") + (lib.optional (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest") "__tls") + (lib.optional (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest") "hyper-rustls") + (lib.optional (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest") "json") + (lib.optional (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest") "rustls") + (lib.optional (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest") "rustls-tls-manual-roots") + (lib.optional (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest") "serde_json") + (lib.optional (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest") "tokio-rustls") + ]; + dependencies = { + ${ if rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest" then "base64" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".base64."0.21.7" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest" then "bytes" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }).out; + ${ if (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest") && !(hostPlatform.parsed.cpu.name == "wasm32") then "encoding_rs" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".encoding_rs."0.8.33" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest" then "futures_core" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.30" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest" then "futures_util" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.30" { inherit profileName; }).out; + ${ if (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest") && !(hostPlatform.parsed.cpu.name == "wasm32") then "h2" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".h2."0.3.24" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest" then "http" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.11" { inherit profileName; }).out; + ${ if (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest") && !(hostPlatform.parsed.cpu.name == "wasm32") then "http_body" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".http-body."0.4.6" { inherit profileName; }).out; + ${ if (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest") && !(hostPlatform.parsed.cpu.name == "wasm32") then "hyper" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".hyper."0.14.28" { inherit profileName; }).out; + ${ if (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest") && !(hostPlatform.parsed.cpu.name == "wasm32") then "hyper_rustls" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".hyper-rustls."0.24.2" { inherit profileName; }).out; + ${ if (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest") && !(hostPlatform.parsed.cpu.name == "wasm32") then "ipnet" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".ipnet."2.9.0" { inherit profileName; }).out; + ${ if (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest") && hostPlatform.parsed.cpu.name == "wasm32" then "js_sys" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".js-sys."0.3.67" { inherit profileName; }).out; + ${ if (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest") && !(hostPlatform.parsed.cpu.name == "wasm32") then "log" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.20" { inherit profileName; }).out; + ${ if (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest") && !(hostPlatform.parsed.cpu.name == "wasm32") then "mime" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".mime."0.3.17" { inherit profileName; }).out; + ${ if (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest") && !(hostPlatform.parsed.cpu.name == "wasm32") then "once_cell" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.19.0" { inherit profileName; }).out; + ${ if (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest") && !(hostPlatform.parsed.cpu.name == "wasm32") then "percent_encoding" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".percent-encoding."2.3.1" { inherit profileName; }).out; + ${ if (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest") && !(hostPlatform.parsed.cpu.name == "wasm32") then "pin_project_lite" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.13" { inherit profileName; }).out; + ${ if (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest") && !(hostPlatform.parsed.cpu.name == "wasm32") then "rustls" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".rustls."0.21.10" { inherit profileName; }).out; + ${ if (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest") && !(hostPlatform.parsed.cpu.name == "wasm32") then "rustls_pemfile" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".rustls-pemfile."1.0.4" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest" then "serde" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest" then "serde_json" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_json."1.0.113" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest" then "serde_urlencoded" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_urlencoded."0.7.1" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest" then "sync_wrapper" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".sync_wrapper."0.1.2" { inherit profileName; }).out; + ${ if (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest") && hostPlatform.parsed.kernel.name == "darwin" then "system_configuration" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".system-configuration."0.5.1" { inherit profileName; }).out; + ${ if (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest") && !(hostPlatform.parsed.cpu.name == "wasm32") then "tokio" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }).out; + ${ if (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest") && !(hostPlatform.parsed.cpu.name == "wasm32") then "tokio_rustls" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-rustls."0.24.1" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest" then "tower_service" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tower-service."0.3.2" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest" then "url" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".url."2.5.0" { inherit profileName; }).out; + ${ if (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest") && hostPlatform.parsed.cpu.name == "wasm32" then "wasm_bindgen" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen."0.2.90" { inherit profileName; }).out; + ${ if (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest") && hostPlatform.parsed.cpu.name == "wasm32" then "wasm_bindgen_futures" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-futures."0.4.40" { inherit profileName; }).out; + ${ if (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest") && hostPlatform.parsed.cpu.name == "wasm32" then "web_sys" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".web-sys."0.3.67" { inherit profileName; }).out; + ${ if (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest") && hostPlatform.isWindows then "winreg" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".winreg."0.50.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".rfc6979."0.3.1" = overridableMkRustCrate (profileName: rec { + name = "rfc6979"; + version = "0.3.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb"; }; + dependencies = { + crypto_bigint = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".crypto-bigint."0.4.9" { inherit profileName; }).out; + hmac = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".hmac."0.12.1" { inherit profileName; }).out; + zeroize = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".zeroize."1.7.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".ring."0.17.7" = overridableMkRustCrate (profileName: rec { + name = "ring"; + version = "0.17.7"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74"; }; + features = builtins.concatLists [ + [ "alloc" ] + [ "default" ] + [ "dev_urandom_fallback" ] + ]; + dependencies = { + getrandom = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".getrandom."0.2.12" { inherit profileName; }).out; + ${ if (hostPlatform.parsed.kernel.name == "android" || hostPlatform.parsed.kernel.name == "linux") && (hostPlatform.parsed.cpu.name == "aarch64" || hostPlatform.parsed.cpu.name == "armv6l" || hostPlatform.parsed.cpu.name == "armv7l") then "libc" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }).out; + ${ if hostPlatform.parsed.cpu.name == "aarch64" || hostPlatform.parsed.cpu.name == "armv6l" || hostPlatform.parsed.cpu.name == "armv7l" || hostPlatform.parsed.cpu.name == "i686" || hostPlatform.parsed.cpu.name == "x86_64" then "spin" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".spin."0.9.8" { inherit profileName; }).out; + untrusted = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".untrusted."0.9.0" { inherit profileName; }).out; + ${ if hostPlatform.parsed.cpu.name == "aarch64" && hostPlatform.parsed.kernel.name == "windows" then "windows_sys" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows-sys."0.48.0" { inherit profileName; }).out; + }; + buildDependencies = { + cc = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".cc."1.0.83" { profileName = "__noProfile"; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".rmp."0.8.12" = overridableMkRustCrate (profileName: rec { + name = "rmp"; + version = "0.8.12"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "7f9860a6cc38ed1da53456442089b4dfa35e7cedaa326df63017af88385e6b20"; }; + features = builtins.concatLists [ + [ "default" ] + [ "std" ] + ]; + dependencies = { + byteorder = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".byteorder."1.5.0" { inherit profileName; }).out; + num_traits = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-traits."0.2.17" { inherit profileName; }).out; + paste = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".paste."1.0.14" { profileName = "__noProfile"; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".rmp-serde."1.1.2" = overridableMkRustCrate (profileName: rec { + name = "rmp-serde"; + version = "1.1.2"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "bffea85eea980d8a74453e5d02a8d93028f3c34725de143085a844ebe953258a"; }; + dependencies = { + byteorder = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".byteorder."1.5.0" { inherit profileName; }).out; + rmp = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".rmp."0.8.12" { inherit profileName; }).out; + serde = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".roxmltree."0.19.0" = overridableMkRustCrate (profileName: rec { + name = "roxmltree"; + version = "0.19.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "3cd14fd5e3b777a7422cca79358c57a8f6e3a703d9ac187448d0daf220c2407f"; }; + features = builtins.concatLists [ + [ "default" ] + [ "positions" ] + [ "std" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".rusqlite."0.31.0" = overridableMkRustCrate (profileName: rec { + name = "rusqlite"; + version = "0.31.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "b838eba278d213a8beaf485bd313fd580ca4505a00d5871caeb1457c55322cae"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/bundled-libs" || rootFeatures' ? "garage/default" || rootFeatures' ? "garage/sqlite" || rootFeatures' ? "garage_db/bundled-libs" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/rusqlite" || rootFeatures' ? "garage_db/sqlite" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/sqlite") "backup") + (lib.optional (rootFeatures' ? "garage/bundled-libs" || rootFeatures' ? "garage/default" || rootFeatures' ? "garage_db/bundled-libs") "bundled") + (lib.optional (rootFeatures' ? "garage/bundled-libs" || rootFeatures' ? "garage/default" || rootFeatures' ? "garage_db/bundled-libs") "modern_sqlite") + ]; + dependencies = { + ${ if rootFeatures' ? "garage/bundled-libs" || rootFeatures' ? "garage/default" || rootFeatures' ? "garage/sqlite" || rootFeatures' ? "garage_db/bundled-libs" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/r2d2_sqlite" || rootFeatures' ? "garage_db/rusqlite" || rootFeatures' ? "garage_db/sqlite" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/sqlite" then "bitflags" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bitflags."2.4.2" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/bundled-libs" || rootFeatures' ? "garage/default" || rootFeatures' ? "garage/sqlite" || rootFeatures' ? "garage_db/bundled-libs" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/r2d2_sqlite" || rootFeatures' ? "garage_db/rusqlite" || rootFeatures' ? "garage_db/sqlite" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/sqlite" then "fallible_iterator" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".fallible-iterator."0.3.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/bundled-libs" || rootFeatures' ? "garage/default" || rootFeatures' ? "garage/sqlite" || rootFeatures' ? "garage_db/bundled-libs" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/r2d2_sqlite" || rootFeatures' ? "garage_db/rusqlite" || rootFeatures' ? "garage_db/sqlite" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/sqlite" then "fallible_streaming_iterator" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".fallible-streaming-iterator."0.1.9" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/bundled-libs" || rootFeatures' ? "garage/default" || rootFeatures' ? "garage/sqlite" || rootFeatures' ? "garage_db/bundled-libs" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/r2d2_sqlite" || rootFeatures' ? "garage_db/rusqlite" || rootFeatures' ? "garage_db/sqlite" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/sqlite" then "hashlink" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".hashlink."0.9.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/bundled-libs" || rootFeatures' ? "garage/default" || rootFeatures' ? "garage/sqlite" || rootFeatures' ? "garage_db/bundled-libs" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/r2d2_sqlite" || rootFeatures' ? "garage_db/rusqlite" || rootFeatures' ? "garage_db/sqlite" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/sqlite" then "libsqlite3_sys" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libsqlite3-sys."0.28.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/bundled-libs" || rootFeatures' ? "garage/default" || rootFeatures' ? "garage/sqlite" || rootFeatures' ? "garage_db/bundled-libs" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/r2d2_sqlite" || rootFeatures' ? "garage_db/rusqlite" || rootFeatures' ? "garage_db/sqlite" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/sqlite" then "smallvec" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".smallvec."1.13.1" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".rustc-demangle."0.1.23" = overridableMkRustCrate (profileName: rec { + name = "rustc-demangle"; + version = "0.1.23"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".rustc_version."0.4.0" = overridableMkRustCrate (profileName: rec { + name = "rustc_version"; + version = "0.4.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366"; }; + dependencies = { + semver = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".semver."1.0.21" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".rustix."0.38.31" = overridableMkRustCrate (profileName: rec { + name = "rustix"; + version = "0.38.31"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "alloc") + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "default") + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "fs") + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "std") + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "use-libc-auxv") + ]; + dependencies = { + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "bitflags" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bitflags."2.4.2" { inherit profileName; }).out; + ${ if (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") && (hostPlatform.parsed.kernel.name == "linux" && hostPlatform.parsed.cpu.significantByte == "littleEndian" && (hostPlatform.parsed.cpu.name == "armv6l" || hostPlatform.parsed.cpu.name == "armv7l" || hostPlatform.parsed.cpu.name == "aarch64" && hostPlatform.parsed.cpu.bits == 64 || hostPlatform.parsed.cpu.name == "riscv64" || hostPlatform.parsed.cpu.name == "i686" || hostPlatform.parsed.cpu.name == "x86_64" && hostPlatform.parsed.cpu.bits == 64) || !hostPlatform.isWindows && !(hostPlatform.parsed.kernel.name == "linux" && hostPlatform.parsed.cpu.significantByte == "littleEndian" && (hostPlatform.parsed.cpu.name == "armv6l" || hostPlatform.parsed.cpu.name == "armv7l" || hostPlatform.parsed.cpu.name == "aarch64" && hostPlatform.parsed.cpu.bits == 64 || hostPlatform.parsed.cpu.name == "riscv64" || hostPlatform.parsed.cpu.name == "i686" || hostPlatform.parsed.cpu.name == "x86_64" && hostPlatform.parsed.cpu.bits == 64)) || hostPlatform.isWindows) then "libc_errno" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".errno."0.3.8" { inherit profileName; }).out; + ${ if (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") && (hostPlatform.parsed.kernel.name == "linux" && hostPlatform.parsed.cpu.significantByte == "littleEndian" && (hostPlatform.parsed.cpu.name == "armv6l" || hostPlatform.parsed.cpu.name == "armv7l" || hostPlatform.parsed.cpu.name == "aarch64" && hostPlatform.parsed.cpu.bits == 64 || hostPlatform.parsed.cpu.name == "riscv64" || hostPlatform.parsed.cpu.name == "i686" || hostPlatform.parsed.cpu.name == "x86_64" && hostPlatform.parsed.cpu.bits == 64) || !hostPlatform.isWindows && !(hostPlatform.parsed.kernel.name == "linux" && hostPlatform.parsed.cpu.significantByte == "littleEndian" && (hostPlatform.parsed.cpu.name == "armv6l" || hostPlatform.parsed.cpu.name == "armv7l" || hostPlatform.parsed.cpu.name == "aarch64" && hostPlatform.parsed.cpu.bits == 64 || hostPlatform.parsed.cpu.name == "riscv64" || hostPlatform.parsed.cpu.name == "i686" || hostPlatform.parsed.cpu.name == "x86_64" && hostPlatform.parsed.cpu.bits == 64))) then "libc" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }).out; + ${ if (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") && (hostPlatform.parsed.kernel.name == "linux" && hostPlatform.parsed.cpu.significantByte == "littleEndian" && (hostPlatform.parsed.cpu.name == "armv6l" || hostPlatform.parsed.cpu.name == "armv7l" || hostPlatform.parsed.cpu.name == "aarch64" && hostPlatform.parsed.cpu.bits == 64 || hostPlatform.parsed.cpu.name == "riscv64" || hostPlatform.parsed.cpu.name == "i686" || hostPlatform.parsed.cpu.name == "x86_64" && hostPlatform.parsed.cpu.bits == 64) || (hostPlatform.parsed.kernel.name == "android" || hostPlatform.parsed.kernel.name == "linux") && !(hostPlatform.parsed.kernel.name == "linux" && hostPlatform.parsed.cpu.significantByte == "littleEndian" && (hostPlatform.parsed.cpu.name == "armv6l" || hostPlatform.parsed.cpu.name == "armv7l" || hostPlatform.parsed.cpu.name == "aarch64" && hostPlatform.parsed.cpu.bits == 64 || hostPlatform.parsed.cpu.name == "riscv64" || hostPlatform.parsed.cpu.name == "i686" || hostPlatform.parsed.cpu.name == "x86_64" && hostPlatform.parsed.cpu.bits == 64))) then "linux_raw_sys" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".linux-raw-sys."0.4.13" { inherit profileName; }).out; + ${ if (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") && hostPlatform.isWindows then "windows_sys" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows-sys."0.52.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".rustls."0.21.10" = overridableMkRustCrate (profileName: rec { + name = "rustls"; + version = "0.21.10"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" || rootFeatures' ? "garage_rpc/reqwest") "dangerous_configuration") + [ "default" ] + [ "log" ] + [ "logging" ] + [ "tls12" ] + ]; + dependencies = { + log = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.20" { inherit profileName; }).out; + ring = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".ring."0.17.7" { inherit profileName; }).out; + webpki = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".rustls-webpki."0.101.7" { inherit profileName; }).out; + sct = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".sct."0.7.1" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".rustls."0.22.2" = overridableMkRustCrate (profileName: rec { + name = "rustls"; + version = "0.22.2"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "e87c9956bd9807afa1f77e0f7594af32566e830e088a5576d27c5b6f30f49d41"; }; + features = builtins.concatLists [ + [ "log" ] + [ "logging" ] + [ "ring" ] + [ "tls12" ] + ]; + dependencies = { + log = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.20" { inherit profileName; }).out; + ring = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".ring."0.17.7" { inherit profileName; }).out; + pki_types = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".rustls-pki-types."1.2.0" { inherit profileName; }).out; + webpki = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".rustls-webpki."0.102.2" { inherit profileName; }).out; + subtle = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".subtle."2.5.0" { inherit profileName; }).out; + zeroize = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".zeroize."1.7.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".rustls-native-certs."0.6.3" = overridableMkRustCrate (profileName: rec { + name = "rustls-native-certs"; + version = "0.6.3"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00"; }; + dependencies = { + ${ if hostPlatform.isUnix && !(hostPlatform.parsed.kernel.name == "darwin") then "openssl_probe" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".openssl-probe."0.1.5" { inherit profileName; }).out; + rustls_pemfile = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".rustls-pemfile."1.0.4" { inherit profileName; }).out; + ${ if hostPlatform.isWindows then "schannel" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".schannel."0.1.23" { inherit profileName; }).out; + ${ if hostPlatform.parsed.kernel.name == "darwin" then "security_framework" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".security-framework."2.9.2" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".rustls-native-certs."0.7.0" = overridableMkRustCrate (profileName: rec { + name = "rustls-native-certs"; + version = "0.7.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "8f1fb85efa936c42c6d5fc28d2629bb51e4b2f4b8a5211e297d599cc5a093792"; }; + dependencies = { + ${ if hostPlatform.isUnix && !(hostPlatform.parsed.kernel.name == "darwin") then "openssl_probe" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".openssl-probe."0.1.5" { inherit profileName; }).out; + rustls_pemfile = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".rustls-pemfile."2.0.0" { inherit profileName; }).out; + pki_types = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".rustls-pki-types."1.2.0" { inherit profileName; }).out; + ${ if hostPlatform.isWindows then "schannel" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".schannel."0.1.23" { inherit profileName; }).out; + ${ if hostPlatform.parsed.kernel.name == "darwin" then "security_framework" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".security-framework."2.9.2" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".rustls-pemfile."1.0.4" = overridableMkRustCrate (profileName: rec { + name = "rustls-pemfile"; + version = "1.0.4"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c"; }; + dependencies = { + base64 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".base64."0.21.7" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".rustls-pemfile."2.0.0" = overridableMkRustCrate (profileName: rec { + name = "rustls-pemfile"; + version = "2.0.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "35e4980fa29e4c4b212ffb3db068a564cbf560e51d3944b7c88bd8bf5bec64f4"; }; + features = builtins.concatLists [ + [ "default" ] + [ "std" ] + ]; + dependencies = { + base64 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".base64."0.21.7" { inherit profileName; }).out; + pki_types = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".rustls-pki-types."1.2.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".rustls-pki-types."1.2.0" = overridableMkRustCrate (profileName: rec { + name = "rustls-pki-types"; + version = "1.2.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "0a716eb65e3158e90e17cd93d855216e27bde02745ab842f2cab4a39dba1bacf"; }; + features = builtins.concatLists [ + [ "alloc" ] + [ "default" ] + [ "std" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".rustls-webpki."0.101.7" = overridableMkRustCrate (profileName: rec { + name = "rustls-webpki"; + version = "0.101.7"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765"; }; + features = builtins.concatLists [ + [ "alloc" ] + [ "default" ] + [ "std" ] + ]; + dependencies = { + ring = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".ring."0.17.7" { inherit profileName; }).out; + untrusted = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".untrusted."0.9.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".rustls-webpki."0.102.2" = overridableMkRustCrate (profileName: rec { + name = "rustls-webpki"; + version = "0.102.2"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "faaa0a62740bedb9b2ef5afa303da42764c012f743917351dc9a237ea1663610"; }; + features = builtins.concatLists [ + [ "alloc" ] + [ "ring" ] + [ "std" ] + ]; + dependencies = { + ring = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".ring."0.17.7" { inherit profileName; }).out; + pki_types = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".rustls-pki-types."1.2.0" { inherit profileName; }).out; + untrusted = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".untrusted."0.9.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".rustversion."1.0.14" = overridableMkRustCrate (profileName: rec { + name = "rustversion"; + version = "1.0.14"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".ryu."1.0.16" = overridableMkRustCrate (profileName: rec { + name = "ryu"; + version = "1.0.16"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".same-file."1.0.6" = overridableMkRustCrate (profileName: rec { + name = "same-file"; + version = "1.0.6"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"; }; + dependencies = { + ${ if hostPlatform.isWindows then "winapi_util" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".winapi-util."0.1.6" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".schannel."0.1.23" = overridableMkRustCrate (profileName: rec { + name = "schannel"; + version = "0.1.23"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534"; }; + dependencies = { + windows_sys = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows-sys."0.52.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".scheduled-thread-pool."0.2.7" = overridableMkRustCrate (profileName: rec { + name = "scheduled-thread-pool"; + version = "0.2.7"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "3cbc66816425a074528352f5789333ecff06ca41b36b0b0efdfbb29edc391a19"; }; + dependencies = { + ${ if rootFeatures' ? "garage/default" || rootFeatures' ? "garage/sqlite" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/r2d2" || rootFeatures' ? "garage_db/r2d2_sqlite" || rootFeatures' ? "garage_db/sqlite" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/sqlite" then "parking_lot" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".parking_lot."0.12.1" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".schemars."0.8.16" = overridableMkRustCrate (profileName: rec { + name = "schemars"; + version = "0.8.16"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "45a28f4c49489add4ce10783f7911893516f15afe45d015608d41faca6bc4d29"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" || rootFeatures' ? "garage_rpc/schemars") "default") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" || rootFeatures' ? "garage_rpc/schemars") "derive") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" || rootFeatures' ? "garage_rpc/schemars") "schemars_derive") + ]; + dependencies = { + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" || rootFeatures' ? "garage_rpc/schemars" then "dyn_clone" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".dyn-clone."1.0.16" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" || rootFeatures' ? "garage_rpc/schemars" then "schemars_derive" else null } = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".schemars_derive."0.8.16" { profileName = "__noProfile"; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" || rootFeatures' ? "garage_rpc/schemars" then "serde" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" || rootFeatures' ? "garage_rpc/schemars" then "serde_json" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_json."1.0.113" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".schemars_derive."0.8.16" = overridableMkRustCrate (profileName: rec { + name = "schemars_derive"; + version = "0.8.16"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "c767fd6fa65d9ccf9cf026122c1b555f2ef9a4f0cea69da4d7dbc3e258d30967"; }; + dependencies = { + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" || rootFeatures' ? "garage_rpc/schemars" then "proc_macro2" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" || rootFeatures' ? "garage_rpc/schemars" then "quote" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" || rootFeatures' ? "garage_rpc/schemars" then "serde_derive_internals" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_derive_internals."0.26.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" || rootFeatures' ? "garage_rpc/schemars" then "syn" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.109" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".scopeguard."1.2.0" = overridableMkRustCrate (profileName: rec { + name = "scopeguard"; + version = "1.2.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".sct."0.7.1" = overridableMkRustCrate (profileName: rec { + name = "sct"; + version = "0.7.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414"; }; + dependencies = { + ring = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".ring."0.17.7" { inherit profileName; }).out; + untrusted = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".untrusted."0.9.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".sec1."0.3.0" = overridableMkRustCrate (profileName: rec { + name = "sec1"; + version = "0.3.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928"; }; + features = builtins.concatLists [ + [ "alloc" ] + [ "base16ct" ] + [ "default" ] + [ "der" ] + [ "generic-array" ] + [ "pkcs8" ] + [ "point" ] + [ "subtle" ] + [ "zeroize" ] + ]; + dependencies = { + base16ct = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".base16ct."0.1.1" { inherit profileName; }).out; + der = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".der."0.6.1" { inherit profileName; }).out; + generic_array = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".generic-array."0.14.7" { inherit profileName; }).out; + pkcs8 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".pkcs8."0.9.0" { inherit profileName; }).out; + subtle = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".subtle."2.5.0" { inherit profileName; }).out; + zeroize = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".zeroize."1.7.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".secrecy."0.8.0" = overridableMkRustCrate (profileName: rec { + name = "secrecy"; + version = "0.8.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "9bd1c54ea06cfd2f6b63219704de0b9b4f72dcc2b8fdef820be6cd799780e91e"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "alloc") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "default") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "serde") + ]; + dependencies = { + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "serde" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "zeroize" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".zeroize."1.7.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".security-framework."2.9.2" = overridableMkRustCrate (profileName: rec { + name = "security-framework"; + version = "2.9.2"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de"; }; + features = builtins.concatLists [ + [ "OSX_10_9" ] + [ "default" ] + ]; + dependencies = { + bitflags = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bitflags."1.3.2" { inherit profileName; }).out; + core_foundation = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".core-foundation."0.9.4" { inherit profileName; }).out; + core_foundation_sys = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".core-foundation-sys."0.8.6" { inherit profileName; }).out; + libc = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }).out; + security_framework_sys = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".security-framework-sys."2.9.1" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".security-framework-sys."2.9.1" = overridableMkRustCrate (profileName: rec { + name = "security-framework-sys"; + version = "2.9.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a"; }; + features = builtins.concatLists [ + [ "OSX_10_9" ] + ]; + dependencies = { + core_foundation_sys = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".core-foundation-sys."0.8.6" { inherit profileName; }).out; + libc = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".semver."1.0.21" = overridableMkRustCrate (profileName: rec { + name = "semver"; + version = "1.0.21"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0"; }; + features = builtins.concatLists [ + [ "default" ] + [ "std" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" = overridableMkRustCrate (profileName: rec { + name = "serde"; + version = "1.0.196"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32"; }; + features = builtins.concatLists [ + [ "alloc" ] + [ "default" ] + [ "derive" ] + [ "rc" ] + [ "serde_derive" ] + [ "std" ] + ]; + dependencies = { + serde_derive = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_derive."1.0.196" { profileName = "__noProfile"; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".serde-value."0.7.0" = overridableMkRustCrate (profileName: rec { + name = "serde-value"; + version = "0.7.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "f3a1a3341211875ef120e117ea7fd5228530ae7e7036a779fdc9117be6b3282c"; }; + dependencies = { + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/k8s-openapi" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "ordered_float" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".ordered-float."2.10.1" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/k8s-openapi" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "serde" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".serde_bytes."0.11.14" = overridableMkRustCrate (profileName: rec { + name = "serde_bytes"; + version = "0.11.14"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "8b8497c313fd43ab992087548117643f6fcd935cbf36f176ffda0aacf9591734"; }; + features = builtins.concatLists [ + [ "default" ] + [ "std" ] + ]; + dependencies = { + serde = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".serde_derive."1.0.196" = overridableMkRustCrate (profileName: rec { + name = "serde_derive"; + version = "1.0.196"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67"; }; + features = builtins.concatLists [ + [ "default" ] + ]; + dependencies = { + proc_macro2 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }).out; + quote = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }).out; + syn = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."2.0.48" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".serde_derive_internals."0.26.0" = overridableMkRustCrate (profileName: rec { + name = "serde_derive_internals"; + version = "0.26.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c"; }; + dependencies = { + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" || rootFeatures' ? "garage_rpc/schemars" then "proc_macro2" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" || rootFeatures' ? "garage_rpc/schemars" then "quote" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" || rootFeatures' ? "garage_rpc/schemars" then "syn" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.109" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".serde_json."1.0.113" = overridableMkRustCrate (profileName: rec { + name = "serde_json"; + version = "1.0.113"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "69801b70b1c3dac963ecb03a364ba0ceda9cf60c71cfe475e99864759c8b8a79"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/k8s-openapi" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "alloc") + [ "default" ] + [ "std" ] + ]; + dependencies = { + itoa = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".itoa."1.0.10" { inherit profileName; }).out; + ryu = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".ryu."1.0.16" { inherit profileName; }).out; + serde = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".serde_spanned."0.6.5" = overridableMkRustCrate (profileName: rec { + name = "serde_spanned"; + version = "0.6.5"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1"; }; + features = builtins.concatLists [ + [ "serde" ] + ]; + dependencies = { + serde = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".serde_urlencoded."0.7.1" = overridableMkRustCrate (profileName: rec { + name = "serde_urlencoded"; + version = "0.7.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd"; }; + dependencies = { + ${ if rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest" then "form_urlencoded" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".form_urlencoded."1.2.1" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest" then "itoa" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".itoa."1.0.10" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest" then "ryu" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".ryu."1.0.16" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest" then "serde" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".serde_yaml."0.9.31" = overridableMkRustCrate (profileName: rec { + name = "serde_yaml"; + version = "0.9.31"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "adf8a49373e98a4c5f0ceb5d05aa7c648d75f63774981ed95b7c7443bbd50c6e"; }; + dependencies = { + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "indexmap" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".indexmap."2.2.2" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "itoa" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".itoa."1.0.10" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "ryu" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".ryu."1.0.16" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "serde" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "unsafe_libyaml" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".unsafe-libyaml."0.2.10" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".sha1."0.10.6" = overridableMkRustCrate (profileName: rec { + name = "sha1"; + version = "0.10.6"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba"; }; + features = builtins.concatLists [ + [ "default" ] + [ "std" ] + ]; + dependencies = { + cfg_if = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."1.0.0" { inherit profileName; }).out; + ${ if hostPlatform.parsed.cpu.name == "aarch64" || hostPlatform.parsed.cpu.name == "i686" || hostPlatform.parsed.cpu.name == "x86_64" then "cpufeatures" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".cpufeatures."0.2.12" { inherit profileName; }).out; + digest = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".digest."0.10.7" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".sha2."0.10.8" = overridableMkRustCrate (profileName: rec { + name = "sha2"; + version = "0.10.8"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8"; }; + features = builtins.concatLists [ + [ "default" ] + [ "std" ] + ]; + dependencies = { + cfg_if = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."1.0.0" { inherit profileName; }).out; + ${ if hostPlatform.parsed.cpu.name == "aarch64" || hostPlatform.parsed.cpu.name == "x86_64" || hostPlatform.parsed.cpu.name == "i686" then "cpufeatures" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".cpufeatures."0.2.12" { inherit profileName; }).out; + digest = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".digest."0.10.7" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".sharded-slab."0.1.7" = overridableMkRustCrate (profileName: rec { + name = "sharded-slab"; + version = "0.1.7"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6"; }; + dependencies = { + lazy_static = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".lazy_static."1.4.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".signal-hook-registry."1.4.1" = overridableMkRustCrate (profileName: rec { + name = "signal-hook-registry"; + version = "1.4.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1"; }; + dependencies = { + libc = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".signature."1.6.4" = overridableMkRustCrate (profileName: rec { + name = "signature"; + version = "1.6.4"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c"; }; + features = builtins.concatLists [ + [ "digest" ] + [ "digest-preview" ] + [ "hazmat-preview" ] + [ "rand-preview" ] + [ "rand_core" ] + [ "std" ] + ]; + dependencies = { + digest = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".digest."0.10.7" { inherit profileName; }).out; + rand_core = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".rand_core."0.6.4" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".slab."0.4.9" = overridableMkRustCrate (profileName: rec { + name = "slab"; + version = "0.4.9"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67"; }; + features = builtins.concatLists [ + [ "default" ] + [ "std" ] + ]; + buildDependencies = { + autocfg = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".autocfg."1.1.0" { profileName = "__noProfile"; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".smallvec."1.13.1" = overridableMkRustCrate (profileName: rec { + name = "smallvec"; + version = "1.13.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".socket2."0.5.5" = overridableMkRustCrate (profileName: rec { + name = "socket2"; + version = "0.5.5"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9"; }; + features = builtins.concatLists [ + [ "all" ] + ]; + dependencies = { + ${ if hostPlatform.isUnix then "libc" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }).out; + ${ if hostPlatform.isWindows then "windows_sys" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows-sys."0.48.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".spin."0.9.8" = overridableMkRustCrate (profileName: rec { + name = "spin"; + version = "0.9.8"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67"; }; + features = builtins.concatLists [ + [ "mutex" ] + [ "once" ] + [ "spin_mutex" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".spki."0.6.0" = overridableMkRustCrate (profileName: rec { + name = "spki"; + version = "0.6.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b"; }; + features = builtins.concatLists [ + [ "alloc" ] + [ "base64ct" ] + ]; + dependencies = { + base64ct = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".base64ct."1.6.0" { inherit profileName; }).out; + der = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".der."0.6.1" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".static_init."1.0.3" = overridableMkRustCrate (profileName: rec { + name = "static_init"; + version = "1.0.3"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "8a2a1c578e98c1c16fc3b8ec1328f7659a500737d7a0c6d625e73e830ff9c1f6"; }; + features = builtins.concatLists [ + [ "default" ] + ]; + dependencies = { + bitflags = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bitflags."1.3.2" { inherit profileName; }).out; + ${ if hostPlatform.parsed.kernel.name == "android" || hostPlatform.parsed.kernel.name == "linux" then "libc" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }).out; + ${ if !(hostPlatform.parsed.kernel.name == "linux" || hostPlatform.parsed.kernel.name == "android") then "parking_lot" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".parking_lot."0.11.2" { inherit profileName; }).out; + ${ if !(hostPlatform.parsed.kernel.name == "linux" || hostPlatform.parsed.kernel.name == "android") then "parking_lot_core" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".parking_lot_core."0.8.6" { inherit profileName; }).out; + static_init_macro = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".static_init_macro."1.0.2" { profileName = "__noProfile"; }).out; + ${ if hostPlatform.parsed.kernel.name == "windows" then "winapi" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".winapi."0.3.9" { inherit profileName; }).out; + }; + buildDependencies = { + cfg_aliases = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg_aliases."0.1.1" { profileName = "__noProfile"; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".static_init_macro."1.0.2" = overridableMkRustCrate (profileName: rec { + name = "static_init_macro"; + version = "1.0.2"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "70a2595fc3aa78f2d0e45dd425b22282dd863273761cc77780914b2cf3003acf"; }; + dependencies = { + memchr = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".memchr."2.7.1" { inherit profileName; }).out; + proc_macro2 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }).out; + quote = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }).out; + syn = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.109" { inherit profileName; }).out; + }; + buildDependencies = { + cfg_aliases = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg_aliases."0.1.1" { profileName = "__noProfile"; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".strsim."0.10.0" = overridableMkRustCrate (profileName: rec { + name = "strsim"; + version = "0.10.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".structopt."0.3.26" = overridableMkRustCrate (profileName: rec { + name = "structopt"; + version = "0.3.26"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "0c6b5c64445ba8094a6ab0c3cd2ad323e07171012d9c98b0b15651daf1787a10"; }; + dependencies = { + clap = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".clap."2.34.0" { inherit profileName; }).out; + lazy_static = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".lazy_static."1.4.0" { inherit profileName; }).out; + structopt_derive = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".structopt-derive."0.4.18" { profileName = "__noProfile"; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".structopt-derive."0.4.18" = overridableMkRustCrate (profileName: rec { + name = "structopt-derive"; + version = "0.4.18"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "dcb5ae327f9cc13b68763b5749770cb9e048a99bd9dfdfa58d0cf05d5f64afe0"; }; + dependencies = { + heck = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".heck."0.3.3" { inherit profileName; }).out; + proc_macro_error = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro-error."1.0.4" { inherit profileName; }).out; + proc_macro2 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }).out; + quote = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }).out; + syn = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.109" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".subtle."2.5.0" = overridableMkRustCrate (profileName: rec { + name = "subtle"; + version = "2.5.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc"; }; + features = builtins.concatLists [ + [ "default" ] + [ "i128" ] + [ "std" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".syn."1.0.109" = overridableMkRustCrate (profileName: rec { + name = "syn"; + version = "1.0.109"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"; }; + features = builtins.concatLists [ + [ "clone-impls" ] + [ "default" ] + [ "derive" ] + [ "extra-traits" ] + [ "full" ] + [ "parsing" ] + [ "printing" ] + [ "proc-macro" ] + [ "quote" ] + [ "visit" ] + ]; + dependencies = { + proc_macro2 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }).out; + quote = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }).out; + unicode_ident = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".unicode-ident."1.0.12" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".syn."2.0.48" = overridableMkRustCrate (profileName: rec { + name = "syn"; + version = "2.0.48"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f"; }; + features = builtins.concatLists [ + [ "clone-impls" ] + [ "default" ] + [ "derive" ] + [ "extra-traits" ] + [ "full" ] + [ "parsing" ] + [ "printing" ] + [ "proc-macro" ] + [ "quote" ] + [ "visit" ] + [ "visit-mut" ] + ]; + dependencies = { + proc_macro2 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }).out; + quote = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }).out; + unicode_ident = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".unicode-ident."1.0.12" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".sync_wrapper."0.1.2" = overridableMkRustCrate (profileName: rec { + name = "sync_wrapper"; + version = "0.1.2"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".synchronoise."1.0.1" = overridableMkRustCrate (profileName: rec { + name = "synchronoise"; + version = "1.0.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "3dbc01390fc626ce8d1cffe3376ded2b72a11bb70e1c75f404a210e4daa4def2"; }; + dependencies = { + ${ if rootFeatures' ? "garage/default" || rootFeatures' ? "garage/lmdb" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/heed" || rootFeatures' ? "garage_db/lmdb" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/lmdb" then "crossbeam_queue" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".crossbeam-queue."0.3.11" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".synstructure."0.12.6" = overridableMkRustCrate (profileName: rec { + name = "synstructure"; + version = "0.12.6"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f"; }; + features = builtins.concatLists [ + [ "default" ] + [ "proc-macro" ] + ]; + dependencies = { + proc_macro2 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }).out; + quote = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }).out; + syn = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.109" { inherit profileName; }).out; + unicode_xid = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".unicode-xid."0.2.4" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".syslog-tracing."0.3.0" = overridableMkRustCrate (profileName: rec { + name = "syslog-tracing"; + version = "0.3.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "340b1540dcdb6b066bc2966e7974f977ab1a38f21b2be189014ffb0cc2405768"; }; + dependencies = { + ${ if rootFeatures' ? "garage/syslog" || rootFeatures' ? "garage/syslog-tracing" then "libc" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/syslog" || rootFeatures' ? "garage/syslog-tracing" then "tracing_core" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing-core."0.1.32" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/syslog" || rootFeatures' ? "garage/syslog-tracing" then "tracing_subscriber" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing-subscriber."0.3.18" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".system-configuration."0.5.1" = overridableMkRustCrate (profileName: rec { + name = "system-configuration"; + version = "0.5.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7"; }; + dependencies = { + ${ if rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest" then "bitflags" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bitflags."1.3.2" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest" then "core_foundation" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".core-foundation."0.9.4" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest" then "system_configuration_sys" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".system-configuration-sys."0.5.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".system-configuration-sys."0.5.0" = overridableMkRustCrate (profileName: rec { + name = "system-configuration-sys"; + version = "0.5.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9"; }; + dependencies = { + ${ if rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest" then "core_foundation_sys" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".core-foundation-sys."0.8.6" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest" then "libc" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".tempfile."3.9.0" = overridableMkRustCrate (profileName: rec { + name = "tempfile"; + version = "3.9.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "01ce4141aa927a6d1bd34a041795abd0db1cccba5d5f24b009f694bdf3a1f3fa"; }; + dependencies = { + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "cfg_if" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."1.0.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "fastrand" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".fastrand."2.0.1" { inherit profileName; }).out; + ${ if (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") && hostPlatform.parsed.kernel.name == "redox" then "syscall" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".redox_syscall."0.4.1" { inherit profileName; }).out; + ${ if (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") && (hostPlatform.isUnix || hostPlatform.parsed.kernel.name == "wasi") then "rustix" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".rustix."0.38.31" { inherit profileName; }).out; + ${ if (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") && hostPlatform.isWindows then "windows_sys" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows-sys."0.52.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".termcolor."1.4.1" = overridableMkRustCrate (profileName: rec { + name = "termcolor"; + version = "1.4.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755"; }; + dependencies = { + ${ if hostPlatform.isWindows then "winapi_util" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".winapi-util."0.1.6" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".textwrap."0.11.0" = overridableMkRustCrate (profileName: rec { + name = "textwrap"; + version = "0.11.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060"; }; + dependencies = { + unicode_width = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".unicode-width."0.1.11" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".thiserror."1.0.56" = overridableMkRustCrate (profileName: rec { + name = "thiserror"; + version = "1.0.56"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "d54378c645627613241d077a3a79db965db602882668f9136ac42af9ecb730ad"; }; + dependencies = { + thiserror_impl = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".thiserror-impl."1.0.56" { profileName = "__noProfile"; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".thiserror-impl."1.0.56" = overridableMkRustCrate (profileName: rec { + name = "thiserror-impl"; + version = "1.0.56"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471"; }; + dependencies = { + proc_macro2 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }).out; + quote = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }).out; + syn = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."2.0.48" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".thread_local."1.1.7" = overridableMkRustCrate (profileName: rec { + name = "thread_local"; + version = "1.1.7"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152"; }; + dependencies = { + cfg_if = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."1.0.0" { inherit profileName; }).out; + once_cell = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.19.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".time."0.3.34" = overridableMkRustCrate (profileName: rec { + name = "time"; + version = "0.3.34"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749"; }; + features = builtins.concatLists [ + [ "alloc" ] + [ "default" ] + [ "parsing" ] + [ "std" ] + ]; + dependencies = { + deranged = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".deranged."0.3.11" { inherit profileName; }).out; + num_conv = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-conv."0.1.0" { inherit profileName; }).out; + powerfmt = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".powerfmt."0.2.0" { inherit profileName; }).out; + serde = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }).out; + time_core = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".time-core."0.1.2" { inherit profileName; }).out; + time_macros = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".time-macros."0.2.17" { profileName = "__noProfile"; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".time-core."0.1.2" = overridableMkRustCrate (profileName: rec { + name = "time-core"; + version = "0.1.2"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".time-macros."0.2.17" = overridableMkRustCrate (profileName: rec { + name = "time-macros"; + version = "0.2.17"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774"; }; + features = builtins.concatLists [ + [ "parsing" ] + ]; + dependencies = { + num_conv = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".num-conv."0.1.0" { inherit profileName; }).out; + time_core = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".time-core."0.1.2" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".timeago."0.4.2" = overridableMkRustCrate (profileName: rec { + name = "timeago"; + version = "0.4.2"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "a1710e589de0a76aaf295cd47a6699f6405737dbfd3cf2b75c92d000b548d0e6"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".tinyvec."1.6.0" = overridableMkRustCrate (profileName: rec { + name = "tinyvec"; + version = "1.6.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50"; }; + features = builtins.concatLists [ + [ "alloc" ] + [ "default" ] + [ "tinyvec_macros" ] + ]; + dependencies = { + tinyvec_macros = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tinyvec_macros."0.1.1" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".tinyvec_macros."0.1.1" = overridableMkRustCrate (profileName: rec { + name = "tinyvec_macros"; + version = "0.1.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" = overridableMkRustCrate (profileName: rec { + name = "tokio"; + version = "1.36.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931"; }; + features = builtins.concatLists [ + [ "bytes" ] + [ "default" ] + [ "fs" ] + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "full") + [ "io-std" ] + [ "io-util" ] + [ "libc" ] + [ "macros" ] + [ "mio" ] + [ "net" ] + [ "num_cpus" ] + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "parking_lot") + [ "process" ] + [ "rt" ] + [ "rt-multi-thread" ] + [ "signal" ] + [ "signal-hook-registry" ] + [ "socket2" ] + [ "sync" ] + [ "time" ] + [ "tokio-macros" ] + [ "windows-sys" ] + ]; + dependencies = { + ${ if false then "backtrace" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".backtrace."0.3.69" { inherit profileName; }).out; + bytes = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }).out; + ${ if hostPlatform.isUnix then "libc" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.153" { inherit profileName; }).out; + mio = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".mio."0.8.10" { inherit profileName; }).out; + num_cpus = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".num_cpus."1.16.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "parking_lot" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".parking_lot."0.12.1" { inherit profileName; }).out; + pin_project_lite = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.13" { inherit profileName; }).out; + ${ if hostPlatform.isUnix then "signal_hook_registry" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".signal-hook-registry."1.4.1" { inherit profileName; }).out; + socket2 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".socket2."0.5.5" { inherit profileName; }).out; + tokio_macros = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-macros."2.2.0" { profileName = "__noProfile"; }).out; + ${ if hostPlatform.isWindows then "windows_sys" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows-sys."0.48.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".tokio-io-timeout."1.2.0" = overridableMkRustCrate (profileName: rec { + name = "tokio-io-timeout"; + version = "1.2.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf"; }; + dependencies = { + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "pin_project_lite" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.13" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "tokio" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".tokio-macros."2.2.0" = overridableMkRustCrate (profileName: rec { + name = "tokio-macros"; + version = "2.2.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b"; }; + dependencies = { + proc_macro2 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }).out; + quote = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }).out; + syn = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."2.0.48" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".tokio-rustls."0.24.1" = overridableMkRustCrate (profileName: rec { + name = "tokio-rustls"; + version = "0.24.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest") "default") + [ "logging" ] + [ "tls12" ] + ]; + dependencies = { + rustls = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".rustls."0.21.10" { inherit profileName; }).out; + tokio = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".tokio-rustls."0.25.0" = overridableMkRustCrate (profileName: rec { + name = "tokio-rustls"; + version = "0.25.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f"; }; + features = builtins.concatLists [ + [ "logging" ] + [ "tls12" ] + ]; + dependencies = { + rustls = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".rustls."0.22.2" { inherit profileName; }).out; + pki_types = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".rustls-pki-types."1.2.0" { inherit profileName; }).out; + tokio = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".tokio-stream."0.1.14" = overridableMkRustCrate (profileName: rec { + name = "tokio-stream"; + version = "0.1.14"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842"; }; + features = builtins.concatLists [ + [ "default" ] + [ "net" ] + [ "time" ] + ]; + dependencies = { + futures_core = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.30" { inherit profileName; }).out; + pin_project_lite = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.13" { inherit profileName; }).out; + tokio = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".tokio-util."0.6.10" = overridableMkRustCrate (profileName: rec { + name = "tokio-util"; + version = "0.6.10"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "36943ee01a6d67977dd3f84a5a1d2efeb4ada3a1ae771cadfaa535d9d9fc6507"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "codec") + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "default") + ]; + dependencies = { + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "bytes" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "futures_core" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.30" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "futures_sink" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-sink."0.3.30" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "log" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.20" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "pin_project_lite" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.13" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "tokio" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".tokio-util."0.7.10" = overridableMkRustCrate (profileName: rec { + name = "tokio-util"; + version = "0.7.10"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15"; }; + features = builtins.concatLists [ + [ "codec" ] + [ "compat" ] + [ "default" ] + [ "futures-io" ] + [ "io" ] + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "slab") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "time") + [ "tracing" ] + ]; + dependencies = { + bytes = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }).out; + futures_core = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.30" { inherit profileName; }).out; + futures_io = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-io."0.3.30" { inherit profileName; }).out; + futures_sink = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-sink."0.3.30" { inherit profileName; }).out; + pin_project_lite = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.13" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "slab" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".slab."0.4.9" { inherit profileName; }).out; + tokio = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }).out; + tracing = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".toml."0.8.10" = overridableMkRustCrate (profileName: rec { + name = "toml"; + version = "0.8.10"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "9a9aad4a3066010876e8dcf5a8a06e70a558751117a145c6ce2b82c2e2054290"; }; + features = builtins.concatLists [ + [ "parse" ] + ]; + dependencies = { + serde = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }).out; + serde_spanned = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_spanned."0.6.5" { inherit profileName; }).out; + toml_datetime = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".toml_datetime."0.6.5" { inherit profileName; }).out; + toml_edit = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".toml_edit."0.22.5" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".toml_datetime."0.6.5" = overridableMkRustCrate (profileName: rec { + name = "toml_datetime"; + version = "0.6.5"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1"; }; + features = builtins.concatLists [ + [ "serde" ] + ]; + dependencies = { + serde = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".toml_edit."0.22.5" = overridableMkRustCrate (profileName: rec { + name = "toml_edit"; + version = "0.22.5"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "99e68c159e8f5ba8a28c4eb7b0c0c190d77bb479047ca713270048145a9ad28a"; }; + features = builtins.concatLists [ + [ "parse" ] + [ "serde" ] + ]; + dependencies = { + indexmap = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".indexmap."2.2.2" { inherit profileName; }).out; + serde = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde."1.0.196" { inherit profileName; }).out; + serde_spanned = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_spanned."0.6.5" { inherit profileName; }).out; + toml_datetime = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".toml_datetime."0.6.5" { inherit profileName; }).out; + winnow = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".winnow."0.6.1" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".tonic."0.6.2" = overridableMkRustCrate (profileName: rec { + name = "tonic"; + version = "0.6.2"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "ff08f4649d10a70ffa3522ca559031285d8e421d727ac85c60825761818f5d0a"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "async-trait") + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "codegen") + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "default") + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "h2") + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "hyper") + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "hyper-timeout") + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "prost") + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "prost-derive") + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "prost1") + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "tokio") + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "tower") + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "tracing-futures") + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "transport") + ]; + dependencies = { + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "async_stream" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".async-stream."0.3.5" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "async_trait" else null } = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".async-trait."0.1.77" { profileName = "__noProfile"; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "base64" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".base64."0.13.1" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "bytes" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "futures_core" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.30" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "futures_util" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.30" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "h2" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".h2."0.3.24" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "http" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.11" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "http_body" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".http-body."0.4.6" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "hyper" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".hyper."0.14.28" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "hyper_timeout" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".hyper-timeout."0.4.1" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "percent_encoding" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".percent-encoding."2.3.1" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "pin_project" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project."1.1.4" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "prost1" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".prost."0.9.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "prost_derive" else null } = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".prost-derive."0.9.0" { profileName = "__noProfile"; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "tokio" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "tokio_stream" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-stream."0.1.14" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "tokio_util" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-util."0.6.10" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "tower" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tower."0.4.13" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "tower_layer" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tower-layer."0.3.2" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "tower_service" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tower-service."0.3.2" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "tracing" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "tracing_futures" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing-futures."0.2.5" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".tonic-build."0.6.2" = overridableMkRustCrate (profileName: rec { + name = "tonic-build"; + version = "0.6.2"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "9403f1bafde247186684b230dc6f38b5cd514584e8bec1dd32514be4745fa757"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "prost") + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "prost-build") + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "transport") + ]; + dependencies = { + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "proc_macro2" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "prost_build" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".prost-build."0.9.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "quote" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "syn" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."1.0.109" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".tower."0.4.13" = overridableMkRustCrate (profileName: rec { + name = "tower"; + version = "0.4.13"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c"; }; + features = builtins.concatLists [ + [ "__common" ] + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "balance") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "buffer") + [ "default" ] + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "discover") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "filter") + [ "futures-core" ] + [ "futures-util" ] + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "indexmap") + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "limit") + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "load") + [ "log" ] + [ "make" ] + [ "pin-project" ] + [ "pin-project-lite" ] + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "rand") + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "ready-cache") + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "slab") + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "timeout") + [ "tokio" ] + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "tokio-util") + [ "tracing" ] + [ "util" ] + ]; + dependencies = { + futures_core = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.30" { inherit profileName; }).out; + futures_util = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.30" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "indexmap" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".indexmap."1.9.3" { inherit profileName; }).out; + pin_project = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project."1.1.4" { inherit profileName; }).out; + pin_project_lite = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.13" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "rand" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".rand."0.8.5" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "slab" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".slab."0.4.9" { inherit profileName; }).out; + tokio = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.36.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "tokio_util" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-util."0.7.10" { inherit profileName; }).out; + tower_layer = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tower-layer."0.3.2" { inherit profileName; }).out; + tower_service = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tower-service."0.3.2" { inherit profileName; }).out; + tracing = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".tower-http."0.4.4" = overridableMkRustCrate (profileName: rec { + name = "tower-http"; + version = "0.4.4"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "auth") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "base64") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "default") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "map-response-body") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "mime") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "trace") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "tracing") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "validate-request") + ]; + dependencies = { + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "base64" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".base64."0.21.7" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "bitflags" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bitflags."2.4.2" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "bytes" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bytes."1.5.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "futures_core" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-core."0.3.30" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "futures_util" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.30" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "http" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."0.2.11" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "http_body" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".http-body."0.4.6" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "http_range_header" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".http-range-header."0.3.1" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "mime" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".mime."0.3.17" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "pin_project_lite" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.13" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "tower_layer" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tower-layer."0.3.2" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "tower_service" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tower-service."0.3.2" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "tracing" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".tower-layer."0.3.2" = overridableMkRustCrate (profileName: rec { + name = "tower-layer"; + version = "0.3.2"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".tower-service."0.3.2" = overridableMkRustCrate (profileName: rec { + name = "tower-service"; + version = "0.3.2"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" = overridableMkRustCrate (profileName: rec { + name = "tracing"; + version = "0.1.40"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef"; }; + features = builtins.concatLists [ + [ "attributes" ] + [ "default" ] + [ "log" ] + [ "std" ] + [ "tracing-attributes" ] + ]; + dependencies = { + log = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.20" { inherit profileName; }).out; + pin_project_lite = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project-lite."0.2.13" { inherit profileName; }).out; + tracing_attributes = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing-attributes."0.1.27" { profileName = "__noProfile"; }).out; + tracing_core = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing-core."0.1.32" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".tracing-attributes."0.1.27" = overridableMkRustCrate (profileName: rec { + name = "tracing-attributes"; + version = "0.1.27"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"; }; + dependencies = { + proc_macro2 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }).out; + quote = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }).out; + syn = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."2.0.48" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".tracing-core."0.1.32" = overridableMkRustCrate (profileName: rec { + name = "tracing-core"; + version = "0.1.32"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54"; }; + features = builtins.concatLists [ + [ "default" ] + [ "once_cell" ] + [ "std" ] + [ "valuable" ] + ]; + dependencies = { + once_cell = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.19.0" { inherit profileName; }).out; + ${ if false then "valuable" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".valuable."0.1.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".tracing-futures."0.2.5" = overridableMkRustCrate (profileName: rec { + name = "tracing-futures"; + version = "0.2.5"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "default") + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "pin-project") + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "std") + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "std-future") + ]; + dependencies = { + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "pin_project" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".pin-project."1.1.4" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "tracing" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".tracing-log."0.2.0" = overridableMkRustCrate (profileName: rec { + name = "tracing-log"; + version = "0.2.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3"; }; + features = builtins.concatLists [ + [ "log-tracer" ] + [ "std" ] + ]; + dependencies = { + log = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.20" { inherit profileName; }).out; + once_cell = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.19.0" { inherit profileName; }).out; + tracing_core = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing-core."0.1.32" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".tracing-subscriber."0.3.18" = overridableMkRustCrate (profileName: rec { + name = "tracing-subscriber"; + version = "0.3.18"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b"; }; + features = builtins.concatLists [ + [ "alloc" ] + [ "ansi" ] + [ "default" ] + [ "env-filter" ] + [ "fmt" ] + [ "matchers" ] + [ "nu-ansi-term" ] + [ "once_cell" ] + [ "regex" ] + [ "registry" ] + [ "sharded-slab" ] + [ "smallvec" ] + [ "std" ] + [ "thread_local" ] + [ "tracing" ] + [ "tracing-log" ] + ]; + dependencies = { + matchers = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".matchers."0.1.0" { inherit profileName; }).out; + nu_ansi_term = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".nu-ansi-term."0.46.0" { inherit profileName; }).out; + once_cell = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.19.0" { inherit profileName; }).out; + regex = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".regex."1.10.3" { inherit profileName; }).out; + sharded_slab = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".sharded-slab."0.1.7" { inherit profileName; }).out; + smallvec = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".smallvec."1.13.1" { inherit profileName; }).out; + thread_local = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".thread_local."1.1.7" { inherit profileName; }).out; + tracing = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing."0.1.40" { inherit profileName; }).out; + tracing_core = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing-core."0.1.32" { inherit profileName; }).out; + tracing_log = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tracing-log."0.2.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".treediff."4.0.3" = overridableMkRustCrate (profileName: rec { + name = "treediff"; + version = "4.0.3"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "4d127780145176e2b5d16611cc25a900150e86e9fd79d3bde6ff3a37359c9cb5"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "serde_json") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "with-serde-json") + ]; + dependencies = { + ${ if rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "serde_json" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".serde_json."1.0.113" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".try-lock."0.2.5" = overridableMkRustCrate (profileName: rec { + name = "try-lock"; + version = "0.2.5"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".typenum."1.17.0" = overridableMkRustCrate (profileName: rec { + name = "typenum"; + version = "1.17.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".ucd-trie."0.1.6" = overridableMkRustCrate (profileName: rec { + name = "ucd-trie"; + version = "0.1.6"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "std") + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".unicode-bidi."0.3.15" = overridableMkRustCrate (profileName: rec { + name = "unicode-bidi"; + version = "0.3.15"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75"; }; + features = builtins.concatLists [ + [ "hardcoded-data" ] + [ "std" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".unicode-ident."1.0.12" = overridableMkRustCrate (profileName: rec { + name = "unicode-ident"; + version = "1.0.12"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".unicode-normalization."0.1.22" = overridableMkRustCrate (profileName: rec { + name = "unicode-normalization"; + version = "0.1.22"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921"; }; + features = builtins.concatLists [ + [ "std" ] + ]; + dependencies = { + tinyvec = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".tinyvec."1.6.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".unicode-segmentation."1.10.1" = overridableMkRustCrate (profileName: rec { + name = "unicode-segmentation"; + version = "1.10.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".unicode-width."0.1.11" = overridableMkRustCrate (profileName: rec { + name = "unicode-width"; + version = "0.1.11"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85"; }; + features = builtins.concatLists [ + [ "default" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".unicode-xid."0.2.4" = overridableMkRustCrate (profileName: rec { + name = "unicode-xid"; + version = "0.2.4"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c"; }; + features = builtins.concatLists [ + [ "default" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".universal-hash."0.5.1" = overridableMkRustCrate (profileName: rec { + name = "universal-hash"; + version = "0.5.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea"; }; + dependencies = { + crypto_common = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".crypto-common."0.1.6" { inherit profileName; }).out; + subtle = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".subtle."2.5.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".unsafe-libyaml."0.2.10" = overridableMkRustCrate (profileName: rec { + name = "unsafe-libyaml"; + version = "0.2.10"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "ab4c90930b95a82d00dc9e9ac071b4991924390d46cbd0dfe566148667605e4b"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".untrusted."0.9.0" = overridableMkRustCrate (profileName: rec { + name = "untrusted"; + version = "0.9.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".url."2.5.0" = overridableMkRustCrate (profileName: rec { + name = "url"; + version = "2.5.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633"; }; + features = builtins.concatLists [ + [ "default" ] + ]; + dependencies = { + form_urlencoded = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".form_urlencoded."1.2.1" { inherit profileName; }).out; + idna = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".idna."0.5.0" { inherit profileName; }).out; + percent_encoding = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".percent-encoding."2.3.1" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".urlencoding."2.1.3" = overridableMkRustCrate (profileName: rec { + name = "urlencoding"; + version = "2.1.3"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".utf8parse."0.2.1" = overridableMkRustCrate (profileName: rec { + name = "utf8parse"; + version = "0.2.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "k2v-client/clap" || rootFeatures' ? "k2v-client/cli") "default") + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".uuid."1.4.1" = overridableMkRustCrate (profileName: rec { + name = "uuid"; + version = "1.4.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "79daa5ed5740825c40b389c5e50312b9c86df53fccd33f281df655642b43869d"; }; + features = builtins.concatLists [ + [ "default" ] + (lib.optional (rootFeatures' ? "garage/default" || rootFeatures' ? "garage/sqlite" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/r2d2_sqlite" || rootFeatures' ? "garage_db/sqlite" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/sqlite") "fast-rng") + [ "getrandom" ] + (lib.optional (rootFeatures' ? "garage/default" || rootFeatures' ? "garage/sqlite" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/r2d2_sqlite" || rootFeatures' ? "garage_db/sqlite" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/sqlite") "rand") + [ "rng" ] + [ "std" ] + [ "v4" ] + ]; + dependencies = { + getrandom = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".getrandom."0.2.12" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/default" || rootFeatures' ? "garage/sqlite" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/r2d2_sqlite" || rootFeatures' ? "garage_db/sqlite" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/sqlite" then "rand" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".rand."0.8.5" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".valuable."0.1.0" = overridableMkRustCrate (profileName: rec { + name = "valuable"; + version = "0.1.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d"; }; + features = builtins.concatLists [ + [ "alloc" ] + [ "std" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".vcpkg."0.2.15" = overridableMkRustCrate (profileName: rec { + name = "vcpkg"; + version = "0.2.15"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".version_check."0.9.4" = overridableMkRustCrate (profileName: rec { + name = "version_check"; + version = "0.9.4"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".vsimd."0.8.0" = overridableMkRustCrate (profileName: rec { + name = "vsimd"; + version = "0.8.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "5c3082ca00d5a5ef149bb8b555a72ae84c9c59f7250f013ac822ac2e49b19c64"; }; + features = builtins.concatLists [ + [ "alloc" ] + [ "detect" ] + [ "std" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".walkdir."2.4.0" = overridableMkRustCrate (profileName: rec { + name = "walkdir"; + version = "2.4.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee"; }; + dependencies = { + same_file = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".same-file."1.0.6" { inherit profileName; }).out; + ${ if hostPlatform.isWindows then "winapi_util" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".winapi-util."0.1.6" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".want."0.3.1" = overridableMkRustCrate (profileName: rec { + name = "want"; + version = "0.3.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e"; }; + dependencies = { + try_lock = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".try-lock."0.2.5" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".wasi."0.11.0+wasi-snapshot-preview1" = overridableMkRustCrate (profileName: rec { + name = "wasi"; + version = "0.11.0+wasi-snapshot-preview1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"; }; + features = builtins.concatLists [ + [ "default" ] + [ "std" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen."0.2.90" = overridableMkRustCrate (profileName: rec { + name = "wasm-bindgen"; + version = "0.2.90"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "b1223296a201415c7fad14792dbefaace9bd52b62d33453ade1c5b5f07555406"; }; + features = builtins.concatLists [ + [ "default" ] + [ "spans" ] + [ "std" ] + ]; + dependencies = { + cfg_if = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."1.0.0" { inherit profileName; }).out; + wasm_bindgen_macro = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-macro."0.2.90" { profileName = "__noProfile"; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-backend."0.2.90" = overridableMkRustCrate (profileName: rec { + name = "wasm-bindgen-backend"; + version = "0.2.90"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "fcdc935b63408d58a32f8cc9738a0bffd8f05cc7c002086c6ef20b7312ad9dcd"; }; + features = builtins.concatLists [ + [ "spans" ] + ]; + dependencies = { + bumpalo = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".bumpalo."3.14.0" { inherit profileName; }).out; + log = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.20" { inherit profileName; }).out; + once_cell = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.19.0" { inherit profileName; }).out; + proc_macro2 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }).out; + quote = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }).out; + syn = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."2.0.48" { inherit profileName; }).out; + wasm_bindgen_shared = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-shared."0.2.90" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-futures."0.4.40" = overridableMkRustCrate (profileName: rec { + name = "wasm-bindgen-futures"; + version = "0.4.40"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "bde2032aeb86bdfaecc8b261eef3cba735cc426c1f3a3416d1e0791be95fc461"; }; + dependencies = { + ${ if rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest" then "cfg_if" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."1.0.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest" then "js_sys" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".js-sys."0.3.67" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest" then "wasm_bindgen" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen."0.2.90" { inherit profileName; }).out; + ${ if (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest") && builtins.elem "atomics" hostPlatformFeatures then "web_sys" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".web-sys."0.3.67" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-macro."0.2.90" = overridableMkRustCrate (profileName: rec { + name = "wasm-bindgen-macro"; + version = "0.2.90"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "3e4c238561b2d428924c49815533a8b9121c664599558a5d9ec51f8a1740a999"; }; + features = builtins.concatLists [ + [ "spans" ] + ]; + dependencies = { + quote = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }).out; + wasm_bindgen_macro_support = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-macro-support."0.2.90" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-macro-support."0.2.90" = overridableMkRustCrate (profileName: rec { + name = "wasm-bindgen-macro-support"; + version = "0.2.90"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "bae1abb6806dc1ad9e560ed242107c0f6c84335f1749dd4e8ddb012ebd5e25a7"; }; + features = builtins.concatLists [ + [ "spans" ] + ]; + dependencies = { + proc_macro2 = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }).out; + quote = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }).out; + syn = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."2.0.48" { inherit profileName; }).out; + wasm_bindgen_backend = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-backend."0.2.90" { inherit profileName; }).out; + wasm_bindgen_shared = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-shared."0.2.90" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-shared."0.2.90" = overridableMkRustCrate (profileName: rec { + name = "wasm-bindgen-shared"; + version = "0.2.90"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "4d91413b1c31d7539ba5ef2451af3f0b833a005eb27a631cec32bc0635a8602b"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".web-sys."0.3.67" = overridableMkRustCrate (profileName: rec { + name = "web-sys"; + version = "0.3.67"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "58cd2333b6e0be7a39605f0e255892fd7418a682d8da8fe042fe25128794d2ed"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest") "AbortController") + (lib.optional (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest") "AbortSignal") + (lib.optional (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest") "Blob") + (lib.optional (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest") "BlobPropertyBag") + (lib.optional (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest") "Event") + (lib.optional (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest") "EventTarget") + (lib.optional (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest") "File") + (lib.optional (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest") "FormData") + (lib.optional (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest") "Headers") + (lib.optional (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest") "MessageEvent") + (lib.optional (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest") "ReadableStream") + (lib.optional (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest") "Request") + (lib.optional (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest") "RequestCredentials") + (lib.optional (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest") "RequestInit") + (lib.optional (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest") "RequestMode") + (lib.optional (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest") "Response") + (lib.optional (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest") "ServiceWorkerGlobalScope") + (lib.optional (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest") "Window") + (lib.optional (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest") "Worker") + (lib.optional (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest") "WorkerGlobalScope") + ]; + dependencies = { + ${ if rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest" then "js_sys" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".js-sys."0.3.67" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest" then "wasm_bindgen" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen."0.2.90" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".which."4.4.2" = overridableMkRustCrate (profileName: rec { + name = "which"; + version = "4.4.2"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7"; }; + dependencies = { + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "either" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".either."1.9.0" { inherit profileName; }).out; + ${ if (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") && (hostPlatform.isWindows || hostPlatform.isUnix || hostPlatform.parsed.kernel.name == "redox") then "home" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".home."0.5.9" { inherit profileName; }).out; + ${ if (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") && hostPlatform.isWindows then "once_cell" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.19.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" then "rustix" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".rustix."0.38.31" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".winapi."0.3.9" = overridableMkRustCrate (profileName: rec { + name = "winapi"; + version = "0.3.9"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"; }; + features = builtins.concatLists [ + [ "consoleapi" ] + [ "errhandlingapi" ] + [ "fileapi" ] + [ "handleapi" ] + [ "minwindef" ] + [ "ntstatus" ] + [ "processenv" ] + [ "std" ] + [ "synchapi" ] + [ "sysinfoapi" ] + [ "winbase" ] + [ "wincon" ] + [ "winerror" ] + [ "winnt" ] + [ "winsock2" ] + [ "ws2ipdef" ] + ]; + dependencies = { + ${ if hostPlatform.config == "i686-pc-windows-gnu" then "winapi_i686_pc_windows_gnu" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".winapi-i686-pc-windows-gnu."0.4.0" { inherit profileName; }).out; + ${ if hostPlatform.config == "x86_64-pc-windows-gnu" then "winapi_x86_64_pc_windows_gnu" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".winapi-x86_64-pc-windows-gnu."0.4.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".winapi-i686-pc-windows-gnu."0.4.0" = overridableMkRustCrate (profileName: rec { + name = "winapi-i686-pc-windows-gnu"; + version = "0.4.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".winapi-util."0.1.6" = overridableMkRustCrate (profileName: rec { + name = "winapi-util"; + version = "0.1.6"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596"; }; + dependencies = { + ${ if hostPlatform.isWindows then "winapi" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".winapi."0.3.9" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".winapi-x86_64-pc-windows-gnu."0.4.0" = overridableMkRustCrate (profileName: rec { + name = "winapi-x86_64-pc-windows-gnu"; + version = "0.4.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".windows-core."0.52.0" = overridableMkRustCrate (profileName: rec { + name = "windows-core"; + version = "0.52.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9"; }; + features = builtins.concatLists [ + [ "default" ] + ]; + dependencies = { + windows_targets = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows-targets."0.52.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".windows-sys."0.48.0" = overridableMkRustCrate (profileName: rec { + name = "windows-sys"; + version = "0.48.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"; }; + features = builtins.concatLists [ + [ "Win32" ] + [ "Win32_Foundation" ] + [ "Win32_Networking" ] + [ "Win32_Networking_WinSock" ] + [ "Win32_Security" ] + [ "Win32_Storage" ] + [ "Win32_Storage_FileSystem" ] + [ "Win32_System" ] + [ "Win32_System_Console" ] + (lib.optional (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest") "Win32_System_Diagnostics") + (lib.optional (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest") "Win32_System_Diagnostics_Debug") + [ "Win32_System_IO" ] + [ "Win32_System_Pipes" ] + (lib.optional (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest") "Win32_System_Registry") + [ "Win32_System_SystemServices" ] + [ "Win32_System_Threading" ] + (lib.optional (rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest") "Win32_System_Time") + [ "Win32_System_WindowsProgramming" ] + [ "default" ] + ]; + dependencies = { + windows_targets = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows-targets."0.48.5" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".windows-sys."0.52.0" = overridableMkRustCrate (profileName: rec { + name = "windows-sys"; + version = "0.52.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"; }; + features = builtins.concatLists [ + [ "Win32" ] + [ "Win32_Foundation" ] + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "Win32_NetworkManagement") + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "Win32_NetworkManagement_IpHelper") + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "Win32_Networking") + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "Win32_Networking_WinSock") + [ "Win32_Security" ] + [ "Win32_Security_Authentication" ] + [ "Win32_Security_Authentication_Identity" ] + [ "Win32_Security_Credentials" ] + [ "Win32_Security_Cryptography" ] + [ "Win32_Storage" ] + [ "Win32_Storage_FileSystem" ] + [ "Win32_System" ] + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "Win32_System_Com") + [ "Win32_System_Console" ] + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "Win32_System_Diagnostics") + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "Win32_System_Diagnostics_Debug") + [ "Win32_System_Memory" ] + (lib.optional (rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp") "Win32_System_Threading") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "Win32_UI") + (lib.optional (rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage/opentelemetry-otlp" || rootFeatures' ? "garage/telemetry-otlp" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "Win32_UI_Shell") + [ "default" ] + ]; + dependencies = { + windows_targets = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows-targets."0.52.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".windows-targets."0.48.5" = overridableMkRustCrate (profileName: rec { + name = "windows-targets"; + version = "0.48.5"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c"; }; + dependencies = { + ${ if hostPlatform.config == "aarch64-pc-windows-gnullvm" then "windows_aarch64_gnullvm" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows_aarch64_gnullvm."0.48.5" { inherit profileName; }).out; + ${ if hostPlatform.parsed.cpu.name == "aarch64" && hostPlatform.parsed.abi.name == "msvc" then "windows_aarch64_msvc" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows_aarch64_msvc."0.48.5" { inherit profileName; }).out; + ${ if hostPlatform.parsed.cpu.name == "i686" && hostPlatform.parsed.abi.name == "gnu" then "windows_i686_gnu" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows_i686_gnu."0.48.5" { inherit profileName; }).out; + ${ if hostPlatform.parsed.cpu.name == "i686" && hostPlatform.parsed.abi.name == "msvc" then "windows_i686_msvc" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows_i686_msvc."0.48.5" { inherit profileName; }).out; + ${ if hostPlatform.parsed.cpu.name == "x86_64" && hostPlatform.parsed.abi.name == "gnu" then "windows_x86_64_gnu" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows_x86_64_gnu."0.48.5" { inherit profileName; }).out; + ${ if hostPlatform.config == "x86_64-pc-windows-gnullvm" then "windows_x86_64_gnullvm" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows_x86_64_gnullvm."0.48.5" { inherit profileName; }).out; + ${ if hostPlatform.parsed.cpu.name == "x86_64" && hostPlatform.parsed.abi.name == "msvc" then "windows_x86_64_msvc" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows_x86_64_msvc."0.48.5" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".windows-targets."0.52.0" = overridableMkRustCrate (profileName: rec { + name = "windows-targets"; + version = "0.52.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd"; }; + dependencies = { + ${ if hostPlatform.config == "aarch64-pc-windows-gnullvm" then "windows_aarch64_gnullvm" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows_aarch64_gnullvm."0.52.0" { inherit profileName; }).out; + ${ if hostPlatform.parsed.cpu.name == "aarch64" && hostPlatform.parsed.abi.name == "msvc" then "windows_aarch64_msvc" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows_aarch64_msvc."0.52.0" { inherit profileName; }).out; + ${ if hostPlatform.parsed.cpu.name == "i686" && hostPlatform.parsed.abi.name == "gnu" then "windows_i686_gnu" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows_i686_gnu."0.52.0" { inherit profileName; }).out; + ${ if hostPlatform.parsed.cpu.name == "i686" && hostPlatform.parsed.abi.name == "msvc" then "windows_i686_msvc" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows_i686_msvc."0.52.0" { inherit profileName; }).out; + ${ if hostPlatform.parsed.cpu.name == "x86_64" && hostPlatform.parsed.abi.name == "gnu" then "windows_x86_64_gnu" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows_x86_64_gnu."0.52.0" { inherit profileName; }).out; + ${ if hostPlatform.config == "x86_64-pc-windows-gnullvm" then "windows_x86_64_gnullvm" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows_x86_64_gnullvm."0.52.0" { inherit profileName; }).out; + ${ if hostPlatform.parsed.cpu.name == "x86_64" && hostPlatform.parsed.abi.name == "msvc" then "windows_x86_64_msvc" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows_x86_64_msvc."0.52.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".windows_aarch64_gnullvm."0.48.5" = overridableMkRustCrate (profileName: rec { + name = "windows_aarch64_gnullvm"; + version = "0.48.5"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".windows_aarch64_gnullvm."0.52.0" = overridableMkRustCrate (profileName: rec { + name = "windows_aarch64_gnullvm"; + version = "0.52.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".windows_aarch64_msvc."0.48.5" = overridableMkRustCrate (profileName: rec { + name = "windows_aarch64_msvc"; + version = "0.48.5"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".windows_aarch64_msvc."0.52.0" = overridableMkRustCrate (profileName: rec { + name = "windows_aarch64_msvc"; + version = "0.52.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".windows_i686_gnu."0.48.5" = overridableMkRustCrate (profileName: rec { + name = "windows_i686_gnu"; + version = "0.48.5"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".windows_i686_gnu."0.52.0" = overridableMkRustCrate (profileName: rec { + name = "windows_i686_gnu"; + version = "0.52.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".windows_i686_msvc."0.48.5" = overridableMkRustCrate (profileName: rec { + name = "windows_i686_msvc"; + version = "0.48.5"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".windows_i686_msvc."0.52.0" = overridableMkRustCrate (profileName: rec { + name = "windows_i686_msvc"; + version = "0.52.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".windows_x86_64_gnu."0.48.5" = overridableMkRustCrate (profileName: rec { + name = "windows_x86_64_gnu"; + version = "0.48.5"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".windows_x86_64_gnu."0.52.0" = overridableMkRustCrate (profileName: rec { + name = "windows_x86_64_gnu"; + version = "0.52.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".windows_x86_64_gnullvm."0.48.5" = overridableMkRustCrate (profileName: rec { + name = "windows_x86_64_gnullvm"; + version = "0.48.5"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".windows_x86_64_gnullvm."0.52.0" = overridableMkRustCrate (profileName: rec { + name = "windows_x86_64_gnullvm"; + version = "0.52.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".windows_x86_64_msvc."0.48.5" = overridableMkRustCrate (profileName: rec { + name = "windows_x86_64_msvc"; + version = "0.48.5"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".windows_x86_64_msvc."0.52.0" = overridableMkRustCrate (profileName: rec { + name = "windows_x86_64_msvc"; + version = "0.52.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04"; }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".winnow."0.6.1" = overridableMkRustCrate (profileName: rec { + name = "winnow"; + version = "0.6.1"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "d90f4e0f530c4c69f62b80d839e9ef3855edc9cba471a160c4d692deed62b401"; }; + features = builtins.concatLists [ + [ "alloc" ] + [ "default" ] + [ "std" ] + ]; + dependencies = { + memchr = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".memchr."2.7.1" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".winreg."0.50.0" = overridableMkRustCrate (profileName: rec { + name = "winreg"; + version = "0.50.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1"; }; + dependencies = { + ${ if rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest" then "cfg_if" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".cfg-if."1.0.0" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/consul-discovery" || rootFeatures' ? "garage_rpc/consul-discovery" || rootFeatures' ? "garage_rpc/reqwest" then "windows_sys" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".windows-sys."0.48.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".xmlparser."0.13.6" = overridableMkRustCrate (profileName: rec { + name = "xmlparser"; + version = "0.13.6"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "66fee0b777b0f5ac1c69bb06d361268faafa61cd4682ae064a171c16c433e9e4"; }; + features = builtins.concatLists [ + [ "default" ] + [ "std" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".xxhash-rust."0.8.8" = overridableMkRustCrate (profileName: rec { + name = "xxhash-rust"; + version = "0.8.8"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "53be06678ed9e83edb1745eb72efc0bbcd7b5c3c35711a860906aed827a13d61"; }; + features = builtins.concatLists [ + [ "xxh3" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".zerocopy."0.7.32" = overridableMkRustCrate (profileName: rec { + name = "zerocopy"; + version = "0.7.32"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/bundled-libs" || rootFeatures' ? "garage/default" || rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage/sqlite" || rootFeatures' ? "garage_db/bundled-libs" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/r2d2_sqlite" || rootFeatures' ? "garage_db/rusqlite" || rootFeatures' ? "garage_db/sqlite" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/sqlite" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery") "simd") + ]; + dependencies = { + ${ if false then "zerocopy_derive" else null } = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".zerocopy-derive."0.7.32" { profileName = "__noProfile"; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".zerocopy-derive."0.7.32" = overridableMkRustCrate (profileName: rec { + name = "zerocopy-derive"; + version = "0.7.32"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6"; }; + dependencies = { + ${ if rootFeatures' ? "garage/bundled-libs" || rootFeatures' ? "garage/default" || rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage/sqlite" || rootFeatures' ? "garage_db/bundled-libs" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/r2d2_sqlite" || rootFeatures' ? "garage_db/rusqlite" || rootFeatures' ? "garage_db/sqlite" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/sqlite" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "proc_macro2" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.78" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/bundled-libs" || rootFeatures' ? "garage/default" || rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage/sqlite" || rootFeatures' ? "garage_db/bundled-libs" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/r2d2_sqlite" || rootFeatures' ? "garage_db/rusqlite" || rootFeatures' ? "garage_db/sqlite" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/sqlite" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "quote" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".quote."1.0.35" { inherit profileName; }).out; + ${ if rootFeatures' ? "garage/bundled-libs" || rootFeatures' ? "garage/default" || rootFeatures' ? "garage/kubernetes-discovery" || rootFeatures' ? "garage/sqlite" || rootFeatures' ? "garage_db/bundled-libs" || rootFeatures' ? "garage_db/default" || rootFeatures' ? "garage_db/r2d2_sqlite" || rootFeatures' ? "garage_db/rusqlite" || rootFeatures' ? "garage_db/sqlite" || rootFeatures' ? "garage_model/default" || rootFeatures' ? "garage_model/sqlite" || rootFeatures' ? "garage_rpc/kube" || rootFeatures' ? "garage_rpc/kubernetes-discovery" then "syn" else null } = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".syn."2.0.48" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".zeroize."1.7.0" = overridableMkRustCrate (profileName: rec { + name = "zeroize"; + version = "1.7.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d"; }; + features = builtins.concatLists [ + [ "alloc" ] + [ "default" ] + ]; + }); + + "registry+https://github.com/rust-lang/crates.io-index".zstd."0.13.0" = overridableMkRustCrate (profileName: rec { + name = "zstd"; + version = "0.13.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "bffb3309596d527cfcba7dfc6ed6052f1d39dfbd7c867aa2e865e4a449c10110"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/system-libs" || rootFeatures' ? "garage_block/system-libs") "pkg-config") + ]; + dependencies = { + zstd_safe = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".zstd-safe."7.0.0" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".zstd-safe."7.0.0" = overridableMkRustCrate (profileName: rec { + name = "zstd-safe"; + version = "7.0.0"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "43747c7422e2924c11144d5229878b98180ef8b06cca4ab5af37afc8a8d8ea3e"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/system-libs" || rootFeatures' ? "garage_block/system-libs") "pkg-config") + [ "std" ] + ]; + dependencies = { + zstd_sys = (rustPackages."registry+https://github.com/rust-lang/crates.io-index".zstd-sys."2.0.9+zstd.1.5.5" { inherit profileName; }).out; + }; + }); + + "registry+https://github.com/rust-lang/crates.io-index".zstd-sys."2.0.9+zstd.1.5.5" = overridableMkRustCrate (profileName: rec { + name = "zstd-sys"; + version = "2.0.9+zstd.1.5.5"; + registry = "registry+https://github.com/rust-lang/crates.io-index"; + src = fetchCratesIo { inherit name version; sha256 = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656"; }; + features = builtins.concatLists [ + (lib.optional (rootFeatures' ? "garage/system-libs" || rootFeatures' ? "garage_block/system-libs") "pkg-config") + [ "std" ] + ]; + buildDependencies = { + cc = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".cc."1.0.83" { profileName = "__noProfile"; }).out; + pkg_config = (buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".pkg-config."0.3.29" { profileName = "__noProfile"; }).out; + }; + }); + +} diff --git a/Cargo.toml b/Cargo.toml index df4005a3..500079f2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,10 +8,7 @@ members = [ "src/table", "src/block", "src/model", - "src/api/common", - "src/api/s3", - "src/api/k2v", - "src/api/admin", + "src/api", "src/web", "src/garage", "src/k2v-client", @@ -24,18 +21,15 @@ default-members = ["src/garage"] # Internal Garage crates format_table = { version = "0.1.1", path = "src/format-table" } -garage_api_common = { version = "1.3.1", path = "src/api/common" } -garage_api_admin = { version = "1.3.1", path = "src/api/admin" } -garage_api_s3 = { version = "1.3.1", path = "src/api/s3" } -garage_api_k2v = { version = "1.3.1", path = "src/api/k2v" } -garage_block = { version = "1.3.1", path = "src/block" } -garage_db = { version = "1.3.1", path = "src/db", default-features = false } -garage_model = { version = "1.3.1", path = "src/model", default-features = false } -garage_net = { version = "1.3.1", path = "src/net" } -garage_rpc = { version = "1.3.1", path = "src/rpc" } -garage_table = { version = "1.3.1", path = "src/table" } -garage_util = { version = "1.3.1", path = "src/util" } -garage_web = { version = "1.3.1", path = "src/web" } +garage_api = { version = "1.0.0", path = "src/api" } +garage_block = { version = "1.0.0", path = "src/block" } +garage_db = { version = "1.0.0", path = "src/db", default-features = false } +garage_model = { version = "1.0.0", path = "src/model", default-features = false } +garage_net = { version = "1.0.0", path = "src/net" } +garage_rpc = { version = "1.0.0", path = "src/rpc" } +garage_table = { version = "1.0.0", path = "src/table" } +garage_util = { version = "1.0.0", path = "src/util" } +garage_web = { version = "1.0.0", path = "src/web" } k2v-client = { version = "0.0.4", path = "src/k2v-client" } # External crates from crates.io @@ -52,19 +46,21 @@ chrono = "0.4" crc32fast = "1.4" crc32c = "0.6" crypto-common = "0.1" +digest = "0.10" +err-derive = "0.3" gethostname = "0.4" git-version = "0.3.4" hex = "0.4" hexdump = "0.1" hmac = "0.12" +idna = "0.5" itertools = "0.12" ipnet = "2.9.0" lazy_static = "1.4" md-5 = "0.10" mktemp = "0.5" -nix = { version = "0.29", default-features = false, features = ["fs"] } +nix = { version = "0.27", default-features = false, features = ["fs"] } nom = "7.1" -parking_lot = "0.12" parse_duration = "2.1" pin-project = "1.0.12" pnet_datalink = "0.34" @@ -83,14 +79,12 @@ pretty_env_logger = "0.5" structopt = { version = "0.3", default-features = false } syslog-tracing = "0.3" tracing = "0.1" -tracing-journald = "0.3.1" tracing-subscriber = { version = "0.3", features = ["env-filter"] } heed = { version = "0.11", default-features = false, features = ["lmdb"] } -rusqlite = "0.37" +rusqlite = "0.31.0" r2d2 = "0.8" -r2d2_sqlite = "0.31" -fjall = "2.4" +r2d2_sqlite = "0.24" async-compression = { version = "0.4", features = ["tokio", "zstd"] } zstd = { version = "0.13", default-features = false } @@ -133,21 +127,26 @@ opentelemetry-contrib = "0.9" prometheus = "0.13" # used by the k2v-client crate only -aws-sigv4 = { version = "1.1", default-features = false } -hyper-rustls = { version = "0.26", default-features = false, features = ["http1", "http2", "ring", "rustls-native-certs"] } +aws-sigv4 = { version = "1.1" } +hyper-rustls = { version = "0.26", features = ["http2"] } log = "0.4" -thiserror = "2.0" +thiserror = "1.0" # ---- used only as build / dev dependencies ---- assert-json-diff = "2.0" rustc_version = "0.4.0" static_init = "1.0" -aws-smithy-runtime = { version = "1.8", default-features = false, features = ["tls-rustls"] } -aws-sdk-config = { version = "1.62", default-features = false } -aws-sdk-s3 = { version = "1.79", default-features = false, features = ["rt-tokio"] } + +aws-config = "1.1.4" +aws-sdk-config = "1.13" +aws-sdk-s3 = "1.14" + +[profile.dev] +#lto = "thin" # disabled for now, adds 2-4 min to each CI build +lto = "off" [profile.release] -lto = "thin" -codegen-units = 16 -opt-level = 3 -strip = "debuginfo" +lto = true +codegen-units = 1 +opt-level = "s" +strip = true diff --git a/Dockerfile b/Dockerfile index 2e301ee9..62e51b32 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,5 +3,5 @@ FROM scratch ENV RUST_BACKTRACE=1 ENV RUST_LOG=garage=info -COPY result/bin/garage / +COPY result-bin/bin/garage / CMD [ "/garage", "server"] diff --git a/Makefile b/Makefile index 35c3f22c..55fa16dd 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,13 @@ -.PHONY: doc all run1 run2 run3 +.PHONY: doc all release shell run1 run2 run3 all: - clear - cargo build + clear; cargo build + +release: + nix-build --attr pkgs.amd64.release --no-build-output + +shell: + nix-shell # ---- diff --git a/default.nix b/default.nix index 6974567f..57bc24a5 100644 --- a/default.nix +++ b/default.nix @@ -3,22 +3,53 @@ with import ./nix/common.nix; let - pkgs = import nixpkgs { }; + pkgs = import pkgsSrc { }; compile = import ./nix/compile.nix; - build_release = target: (compile { - inherit target system git_version nixpkgs; - crane = flake.inputs.crane; - rust-overlay = flake.inputs.rust-overlay; - release = true; - }).garage; + build_debug_and_release = (target: { + debug = (compile { + inherit system target git_version pkgsSrc cargo2nixOverlay; + release = false; + }).workspace.garage { compileMode = "build"; }; + + release = (compile { + inherit system target git_version pkgsSrc cargo2nixOverlay; + release = true; + }).workspace.garage { compileMode = "build"; }; + }); + + test = (rustPkgs: + pkgs.symlinkJoin { + name = "garage-tests"; + paths = + builtins.map (key: rustPkgs.workspace.${key} { compileMode = "test"; }) + (builtins.attrNames rustPkgs.workspace); + }); in { - releasePackages = { - amd64 = build_release "x86_64-unknown-linux-musl"; - i386 = build_release "i686-unknown-linux-musl"; - arm64 = build_release "aarch64-unknown-linux-musl"; - arm = build_release "armv6l-unknown-linux-musleabihf"; + pkgs = { + amd64 = build_debug_and_release "x86_64-unknown-linux-musl"; + i386 = build_debug_and_release "i686-unknown-linux-musl"; + arm64 = build_debug_and_release "aarch64-unknown-linux-musl"; + arm = build_debug_and_release "armv6l-unknown-linux-musleabihf"; + }; + test = { + amd64 = test (compile { + inherit system git_version pkgsSrc cargo2nixOverlay; + target = "x86_64-unknown-linux-musl"; + features = [ + "garage/bundled-libs" + "garage/k2v" + "garage/lmdb" + "garage/sqlite" + ]; + }); + }; + clippy = { + amd64 = (compile { + inherit system git_version pkgsSrc cargo2nixOverlay; + target = "x86_64-unknown-linux-musl"; + compiler = "clippy"; + }).workspace.garage { compileMode = "build"; }; }; - flakePackages = flake.packages.${system}; } diff --git a/doc/api/garage-admin-v1.yml b/doc/api/garage-admin-v1.yml index a70dc97b..1ea77b2e 100644 --- a/doc/api/garage-admin-v1.yml +++ b/doc/api/garage-admin-v1.yml @@ -687,7 +687,7 @@ paths: operationId: "GetBucketInfo" summary: "Get a bucket" description: | - Given a bucket identifier (`id`) or a global alias (`globalAlias`), get its information. + Given a bucket identifier (`id`) or a global alias (`alias`), get its information. It includes its aliases, its web configuration, keys that have some permissions on it, some statistics (number of objects, size), number of dangling multipart uploads, and its quotas (if any). @@ -701,7 +701,7 @@ paths: example: "b4018dc61b27ccb5c64ec1b24f53454bbbd180697c758c4d47a22a8921864a87" schema: type: string - - name: globalAlias + - name: alias in: query description: | The exact global alias of one of the existing buckets. diff --git a/doc/book/build/python.md b/doc/book/build/python.md index 612394e1..896c99d3 100644 --- a/doc/book/build/python.md +++ b/doc/book/build/python.md @@ -23,7 +23,7 @@ client = minio.Minio( "GKyourapikey", "abcd[...]1234", # Force the region, this is specific to garage - region="garage", + region="region", ) ``` diff --git a/doc/book/connect/apps/index.md b/doc/book/connect/apps/index.md index f52d434b..9a678275 100644 --- a/doc/book/connect/apps/index.md +++ b/doc/book/connect/apps/index.md @@ -12,7 +12,7 @@ In this section, we cover the following web applications: | [Mastodon](#mastodon) | ✅ | Natively supported | | [Matrix](#matrix) | ✅ | Tested with `synapse-s3-storage-provider` | | [ejabberd](#ejabberd) | ✅ | `mod_s3_upload` | -| [Pixelfed](#pixelfed) | ✅ | Natively supported | +| [Pixelfed](#pixelfed) | ❓ | Not yet tested | | [Pleroma](#pleroma) | ❓ | Not yet tested | | [Lemmy](#lemmy) | ✅ | Supported with pict-rs | | [Funkwhale](#funkwhale) | ❓ | Not yet tested | @@ -69,7 +69,7 @@ $CONFIG = array( 'hostname' => '127.0.0.1', // Can also be a domain name, eg. garage.example.com 'port' => 3900, // Put your reverse proxy port or your S3 API port 'use_ssl' => false, // Set it to true if you have a TLS enabled reverse proxy - 'region' => 'garage', // Garage default region is named "garage", edit according to your cluster config + 'region' => 'garage', // Garage has only one region named "garage" 'use_path_style' => true // Garage supports only path style, must be set to true ], ], @@ -135,7 +135,7 @@ bucket but doesn't also know the secret encryption key. *Click on the picture to zoom* Add a new external storage. Put what you want in "folder name" (eg. "shared"). Select "Amazon S3". Keep "Access Key" for the Authentication field. -In Configuration, put your bucket name (eg. nextcloud), the host (eg. 127.0.0.1), the port (eg. 3900 or 443), the region ("garage" if you use the default, or the one your configured in your `garage.toml`). Tick the SSL box if you have put an HTTPS proxy in front of garage. You must tick the "Path access" box and you must leave the "Legacy authentication (v2)" box empty. Put your Key ID (eg. GK...) and your Secret Key in the last two input boxes. Finally click on the tick symbol on the right of your screen. +In Configuration, put your bucket name (eg. nextcloud), the host (eg. 127.0.0.1), the port (eg. 3900 or 443), the region (garage). Tick the SSL box if you have put an HTTPS proxy in front of garage. You must tick the "Path access" box and you must leave the "Legacy authentication (v2)" box empty. Put your Key ID (eg. GK...) and your Secret Key in the last two input boxes. Finally click on the tick symbol on the right of your screen. Now go to your "Files" app and a new "linked folder" has appeared with the name you chose earlier (eg. "shared"). @@ -191,10 +191,10 @@ garage key create peertube-key Keep the Key ID and the Secret key in a pad, they will be needed later. -We need two buckets, one for normal videos (named peertube-videos) and one for webtorrent videos (named peertube-playlists). +We need two buckets, one for normal videos (named peertube-video) and one for webtorrent videos (named peertube-playlist). ```bash garage bucket create peertube-videos -garage bucket create peertube-playlists +garage bucket create peertube-playlist ``` Now we allow our key to read and write on these buckets: @@ -238,7 +238,7 @@ object_storage: # Put localhost only if you have a garage instance running on that node endpoint: 'http://localhost:3900' # or "garage.example.com" if you have TLS on port 443 - # Garage default region is named "garage", edit according to your config + # Garage supports only one region for now, named garage region: 'garage' credentials: @@ -253,7 +253,7 @@ object_storage: proxify_private_files: false streaming_playlists: - bucket_name: 'peertube-playlists' + bucket_name: 'peertube-playlist' # Keep it empty for our example prefix: '' @@ -335,7 +335,6 @@ From the [official Mastodon documentation](https://docs.joinmastodon.org/admin/t ```bash $ RAILS_ENV=production bin/tootctl media remove --days 3 -$ RAILS_ENV=production bin/tootctl media remove --days 15 --prune-profiles $ RAILS_ENV=production bin/tootctl media remove-orphans $ RAILS_ENV=production bin/tootctl preview_cards remove --days 15 ``` @@ -354,6 +353,8 @@ Imports: 1.7 KB Settings: 0 Bytes ``` +Unfortunately, [old avatars and headers cannot currently be cleaned up](https://github.com/mastodon/mastodon/issues/9567). + ### Migrating your data Data migration should be done with an efficient S3 client. @@ -441,7 +442,7 @@ media_storage_providers: store_synchronous: True # do we want to wait that the file has been written before returning? config: bucket: matrix # the name of our bucket, we chose matrix earlier - region_name: garage # "garage" by default, edit according to your cluster config + region_name: garage # only "garage" is supported for the region field endpoint_url: http://localhost:3900 # the path to the S3 endpoint access_key_id: "GKxxx" # your Key ID secret_access_key: "xxxx" # your Secret Key diff --git a/doc/book/connect/backup.md b/doc/book/connect/backup.md index 7e97d777..f39cc3b6 100644 --- a/doc/book/connect/backup.md +++ b/doc/book/connect/backup.md @@ -161,49 +161,3 @@ kopia repository validate-provider You can then run all the standard kopia commands: `kopia snapshot create`, `kopia mount`... Everything should work out-of-the-box. - -## Plakar - -Create your key and bucket on Garage server: - -```bash -garage key create my-plakar-key -garage bucket create plakar-backups -garage bucket allow plakar-backups --read --write --key my-plakar-key -… -``` - -On Plakar server, add your Garage as a storage location: -```bash -plakar store add garageS3 s3://my-garage.tld/plakar-backups \ -region=garage # Or as you've specified in garage.toml \ -access_key= \ -secret_access_key= -``` - -Then create the repository. -```bash -plakar at @garageS3 create -plaintext # Unencrypted -# or -plakar at @garageS3 create #encrypted -``` - -If you encrypt your backups (Plakar default), you will need to define a strong passphrase. Do not forget to save your password safely. It will be needed to decrypt your backups. - - -After the repository has been created, check that everything works as expected (that might give an empty result as no file has been added yet, but no error message): -```bash -plakar at @garageS3 check -``` - -Now that everything is configure, you can use Garage as your backups storage. For instance sync it with a local backup storage: -```bash -$ plakar at ~/backups sync to @garageS3 -``` - -Or list the S3 storage content: -```bash -$ plakar at @garageS3 ls -``` - -More information in Plakar documentation: https://www.plakar.io/docs/main/quickstart/ diff --git a/doc/book/connect/repositories.md b/doc/book/connect/repositories.md index 537b02e7..66365d64 100644 --- a/doc/book/connect/repositories.md +++ b/doc/book/connect/repositories.md @@ -17,7 +17,7 @@ Garage can also help you serve this content. ## Gitea -You can use Garage with Gitea to store your [git LFS](https://git-lfs.github.com/) data, your users' avatar, and their attachments. +You can use Garage with Gitea to store your [git LFS](https://git-lfs.github.com/) data, your users' avatar, and their attachements. You can configure a different target for each data type (check `[lfs]` and `[attachment]` sections of the Gitea documentation) and you can provide a default one through the `[storage]` section. Let's start by creating a key and a bucket (your key id and secret will be needed later, keep them somewhere): diff --git a/doc/book/cookbook/ansible.md b/doc/book/cookbook/ansible.md index 8b0d2969..6d624c9c 100644 --- a/doc/book/cookbook/ansible.md +++ b/doc/book/cookbook/ansible.md @@ -8,18 +8,18 @@ have published Ansible roles. We list them and compare them below. ## Comparison of Ansible roles -| Feature | [ansible-role-garage](#zorun-ansible-role-garage) | [garage-docker-ansible-deploy](#moan0s-garage-docker-ansible-deploy) | [eddster ansible-role-garage](#eddster-ansible-role-garage) | -|------------------------------------|---------------------------------------------|---------------------------------------------------------------|---------------------------------| -| **Runtime** | Systemd | Docker | Systemd | -| **Target OS** | Any Linux | Any Linux | Any Linux | -| **Architecture** | amd64, arm64, i686 | amd64, arm64 | arm64, arm, 386, amd64 | -| **Additional software** | None | Traefik | Ngnix and Keepalived (optional) | -| **Automatic node connection** | ❌ | ✅ | ✅ | -| **Layout management** | ❌ | ✅ | ✅ | -| **Manage buckets & keys** | ❌ | ✅ (basic) | ✅ | -| **Allow custom Garage config** | ✅ | ❌ | ❌ | -| **Facilitate Garage upgrades** | ✅ | ❌ | ✅ | -| **Multiple instances on one host** | ✅ | ✅ | ❌ | +| Feature | [ansible-role-garage](#zorun-ansible-role-garage) | [garage-docker-ansible-deploy](#moan0s-garage-docker-ansible-deploy) | +|------------------------------------|---------------------------------------------|---------------------------------------------------------------| +| **Runtime** | Systemd | Docker | +| **Target OS** | Any Linux | Any Linux | +| **Architecture** | amd64, arm64, i686 | amd64, arm64 | +| **Additional software** | None | Traefik | +| **Automatic node connection** | ❌ | ✅ | +| **Layout management** | ❌ | ✅ | +| **Manage buckets & keys** | ❌ | ✅ (basic) | +| **Allow custom Garage config** | ✅ | ❌ | +| **Facilitate Garage upgrades** | ✅ | ❌ | +| **Multiple instances on one host** | ✅ | ✅ | ## zorun/ansible-role-garage @@ -49,15 +49,3 @@ structured DNS names, etc). As a result, this role makes it easier to start with Garage on Ansible, but is less flexible. - -## eddster2309/ansible-role-garage - -[Source code](https://github.com/eddster2309/ansible-role-garage), [Ansible galaxy](https://galaxy.ansible.com/ui/standalone/roles/eddster2309/garage/) - -This role is a opinionated but customisable role using the official Garage -static binaries and only requires Systemd. As such it should work on any -Linux based host. It includes all the nesscary configuration to -automatically setup a clustered Garage deployment. Most Garage -configuration options are exposed through Ansible variables so while you -can't provide a custom config you can get very close. It can optionally -installed a HA nginx deployment with Keepalived. diff --git a/doc/book/cookbook/binary-packages.md b/doc/book/cookbook/binary-packages.md index ce6beb7b..0a6ad8fc 100644 --- a/doc/book/cookbook/binary-packages.md +++ b/doc/book/cookbook/binary-packages.md @@ -15,10 +15,9 @@ Alpine Linux repositories (available since v3.17): apk add garage ``` -The default configuration file is installed to `/etc/garage/garage.toml`. You can run -Garage using: `rc-service garage start`. - -If you don't specify `rpc_secret`, it will be automatically replaced with a random string on the first start. +The default configuration file is installed to `/etc/garage.toml`. You can run +Garage using: `rc-service garage start`. If you don't specify `rpc_secret`, it +will be automatically replaced with a random string on the first start. Please note that this package is built without Consul discovery, Kubernetes discovery, OpenTelemetry exporter, and K2V features (K2V will be enabled once @@ -27,7 +26,7 @@ it's stable). ## Arch Linux -Garage is available in the official repositories under [extra](https://archlinux.org/packages/extra/x86_64/garage). +Garage is available in the [AUR](https://aur.archlinux.org/packages/garage). ## FreeBSD diff --git a/doc/book/cookbook/kubernetes.md b/doc/book/cookbook/kubernetes.md index f5bceec8..dfeb3281 100644 --- a/doc/book/cookbook/kubernetes.md +++ b/doc/book/cookbook/kubernetes.md @@ -11,7 +11,7 @@ Firstly clone the repository: ```bash git clone https://git.deuxfleurs.fr/Deuxfleurs/garage -cd garage/script/helm +cd garage/scripts/helm ``` Deploy with default options: @@ -26,13 +26,6 @@ Or deploy with custom values: helm install --create-namespace --namespace garage garage ./garage -f values.override.yaml ``` -If you want to manage the CustomRessourceDefinition used by garage for its `kubernetes_discovery` outside of the helm chart, add `garage.kubernetesSkipCrd: true` to your custom values and use the kustomization before deploying the helm chart: - -```bash -kubectl apply -k ../k8s/crd -helm install --create-namespace --namespace garage garage ./garage -f values.override.yaml -``` - After deploying, cluster layout must be configured manually as described in [Creating a cluster layout](@/documentation/quick-start/_index.md#creating-a-cluster-layout). Use the following command to access garage CLI: ```bash @@ -93,62 +86,3 @@ helm delete --namespace garage garage ``` Note that this will leave behind custom CRD `garagenodes.deuxfleurs.fr`, which must be removed manually if desired. - -## Increase PVC size on running Garage instances - -Since the Garage Helm chart creates the data and meta PVC based on `StatefulSet` templates, increasing the PVC size can be a bit tricky. - -### Confirm the `StorageClass` used for Garage supports volume expansion - -Confirm the storage class used for garage. - -```bash -kubectl -n garage get pvc -NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS VOLUMEATTRIBUTESCLASS AGE -data-garage-0 Bound pvc-080360c9-8ce3-4acf-8579-1701e57b7f3f 30Gi RWO longhorn-local 77d -data-garage-1 Bound pvc-ab8ba697-6030-4fc7-ab3c-0d6df9e3dbc0 30Gi RWO longhorn-local 5d8h -data-garage-2 Bound pvc-3ab37551-0231-4604-986d-136d0fd950ec 30Gi RWO longhorn-local 5d5h -meta-garage-0 Bound pvc-3b457302-3023-4169-846e-c928c5f2ea65 3Gi RWO longhorn-local 77d -meta-garage-1 Bound pvc-49ace2b9-5c85-42df-9247-51c4cf64b460 3Gi RWO longhorn-local 5d8h -meta-garage-2 Bound pvc-99e2e50f-42b4-4128-ae2f-b52629259723 3Gi RWO longhorn-local 5d5h -``` - -In this case, the storage class is `longhorn-local`. Now, check if `ALLOWVOLUMEEXPANSION` is true for the used `StorageClass`. - -```bash -kubectl get storageclasses.storage.k8s.io longhorn-local -NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE -longhorn-local driver.longhorn.io Delete Immediate true 103d -``` - -If your `StorageClass` does not support volume expansion, double check if you can enable it. Otherwise, your only real option is to spin up a new Garage cluster with increased size and migrate all data over. - -If your `StorageClass` supports expansion, you are free to continue. - -### Increase the size of the PVCs - -Increase the size of all PVCs to your desired size. - -```bash -kubectl -n garage edit pvc data-garage-0 -kubectl -n garage edit pvc data-garage-1 -kubectl -n garage edit pvc data-garage-2 -kubectl -n garage edit pvc meta-garage-0 -kubectl -n garage edit pvc meta-garage-1 -kubectl -n garage edit pvc meta-garage-2 -``` - -### Increase the size of the `StatefulSet` PVC template - -This is an optional step, but if not done, future instances of Garage will be created with the original size from the template. - -```bash -kubectl -n garage delete sts --cascade=orphan garage -statefulset.apps "garage" deleted -``` - -This will remove the Garage `StatefulSet` but leave the pods running. It may seem destructive but needs to be done this way since edits to the size of PVC templates are prohibited. - -### Redeploy the `StatefulSet` - -Now the size of future PVCs can be increased, and the Garage Helm chart can be upgraded. The new `StatefulSet` should take ownership of the orphaned pods again. diff --git a/doc/book/cookbook/real-world.md b/doc/book/cookbook/real-world.md index b9927c06..48d2b369 100644 --- a/doc/book/cookbook/real-world.md +++ b/doc/book/cookbook/real-world.md @@ -96,14 +96,14 @@ to store 2 TB of data in total. ## Get a Docker image Our docker image is currently named `dxflrs/garage` and is stored on the [Docker Hub](https://hub.docker.com/r/dxflrs/garage/tags?page=1&ordering=last_updated). -We encourage you to use a fixed tag (eg. `v1.3.0`) and not the `latest` tag. -For this example, we will use the latest published version at the time of the writing which is `v1.3.0` but it's up to you +We encourage you to use a fixed tag (eg. `v1.0.0`) and not the `latest` tag. +For this example, we will use the latest published version at the time of the writing which is `v1.0.0` but it's up to you to check [the most recent versions on the Docker Hub](https://hub.docker.com/r/dxflrs/garage/tags?page=1&ordering=last_updated). For example: ``` -sudo docker pull dxflrs/garage:v1.3.0 +sudo docker pull dxflrs/garage:v1.0.0 ``` ## Deploying and configuring Garage @@ -171,7 +171,7 @@ docker run \ -v /etc/garage.toml:/etc/garage.toml \ -v /var/lib/garage/meta:/var/lib/garage/meta \ -v /var/lib/garage/data:/var/lib/garage/data \ - dxflrs/garage:v1.3.0 + dxflrs/garage:v1.0.0 ``` With this command line, Garage should be started automatically at each boot. @@ -185,7 +185,7 @@ If you want to use `docker-compose`, you may use the following `docker-compose.y version: "3" services: garage: - image: dxflrs/garage:v1.3.0 + image: dxflrs/garage:v1.0.0 network_mode: "host" restart: unless-stopped volumes: diff --git a/doc/book/cookbook/systemd.md b/doc/book/cookbook/systemd.md index ebff8c15..c0ed7d1f 100644 --- a/doc/book/cookbook/systemd.md +++ b/doc/book/cookbook/systemd.md @@ -28,7 +28,6 @@ StateDirectory=garage DynamicUser=true ProtectHome=true NoNewPrivileges=true -LimitNOFILE=42000 [Install] WantedBy=multi-user.target diff --git a/doc/book/design/goals.md b/doc/book/design/goals.md index efa3cd33..4efb6349 100644 --- a/doc/book/design/goals.md +++ b/doc/book/design/goals.md @@ -50,20 +50,3 @@ locations. They use Garage themselves for the following tasks: The Deuxfleurs Garage cluster is a multi-site cluster currently composed of 9 nodes in 3 physical locations. - -### Triplebit - -[Triplebit](https://www.triplebit.org) is a non-profit hosting provider and -ISP focused on improving access to privacy-related services. They use -Garage themselves for the following tasks: - -- Hosting of their homepage, [privacyguides.org](https://www.privacyguides.org/), and various other static sites - -- As a Mastodon object storage backend for [mstdn.party](https://mstdn.party/) and [mstdn.plus](https://mstdn.plus/) - -- As a PeerTube storage backend for [neat.tube](https://neat.tube/) - -- As a [Matrix media backend](https://github.com/matrix-org/synapse-s3-storage-provider) - -Triplebit's Garage cluster is a multi-site cluster currently composed of -10 nodes in 3 physical locations. diff --git a/doc/book/development/devenv.md b/doc/book/development/devenv.md index 518fd232..88f8ba06 100644 --- a/doc/book/development/devenv.md +++ b/doc/book/development/devenv.md @@ -36,7 +36,7 @@ sudo killall nix-daemon Now you can enter our nix-shell, all the required packages will be downloaded but they will not pollute your environment outside of the shell: ```bash -nix-shell -A devShell +nix-shell ``` You can use the traditional Rust development workflow: @@ -65,8 +65,8 @@ nix-build -j $(nproc) --max-jobs auto ``` Our build has multiple parameters you might want to set: - - `release` to build with release optimisations instead of debug - - `target` allows for cross compilation + - `release` build with release optimisations instead of debug + - `target allows` for cross compilation - `compileMode` can be set to test or bench to build a unit test runner - `git_version` to inject the hash to display when running `garage stats` diff --git a/doc/book/operations/multi-hdd.md b/doc/book/operations/multi-hdd.md index 1cbcd805..36445b0a 100644 --- a/doc/book/operations/multi-hdd.md +++ b/doc/book/operations/multi-hdd.md @@ -21,14 +21,14 @@ data_dir = [ ``` Garage will automatically balance all blocks stored by the node -among the different specified directories, proportionally to the +among the different specified directories, proportionnally to the specified capacities. ## Updating the list of storage locations If you add new storage locations to your `data_dir`, Garage will not rebalance existing data between storage locations. -Newly written blocks will be balanced proportionally to the specified capacities, +Newly written blocks will be balanced proportionnally to the specified capacities, and existing data may be moved between drives to improve balancing, but only opportunistically when a data block is re-written (e.g. an object is re-uploaded, or an object with a duplicate block is uploaded). diff --git a/doc/book/operations/recovering.md b/doc/book/operations/recovering.md index 05322b67..6e19db0e 100644 --- a/doc/book/operations/recovering.md +++ b/doc/book/operations/recovering.md @@ -5,7 +5,7 @@ weight = 40 Garage is meant to work on old, second-hand hardware. In particular, this makes it likely that some of your drives will fail, and some manual intervention will be needed. -Fear not! Garage is fully equipped to handle drive failures, in most common cases. +Fear not! For Garage is fully equipped to handle drive failures, in most common cases. ## A note on availability of Garage @@ -61,7 +61,7 @@ garage repair -a --yes blocks This will re-synchronize blocks of data that are missing to the new HDD, reading them from copies located on other nodes. -You can check on the advancement of this process by doing the following command: +You can check on the advancement of this process by doing the following command: ```bash garage stats -a diff --git a/doc/book/operations/upgrading.md b/doc/book/operations/upgrading.md index a3d2bcf5..c239bfe4 100644 --- a/doc/book/operations/upgrading.md +++ b/doc/book/operations/upgrading.md @@ -71,7 +71,7 @@ The entire procedure would look something like this: 2. Take each node offline individually to back up its metadata folder, bring them back online once the backup is done. You can do all of the nodes in a single zone at once as that won't impact global cluster availability. - Do not try to manually copy the metadata folder of a running node. + Do not try to make a backup of the metadata folder of a running node. **Since Garage v0.9.4,** you can use the `garage meta snapshot --all` command to take a simultaneous snapshot of the metadata database files of all your diff --git a/doc/book/quick-start/_index.md b/doc/book/quick-start/_index.md index 633b785a..9619f388 100644 --- a/doc/book/quick-start/_index.md +++ b/doc/book/quick-start/_index.md @@ -42,13 +42,6 @@ If a binary of the last version is not available for your architecture, or if you want a build customized for your system, you can [build Garage from source](@/documentation/cookbook/from-source.md). -If none of these option work for you, you can also run Garage in a Docker -container. When using Docker, the commands used in this guide will not work -anymore. We recommend reading the tutorial on [configuring a -multi-node cluster](@/documentation/cookbook/real-world.md) to learn about -using Garage as a Docker container. For simplicity, a minimal command to launch -Garage using Docker is provided in this quick start guide as well. - ## Configuring and starting Garage @@ -92,9 +85,6 @@ metrics_token = "$(openssl rand -base64 32)" EOF ``` -See the [Configuration file format](https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/) -for complete options and values. - Now that your configuration file has been created, you may save it to the directory of your choice. By default, Garage looks for **`/etc/garage.toml`.** You can also store it somewhere else, but you will have to specify `-c path/to/garage.toml` @@ -121,26 +111,6 @@ garage -c path/to/garage.toml server If you have placed the `garage.toml` file in `/etc` (its default location), you can simply run `garage server`. -Alternatively, if you cannot or do not wish to run the Garage binary directly, -you may use Docker to run Garage in a container using the following command: - -```bash -docker run \ - -d \ - --name garaged \ - -p 3900:3900 -p 3901:3901 -p 3902:3902 -p 3903:3903 \ - -v /path/to/garage.toml:/etc/garage.toml \ - -v /path/to/garage/meta:/var/lib/garage/meta \ - -v /path/to/garage/data:/var/lib/garage/data \ - dxflrs/garage:v1.3.0 -``` - -Under Linux, you can substitute `--network host` for `-p 3900:3900 -p 3901:3901 -p 3902:3902 -p 3903:3903` - -#### Troubleshooting - -Ensure your configuration file, `metadata_dir` and `data_dir` are readable by the user running the `garage` server or Docker. - You can tune Garage's verbosity by setting the `RUST_LOG=` environment variable. \ Available log levels are (from less verbose to more verbose): `error`, `warn`, `info` *(default)*, `debug` and `trace`. @@ -161,9 +131,6 @@ It uses values from the TOML configuration file to find the Garage daemon runnin local node, therefore if your configuration file is not at `/etc/garage.toml` you will again have to specify `-c path/to/garage.toml` at each invocation. -If you are running Garage in a Docker container, you can set `alias garage="docker exec -ti /garage"` -to use the Garage binary inside your container. - If the `garage` CLI is able to correctly detect the parameters of your local Garage node, the following command should be enough to show the status of your cluster: @@ -182,12 +149,11 @@ ID Hostname Address Tag Zone Capacit ## Creating a cluster layout Creating a cluster layout for a Garage deployment means informing Garage -of the disk space available on each node of the cluster, `-c`, -as well as the name of the zone (e.g. datacenter), `-z`, each machine is located in. +of the disk space available on each node of the cluster +as well as the zone (e.g. datacenter) each machine is located in. -For our test deployment, we are have only one node with zone named `dc1` and a -capacity of `1G`, though the capacity is ignored for a single node deployment -and can be changed later when adding new nodes. +For our test deployment, we are using only one node. The way in which we configure +it does not matter, you can simply write: ```bash garage layout assign -z dc1 -c 1G @@ -200,7 +166,7 @@ For instance here you could write just `garage layout assign -z dc1 -c 1G 563e`. The layout then has to be applied to the cluster, using: ```bash -garage layout apply --version 1 +garage layout apply ``` @@ -350,7 +316,7 @@ Check [our s3 compatibility list](@/documentation/reference-manual/s3-compatibil ### Other tools for interacting with Garage -The following tools can also be used to send and receive files from/to Garage: +The following tools can also be used to send and recieve files from/to Garage: - [minio-client](@/documentation/connect/cli.md#minio-client) - [s3cmd](@/documentation/connect/cli.md#s3cmd) diff --git a/doc/book/reference-manual/configuration.md b/doc/book/reference-manual/configuration.md index 1f583fe6..e3595784 100644 --- a/doc/book/reference-manual/configuration.md +++ b/doc/book/reference-manual/configuration.md @@ -13,19 +13,16 @@ consistency_mode = "consistent" metadata_dir = "/var/lib/garage/meta" data_dir = "/var/lib/garage/data" -metadata_snapshots_dir = "/var/lib/garage/snapshots" metadata_fsync = true data_fsync = false disable_scrub = false -use_local_tz = false metadata_auto_snapshot_interval = "6h" db_engine = "lmdb" block_size = "1M" block_ram_buffer_max = "256MiB" -block_max_concurrent_reads = 16 -block_max_concurrent_writes_per_request =10 + lmdb_map_size = "1T" compression_level = 1 @@ -47,7 +44,6 @@ bootstrap_peers = [ "212fd62eeaca72c122b45a7f4fa0f55e012aa5e24ac384a72a3016413fa724ff@[fc00:F::1]:3901", ] -allow_punycode = false [consul_discovery] api = "catalog" @@ -77,7 +73,6 @@ root_domain = ".s3.garage" [s3_web] bind_addr = "[::]:3902" root_domain = ".web.garage" -add_host_to_metrics = true [admin] api_bind_addr = "0.0.0.0:3903" @@ -94,16 +89,12 @@ The following gives details about each available configuration option. [Environment variables](#env_variables). -Top-level configuration options, in alphabetical order: -[`allow_punycode`](#allow_punycode), +Top-level configuration options: [`allow_world_readable_secrets`](#allow_world_readable_secrets), -[`block_max_concurrent_reads`](`block_max_concurrent_reads), [`block_ram_buffer_max`](#block_ram_buffer_max), -[`block_max_concurrent_writes_per_request`](#block_max_concurrent_writes_per_request), [`block_size`](#block_size), [`bootstrap_peers`](#bootstrap_peers), [`compression_level`](#compression_level), -[`consistency_mode`](#consistency_mode), [`data_dir`](#data_dir), [`data_fsync`](#data_fsync), [`db_engine`](#db_engine), @@ -112,14 +103,13 @@ Top-level configuration options, in alphabetical order: [`metadata_auto_snapshot_interval`](#metadata_auto_snapshot_interval), [`metadata_dir`](#metadata_dir), [`metadata_fsync`](#metadata_fsync), -[`metadata_snapshots_dir`](#metadata_snapshots_dir), [`replication_factor`](#replication_factor), +[`consistency_mode`](#consistency_mode), [`rpc_bind_addr`](#rpc_bind_addr), [`rpc_bind_outgoing`](#rpc_bind_outgoing), [`rpc_public_addr`](#rpc_public_addr), [`rpc_public_addr_subnet`](#rpc_public_addr_subnet) -[`rpc_secret`/`rpc_secret_file`](#rpc_secret), -[`use_local_tz`](#use_local_tz). +[`rpc_secret`/`rpc_secret_file`](#rpc_secret). The `[consul_discovery]` section: [`api`](#consul_api), @@ -144,7 +134,6 @@ The `[s3_api]` section: [`s3_region`](#s3_region). The `[s3_web]` section: -[`add_host_to_metrics`](#web_add_host_to_metrics), [`bind_addr`](#web_bind_addr), [`root_domain`](#web_root_domain). @@ -156,17 +145,13 @@ The `[admin]` section: ### Environment variables {#env_variables} -The following configuration parameters must be specified as environment variables, -they do not exist in the configuration file: +The following configuration parameter must be specified as an environment +variable, it does not exist in the configuration file: -- `GARAGE_LOG_TO_SYSLOG` (since `v0.9.4`): set this to `1` or `true` to make the +- `GARAGE_LOG_TO_SYSLOG` (since v0.9.4): set this to `1` or `true` to make the Garage daemon send its logs to `syslog` (using the libc `syslog` function) instead of printing to stderr. -- `GARAGE_LOG_TO_JOURNALD` (since `v1.2.0`): set this to `1` or `true` to make the - Garage daemon send its logs to `journald` (using the native protocol of `systemd-journald`) - instead of printing to stderr. - The following environment variables can be used to override the corresponding values in the configuration file: @@ -178,7 +163,7 @@ values in the configuration file: ### Top-level configuration options -#### `replication_factor` (since `v1.0.0`) {#replication_factor} +#### `replication_factor` {#replication_factor} The replication factor can be any positive integer smaller or equal the node count in your cluster. The chosen replication factor has a big impact on the cluster's failure tolerancy and performance characteristics. @@ -226,7 +211,7 @@ is in progress. In theory, no data should be lost as rebalancing is a routine operation for Garage, although we cannot guarantee you that everything will go right in such an extreme scenario. -#### `consistency_mode` (since `v1.0.0`) {#consistency_mode} +#### `consistency_mode` {#consistency_mode} The consistency mode setting determines the read and write behaviour of your cluster. @@ -288,7 +273,6 @@ as the index of all objects, object version and object blocks. Store this folder on a fast SSD drive if possible to maximize Garage's performance. - #### `data_dir` {#data_dir} The directory in which Garage will store the data blocks of objects. @@ -309,25 +293,6 @@ data_dir = [ See [the dedicated documentation page](@/documentation/operations/multi-hdd.md) on how to operate Garage in such a setup. -#### `metadata_snapshots_dir` (since `v1.1.0`) {#metadata_snapshots_dir} - -The directory in which Garage will store metadata snapshots when it -performs a snapshot of the metadata database, either when instructed to do -so from a RPC call or regularly through -[`metadata_auto_snapshot_interval`](#metadata_auto_snapshot_interval). - -By default, Garage will store snapshots into a `snapshots/` subdirectory -of [`metadata_dir`](#metadata_dir). This might quickly fill up your -metadata storage space if you use snapshots, because Garage will need up -to 4x the space of the existing metadata database: each snapshot requires -roughly as much space as the original database, and Garage temporarily -needs to store up to three different snapshots before it cleans up the oldest -snapshot to go back to two stored snapshots. - -To prevent filling your disk, you might to change this setting to a -directory with ample available space, e.g. on the same storage space as -[`data_dir`](#data_dir). - #### `db_engine` (since `v0.8.0`) {#db_engine} Since `v0.8.0`, Garage can use alternative storage backends as follows: @@ -336,7 +301,6 @@ Since `v0.8.0`, Garage can use alternative storage backends as follows: | --------- | ----------------- | ------------- | | [LMDB](https://www.symas.com/lmdb) (since `v0.8.0`, default since `v0.9.0`) | `"lmdb"` | `/db.lmdb/` | | [Sqlite](https://sqlite.org) (since `v0.8.0`) | `"sqlite"` | `/db.sqlite` | -| [Fjall](https://github.com/fjall-rs/fjall) (**experimental support** since `v1.3.0`) | `"fjall"` | `/db.fjall/` | | [Sled](https://sled.rs) (old default, removed since `v1.0`) | `"sled"` | `/db/` | Sled was supported until Garage v0.9.x, and was removed in Garage v1.0. @@ -373,14 +337,6 @@ LMDB works very well, but is known to have the following limitations: so it is not the best choice for high-performance storage clusters, but it should work fine in many cases. -- Fjall: a storage engine based on LSM trees, which theoretically allow for - higher write throughput than other storage engines that are based on B-trees. - Using Fjall could potentially improve Garage's performance significantly in - write-heavy workloads. **Support for Fjall is experimental at this point**, - we have added it to Garage for evaluation purposes only. **Do not use it for - production-critical workloads.** - - It is possible to convert Garage's metadata directory from one format to another using the `garage convert-db` command, which should be used as follows: @@ -418,7 +374,6 @@ Here is how this option impacts the different database engines: |----------|------------------------------------|-------------------------------| | Sqlite | `PRAGMA synchronous = OFF` | `PRAGMA synchronous = NORMAL` | | LMDB | `MDB_NOMETASYNC` + `MDB_NOSYNC` | `MDB_NOMETASYNC` | -| Fjall | default options | not supported | Note that the Sqlite database is always ran in `WAL` mode (`PRAGMA journal_mode = WAL`). @@ -435,7 +390,7 @@ at the cost of a moderate drop in write performance. Similarly to `metatada_fsync`, this is likely not necessary if geographical replication is used. -#### `metadata_auto_snapshot_interval` (since `v0.9.4`) {#metadata_auto_snapshot_interval} +#### `metadata_auto_snapshot_interval` (since Garage v0.9.4) {#metadata_auto_snapshot_interval} If this value is set, Garage will automatically take a snapshot of the metadata DB file at a regular interval and save it in the metadata directory. @@ -472,13 +427,6 @@ you should delete it from the data directory and then call `garage repair blocks` on the node to ensure that it re-obtains a copy from another node on the network. -#### `use_local_tz` (since `v1.1.0`) {#use_local_tz} - -By default, Garage runs the lifecycle worker every day at midnight in UTC. Set the -`use_local_tz` configuration value to `true` if you want Garage to run the -lifecycle worker at midnight in your local timezone. If you have multiple nodes, -you should also ensure that each node has the same timezone configuration. - #### `block_size` {#block_size} Garage splits stored objects in consecutive chunks of size `block_size` @@ -494,7 +442,7 @@ files will remain available. This however means that chunks from existing files will not be deduplicated with chunks from newly uploaded files, meaning you might use more storage space that is optimally possible. -#### `block_ram_buffer_max` (since `v0.9.4`) {#block_ram_buffer_max} +#### `block_ram_buffer_max` (since v0.9.4) {#block_ram_buffer_max} A limit on the total size of data blocks kept in RAM by S3 API nodes awaiting to be sent to storage nodes asynchronously. @@ -525,37 +473,6 @@ node. The default value is 256MiB. -#### `block_max_concurrent_reads` (since `v1.3.0` / `v2.1.0`) {#block_max_concurrent_reads} - -The maximum number of blocks (individual files in the data directory) open -simultaneously for reading. - -Reducing this number does not limit the number of data blocks that can be -transferred through the network simultaneously. This mechanism was just added -as a backpressure mechanism for HDD read speed: it helps avoid a situation -where too many requests are coming in and Garage is reading too many block -files simultaneously, thus not making timely progress on any of the reads. - -When a request to read a data block comes in through the network, the requests -awaits for one of the `block_max_concurrent_reads` slots to be available -(internally implemented using a Semaphore object). Once it acquired a read -slot, it reads the entire block file to RAM and frees the slot as soon as the -block file is finished reading. Only after the slot is released will the -block's data start being transferred over the network. If the request fails to -acquire a reading slot wihtin 15 seconds, it fails with a timeout error. -Timeout events can be monitored through the `block_read_semaphore_timeouts` -metric in Prometheus: a non-zero number of such events indicates an I/O -bottleneck on HDD read speed. - - -#### `block_max_concurrent_writes_per_request` (since `v2.1.0`) {#block_max_concurrent_writes_per_request} - -This parameter is designed to adapt to the concurrent write performance of -different storage media.Maximum number of parallel block writes per put request -Higher values improve throughput but increase memory usage. - -Default: 3, Recommended: 10-30 for NVMe, 3-10 for HDD - #### `lmdb_map_size` {#lmdb_map_size} This parameters can be used to set the map size used by LMDB, @@ -612,7 +529,7 @@ the node, even in the case of a NAT: the NAT should be configured to forward the port number to the same internal port nubmer. This means that if you have several nodes running behind a NAT, they should each use a different RPC port number. -#### `rpc_bind_outgoing` (since `v0.9.2`) {#rpc_bind_outgoing} +#### `rpc_bind_outgoing`(since v0.9.2) {#rpc_bind_outgoing} If enabled, pre-bind all sockets for outgoing connections to the same IP address used for listening (the IP address specified in `rpc_bind_addr`) before @@ -654,7 +571,7 @@ be obtained by running `garage node id` and then included directly in the key will be returned by `garage node id` and you will have to add the IP yourself. -#### `allow_world_readable_secrets` or `GARAGE_ALLOW_WORLD_READABLE_SECRETS` (env) {#allow_world_readable_secrets} +### `allow_world_readable_secrets` or `GARAGE_ALLOW_WORLD_READABLE_SECRETS` (env) {#allow_world_readable_secrets} Garage checks the permissions of your secret files to make sure they're not world-readable. In some cases, the check might fail and consider your files as @@ -666,13 +583,6 @@ permission verification. Alternatively, you can set the `GARAGE_ALLOW_WORLD_READABLE_SECRETS` environment variable to `true` to bypass the permissions check. -#### `allow_punycode` {#allow_punycode} - -Allow creating buckets with names containing punycode. When used for buckets served -as websites, this allows using almost any unicode character in the domain name. - -Default to `false`. - ### The `[consul_discovery]` section Garage supports discovering other nodes of the cluster using Consul. For this @@ -803,13 +713,6 @@ For instance, if `root_domain` is `web.garage.eu`, a bucket called `deuxfleurs.f will be accessible either with hostname `deuxfleurs.fr.web.garage.eu` or with hostname `deuxfleurs.fr`. -#### `add_host_to_metrics` {#web_add_host_to_metrics} - -Whether to include the requested domain name (HTTP `Host` header) in the -Prometheus metrics of the web endpoint. This is disabled by default as the -number of possible values is not bounded and can be a source of cardinality -explosion in the exported metrics. - ### The `[admin]` section diff --git a/doc/book/reference-manual/features.md b/doc/book/reference-manual/features.md index 481aef01..34f692cc 100644 --- a/doc/book/reference-manual/features.md +++ b/doc/book/reference-manual/features.md @@ -61,7 +61,7 @@ directed to a Garage cluster can be handled independently of one another instead of going through a central bottleneck (the leader node). As a consequence, requests can be handled much faster, even in cases where latency between cluster nodes is important (see our [benchmarks](@/documentation/design/benchmarks/index.md) for data on this). -This is particularly useful when nodes are far from one another and talk to one other through standard Internet connections. +This is particularly usefull when nodes are far from one another and talk to one other through standard Internet connections. ### Web server for static websites diff --git a/doc/book/reference-manual/monitoring.md b/doc/book/reference-manual/monitoring.md index 4696791e..53608d95 100644 --- a/doc/book/reference-manual/monitoring.md +++ b/doc/book/reference-manual/monitoring.md @@ -392,7 +392,7 @@ table_merkle_updater_todo_queue_length{table_name="block_ref"} 0 #### `table_sync_items_received`, `table_sync_items_sent` (counters) -Number of data items sent to/received from other nodes during resync procedures +Number of data items sent to/recieved from other nodes during resync procedures ``` table_sync_items_received{from="",table_name="bucket_v2"} 3 diff --git a/doc/book/reference-manual/s3-compatibility.md b/doc/book/reference-manual/s3-compatibility.md index b869b6f4..d2c47f3e 100644 --- a/doc/book/reference-manual/s3-compatibility.md +++ b/doc/book/reference-manual/s3-compatibility.md @@ -23,17 +23,17 @@ Feel free to open a PR to suggest fixes this table. Minio is missing because the - 2022-05-25 - Many Ceph S3 endpoints are not documented but implemented. Following a notification from the Ceph community, we added them. + ## High-level features | Feature | Garage | [Openstack Swift](https://docs.openstack.org/swift/latest/s3_compat.html) | [Ceph Object Gateway](https://docs.ceph.com/en/latest/radosgw/s3/) | [Riak CS](https://docs.riak.com/riak/cs/2.1.1/references/apis/storage/s3/index.html) | [OpenIO](https://docs.openio.io/latest/source/arch-design/s3_compliancy.html) | |------------------------------|----------------------------------|-----------------|---------------|---------|-----| -| [signature v2](https://docs.aws.amazon.com/AmazonS3/latest/API/Appendix-Sigv2.html) (deprecated) | ❌ Missing | ✅ | ✅ | ✅ | ✅ | +| [signature v2](https://docs.aws.amazon.com/general/latest/gr/signature-version-2.html) (deprecated) | ❌ Missing | ✅ | ✅ | ✅ | ✅ | | [signature v4](https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html) | ✅ Implemented | ✅ | ✅ | ❌ | ✅ | | [URL path-style](https://docs.aws.amazon.com/AmazonS3/latest/userguide/VirtualHosting.html#path-style-access) (eg. `host.tld/bucket/key`) | ✅ Implemented | ✅ | ✅ | ❓| ✅ | | [URL vhost-style](https://docs.aws.amazon.com/AmazonS3/latest/userguide/VirtualHosting.html#virtual-hosted-style-access) URL (eg. `bucket.host.tld/key`) | ✅ Implemented | ❌| ✅| ✅ | ✅ | | [Presigned URLs](https://docs.aws.amazon.com/AmazonS3/latest/userguide/ShareObjectPreSignedURL.html) | ✅ Implemented | ❌| ✅ | ✅ | ✅(❓) | | [SSE-C encryption](https://docs.aws.amazon.com/AmazonS3/latest/userguide/ServerSideEncryptionCustomerKeys.html) | ✅ Implemented | ❓ | ✅ | ❌ | ✅ | -| [Bucket versioning](https://docs.aws.amazon.com/AmazonS3/latest/userguide/Versioning.html) | ❌ Missing | ✅ | ✅ | ❌ | ✅ | *Note:* OpenIO does not says if it supports presigned URLs. Because it is part of signature v4 and they claim they support it without additional precisions, diff --git a/doc/book/working-documents/design-draft.md b/doc/book/working-documents/design-draft.md index 8d3a31f0..6560dbed 100644 --- a/doc/book/working-documents/design-draft.md +++ b/doc/book/working-documents/design-draft.md @@ -42,7 +42,7 @@ The general principle are similar, but details have not been updated.** A version is defined by the existence of at least one entry in the blocks table for a certain version UUID. We must keep the following invariant: if a version exists in the blocks table, it has to be referenced in the objects table. We explicitly manage concurrent versions of an object: the version timestamp and version UUID columns are index columns, thus we may have several concurrent versions of an object. -Important: before deleting an older version from the objects table, we must make sure that we did a successful delete of the blocks of that version from the blocks table. +Important: before deleting an older version from the objects table, we must make sure that we did a successfull delete of the blocks of that version from the blocks table. Thus, the workflow for reading an object is as follows: @@ -95,7 +95,7 @@ Known issue: if someone is reading from a version that we want to delete and the Usefull metadata: - list of versions that reference this block in the Casandra table, so that we can do GC by checking in Cassandra that the lines still exist -- list of other nodes that we know have acknowledged a write of this block, useful in the rebalancing algorithm +- list of other nodes that we know have acknowledged a write of this block, usefull in the rebalancing algorithm Write strategy: have a single thread that does all write IO so that it is serialized (or have several threads that manage independent parts of the hash space). When writing a blob, write it to a temporary file, close, then rename so that a concurrent read gets a consistent result (either not found or found with whole content). diff --git a/doc/book/working-documents/migration-04.md b/doc/book/working-documents/migration-04.md index 52c56737..d9d3ede1 100644 --- a/doc/book/working-documents/migration-04.md +++ b/doc/book/working-documents/migration-04.md @@ -68,7 +68,7 @@ The migration steps are as follows: 5. Turn off Garage 0.3 6. Backup metadata folders if you can (i.e. if you have space to do it - somewhere). Backuping data folders could also be useful but that's much + somewhere). Backuping data folders could also be usefull but that's much harder to do. If your filesystem supports snapshots, this could be a good time to use them. diff --git a/doc/book/working-documents/testing-strategy.md b/doc/book/working-documents/testing-strategy.md index fff706d7..7d6be8ef 100644 --- a/doc/book/working-documents/testing-strategy.md +++ b/doc/book/working-documents/testing-strategy.md @@ -37,7 +37,7 @@ There are two reasons for this: Reminder: rules of simplicity, concerning changes to Garage's source code. Always question what we are doing. -Never do anything just because it looks nice or because we "think" it might be useful at some later point but without knowing precisely why/when. +Never do anything just because it looks nice or because we "think" it might be usefull at some later point but without knowing precisely why/when. Only do things that make perfect sense in the context of what we currently know. ## References diff --git a/doc/drafts/admin-api.md b/doc/drafts/admin-api.md index 3ee948cb..16338194 100644 --- a/doc/drafts/admin-api.md +++ b/doc/drafts/admin-api.md @@ -70,7 +70,7 @@ Example response body: ```json { "node": "b10c110e4e854e5aa3f4637681befac755154b20059ec163254ddbfae86b09df", - "garageVersion": "v1.3.0", + "garageVersion": "v1.0.0", "garageFeatures": [ "k2v", "lmdb", diff --git a/doc/drafts/k2v-spec.md b/doc/drafts/k2v-spec.md index f9696717..3956fa31 100644 --- a/doc/drafts/k2v-spec.md +++ b/doc/drafts/k2v-spec.md @@ -562,7 +562,7 @@ token>", v: ["", ...] }`, with the following fields: - in case of concurrent update and deletion, a `null` is added to the list of concurrent values - if the `tombstones` query parameter is set to `true`, tombstones are returned - for items that have been deleted (this can be useful for inserting after an + for items that have been deleted (this can be usefull for inserting after an item that has been deleted, so that the insert is not considered concurrent with the delete). Tombstones are returned as tuples in the same format with only `null` values diff --git a/flake.lock b/flake.lock index 211b70e0..2479fb5a 100644 --- a/flake.lock +++ b/flake.lock @@ -1,27 +1,38 @@ { "nodes": { - "crane": { + "cargo2nix": { + "inputs": { + "flake-compat": [ + "flake-compat" + ], + "flake-utils": "flake-utils", + "nixpkgs": [ + "nixpkgs" + ], + "rust-overlay": "rust-overlay" + }, "locked": { - "lastModified": 1737689766, - "narHash": "sha256-ivVXYaYlShxYoKfSo5+y5930qMKKJ8CLcAoIBPQfJ6s=", - "owner": "ipetkov", - "repo": "crane", - "rev": "6fe74265bbb6d016d663b1091f015e2976c4a527", + "lastModified": 1666087781, + "narHash": "sha256-trKVdjMZ8mNkGfLcY5LsJJGtdV3xJDZnMVrkFjErlcs=", + "owner": "Alexis211", + "repo": "cargo2nix", + "rev": "a7a61179b66054904ef6a195d8da736eaaa06c36", "type": "github" }, "original": { - "owner": "ipetkov", - "repo": "crane", + "owner": "Alexis211", + "repo": "cargo2nix", + "rev": "a7a61179b66054904ef6a195d8da736eaaa06c36", "type": "github" } }, "flake-compat": { "locked": { - "lastModified": 1717312683, - "narHash": "sha256-FrlieJH50AuvagamEvWMIE6D2OAnERuDboFDYAED/dE=", + "lastModified": 1688025799, + "narHash": "sha256-ktpB4dRtnksm9F5WawoIkEneh1nrEvuxb5lJFt1iOyw=", "owner": "nix-community", "repo": "flake-compat", - "rev": "38fd3954cf65ce6faf3d0d45cd26059e059f07ea", + "rev": "8bf105319d44f6b9f0d764efa4fdef9f1cc9ba1c", "type": "github" }, "original": { @@ -35,11 +46,29 @@ "systems": "systems" }, "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "lastModified": 1681202837, + "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", "owner": "numtide", "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "rev": "cfacdce06f30d2b68473a46042957675eebb3401", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { + "inputs": { + "systems": "systems_2" + }, + "locked": { + "lastModified": 1681202837, + "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "cfacdce06f30d2b68473a46042957675eebb3401", "type": "github" }, "original": { @@ -50,47 +79,63 @@ }, "nixpkgs": { "locked": { - "lastModified": 1763977559, - "narHash": "sha256-g4MKqsIRy5yJwEsI+fYODqLUnAqIY4kZai0nldAP6EM=", + "lastModified": 1682109806, + "narHash": "sha256-d9g7RKNShMLboTWwukM+RObDWWpHKaqTYXB48clBWXI=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "cfe2c7d5b5d3032862254e68c37a6576b633d632", + "rev": "2362848adf8def2866fabbffc50462e929d7fffb", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1707091808, + "narHash": "sha256-LahKBAfGbY836gtpVNnWwBTIzN7yf/uYM/S0g393r0Y=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "9f2ee8c91ac42da3ae6c6a1d21555f283458247e", "type": "github" }, "original": { "owner": "NixOS", "repo": "nixpkgs", - "rev": "cfe2c7d5b5d3032862254e68c37a6576b633d632", + "rev": "9f2ee8c91ac42da3ae6c6a1d21555f283458247e", "type": "github" } }, "root": { "inputs": { - "crane": "crane", + "cargo2nix": "cargo2nix", "flake-compat": "flake-compat", - "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs", - "rust-overlay": "rust-overlay" + "flake-utils": [ + "cargo2nix", + "flake-utils" + ], + "nixpkgs": "nixpkgs_2" } }, "rust-overlay": { "inputs": { - "nixpkgs": [ - "nixpkgs" - ] + "flake-utils": "flake-utils_2", + "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1763952169, - "narHash": "sha256-+PeDBD8P+NKauH+w7eO/QWCIp8Cx4mCfWnh9sJmy9CM=", + "lastModified": 1707271822, + "narHash": "sha256-/DZsoPH5GBzOpVEGz5PgJ7vh8Q6TcrJq5u8FcBjqAfI=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "ab726555a9a72e6dc80649809147823a813fa95b", + "rev": "7a94fe7690d2bdfe1aab475382a505e14dc114a6", "type": "github" }, "original": { "owner": "oxalica", "repo": "rust-overlay", - "rev": "ab726555a9a72e6dc80649809147823a813fa95b", "type": "github" } }, @@ -108,6 +153,21 @@ "repo": "default", "type": "github" } + }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 01a077c4..f8840c5b 100644 --- a/flake.nix +++ b/flake.nix @@ -2,95 +2,89 @@ description = "Garage, an S3-compatible distributed object store for self-hosted deployments"; - # Nixpkgs 25.05 as of 2025-11-24 + # Nixpkgs 23.11 as of 2024-02-07, has rustc v1.73 inputs.nixpkgs.url = - "github:NixOS/nixpkgs/cfe2c7d5b5d3032862254e68c37a6576b633d632"; - - # Rust overlay as of 2025-11-24 - inputs.rust-overlay.url = - "github:oxalica/rust-overlay/ab726555a9a72e6dc80649809147823a813fa95b"; - inputs.rust-overlay.inputs.nixpkgs.follows = "nixpkgs"; - - inputs.crane.url = "github:ipetkov/crane"; + "github:NixOS/nixpkgs/9f2ee8c91ac42da3ae6c6a1d21555f283458247e"; inputs.flake-compat.url = "github:nix-community/flake-compat"; - inputs.flake-utils.url = "github:numtide/flake-utils"; - outputs = { self, nixpkgs, flake-utils, crane, rust-overlay, ... }: + inputs.cargo2nix = { + # As of 2022-10-18: two small patches over unstable branch, one for clippy and one to fix feature detection + url = "github:Alexis211/cargo2nix/a7a61179b66054904ef6a195d8da736eaaa06c36"; + + # As of 2023-04-25: + # - my two patches were merged into unstable (one for clippy and one to "fix" feature detection) + # - rustc v1.66 + # url = "github:cargo2nix/cargo2nix/8fb57a670f7993bfc24099c33eb9c5abb51f29a2"; + + # Rust overlay as of 2024-02-07 + inputs.rust-overlay.url = + "github:oxalica/rust-overlay/7a94fe7690d2bdfe1aab475382a505e14dc114a6"; + + inputs.nixpkgs.follows = "nixpkgs"; + inputs.flake-compat.follows = "flake-compat"; + }; + + inputs.flake-utils.follows = "cargo2nix/flake-utils"; + + outputs = { self, nixpkgs, cargo2nix, flake-utils, ... }: let + git_version = self.lastModifiedDate; compile = import ./nix/compile.nix; in flake-utils.lib.eachDefaultSystem (system: let pkgs = nixpkgs.legacyPackages.${system}; - packageFor = target: release: (compile { - inherit system target nixpkgs crane rust-overlay release; - }).garage; - testWith = extraTestEnv: (compile { - inherit system nixpkgs crane rust-overlay extraTestEnv; - release = false; - }).garage-test; - lints = (compile { - inherit system nixpkgs crane rust-overlay; - release = false; - }); in { - packages = { - # default = native release build - default = packageFor null true; - - # = cross-compiled, statically-linked release builds - amd64 = packageFor "x86_64-unknown-linux-musl" true; - i386 = packageFor "i686-unknown-linux-musl" true; - arm64 = packageFor "aarch64-unknown-linux-musl" true; - arm = packageFor "armv6l-unknown-linux-musl" true; - - # dev = native dev build - dev = packageFor null false; - - # test = cargo test - tests = testWith {}; - tests-lmdb = testWith { - GARAGE_TEST_INTEGRATION_DB_ENGINE = "lmdb"; + packages = + let + packageFor = target: (compile { + inherit system git_version target; + pkgsSrc = nixpkgs; + cargo2nixOverlay = cargo2nix.overlays.default; + release = true; + }).workspace.garage { compileMode = "build"; }; + in + { + # default = native release build + default = packageFor null; + # other = cross-compiled, statically-linked builds + amd64 = packageFor "x86_64-unknown-linux-musl"; + i386 = packageFor "i686-unknown-linux-musl"; + arm64 = packageFor "aarch64-unknown-linux-musl"; + arm = packageFor "armv6l-unknown-linux-musl"; }; - tests-sqlite = testWith { - GARAGE_TEST_INTEGRATION_DB_ENGINE = "sqlite"; - }; - tests-fjall = testWith { - GARAGE_TEST_INTEGRATION_DB_ENGINE = "fjall"; - }; - - # lints (fmt, clippy) - fmt = lints.garage-cargo-fmt; - clippy = lints.garage-cargo-clippy; - }; # ---- developpment shell, for making native builds only ---- devShells = let - targets = compile { - inherit system nixpkgs crane rust-overlay; - }; + shellWithPackages = (packages: (compile { + inherit system git_version; + pkgsSrc = nixpkgs; + cargo2nixOverlay = cargo2nix.overlays.default; + }).workspaceShell { inherit packages; }); in { - default = targets.devShell; - - # import the full shell using `nix develop .#full` - full = pkgs.mkShell { - buildInputs = with pkgs; [ - targets.toolchain - protobuf + default = shellWithPackages + (with pkgs; [ + rustfmt clang mold - # ---- extra packages for dev tasks ---- - rust-analyzer - cargo-audit - cargo-outdated - cargo-machete - nixpkgs-fmt - ]; - }; + ]); + + # import the full shell using `nix develop .#full` + full = shellWithPackages (with pkgs; [ + rustfmt + rust-analyzer + clang + mold + # ---- extra packages for dev tasks ---- + cargo-audit + cargo-outdated + cargo-machete + nixpkgs-fmt + ]); }; }); } diff --git a/nix/build_index.nix b/nix/build_index.nix index 7869566f..7cc4f62c 100644 --- a/nix/build_index.nix +++ b/nix/build_index.nix @@ -2,7 +2,7 @@ with import ./common.nix; let - pkgs = import nixpkgs { }; + pkgs = import pkgsSrc { }; lib = pkgs.lib; /* Converts a key list and a value list to a set diff --git a/nix/common.nix b/nix/common.nix index 2c03f04e..1ad809bb 100644 --- a/nix/common.nix +++ b/nix/common.nix @@ -10,9 +10,9 @@ let flake = (import flake-compat { system = builtins.currentSystem; src = ../.; }); in - -{ - flake = flake.defaultNix; - nixpkgs = flake.defaultNix.inputs.nixpkgs; - devShells = flake.defaultNix.devShells.${builtins.currentSystem}; +rec { + pkgsSrc = flake.defaultNix.inputs.nixpkgs; + cargo2nix = flake.defaultNix.inputs.cargo2nix; + cargo2nixOverlay = cargo2nix.overlays.default; + devShells = builtins.getAttr builtins.currentSystem flake.defaultNix.devShells; } diff --git a/nix/compile.nix b/nix/compile.nix index c6df9dbd..6a92e479 100644 --- a/nix/compile.nix +++ b/nix/compile.nix @@ -1,64 +1,164 @@ -{ - /* build inputs */ - nixpkgs, - crane, - rust-overlay, - - /* parameters */ - system, - git_version ? null, - target ? null, - release ? false, - features ? null, - extraTestEnv ? {} -}: +{ system, target ? null, pkgsSrc, cargo2nixOverlay, compiler ? "rustc" +, release ? false, git_version ? null, features ? null, }: let log = v: builtins.trace v v; - # NixOS and Rust/Cargo triples do not match for ARM, fix it here. - rustTarget = if target == "armv6l-unknown-linux-musleabihf" then - "arm-unknown-linux-musleabihf" - else - target; - - rustTargetEnvMap = { - "x86_64-unknown-linux-musl" = "X86_64_UNKNOWN_LINUX_MUSL"; - "aarch64-unknown-linux-musl" = "AARCH64_UNKNOWN_LINUX_MUSL"; - "i686-unknown-linux-musl" = "I686_UNKNOWN_LINUX_MUSL"; - "arm-unknown-linux-musleabihf" = "ARM_UNKNOWN_LINUX_MUSLEABIHF"; - }; - - pkgsNative = import nixpkgs { - inherit system; - overlays = [ (import rust-overlay) ]; - }; - pkgs = if target != null then - import nixpkgs { + import pkgsSrc { inherit system; crossSystem = { config = target; isStatic = true; }; - overlays = [ (import rust-overlay) ]; + overlays = [ cargo2nixOverlay ]; } else - pkgsNative; + import pkgsSrc { + inherit system; + overlays = [ cargo2nixOverlay ]; + }; - inherit (pkgs) lib stdenv; + toolchainOptions = { + rustVersion = "1.73.0"; + extraRustComponents = [ "clippy" ]; + }; - toolchainFn = (p: p.rust-bin.stable."1.91.0".default.override { - targets = lib.optionals (target != null) [ rustTarget ]; - extensions = [ - "rust-src" - "rustfmt" + buildEnv = (drv: + { + rustc = drv.setBuildEnv; + clippy = '' + ${drv.setBuildEnv or ""} + echo + echo --- BUILDING WITH CLIPPY --- + echo + + export NIX_RUST_BUILD_FLAGS="''${NIX_RUST_BUILD_FLAGS} --deny warnings" + export RUSTC="''${CLIPPY_DRIVER}" + ''; + }.${compiler}); + + /* Cargo2nix provides many overrides by default, you can take inspiration from them: + https://github.com/cargo2nix/cargo2nix/blob/master/overlay/overrides.nix + + You can have a complete list of the available options by looking at the overriden object, mkcrate: + https://github.com/cargo2nix/cargo2nix/blob/master/overlay/mkcrate.nix + */ + packageOverrides = pkgs: + pkgs.rustBuilder.overrides.all ++ [ + /* [1] We add some logic to compile our crates with clippy, it provides us many additional lints + + [2] We need to alter Nix hardening to make static binaries: PIE, + Position Independent Executables seems to be supported only on amd64. Having + this flag set either 1. make our executables crash or 2. compile as dynamic on some platforms. + Here, we deactivate it. Later (find `codegenOpts`), we reactivate it for supported targets + (only amd64 curently) through the `-static-pie` flag. + PIE is a feature used by ASLR, which helps mitigate security issues. + Learn more about Nix Hardening at: https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/cc-wrapper/add-hardening.sh + + [3] We want to inject the git version while keeping the build deterministic. + As we do not want to consider the .git folder as part of the input source, + we ask the user (the CI often) to pass the value to Nix. + + [4] We don't want libsodium-sys and zstd-sys to try to use pkgconfig to build against a system library. + However the features to do so get activated for some reason (due to a bug in cargo2nix?), + so disable them manually here. + */ + (pkgs.rustBuilder.rustLib.makeOverride { + name = "garage"; + overrideAttrs = drv: + (if git_version != null then { + # [3] + preConfigure = '' + ${drv.preConfigure or ""} + export GIT_VERSION="${git_version}" + ''; + } else + { }) // { + # [1] + setBuildEnv = (buildEnv drv); + # [2] + hardeningDisable = [ "pie" ]; + }; + }) + + (pkgs.rustBuilder.rustLib.makeOverride { + name = "garage_rpc"; + overrideAttrs = drv: { # [1] + setBuildEnv = (buildEnv drv); + }; + }) + + (pkgs.rustBuilder.rustLib.makeOverride { + name = "garage_db"; + overrideAttrs = drv: { # [1] + setBuildEnv = (buildEnv drv); + }; + }) + + (pkgs.rustBuilder.rustLib.makeOverride { + name = "garage_util"; + overrideAttrs = drv: { # [1] + setBuildEnv = (buildEnv drv); + }; + }) + + (pkgs.rustBuilder.rustLib.makeOverride { + name = "garage_table"; + overrideAttrs = drv: { # [1] + setBuildEnv = (buildEnv drv); + }; + }) + + (pkgs.rustBuilder.rustLib.makeOverride { + name = "garage_block"; + overrideAttrs = drv: { # [1] + setBuildEnv = (buildEnv drv); + }; + }) + + (pkgs.rustBuilder.rustLib.makeOverride { + name = "garage_model"; + overrideAttrs = drv: { # [1] + setBuildEnv = (buildEnv drv); + }; + }) + + (pkgs.rustBuilder.rustLib.makeOverride { + name = "garage_api"; + overrideAttrs = drv: { # [1] + setBuildEnv = (buildEnv drv); + }; + }) + + (pkgs.rustBuilder.rustLib.makeOverride { + name = "garage_web"; + overrideAttrs = drv: { # [1] + setBuildEnv = (buildEnv drv); + }; + }) + + (pkgs.rustBuilder.rustLib.makeOverride { + name = "k2v-client"; + overrideAttrs = drv: { # [1] + setBuildEnv = (buildEnv drv); + }; + }) + + (pkgs.rustBuilder.rustLib.makeOverride { + name = "libsodium-sys"; + overrideArgs = old: { + features = [ ]; # [4] + }; + }) + + (pkgs.rustBuilder.rustLib.makeOverride { + name = "zstd-sys"; + overrideArgs = old: { + features = [ ]; # [4] + }; + }) ]; - }); - - craneLib = (crane.mkLib pkgs).overrideToolchain toolchainFn; - - src = craneLib.cleanCargoSource ../.; /* We ship some parts of the code disabled by default by putting them behind a flag. It speeds up the compilation (when the feature is not required) and released crates have less dependency by default (less attack surface, disk space, etc.). @@ -68,16 +168,16 @@ let rootFeatures = if features != null then features else - ([ "bundled-libs" "lmdb" "sqlite" "fjall" "k2v" ] ++ (lib.optionals release [ - "consul-discovery" - "kubernetes-discovery" - "metrics" - "telemetry-otlp" - "syslog" - "journald" - ])); + ([ "garage/bundled-libs" "garage/lmdb" "garage/sqlite" "garage/k2v" ] ++ (if release then [ + "garage/consul-discovery" + "garage/kubernetes-discovery" + "garage/metrics" + "garage/telemetry-otlp" + "garage/syslog" + ] else + [ ])); - featuresStr = lib.concatStringsSep "," rootFeatures; + packageFun = import ../Cargo.nix; /* We compile fully static binaries with musl to simplify deployment on most systems. When possible, we reactivate PIE hardening (see above). @@ -88,9 +188,12 @@ let For more information on static builds, please refer to Rust's RFC 1721. https://rust-lang.github.io/rfcs/1721-crt-static.html#specifying-dynamicstatic-c-runtime-linkage */ - codegenOptsMap = { - "x86_64-unknown-linux-musl" = - [ "target-feature=+crt-static" "link-arg=-static-pie" ]; + + codegenOpts = { + "armv6l-unknown-linux-musleabihf" = [ + "target-feature=+crt-static" + "link-arg=-static" + ]; # compile as dynamic with static-pie "aarch64-unknown-linux-musl" = [ "target-feature=+crt-static" "link-arg=-static" @@ -99,106 +202,17 @@ let "target-feature=+crt-static" "link-arg=-static" ]; # segfault with static-pie - "armv6l-unknown-linux-musleabihf" = [ - "target-feature=+crt-static" - "link-arg=-static" - ]; # compile as dynamic with static-pie + "x86_64-unknown-linux-musl" = + [ "target-feature=+crt-static" "link-arg=-static-pie" ]; }; - codegenOpts = if target != null then codegenOptsMap.${target} else [ - "link-arg=-fuse-ld=mold" - ]; + # NixOS and Rust/Cargo triples do not match for ARM, fix it here. + rustTarget = if target == "armv6l-unknown-linux-musleabihf" then + "arm-unknown-linux-musleabihf" + else + target; - commonArgs = - { - inherit src; - pname = "garage"; - version = "dev"; - - strictDeps = true; - cargoExtraArgs = "--locked --features ${featuresStr}"; - cargoTestExtraArgs = "--workspace"; - - nativeBuildInputs = [ - pkgsNative.protobuf - pkgs.stdenv.cc - ] ++ lib.optionals (target == null) [ - pkgs.clang - pkgs.mold - ]; - - CARGO_PROFILE = if release then "release" else "dev"; - CARGO_BUILD_RUSTFLAGS = - lib.concatStringsSep - " " - (builtins.map (flag: "-C ${flag}") codegenOpts); - } - // - (if rustTarget != null then { - CARGO_BUILD_TARGET = rustTarget; - - "CARGO_TARGET_${rustTargetEnvMap.${rustTarget}}_LINKER" = "${stdenv.cc.targetPrefix}cc"; - - HOST_CC = "${stdenv.cc.nativePrefix}cc"; - TARGET_CC = "${stdenv.cc.targetPrefix}cc"; - } else { - CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER = "clang"; - }); - -in rec { - toolchain = toolchainFn pkgs; - - devShell = pkgs.mkShell { - buildInputs = [ - toolchain - ] ++ (with pkgs; [ - protobuf - clang - mold - ]); - }; - - # ---- building garage ---- - - garage-deps = craneLib.buildDepsOnly commonArgs; - - garage = craneLib.buildPackage (commonArgs // { - cargoArtifacts = garage-deps; - - doCheck = false; - } // - (if git_version != null then { - version = git_version; - GIT_VERSION = git_version; - } else {})); - - # ---- testing garage ---- - - garage-test-bin = craneLib.cargoBuild (commonArgs // { - cargoArtifacts = garage-deps; - - pname = "garage-tests"; - - CARGO_PROFILE = "test"; - cargoExtraArgs = "${commonArgs.cargoExtraArgs} --tests --workspace"; - doCheck = false; - }); - - garage-test = craneLib.cargoTest (commonArgs // { - cargoArtifacts = garage-test-bin; - nativeBuildInputs = commonArgs.nativeBuildInputs ++ [ - pkgs.cacert - ]; - } // extraTestEnv); - - # ---- source code linting ---- - - garage-cargo-fmt = craneLib.cargoFmt (commonArgs // { - cargoExtraArgs = ""; - }); - - garage-cargo-clippy = craneLib.cargoClippy (commonArgs // { - cargoArtifacts = garage-deps; - cargoClippyExtraArgs = "--all-targets -- -D warnings"; - }); -} +in pkgs.rustBuilder.makePackageSet ({ + inherit release packageFun packageOverrides codegenOpts rootFeatures; + target = rustTarget; +} // toolchainOptions) diff --git a/script/dev-cluster.sh b/script/dev-cluster.sh index 998ffdb9..6b39255a 100755 --- a/script/dev-cluster.sh +++ b/script/dev-cluster.sh @@ -11,7 +11,7 @@ PATH="${GARAGE_DEBUG}:${GARAGE_RELEASE}:${NIX_RELEASE}:$PATH" FANCYCOLORS=("41m" "42m" "44m" "45m" "100m" "104m") export RUST_BACKTRACE=1 -export RUST_LOG=garage=info,garage_api_common=debug,garage_api_s3=debug +export RUST_LOG=garage=info,garage_api=debug MAIN_LABEL="\e[${FANCYCOLORS[0]}[main]\e[49m" if [ -z "$GARAGE_BIN" ]; then diff --git a/script/dev-env-aws.sh b/script/dev-env-aws.sh index 41f1fdde..808f9cf1 100644 --- a/script/dev-env-aws.sh +++ b/script/dev-env-aws.sh @@ -1,7 +1,6 @@ export AWS_ACCESS_KEY_ID=`cat /tmp/garage.s3 |cut -d' ' -f1` export AWS_SECRET_ACCESS_KEY=`cat /tmp/garage.s3 |cut -d' ' -f2` export AWS_DEFAULT_REGION='garage' -export AWS_REQUEST_CHECKSUM_CALCULATION='when_required' # FUTUREWORK: set AWS_ENDPOINT_URL instead, once nixpkgs bumps awscli to >=2.13.0. function aws { command aws --endpoint-url http://127.0.0.1:3911 $@ ; } diff --git a/script/helm/README.md b/script/helm/README.md index 1b22e604..5f919a23 100644 --- a/script/helm/README.md +++ b/script/helm/README.md @@ -1,3 +1,3 @@ # Garage helm3 chart -Documentation is located [here](https://garagehq.deuxfleurs.fr/documentation/cookbook/kubernetes/). +Documentation is located [here](/doc/book/cookbook/kubernetes.md). diff --git a/script/helm/garage/Chart.yaml b/script/helm/garage/Chart.yaml index b3a7b921..f3834fdc 100644 --- a/script/helm/garage/Chart.yaml +++ b/script/helm/garage/Chart.yaml @@ -1,18 +1,24 @@ apiVersion: v2 name: garage description: S3-compatible object store for small self-hosted geo-distributed deployments + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. type: application -version: 0.7.3 -appVersion: "v1.3.1" -home: https://garagehq.deuxfleurs.fr/ -icon: https://garagehq.deuxfleurs.fr/images/garage-logo.svg -keywords: -- geo-distributed -- read-after-write-consistency -- s3-compatible +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 0.5.0 -sources: -- https://git.deuxfleurs.fr/Deuxfleurs/garage.git - -maintainers: [] +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "v1.0.0" diff --git a/script/helm/garage/README.md b/script/helm/garage/README.md deleted file mode 100644 index bdf69ec4..00000000 --- a/script/helm/garage/README.md +++ /dev/null @@ -1,95 +0,0 @@ -# garage - -![Version: 0.7.3](https://img.shields.io/badge/Version-0.7.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v1.3.1](https://img.shields.io/badge/AppVersion-v1.3.1-informational?style=flat-square) - -S3-compatible object store for small self-hosted geo-distributed deployments - -**Homepage:** - -## Source Code - -* - -## Values - -| Key | Type | Default | Description | -|-----|------|---------|-------------| -| affinity | object | `{}` | | -| deployment.kind | string | `"StatefulSet"` | Switchable to DaemonSet | -| deployment.podManagementPolicy | string | `"OrderedReady"` | If using statefulset, allow Parallel or OrderedReady (default) | -| deployment.replicaCount | int | `3` | Number of StatefulSet replicas/garage nodes to start | -| environment | object | `{}` | | -| extraVolumeMounts | object | `{}` | | -| extraVolumes | object | `{}` | | -| fullnameOverride | string | `""` | | -| garage.blockSize | string | `"1048576"` | Defaults is 1MB An increase can result in better performance in certain scenarios https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#block-size | -| garage.bootstrapPeers | list | `[]` | This is not required if you use the integrated kubernetes discovery | -| garage.compressionLevel | string | `"1"` | zstd compression level of stored blocks https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#compression-level | -| garage.dbEngine | string | `"lmdb"` | Can be changed for better performance on certain systems https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#db-engine-since-v0-8-0 | -| garage.existingConfigMap | string | `""` | if not empty string, allow using an existing ConfigMap for the garage.toml, if set, ignores garage.toml | -| garage.garageTomlString | string | `""` | String Template for the garage configuration if set, ignores above values. Values can be templated, see https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/ | -| garage.kubernetesSkipCrd | bool | `false` | Set to true if you want to use k8s discovery but install the CRDs manually outside of the helm chart, for example if you operate at namespace level without cluster ressources | -| garage.metadataAutoSnapshotInterval | string | `""` | If this value is set, Garage will automatically take a snapshot of the metadata DB file at a regular interval and save it in the metadata directory. https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#metadata_auto_snapshot_interval | -| garage.replicationMode | string | `"3"` | Default to 3 replicas, see the replication_mode section at https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#replication-mode | -| garage.rpcBindAddr | string | `"[::]:3901"` | | -| garage.rpcSecret | string | `""` | If not given, a random secret will be generated and stored in a Secret object | -| garage.s3.api.region | string | `"garage"` | | -| garage.s3.api.rootDomain | string | `".s3.garage.tld"` | | -| garage.s3.web.index | string | `"index.html"` | | -| garage.s3.web.rootDomain | string | `".web.garage.tld"` | | -| image.pullPolicy | string | `"IfNotPresent"` | | -| image.repository | string | `"dxflrs/amd64_garage"` | default to amd64 docker image | -| image.tag | string | `""` | set the image tag, please prefer using the chart version and not this to avoid compatibility issues | -| imagePullSecrets | list | `[]` | set if you need credentials to pull your custom image | -| ingress.s3.api.annotations | object | `{}` | Rely _either_ on the className or the annotation below but not both! If you want to use the className, set className: "nginx" and replace "nginx" by an Ingress controller name, examples [here](https://kubernetes.io/docs/concepts/services-networking/ingress-controllers). | -| ingress.s3.api.enabled | bool | `false` | | -| ingress.s3.api.hosts[0] | object | `{"host":"s3.garage.tld","paths":[{"path":"/","pathType":"Prefix"}]}` | garage S3 API endpoint, to be used with awscli for example | -| ingress.s3.api.hosts[1] | object | `{"host":"*.s3.garage.tld","paths":[{"path":"/","pathType":"Prefix"}]}` | garage S3 API endpoint, DNS style bucket access | -| ingress.s3.api.labels | object | `{}` | | -| ingress.s3.api.tls | list | `[]` | | -| ingress.s3.web.annotations | object | `{}` | Rely _either_ on the className or the annotation below but not both! If you want to use the className, set className: "nginx" and replace "nginx" by an Ingress controller name, examples [here](https://kubernetes.io/docs/concepts/services-networking/ingress-controllers). | -| ingress.s3.web.enabled | bool | `false` | | -| ingress.s3.web.hosts[0] | object | `{"host":"*.web.garage.tld","paths":[{"path":"/","pathType":"Prefix"}]}` | wildcard website access with bucket name prefix | -| ingress.s3.web.hosts[1] | object | `{"host":"mywebpage.example.com","paths":[{"path":"/","pathType":"Prefix"}]}` | specific bucket access with FQDN bucket | -| ingress.s3.web.labels | object | `{}` | | -| ingress.s3.web.tls | list | `[]` | | -| initImage.pullPolicy | string | `"IfNotPresent"` | | -| initImage.repository | string | `"busybox"` | | -| initImage.tag | string | `"stable"` | | -| livenessProbe | object | `{}` | Specifies a livenessProbe | -| monitoring.metrics.enabled | bool | `false` | If true, a service for monitoring is created with a prometheus.io/scrape annotation | -| monitoring.metrics.serviceMonitor.enabled | bool | `false` | If true, a ServiceMonitor CRD is created for a prometheus operator https://github.com/coreos/prometheus-operator | -| monitoring.metrics.serviceMonitor.interval | string | `"15s"` | | -| monitoring.metrics.serviceMonitor.labels | object | `{}` | | -| monitoring.metrics.serviceMonitor.path | string | `"/metrics"` | | -| monitoring.metrics.serviceMonitor.relabelings | list | `[]` | | -| monitoring.metrics.serviceMonitor.scheme | string | `"http"` | | -| monitoring.metrics.serviceMonitor.scrapeTimeout | string | `"10s"` | | -| monitoring.metrics.serviceMonitor.tlsConfig | object | `{}` | | -| monitoring.tracing.sink | string | `""` | specify a sink endpoint for OpenTelemetry Traces, eg. `http://localhost:4317` | -| nameOverride | string | `""` | | -| nodeSelector | object | `{}` | | -| persistence.data.hostPath | string | `"/var/lib/garage/data"` | | -| persistence.data.size | string | `"100Mi"` | | -| persistence.enabled | bool | `true` | | -| persistence.meta.hostPath | string | `"/var/lib/garage/meta"` | | -| persistence.meta.size | string | `"100Mi"` | | -| podAnnotations | object | `{}` | additonal pod annotations | -| podSecurityContext.fsGroup | int | `1000` | | -| podSecurityContext.runAsGroup | int | `1000` | | -| podSecurityContext.runAsNonRoot | bool | `true` | | -| podSecurityContext.runAsUser | int | `1000` | | -| readinessProbe | object | `{}` | Specifies a readinessProbe | -| resources | object | `{}` | | -| securityContext.capabilities | object | `{"drop":["ALL"]}` | The default security context is heavily restricted, feel free to tune it to your requirements | -| securityContext.readOnlyRootFilesystem | bool | `true` | | -| service.s3.api.port | int | `3900` | | -| service.s3.web.port | int | `3902` | | -| service.type | string | `"ClusterIP"` | You can rely on any service to expose your cluster - ClusterIP (+ Ingress) - NodePort (+ Ingress) - LoadBalancer | -| serviceAccount.annotations | object | `{}` | Annotations to add to the service account | -| serviceAccount.create | bool | `true` | Specifies whether a service account should be created | -| serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template | -| tolerations | list | `[]` | | - ----------------------------------------------- -Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2) diff --git a/script/helm/garage/templates/configmap.yaml b/script/helm/garage/templates/configmap.yaml index ab5b84db..5cc7a45e 100644 --- a/script/helm/garage/templates/configmap.yaml +++ b/script/helm/garage/templates/configmap.yaml @@ -1,53 +1,7 @@ -{{- if not .Values.garage.existingConfigMap }} apiVersion: v1 kind: ConfigMap metadata: name: {{ include "garage.fullname" . }}-config data: garage.toml: |- - {{- if .Values.garage.garageTomlString }} - {{- tpl (index (index .Values.garage) "garageTomlString") $ | nindent 4 }} - {{- else }} - metadata_dir = "/mnt/meta" - data_dir = "/mnt/data" - - db_engine = "{{ .Values.garage.dbEngine }}" - - block_size = {{ .Values.garage.blockSize }} - - replication_mode = "{{ .Values.garage.replicationMode }}" - - compression_level = {{ .Values.garage.compressionLevel }} - - {{- if .Values.garage.metadataAutoSnapshotInterval }} - metadata_auto_snapshot_interval = {{ .Values.garage.metadataAutoSnapshotInterval | quote }} - {{- end }} - - rpc_bind_addr = "{{ .Values.garage.rpcBindAddr }}" - # rpc_secret will be populated by the init container from a k8s secret object - rpc_secret = "__RPC_SECRET_REPLACE__" - - bootstrap_peers = {{ .Values.garage.bootstrapPeers }} - - [kubernetes_discovery] - namespace = "{{ .Release.Namespace }}" - service_name = "{{ include "garage.fullname" . }}" - skip_crd = {{ .Values.garage.kubernetesSkipCrd }} - - [s3_api] - s3_region = "{{ .Values.garage.s3.api.region }}" - api_bind_addr = "[::]:3900" - root_domain = "{{ .Values.garage.s3.api.rootDomain }}" - - [s3_web] - bind_addr = "[::]:3902" - root_domain = "{{ .Values.garage.s3.web.rootDomain }}" - index = "{{ .Values.garage.s3.web.index }}" - - [admin] - api_bind_addr = "[::]:3903" - {{- if .Values.monitoring.tracing.sink }} - trace_sink = "{{ .Values.monitoring.tracing.sink }}" - {{- end }} - {{- end }} -{{- end }} + {{- tpl (index (index .Values.garage) "garage.toml") $ | nindent 4 }} diff --git a/script/helm/garage/templates/service-headless.yaml b/script/helm/garage/templates/service-headless.yaml deleted file mode 100644 index 7bc9f2cc..00000000 --- a/script/helm/garage/templates/service-headless.yaml +++ /dev/null @@ -1,22 +0,0 @@ -{{- if eq .Values.deployment.kind "StatefulSet" -}} -apiVersion: v1 -kind: Service -metadata: - name: {{ include "garage.fullname" . }}-headless - labels: - {{- include "garage.labels" . | nindent 4 }} -spec: - type: ClusterIP - clusterIP: None - ports: - - port: {{ .Values.service.s3.api.port }} - targetPort: 3900 - protocol: TCP - name: s3-api - - port: {{ .Values.service.s3.web.port }} - targetPort: 3902 - protocol: TCP - name: s3-web - selector: - {{- include "garage.selectorLabels" . | nindent 4 }} -{{- end }} diff --git a/script/helm/garage/templates/service.yaml b/script/helm/garage/templates/service.yaml index 887c90d0..37218872 100644 --- a/script/helm/garage/templates/service.yaml +++ b/script/helm/garage/templates/service.yaml @@ -4,10 +4,6 @@ metadata: name: {{ include "garage.fullname" . }} labels: {{- include "garage.labels" . | nindent 4 }} - {{- with .Values.service.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} spec: type: {{ .Values.service.type }} ports: @@ -41,4 +37,4 @@ spec: name: metrics selector: {{- include "garage.selectorLabels" . | nindent 4 }} -{{- end }} +{{- end }} \ No newline at end of file diff --git a/script/helm/garage/templates/workload.yaml b/script/helm/garage/templates/workload.yaml index d144cb41..635e70e0 100644 --- a/script/helm/garage/templates/workload.yaml +++ b/script/helm/garage/templates/workload.yaml @@ -10,11 +10,12 @@ spec: {{- include "garage.selectorLabels" . | nindent 6 }} {{- if eq .Values.deployment.kind "StatefulSet" }} replicas: {{ .Values.deployment.replicaCount }} - serviceName: {{ include "garage.fullname" . }}-headless + serviceName: {{ include "garage.fullname" . }} podManagementPolicy: {{ .Values.deployment.podManagementPolicy }} {{- end }} template: metadata: + annotations: checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} {{- with .Values.podAnnotations }} @@ -75,17 +76,15 @@ spec: - name: etc mountPath: /etc/garage.toml subPath: garage.toml - {{- with .Values.extraVolumeMounts }} - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with .Values.livenessProbe }} - livenessProbe: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with .Values.readinessProbe }} - readinessProbe: - {{- toYaml . | nindent 12 }} - {{- end }} + # TODO + # livenessProbe: + # httpGet: + # path: / + # port: 3900 + # readinessProbe: + # httpGet: + # path: / + # port: 3900 resources: {{- toYaml .Values.resources | nindent 12 }} volumes: @@ -111,9 +110,6 @@ spec: - name: data emptyDir: {} {{- end }} - {{- with .Values.extraVolumes }} - {{- toYaml . | nindent 8 }} - {{- end }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} diff --git a/script/helm/garage/values.yaml b/script/helm/garage/values.yaml index 5e419fe2..5c381f16 100644 --- a/script/helm/garage/values.yaml +++ b/script/helm/garage/values.yaml @@ -4,34 +4,28 @@ # Garage configuration. These values go to garage.toml garage: - # -- Can be changed for better performance on certain systems + # Can be changed for better performance on certain systems # https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#db-engine-since-v0-8-0 dbEngine: "lmdb" - # -- Defaults is 1MB + # Defaults is 1MB # An increase can result in better performance in certain scenarios # https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#block-size blockSize: "1048576" - # -- Default to 3 replicas, see the replication_mode section at + # Default to 3 replicas, see the replication_mode section at # https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#replication-mode replicationMode: "3" - # -- zstd compression level of stored blocks + # zstd compression level of stored blocks # https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#compression-level compressionLevel: "1" - # -- If this value is set, Garage will automatically take a snapshot of the metadata DB file at a regular interval and save it in the metadata directory. - # https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#metadata_auto_snapshot_interval - metadataAutoSnapshotInterval: "" - rpcBindAddr: "[::]:3901" - # -- If not given, a random secret will be generated and stored in a Secret object + # If not given, a random secret will be generated and stored in a Secret object rpcSecret: "" - # -- This is not required if you use the integrated kubernetes discovery + # This is not required if you use the integrated kubernetes discovery bootstrapPeers: [] - # -- Set to true if you want to use k8s discovery but install the CRDs manually outside - # of the helm chart, for example if you operate at namespace level without cluster ressources kubernetesSkipCrd: false s3: api: @@ -40,16 +34,47 @@ garage: web: rootDomain: ".web.garage.tld" index: "index.html" + # Template for the garage configuration + # Values can be templated + # ref: https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/ + garage.toml: |- + metadata_dir = "/mnt/meta" + data_dir = "/mnt/data" - # -- if not empty string, allow using an existing ConfigMap for the garage.toml, - # if set, ignores garage.toml - existingConfigMap: "" + db_engine = "{{ .Values.garage.dbEngine }}" - # -- String Template for the garage configuration - # if set, ignores above values. - # Values can be templated, - # see https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/ - garageTomlString: "" + block_size = {{ .Values.garage.blockSize }} + + replication_mode = "{{ .Values.garage.replicationMode }}" + + compression_level = {{ .Values.garage.compressionLevel }} + + rpc_bind_addr = "{{ .Values.garage.rpcBindAddr }}" + # rpc_secret will be populated by the init container from a k8s secret object + rpc_secret = "__RPC_SECRET_REPLACE__" + + bootstrap_peers = {{ .Values.garage.bootstrapPeers }} + + [kubernetes_discovery] + namespace = "{{ .Release.Namespace }}" + service_name = "{{ include "garage.fullname" . }}" + skip_crd = {{ .Values.garage.kubernetesSkipCrd }} + + [s3_api] + s3_region = "{{ .Values.garage.s3.api.region }}" + api_bind_addr = "[::]:3900" + root_domain = "{{ .Values.garage.s3.api.rootDomain }}" + + [s3_web] + bind_addr = "[::]:3902" + root_domain = "{{ .Values.garage.s3.web.rootDomain }}" + index = "{{ .Values.garage.s3.web.index }}" + + [admin] + api_bind_addr = "[::]:3903" + {{- if .Values.monitoring.tracing.sink }} + trace_sink = "{{ .Values.monitoring.tracing.sink }}" + {{- end }} # Data persistence persistence: @@ -67,18 +92,16 @@ persistence: # Deployment configuration deployment: - # -- Switchable to DaemonSet + # Switchable to DaemonSet kind: StatefulSet - # -- Number of StatefulSet replicas/garage nodes to start + # Number of StatefulSet replicas/garage nodes to start replicaCount: 3 - # -- If using statefulset, allow Parallel or OrderedReady (default) + # If using statefulset, allow Parallel or OrderedReady (default) podManagementPolicy: OrderedReady image: - # -- default to amd64 docker image repository: dxflrs/amd64_garage - # -- set the image tag, please prefer using the chart version and not this - # to avoid compatibility issues + # please prefer using the chart version and not this tag tag: "" pullPolicy: IfNotPresent @@ -87,21 +110,19 @@ initImage: tag: stable pullPolicy: IfNotPresent -# -- set if you need credentials to pull your custom image imagePullSecrets: [] nameOverride: "" fullnameOverride: "" serviceAccount: - # -- Specifies whether a service account should be created + # Specifies whether a service account should be created create: true - # -- Annotations to add to the service account + # Annotations to add to the service account annotations: {} - # -- The name of the service account to use. + # The name of the service account to use. # If not set and create is true, a name is generated using the fullname template name: "" -# -- additonal pod annotations podAnnotations: {} podSecurityContext: @@ -111,7 +132,7 @@ podSecurityContext: runAsNonRoot: true securityContext: - # -- The default security context is heavily restricted, + # The default security context is heavily restricted # feel free to tune it to your requirements capabilities: drop: @@ -119,13 +140,11 @@ securityContext: readOnlyRootFilesystem: true service: - # -- You can rely on any service to expose your cluster + # You can rely on any service to expose your cluster # - ClusterIP (+ Ingress) # - NodePort (+ Ingress) # - LoadBalancer type: ClusterIP - # -- Annotations to add to the service - annotations: {} s3: api: port: 3900 @@ -137,23 +156,20 @@ ingress: s3: api: enabled: false - # -- Rely _either_ on the className or the annotation below but not both! - # If you want to use the className, set + # Rely either on the className or the annotation below but not both + # replace "nginx" by an Ingress controller + # you can find examples here https://kubernetes.io/docs/concepts/services-networking/ingress-controllers # className: "nginx" - # and replace "nginx" by an Ingress controller name, - # examples [here](https://kubernetes.io/docs/concepts/services-networking/ingress-controllers). annotations: {} # kubernetes.io/ingress.class: "nginx" # kubernetes.io/tls-acme: "true" labels: {} hosts: - # -- garage S3 API endpoint, to be used with awscli for example - - host: "s3.garage.tld" + - host: "s3.garage.tld" # garage S3 API endpoint paths: - path: / pathType: Prefix - # -- garage S3 API endpoint, DNS style bucket access - - host: "*.s3.garage.tld" + - host: "*.s3.garage.tld" # garage S3 API endpoint, DNS style bucket access paths: - path: / pathType: Prefix @@ -163,23 +179,20 @@ ingress: # - kubernetes.docker.internal web: enabled: false - # -- Rely _either_ on the className or the annotation below but not both! - # If you want to use the className, set + # Rely either on the className or the annotation below but not both + # replace "nginx" by an Ingress controller + # you can find examples here https://kubernetes.io/docs/concepts/services-networking/ingress-controllers # className: "nginx" - # and replace "nginx" by an Ingress controller name, - # examples [here](https://kubernetes.io/docs/concepts/services-networking/ingress-controllers). annotations: {} # kubernetes.io/ingress.class: nginx # kubernetes.io/tls-acme: "true" labels: {} hosts: - # -- wildcard website access with bucket name prefix - - host: "*.web.garage.tld" + - host: "*.web.garage.tld" # wildcard website access with bucket name prefix paths: - path: / pathType: Prefix - # -- specific bucket access with FQDN bucket - - host: "mywebpage.example.com" + - host: "mywebpage.example.com" # specific bucket access with FQDN bucket paths: - path: / pathType: Prefix @@ -197,21 +210,6 @@ resources: {} # cpu: 100m # memory: 512Mi -# -- Specifies a livenessProbe -livenessProbe: {} - #httpGet: - # path: /health - # port: 3903 - #initialDelaySeconds: 5 - #periodSeconds: 30 -# -- Specifies a readinessProbe -readinessProbe: {} - #httpGet: - # path: /health - # port: 3903 - #initialDelaySeconds: 5 - #periodSeconds: 30 - nodeSelector: {} tolerations: [] @@ -220,16 +218,12 @@ affinity: {} environment: {} -extraVolumes: {} - -extraVolumeMounts: {} - monitoring: metrics: - # -- If true, a service for monitoring is created with a prometheus.io/scrape annotation + # If true, a service for monitoring is created with a prometheus.io/scrape annotation enabled: false serviceMonitor: - # -- If true, a ServiceMonitor CRD is created for a prometheus operator + # If true, a ServiceMonitor CRD is created for a prometheus operator # https://github.com/coreos/prometheus-operator enabled: false path: /metrics @@ -241,5 +235,4 @@ monitoring: scrapeTimeout: 10s relabelings: [] tracing: - # -- specify a sink endpoint for OpenTelemetry Traces, eg. `http://localhost:4317` sink: "" diff --git a/script/k8s/crd/garagenodes.deuxfleurs.fr.yaml b/script/k8s/crd/garagenodes.deuxfleurs.fr.yaml deleted file mode 100644 index cd0fb166..00000000 --- a/script/k8s/crd/garagenodes.deuxfleurs.fr.yaml +++ /dev/null @@ -1,43 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - name: garagenodes.deuxfleurs.fr -spec: - conversion: - strategy: None - group: deuxfleurs.fr - names: - kind: GarageNode - listKind: GarageNodeList - plural: garagenodes - singular: garagenode - scope: Namespaced - versions: - - name: v1 - schema: - openAPIV3Schema: - description: Auto-generated derived type for Node via `CustomResource` - properties: - spec: - properties: - address: - format: ip - type: string - hostname: - type: string - port: - format: uint16 - minimum: 0 - type: integer - required: - - address - - hostname - - port - type: object - required: - - spec - title: GarageNode - type: object - served: true - storage: true - subresources: {} \ No newline at end of file diff --git a/script/k8s/crd/kustomization.yaml b/script/k8s/crd/kustomization.yaml deleted file mode 100644 index 9f20eccf..00000000 --- a/script/k8s/crd/kustomization.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -resources: -- garagenodes.deuxfleurs.fr.yaml \ No newline at end of file diff --git a/script/not-dynamic.sh b/script/not-dynamic.sh index 2beb4e0b..b9a13070 100755 --- a/script/not-dynamic.sh +++ b/script/not-dynamic.sh @@ -7,12 +7,7 @@ if [ "$#" -ne 1 ]; then exit 2 fi -if [ ! -x "$1" ]; then - echo "[fail] $1 does not exist or is not an executable" - exit 1 -fi - -if file "$1" | grep 'dynamically linked' 2>&1; then +if file $1 | grep 'dynamically linked' 2>&1; then echo "[fail] $1 is dynamic" exit 1 fi diff --git a/shell.nix b/shell.nix index c3dedca8..7236fdcb 100644 --- a/shell.nix +++ b/shell.nix @@ -3,7 +3,7 @@ with import ./nix/common.nix; let - pkgs = import nixpkgs { + pkgs = import pkgsSrc { inherit system; }; winscp = (import ./nix/winscp.nix) pkgs; @@ -34,14 +34,12 @@ in jq ]; shellHook = '' - export AWS_REQUEST_CHECKSUM_CALCULATION='when_required' - function to_s3 { aws \ --endpoint-url https://garage.deuxfleurs.fr \ --region garage \ s3 cp \ - ./result/bin/garage \ + ./result-bin/bin/garage \ s3://garagehq.deuxfleurs.fr/_releases/''${CI_COMMIT_TAG:-$CI_COMMIT_SHA}/''${TARGET}/garage } @@ -117,7 +115,7 @@ in shellHook = '' function refresh_cache { pass show deuxfleurs/nix_priv_key > /tmp/nix-signing-key.sec - for attr in pkgs.amd64.debug test.amd64 pkgs.{amd64,i386,arm,arm64}.release; do + for attr in clippy.amd64 test.amd64 pkgs.{amd64,i386,arm,arm64}.release; do echo "Updating cache for ''${attr}" nix copy -j8 \ --to 's3://nix?endpoint=garage.deuxfleurs.fr®ion=garage&secret-key=/tmp/nix-signing-key.sec' \ diff --git a/src/api/s3/Cargo.toml b/src/api/Cargo.toml similarity index 71% rename from src/api/s3/Cargo.toml rename to src/api/Cargo.toml index 88630866..a5645c26 100644 --- a/src/api/s3/Cargo.toml +++ b/src/api/Cargo.toml @@ -1,12 +1,12 @@ [package] -name = "garage_api_s3" -version = "1.3.1" +name = "garage_api" +version = "1.0.0" authors = ["Alex Auvolat "] edition = "2018" license = "AGPL-3.0" description = "S3 API server crate for the Garage object store" repository = "https://git.deuxfleurs.fr/Deuxfleurs/garage" -readme = "../../../README.md" +readme = "../../README.md" [lib] path = "lib.rs" @@ -20,24 +20,30 @@ garage_block.workspace = true garage_net.workspace = true garage_util.workspace = true garage_rpc.workspace = true -garage_api_common.workspace = true aes-gcm.workspace = true +argon2.workspace = true async-compression.workspace = true +async-trait.workspace = true base64.workspace = true bytes.workspace = true chrono.workspace = true crc32fast.workspace = true crc32c.workspace = true -thiserror.workspace = true +crypto-common.workspace = true +err-derive.workspace = true hex.workspace = true +hmac.workspace = true +idna.workspace = true tracing.workspace = true md-5.workspace = true +nom.workspace = true pin-project.workspace = true sha1.workspace = true sha2.workspace = true futures.workspace = true +futures-util.workspace = true tokio.workspace = true tokio-stream.workspace = true tokio-util.workspace = true @@ -48,13 +54,21 @@ httpdate.workspace = true http-range.workspace = true http-body-util.workspace = true hyper = { workspace = true, default-features = false, features = ["server", "http1"] } +hyper-util.workspace = true multer.workspace = true percent-encoding.workspace = true roxmltree.workspace = true url.workspace = true serde.workspace = true +serde_bytes.workspace = true serde_json.workspace = true quick-xml.workspace = true opentelemetry.workspace = true +opentelemetry-prometheus = { workspace = true, optional = true } +prometheus = { workspace = true, optional = true } + +[features] +k2v = [ "garage_util/k2v", "garage_model/k2v" ] +metrics = [ "opentelemetry-prometheus", "prometheus" ] diff --git a/src/api/admin/Cargo.toml b/src/api/admin/Cargo.toml deleted file mode 100644 index 656c6825..00000000 --- a/src/api/admin/Cargo.toml +++ /dev/null @@ -1,43 +0,0 @@ -[package] -name = "garage_api_admin" -version = "1.3.1" -authors = ["Alex Auvolat "] -edition = "2018" -license = "AGPL-3.0" -description = "Admin API server crate for the Garage object store" -repository = "https://git.deuxfleurs.fr/Deuxfleurs/garage" -readme = "../../../README.md" - -[lib] -path = "lib.rs" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -garage_model.workspace = true -garage_table.workspace = true -garage_util.workspace = true -garage_rpc.workspace = true -garage_api_common.workspace = true - -argon2.workspace = true -async-trait.workspace = true -thiserror.workspace = true -hex.workspace = true -tracing.workspace = true - -futures.workspace = true -tokio.workspace = true -http.workspace = true -hyper = { workspace = true, default-features = false, features = ["server", "http1"] } -url.workspace = true - -serde.workspace = true -serde_json.workspace = true - -opentelemetry.workspace = true -opentelemetry-prometheus = { workspace = true, optional = true } -prometheus = { workspace = true, optional = true } - -[features] -metrics = [ "opentelemetry-prometheus", "prometheus" ] diff --git a/src/api/admin/api_server.rs b/src/api/admin/api_server.rs index 6f0c474f..0e4565bb 100644 --- a/src/api/admin/api_server.rs +++ b/src/api/admin/api_server.rs @@ -2,6 +2,7 @@ use std::collections::HashMap; use std::sync::Arc; use argon2::password_hash::PasswordHash; +use async_trait::async_trait; use http::header::{ACCESS_CONTROL_ALLOW_METHODS, ACCESS_CONTROL_ALLOW_ORIGIN, ALLOW}; use hyper::{body::Incoming as IncomingBody, Request, Response, StatusCode}; @@ -19,15 +20,15 @@ use garage_rpc::system::ClusterHealthStatus; use garage_util::error::Error as GarageError; use garage_util::socket_address::UnixOrTCPSocketAddress; -use garage_api_common::generic_server::*; -use garage_api_common::helpers::*; +use crate::generic_server::*; -use crate::bucket::*; -use crate::cluster::*; -use crate::error::*; -use crate::key::*; -use crate::router_v0; -use crate::router_v1::{Authorization, Endpoint}; +use crate::admin::bucket::*; +use crate::admin::cluster::*; +use crate::admin::error::*; +use crate::admin::key::*; +use crate::admin::router_v0; +use crate::admin::router_v1::{Authorization, Endpoint}; +use crate::helpers::*; pub type ResBody = BoxBody; @@ -220,6 +221,7 @@ impl AdminApiServer { } } +#[async_trait] impl ApiHandler for AdminApiServer { const API_NAME: &'static str = "admin"; const API_NAME_DISPLAY: &'static str = "Admin"; diff --git a/src/api/admin/bucket.rs b/src/api/admin/bucket.rs index 207693b6..ac3cba00 100644 --- a/src/api/admin/bucket.rs +++ b/src/api/admin/bucket.rs @@ -17,12 +17,11 @@ use garage_model::permission::*; use garage_model::s3::mpu_table; use garage_model::s3::object_table::*; -use garage_api_common::common_error::CommonError; -use garage_api_common::helpers::*; - -use crate::api_server::ResBody; -use crate::error::*; -use crate::key::ApiBucketKeyPerm; +use crate::admin::api_server::ResBody; +use crate::admin::error::*; +use crate::admin::key::ApiBucketKeyPerm; +use crate::common_error::CommonError; +use crate::helpers::*; pub async fn handle_list_buckets(garage: &Arc) -> Result, Error> { let buckets = garage @@ -277,7 +276,7 @@ pub async fn handle_create_bucket( let helper = garage.locked_helper().await; if let Some(ga) = &req.global_alias { - if !is_valid_bucket_name(ga, garage.config.allow_punycode) { + if !is_valid_bucket_name(ga) { return Err(Error::bad_request(format!( "{}: {}", ga, INVALID_BUCKET_NAME_MESSAGE @@ -292,7 +291,7 @@ pub async fn handle_create_bucket( } if let Some(la) = &req.local_alias { - if !is_valid_bucket_name(&la.alias, garage.config.allow_punycode) { + if !is_valid_bucket_name(&la.alias) { return Err(Error::bad_request(format!( "{}: {}", la.alias, INVALID_BUCKET_NAME_MESSAGE @@ -382,7 +381,7 @@ pub async fn handle_delete_bucket( for ((key_id, alias), _, active) in state.local_aliases.items().iter() { if *active { helper - .purge_local_bucket_alias(bucket.id, key_id, alias) + .unset_local_bucket_alias(bucket.id, key_id, alias) .await?; } } diff --git a/src/api/admin/cluster.rs b/src/api/admin/cluster.rs index ffa0fa71..357ac600 100644 --- a/src/api/admin/cluster.rs +++ b/src/api/admin/cluster.rs @@ -12,10 +12,9 @@ use garage_rpc::layout; use garage_model::garage::Garage; -use garage_api_common::helpers::{json_ok_response, parse_json_body}; - -use crate::api_server::ResBody; -use crate::error::*; +use crate::admin::api_server::ResBody; +use crate::admin::error::*; +use crate::helpers::{json_ok_response, parse_json_body}; pub async fn handle_get_cluster_status(garage: &Arc) -> Result, Error> { let layout = garage.system.cluster_layout(); diff --git a/src/api/admin/error.rs b/src/api/admin/error.rs index 17d4c200..2668b42d 100644 --- a/src/api/admin/error.rs +++ b/src/api/admin/error.rs @@ -1,50 +1,45 @@ -use std::convert::TryFrom; - +use err_derive::Error; use hyper::header::HeaderValue; use hyper::{HeaderMap, StatusCode}; -use thiserror::Error; pub use garage_model::helper::error::Error as HelperError; -use garage_api_common::common_error::{commonErrorDerivative, CommonError}; -pub use garage_api_common::common_error::{ - CommonErrorDerivative, OkOrBadRequest, OkOrInternalError, -}; -use garage_api_common::generic_server::ApiError; -use garage_api_common::helpers::*; +use crate::common_error::CommonError; +pub use crate::common_error::{CommonErrorDerivative, OkOrBadRequest, OkOrInternalError}; +use crate::generic_server::ApiError; +use crate::helpers::*; /// Errors of this crate #[derive(Debug, Error)] pub enum Error { - #[error("{0}")] + #[error(display = "{}", _0)] /// Error from common error - Common(#[from] CommonError), + Common(CommonError), // Category: cannot process /// The API access key does not exist - #[error("Access key not found: {0}")] + #[error(display = "Access key not found: {}", _0)] NoSuchAccessKey(String), /// In Import key, the key already exists - #[error("Key {0} already exists in data store. Even if it is deleted, we can't let you create a new key with the same ID. Sorry.")] + #[error( + display = "Key {} already exists in data store. Even if it is deleted, we can't let you create a new key with the same ID. Sorry.", + _0 + )] KeyAlreadyExists(String), } -commonErrorDerivative!(Error); - -/// FIXME: helper errors are transformed into their corresponding variants -/// in the Error struct, but in many case a helper error should be considered -/// an internal error. -impl From for Error { - fn from(err: HelperError) -> Error { - match CommonError::try_from(err) { - Ok(ce) => Self::Common(ce), - Err(HelperError::NoSuchAccessKey(k)) => Self::NoSuchAccessKey(k), - Err(_) => unreachable!(), - } +impl From for Error +where + CommonError: From, +{ + fn from(err: T) -> Self { + Error::Common(CommonError::from(err)) } } +impl CommonErrorDerivative for Error {} + impl Error { fn code(&self) -> &'static str { match self { diff --git a/src/api/admin/key.rs b/src/api/admin/key.rs index bebf3063..291b6d54 100644 --- a/src/api/admin/key.rs +++ b/src/api/admin/key.rs @@ -9,10 +9,9 @@ use garage_table::*; use garage_model::garage::Garage; use garage_model::key_table::*; -use garage_api_common::helpers::*; - -use crate::api_server::ResBody; -use crate::error::*; +use crate::admin::api_server::ResBody; +use crate::admin::error::*; +use crate::helpers::*; pub async fn handle_list_keys(garage: &Arc) -> Result, Error> { let res = garage diff --git a/src/api/admin/lib.rs b/src/api/admin/mod.rs similarity index 72% rename from src/api/admin/lib.rs rename to src/api/admin/mod.rs index 599e9b44..43a8c59c 100644 --- a/src/api/admin/lib.rs +++ b/src/api/admin/mod.rs @@ -1,6 +1,3 @@ -#[macro_use] -extern crate tracing; - pub mod api_server; mod error; mod router_v0; diff --git a/src/api/admin/router_v0.rs b/src/api/admin/router_v0.rs index 9dd742ba..68676445 100644 --- a/src/api/admin/router_v0.rs +++ b/src/api/admin/router_v0.rs @@ -2,9 +2,8 @@ use std::borrow::Cow; use hyper::{Method, Request}; -use garage_api_common::router_macros::*; - -use crate::error::*; +use crate::admin::error::*; +use crate::router_macros::*; router_match! {@func diff --git a/src/api/admin/router_v1.rs b/src/api/admin/router_v1.rs index 0b4901ea..cc5ff2ec 100644 --- a/src/api/admin/router_v1.rs +++ b/src/api/admin/router_v1.rs @@ -2,10 +2,9 @@ use std::borrow::Cow; use hyper::{Method, Request}; -use garage_api_common::router_macros::*; - -use crate::error::*; -use crate::router_v0; +use crate::admin::error::*; +use crate::admin::router_v0; +use crate::router_macros::*; pub enum Authorization { None, diff --git a/src/api/common/Cargo.toml b/src/api/common/Cargo.toml deleted file mode 100644 index df01d59a..00000000 --- a/src/api/common/Cargo.toml +++ /dev/null @@ -1,48 +0,0 @@ -[package] -name = "garage_api_common" -version = "1.3.1" -authors = ["Alex Auvolat "] -edition = "2018" -license = "AGPL-3.0" -description = "Common functions for the API server crates for the Garage object store" -repository = "https://git.deuxfleurs.fr/Deuxfleurs/garage" -readme = "../../../README.md" - -[lib] -path = "lib.rs" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -garage_model.workspace = true -garage_table.workspace = true -garage_util.workspace = true - -base64.workspace = true -bytes.workspace = true -chrono.workspace = true -crc32fast.workspace = true -crc32c.workspace = true -crypto-common.workspace = true -thiserror.workspace = true -hex.workspace = true -hmac.workspace = true -md-5.workspace = true -tracing.workspace = true -nom.workspace = true -pin-project.workspace = true -sha1.workspace = true -sha2.workspace = true - -futures.workspace = true -tokio.workspace = true -http.workspace = true -http-body-util.workspace = true -hyper = { workspace = true, default-features = false, features = ["server", "http1"] } -hyper-util.workspace = true -url.workspace = true - -serde.workspace = true -serde_json.workspace = true - -opentelemetry.workspace = true diff --git a/src/api/common/cors.rs b/src/api/common/cors.rs deleted file mode 100644 index 09b55c13..00000000 --- a/src/api/common/cors.rs +++ /dev/null @@ -1,170 +0,0 @@ -use std::sync::Arc; - -use http::header::{ - ACCESS_CONTROL_ALLOW_HEADERS, ACCESS_CONTROL_ALLOW_METHODS, ACCESS_CONTROL_ALLOW_ORIGIN, - ACCESS_CONTROL_EXPOSE_HEADERS, ACCESS_CONTROL_REQUEST_HEADERS, ACCESS_CONTROL_REQUEST_METHOD, -}; -use hyper::{body::Body, body::Incoming as IncomingBody, Request, Response, StatusCode}; - -use garage_model::bucket_table::{BucketParams, CorsRule as GarageCorsRule}; -use garage_model::garage::Garage; - -use crate::common_error::{ - helper_error_as_internal, CommonError, OkOrBadRequest, OkOrInternalError, -}; -use crate::helpers::*; - -pub fn find_matching_cors_rule<'a, B>( - bucket_params: &'a BucketParams, - req: &Request, -) -> Result, CommonError> { - if let Some(cors_config) = bucket_params.cors_config.get() { - if let Some(origin) = req.headers().get("Origin") { - let origin = origin.to_str()?; - let request_headers = match req.headers().get(ACCESS_CONTROL_REQUEST_HEADERS) { - Some(h) => h.to_str()?.split(',').map(|h| h.trim()).collect::>(), - None => vec![], - }; - return Ok(cors_config.iter().find(|rule| { - cors_rule_matches(rule, origin, req.method().as_ref(), request_headers.iter()) - })); - } - } - Ok(None) -} - -pub fn cors_rule_matches<'a, HI, S>( - rule: &GarageCorsRule, - origin: &'a str, - method: &'a str, - mut request_headers: HI, -) -> bool -where - HI: Iterator, - S: AsRef, -{ - rule.allow_origins.iter().any(|x| x == "*" || x == origin) - && rule.allow_methods.iter().any(|x| x == "*" || x == method) - && request_headers.all(|h| { - rule.allow_headers - .iter() - .any(|x| x == "*" || x == h.as_ref()) - }) -} - -pub fn add_cors_headers( - resp: &mut Response, - rule: &GarageCorsRule, -) -> Result<(), http::header::InvalidHeaderValue> { - let h = resp.headers_mut(); - h.insert( - ACCESS_CONTROL_ALLOW_ORIGIN, - rule.allow_origins.join(", ").parse()?, - ); - h.insert( - ACCESS_CONTROL_ALLOW_METHODS, - rule.allow_methods.join(", ").parse()?, - ); - h.insert( - ACCESS_CONTROL_ALLOW_HEADERS, - rule.allow_headers.join(", ").parse()?, - ); - h.insert( - ACCESS_CONTROL_EXPOSE_HEADERS, - rule.expose_headers.join(", ").parse()?, - ); - Ok(()) -} - -pub async fn handle_options_api( - garage: Arc, - req: &Request, - bucket_name: Option, -) -> Result, CommonError> { - // FIXME: CORS rules of buckets with local aliases are - // not taken into account. - - // If the bucket name is a global bucket name, - // we try to apply the CORS rules of that bucket. - // If a user has a local bucket name that has - // the same name, its CORS rules won't be applied - // and will be shadowed by the rules of the globally - // existing bucket (but this is inevitable because - // OPTIONS calls are not auhtenticated). - if let Some(bn) = bucket_name { - let helper = garage.bucket_helper(); - let bucket_id = helper - .resolve_global_bucket_name(&bn) - .await - .map_err(helper_error_as_internal)?; - if let Some(id) = bucket_id { - let bucket = garage - .bucket_helper() - .get_existing_bucket(id) - .await - .map_err(helper_error_as_internal)?; - let bucket_params = bucket.state.into_option().unwrap(); - handle_options_for_bucket(req, &bucket_params) - } else { - // If there is a bucket name in the request, but that name - // does not correspond to a global alias for a bucket, - // then it's either a non-existing bucket or a local bucket. - // We have no way of knowing, because the request is not - // authenticated and thus we can't resolve local aliases. - // We take the permissive approach of allowing everything, - // because we don't want to prevent web apps that use - // local bucket names from making API calls. - Ok(Response::builder() - .header(ACCESS_CONTROL_ALLOW_ORIGIN, "*") - .header(ACCESS_CONTROL_ALLOW_METHODS, "*") - .status(StatusCode::OK) - .body(EmptyBody::new())?) - } - } else { - // If there is no bucket name in the request, - // we are doing a ListBuckets call, which we want to allow - // for all origins. - Ok(Response::builder() - .header(ACCESS_CONTROL_ALLOW_ORIGIN, "*") - .header(ACCESS_CONTROL_ALLOW_METHODS, "GET") - .status(StatusCode::OK) - .body(EmptyBody::new())?) - } -} - -pub fn handle_options_for_bucket( - req: &Request, - bucket_params: &BucketParams, -) -> Result, CommonError> { - let origin = req - .headers() - .get("Origin") - .ok_or_bad_request("Missing Origin header")? - .to_str()?; - let request_method = req - .headers() - .get(ACCESS_CONTROL_REQUEST_METHOD) - .ok_or_bad_request("Missing Access-Control-Request-Method header")? - .to_str()?; - let request_headers = match req.headers().get(ACCESS_CONTROL_REQUEST_HEADERS) { - Some(h) => h.to_str()?.split(',').map(|h| h.trim()).collect::>(), - None => vec![], - }; - - if let Some(cors_config) = bucket_params.cors_config.get() { - let matching_rule = cors_config - .iter() - .find(|rule| cors_rule_matches(rule, origin, request_method, request_headers.iter())); - if let Some(rule) = matching_rule { - let mut resp = Response::builder() - .status(StatusCode::OK) - .body(EmptyBody::new())?; - add_cors_headers(&mut resp, rule).ok_or_internal_error("Invalid CORS configuration")?; - return Ok(resp); - } - } - - Err(CommonError::Forbidden( - "This CORS request is not allowed.".into(), - )) -} diff --git a/src/api/common/lib.rs b/src/api/common/lib.rs deleted file mode 100644 index 0e655a53..00000000 --- a/src/api/common/lib.rs +++ /dev/null @@ -1,12 +0,0 @@ -//! Crate for serving a S3 compatible API -#[macro_use] -extern crate tracing; - -pub mod common_error; - -pub mod cors; -pub mod encoding; -pub mod generic_server; -pub mod helpers; -pub mod router_macros; -pub mod signature; diff --git a/src/api/common/signature/body.rs b/src/api/common/signature/body.rs deleted file mode 100644 index 96be0d5b..00000000 --- a/src/api/common/signature/body.rs +++ /dev/null @@ -1,135 +0,0 @@ -use std::sync::Mutex; - -use futures::prelude::*; -use futures::stream::BoxStream; -use http_body_util::{BodyExt, StreamBody}; -use hyper::body::{Bytes, Frame}; -use serde::Deserialize; -use tokio::sync::mpsc; -use tokio::task; - -use super::*; - -use crate::signature::checksum::*; - -pub struct ReqBody { - // why need mutex to be sync?? - pub(crate) stream: Mutex, Error>>>, - pub(crate) checksummer: Checksummer, - pub(crate) expected_checksums: ExpectedChecksums, - pub(crate) trailer_algorithm: Option, -} - -pub type StreamingChecksumReceiver = task::JoinHandle>; - -impl ReqBody { - pub fn add_expected_checksums(&mut self, more: ExpectedChecksums) { - if more.md5.is_some() { - self.expected_checksums.md5 = more.md5; - } - if more.sha256.is_some() { - self.expected_checksums.sha256 = more.sha256; - } - if more.extra.is_some() { - self.expected_checksums.extra = more.extra; - } - self.checksummer.add_expected(&self.expected_checksums); - } - - pub fn add_md5(&mut self) { - self.checksummer.add_md5(); - } - - // ============ non-streaming ============= - - pub async fn json Deserialize<'a>>(self) -> Result { - let body = self.collect().await?; - let resp: T = serde_json::from_slice(&body).ok_or_bad_request("Invalid JSON")?; - Ok(resp) - } - - pub async fn collect(self) -> Result { - self.collect_with_checksums().await.map(|(b, _)| b) - } - - pub async fn collect_with_checksums(mut self) -> Result<(Bytes, Checksums), Error> { - let stream: BoxStream<_> = self.stream.into_inner().unwrap(); - let bytes = BodyExt::collect(StreamBody::new(stream)).await?.to_bytes(); - - self.checksummer.update(&bytes); - let checksums = self.checksummer.finalize(); - checksums.verify(&self.expected_checksums)?; - - Ok((bytes, checksums)) - } - - // ============ streaming ============= - - pub fn streaming_with_checksums( - self, - ) -> ( - BoxStream<'static, Result>, - StreamingChecksumReceiver, - ) { - let Self { - stream, - mut checksummer, - mut expected_checksums, - trailer_algorithm, - } = self; - - let (frame_tx, mut frame_rx) = mpsc::channel::>(5); - - let join_checksums = tokio::spawn(async move { - while let Some(frame) = frame_rx.recv().await { - match frame.into_data() { - Ok(data) => { - checksummer = tokio::task::spawn_blocking(move || { - checksummer.update(&data); - checksummer - }) - .await - .unwrap() - } - Err(frame) => { - let trailers = frame.into_trailers().unwrap(); - let algo = trailer_algorithm.unwrap(); - expected_checksums.extra = Some(extract_checksum_value(&trailers, algo)?); - break; - } - } - } - - if trailer_algorithm.is_some() && expected_checksums.extra.is_none() { - return Err(Error::bad_request("trailing checksum was not sent")); - } - - let checksums = checksummer.finalize(); - checksums.verify(&expected_checksums)?; - - Ok(checksums) - }); - - let stream: BoxStream<_> = stream.into_inner().unwrap(); - let stream = stream.filter_map(move |x| { - let frame_tx = frame_tx.clone(); - async move { - match x { - Err(e) => Some(Err(e)), - Ok(frame) => { - if frame.is_data() { - let data = frame.data_ref().unwrap().clone(); - let _ = frame_tx.send(frame).await; - Some(Ok(data)) - } else { - let _ = frame_tx.send(frame).await; - None - } - } - } - } - }); - - (stream.boxed(), join_checksums) - } -} diff --git a/src/api/common/signature/mod.rs b/src/api/common/signature/mod.rs deleted file mode 100644 index 50fbd304..00000000 --- a/src/api/common/signature/mod.rs +++ /dev/null @@ -1,118 +0,0 @@ -use chrono::{DateTime, Utc}; -use hmac::{Hmac, Mac}; -use sha2::Sha256; - -use hyper::header::HeaderName; -use hyper::{body::Incoming as IncomingBody, Request}; - -use garage_model::garage::Garage; -use garage_model::key_table::Key; -use garage_util::data::{sha256sum, Hash}; - -use error::*; - -pub mod body; -pub mod checksum; -pub mod error; -pub mod payload; -pub mod streaming; - -pub const SHORT_DATE: &str = "%Y%m%d"; -pub const LONG_DATETIME: &str = "%Y%m%dT%H%M%SZ"; - -// ---- Constants used in AWSv4 signatures ---- - -pub const X_AMZ_ALGORITHM: HeaderName = HeaderName::from_static("x-amz-algorithm"); -pub const X_AMZ_CREDENTIAL: HeaderName = HeaderName::from_static("x-amz-credential"); -pub const X_AMZ_DATE: HeaderName = HeaderName::from_static("x-amz-date"); -pub const X_AMZ_EXPIRES: HeaderName = HeaderName::from_static("x-amz-expires"); -pub const X_AMZ_SIGNEDHEADERS: HeaderName = HeaderName::from_static("x-amz-signedheaders"); -pub const X_AMZ_SIGNATURE: HeaderName = HeaderName::from_static("x-amz-signature"); -pub const X_AMZ_CONTENT_SHA256: HeaderName = HeaderName::from_static("x-amz-content-sha256"); -pub const X_AMZ_TRAILER: HeaderName = HeaderName::from_static("x-amz-trailer"); - -/// Result of `sha256("")` -pub(crate) const EMPTY_STRING_HEX_DIGEST: &str = - "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"; - -// Signature calculation algorithm -pub const AWS4_HMAC_SHA256: &str = "AWS4-HMAC-SHA256"; -type HmacSha256 = Hmac; - -// Possible values for x-amz-content-sha256, in addition to the actual sha256 -pub const UNSIGNED_PAYLOAD: &str = "UNSIGNED-PAYLOAD"; -pub const STREAMING_UNSIGNED_PAYLOAD_TRAILER: &str = "STREAMING-UNSIGNED-PAYLOAD-TRAILER"; -pub const STREAMING_AWS4_HMAC_SHA256_PAYLOAD: &str = "STREAMING-AWS4-HMAC-SHA256-PAYLOAD"; - -// Used in the computation of StringToSign -pub const AWS4_HMAC_SHA256_PAYLOAD: &str = "AWS4-HMAC-SHA256-PAYLOAD"; - -// ---- enums to describe stuff going on in signature calculation ---- - -#[derive(Debug)] -pub enum ContentSha256Header { - UnsignedPayload, - Sha256Checksum(Hash), - StreamingPayload { trailer: bool, signed: bool }, -} - -// ---- top-level functions ---- - -pub struct VerifiedRequest { - pub request: Request, - pub access_key: Key, - pub content_sha256_header: ContentSha256Header, -} - -pub async fn verify_request( - garage: &Garage, - mut req: Request, - service: &'static str, -) -> Result { - let checked_signature = payload::check_payload_signature(&garage, &mut req, service).await?; - - let request = streaming::parse_streaming_body( - req, - &checked_signature, - &garage.config.s3_api.s3_region, - service, - )?; - - let access_key = checked_signature - .key - .ok_or_else(|| Error::forbidden("Garage does not support anonymous access yet"))?; - - Ok(VerifiedRequest { - request, - access_key, - content_sha256_header: checked_signature.content_sha256_header, - }) -} - -pub fn signing_hmac( - datetime: &DateTime, - secret_key: &str, - region: &str, - service: &str, -) -> Result { - let secret = String::from("AWS4") + secret_key; - let mut date_hmac = HmacSha256::new_from_slice(secret.as_bytes())?; - date_hmac.update(datetime.format(SHORT_DATE).to_string().as_bytes()); - let mut region_hmac = HmacSha256::new_from_slice(&date_hmac.finalize().into_bytes())?; - region_hmac.update(region.as_bytes()); - let mut service_hmac = HmacSha256::new_from_slice(®ion_hmac.finalize().into_bytes())?; - service_hmac.update(service.as_bytes()); - let mut signing_hmac = HmacSha256::new_from_slice(&service_hmac.finalize().into_bytes())?; - signing_hmac.update(b"aws4_request"); - let hmac = HmacSha256::new_from_slice(&signing_hmac.finalize().into_bytes())?; - Ok(hmac) -} - -pub fn compute_scope(datetime: &DateTime, region: &str, service: &str) -> String { - format!( - "{}/{}/{}/aws4_request", - datetime.format(SHORT_DATE), - region, - service - ) -} diff --git a/src/api/common/signature/streaming.rs b/src/api/common/signature/streaming.rs deleted file mode 100644 index 64362727..00000000 --- a/src/api/common/signature/streaming.rs +++ /dev/null @@ -1,618 +0,0 @@ -use std::pin::Pin; -use std::sync::Mutex; - -use chrono::{DateTime, NaiveDateTime, TimeZone, Utc}; -use futures::prelude::*; -use futures::task; -use hmac::Mac; -use http::header::{HeaderMap, HeaderValue, CONTENT_ENCODING}; -use hyper::body::{Bytes, Frame, Incoming as IncomingBody}; -use hyper::Request; - -use garage_util::data::Hash; - -use super::*; - -use crate::helpers::body_stream; -use crate::signature::checksum::*; -use crate::signature::payload::CheckedSignature; - -pub use crate::signature::body::ReqBody; - -pub fn parse_streaming_body( - mut req: Request, - checked_signature: &CheckedSignature, - region: &str, - service: &str, -) -> Result, Error> { - debug!( - "Content signature mode: {:?}", - checked_signature.content_sha256_header - ); - - match checked_signature.content_sha256_header { - ContentSha256Header::StreamingPayload { signed, trailer } => { - // Sanity checks - if !signed && !trailer { - return Err(Error::bad_request( - "STREAMING-UNSIGNED-PAYLOAD without trailer is not a valid combination", - )); - } - - // Remove the aws-chunked component in the content-encoding: header - // Note: this header is not properly sent by minio client, so don't fail - // if it is absent from the request. - if let Some(content_encoding) = req.headers_mut().remove(CONTENT_ENCODING) { - if let Some(rest) = content_encoding.as_bytes().strip_prefix(b"aws-chunked,") { - req.headers_mut() - .insert(CONTENT_ENCODING, HeaderValue::from_bytes(rest).unwrap()); - } else if content_encoding != "aws-chunked" { - return Err(Error::bad_request( - "content-encoding does not contain aws-chunked for STREAMING-*-PAYLOAD", - )); - } - } - - // If trailer header is announced, add the calculation of the requested checksum - let mut checksummer = Checksummer::init(&Default::default(), false); - let trailer_algorithm = if trailer { - let algo = Some( - request_trailer_checksum_algorithm(req.headers())? - .ok_or_bad_request("Missing x-amz-trailer header")?, - ); - checksummer = checksummer.add(algo); - algo - } else { - None - }; - - // For signed variants, determine signing parameters - let sign_params = if signed { - let signature = checked_signature - .signature_header - .clone() - .ok_or_bad_request("No signature provided")?; - let signature = hex::decode(signature) - .ok() - .and_then(|bytes| Hash::try_from(&bytes)) - .ok_or_bad_request("Invalid signature")?; - - let secret_key = checked_signature - .key - .as_ref() - .ok_or_bad_request("Cannot sign streaming payload without signing key")? - .state - .as_option() - .ok_or_internal_error("Deleted key state")? - .secret_key - .to_string(); - - let date = req - .headers() - .get(X_AMZ_DATE) - .ok_or_bad_request("Missing X-Amz-Date field")? - .to_str()?; - let date: NaiveDateTime = NaiveDateTime::parse_from_str(date, LONG_DATETIME) - .ok_or_bad_request("Invalid date")?; - let date: DateTime = Utc.from_utc_datetime(&date); - - let scope = compute_scope(&date, region, service); - let signing_hmac = - crate::signature::signing_hmac(&date, &secret_key, region, service) - .ok_or_internal_error("Unable to build signing HMAC")?; - - Some(SignParams { - datetime: date, - scope, - signing_hmac, - previous_signature: signature, - }) - } else { - None - }; - - Ok(req.map(move |body| { - let stream = body_stream::<_, Error>(body); - - let signed_payload_stream = - StreamingPayloadStream::new(stream, sign_params, trailer).map_err(Error::from); - ReqBody { - stream: Mutex::new(signed_payload_stream.boxed()), - checksummer, - expected_checksums: Default::default(), - trailer_algorithm, - } - })) - } - _ => Ok(req.map(|body| { - let expected_checksums = ExpectedChecksums { - sha256: match &checked_signature.content_sha256_header { - ContentSha256Header::Sha256Checksum(sha256) => Some(*sha256), - _ => None, - }, - ..Default::default() - }; - let checksummer = Checksummer::init(&expected_checksums, false); - - let stream = http_body_util::BodyStream::new(body).map_err(Error::from); - ReqBody { - stream: Mutex::new(stream.boxed()), - checksummer, - expected_checksums, - trailer_algorithm: None, - } - })), - } -} - -fn compute_streaming_payload_signature( - signing_hmac: &HmacSha256, - date: DateTime, - scope: &str, - previous_signature: Hash, - content_sha256: Hash, -) -> Result { - let string_to_sign = [ - AWS4_HMAC_SHA256_PAYLOAD, - &date.format(LONG_DATETIME).to_string(), - scope, - &hex::encode(previous_signature), - EMPTY_STRING_HEX_DIGEST, - &hex::encode(content_sha256), - ] - .join("\n"); - - let mut hmac = signing_hmac.clone(); - hmac.update(string_to_sign.as_bytes()); - - Hash::try_from(&hmac.finalize().into_bytes()) - .ok_or_else(|| StreamingPayloadError::Message("Could not build signature".into())) -} - -fn compute_streaming_trailer_signature( - signing_hmac: &HmacSha256, - date: DateTime, - scope: &str, - previous_signature: Hash, - trailer_sha256: Hash, -) -> Result { - let string_to_sign = [ - AWS4_HMAC_SHA256_PAYLOAD, - &date.format(LONG_DATETIME).to_string(), - scope, - &hex::encode(previous_signature), - &hex::encode(trailer_sha256), - ] - .join("\n"); - - let mut hmac = signing_hmac.clone(); - hmac.update(string_to_sign.as_bytes()); - - Hash::try_from(&hmac.finalize().into_bytes()) - .ok_or_else(|| StreamingPayloadError::Message("Could not build signature".into())) -} - -mod payload { - use http::{HeaderName, HeaderValue}; - - use garage_util::data::Hash; - - use nom::bytes::streaming::{tag, take_while}; - use nom::character::streaming::hex_digit1; - use nom::combinator::{map_res, opt}; - use nom::number::streaming::hex_u32; - - macro_rules! try_parse { - ($expr:expr) => { - $expr.map_err(|e| e.map(Error::Parser))? - }; - } - - pub enum Error { - Parser(nom::error::Error), - BadSignature, - } - - impl Error { - pub fn description(&self) -> &str { - match *self { - Error::Parser(ref e) => e.code.description(), - Error::BadSignature => "Bad signature", - } - } - } - - #[derive(Debug, Clone)] - pub struct ChunkHeader { - pub size: usize, - pub signature: Option, - } - - impl ChunkHeader { - pub fn parse_signed(input: &[u8]) -> nom::IResult<&[u8], Self, Error<&[u8]>> { - let (input, size) = try_parse!(hex_u32(input)); - let (input, _) = try_parse!(tag(";")(input)); - - let (input, _) = try_parse!(tag("chunk-signature=")(input)); - let (input, data) = try_parse!(map_res(hex_digit1, hex::decode)(input)); - let signature = Hash::try_from(&data).ok_or(nom::Err::Failure(Error::BadSignature))?; - - let (input, _) = try_parse!(tag("\r\n")(input)); - - let header = ChunkHeader { - size: size as usize, - signature: Some(signature), - }; - - Ok((input, header)) - } - - pub fn parse_unsigned(input: &[u8]) -> nom::IResult<&[u8], Self, Error<&[u8]>> { - let (input, size) = try_parse!(hex_u32(input)); - let (input, _) = try_parse!(tag("\r\n")(input)); - - let header = ChunkHeader { - size: size as usize, - signature: None, - }; - - Ok((input, header)) - } - } - - #[derive(Debug, Clone)] - pub struct TrailerChunk { - pub header_name: HeaderName, - pub header_value: HeaderValue, - pub signature: Option, - } - - impl TrailerChunk { - fn parse_content(input: &[u8]) -> nom::IResult<&[u8], Self, Error<&[u8]>> { - let (input, header_name) = try_parse!(map_res( - take_while(|c: u8| c.is_ascii_alphanumeric() || c == b'-'), - HeaderName::from_bytes - )(input)); - let (input, _) = try_parse!(tag(b":")(input)); - let (input, header_value) = try_parse!(map_res( - take_while(|c: u8| c.is_ascii_alphanumeric() || b"+/=".contains(&c)), - HeaderValue::from_bytes - )(input)); - - // Possible '\n' after the header value, depends on clients - // https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html - let (input, _) = try_parse!(opt(tag(b"\n"))(input)); - - let (input, _) = try_parse!(tag(b"\r\n")(input)); - - Ok(( - input, - TrailerChunk { - header_name, - header_value, - signature: None, - }, - )) - } - pub fn parse_signed(input: &[u8]) -> nom::IResult<&[u8], Self, Error<&[u8]>> { - let (input, trailer) = Self::parse_content(input)?; - - let (input, _) = try_parse!(tag(b"x-amz-trailer-signature:")(input)); - let (input, data) = try_parse!(map_res(hex_digit1, hex::decode)(input)); - let signature = Hash::try_from(&data).ok_or(nom::Err::Failure(Error::BadSignature))?; - let (input, _) = try_parse!(tag(b"\r\n")(input)); - - Ok(( - input, - TrailerChunk { - signature: Some(signature), - ..trailer - }, - )) - } - pub fn parse_unsigned(input: &[u8]) -> nom::IResult<&[u8], Self, Error<&[u8]>> { - let (input, trailer) = Self::parse_content(input)?; - let (input, _) = try_parse!(tag(b"\r\n")(input)); - - Ok((input, trailer)) - } - } -} - -#[derive(Debug)] -pub enum StreamingPayloadError { - Stream(Error), - InvalidSignature, - Message(String), -} - -impl StreamingPayloadError { - fn message(msg: &str) -> Self { - StreamingPayloadError::Message(msg.into()) - } -} - -impl From for Error { - fn from(err: StreamingPayloadError) -> Self { - match err { - StreamingPayloadError::Stream(e) => e, - StreamingPayloadError::InvalidSignature => { - Error::bad_request("Invalid payload signature") - } - StreamingPayloadError::Message(e) => { - Error::bad_request(format!("Chunk format error: {}", e)) - } - } - } -} - -impl From> for StreamingPayloadError { - fn from(err: payload::Error) -> Self { - Self::message(err.description()) - } -} - -impl From> for StreamingPayloadError { - fn from(err: nom::error::Error) -> Self { - Self::message(err.code.description()) - } -} - -enum StreamingPayloadChunk { - Chunk { - header: payload::ChunkHeader, - data: Bytes, - }, - Trailer(payload::TrailerChunk), -} - -struct SignParams { - datetime: DateTime, - scope: String, - signing_hmac: HmacSha256, - previous_signature: Hash, -} - -#[pin_project::pin_project] -pub struct StreamingPayloadStream -where - S: Stream>, -{ - #[pin] - stream: S, - buf: bytes::BytesMut, - signing: Option, - has_trailer: bool, - done: bool, -} - -impl StreamingPayloadStream -where - S: Stream>, -{ - fn new(stream: S, signing: Option, has_trailer: bool) -> Self { - Self { - stream, - buf: bytes::BytesMut::new(), - signing, - has_trailer, - done: false, - } - } - - fn parse_next( - input: &[u8], - is_signed: bool, - has_trailer: bool, - ) -> nom::IResult<&[u8], StreamingPayloadChunk, StreamingPayloadError> { - use nom::bytes::streaming::{tag, take}; - - macro_rules! try_parse { - ($expr:expr) => { - $expr.map_err(nom::Err::convert)? - }; - } - - let (input, header) = if is_signed { - try_parse!(payload::ChunkHeader::parse_signed(input)) - } else { - try_parse!(payload::ChunkHeader::parse_unsigned(input)) - }; - - // 0-sized chunk is the last - if header.size == 0 { - if has_trailer { - let (input, trailer) = if is_signed { - try_parse!(payload::TrailerChunk::parse_signed(input)) - } else { - try_parse!(payload::TrailerChunk::parse_unsigned(input)) - }; - return Ok((input, StreamingPayloadChunk::Trailer(trailer))); - } else { - return Ok(( - input, - StreamingPayloadChunk::Chunk { - header, - data: Bytes::new(), - }, - )); - } - } - - let (input, data) = try_parse!(take::<_, _, nom::error::Error<_>>(header.size)(input)); - let (input, _) = try_parse!(tag::<_, _, nom::error::Error<_>>("\r\n")(input)); - - let data = Bytes::from(data.to_vec()); - - Ok((input, StreamingPayloadChunk::Chunk { header, data })) - } -} - -impl Stream for StreamingPayloadStream -where - S: Stream> + Unpin, -{ - type Item = Result, StreamingPayloadError>; - - fn poll_next( - self: Pin<&mut Self>, - cx: &mut task::Context<'_>, - ) -> task::Poll> { - use std::task::Poll; - - let mut this = self.project(); - - if *this.done { - return Poll::Ready(None); - } - - loop { - let (input, payload) = - match Self::parse_next(this.buf, this.signing.is_some(), *this.has_trailer) { - Ok(res) => res, - Err(nom::Err::Incomplete(_)) => { - match futures::ready!(this.stream.as_mut().poll_next(cx)) { - Some(Ok(bytes)) => { - this.buf.extend(bytes); - continue; - } - Some(Err(e)) => { - return Poll::Ready(Some(Err(StreamingPayloadError::Stream(e)))) - } - None => { - return Poll::Ready(Some(Err(StreamingPayloadError::message( - "Unexpected EOF", - )))); - } - } - } - Err(nom::Err::Error(e)) | Err(nom::Err::Failure(e)) => { - return Poll::Ready(Some(Err(e))) - } - }; - - match payload { - StreamingPayloadChunk::Chunk { data, header } => { - if let Some(signing) = this.signing.as_mut() { - let data_sha256sum = sha256sum(&data); - - let expected_signature = compute_streaming_payload_signature( - &signing.signing_hmac, - signing.datetime, - &signing.scope, - signing.previous_signature, - data_sha256sum, - )?; - - if header.signature.unwrap() != expected_signature { - return Poll::Ready(Some(Err(StreamingPayloadError::InvalidSignature))); - } - - signing.previous_signature = header.signature.unwrap(); - } - - *this.buf = input.into(); - - // 0-sized chunk is the last - if data.is_empty() { - // if there was a trailer, it would have been returned by the parser - assert!(!*this.has_trailer); - *this.done = true; - return Poll::Ready(None); - } - - return Poll::Ready(Some(Ok(Frame::data(data)))); - } - StreamingPayloadChunk::Trailer(trailer) => { - trace!( - "In StreamingPayloadStream::poll_next: got trailer {:?}", - trailer - ); - - if let Some(signing) = this.signing.as_mut() { - let data = [ - trailer.header_name.as_ref(), - &b":"[..], - trailer.header_value.as_ref(), - &b"\n"[..], - ] - .concat(); - let trailer_sha256sum = sha256sum(&data); - - let expected_signature = compute_streaming_trailer_signature( - &signing.signing_hmac, - signing.datetime, - &signing.scope, - signing.previous_signature, - trailer_sha256sum, - )?; - - if trailer.signature.unwrap() != expected_signature { - return Poll::Ready(Some(Err(StreamingPayloadError::InvalidSignature))); - } - } - - *this.buf = input.into(); - *this.done = true; - - let mut trailers_map = HeaderMap::new(); - trailers_map.insert(trailer.header_name, trailer.header_value); - - return Poll::Ready(Some(Ok(Frame::trailers(trailers_map)))); - } - } - } - } - - fn size_hint(&self) -> (usize, Option) { - self.stream.size_hint() - } -} - -#[cfg(test)] -mod tests { - use futures::prelude::*; - - use super::{SignParams, StreamingPayloadError, StreamingPayloadStream}; - - #[tokio::test] - async fn test_interrupted_signed_payload_stream() { - use chrono::{DateTime, Utc}; - - use garage_util::data::Hash; - - let datetime = DateTime::parse_from_rfc3339("2021-12-13T13:12:42+01:00") // TODO UNIX 0 - .unwrap() - .with_timezone(&Utc); - let secret_key = "test"; - let region = "test"; - let scope = crate::signature::compute_scope(&datetime, region, "s3"); - let signing_hmac = - crate::signature::signing_hmac(&datetime, secret_key, region, "s3").unwrap(); - - let data: &[&[u8]] = &[b"1"]; - let body = futures::stream::iter(data.iter().map(|block| Ok(block.to_vec().into()))); - - let seed_signature = Hash::default(); - - let mut stream = StreamingPayloadStream::new( - body, - Some(SignParams { - signing_hmac, - datetime, - scope, - previous_signature: seed_signature, - }), - false, - ); - - assert!(stream.try_next().await.is_err()); - match stream.try_next().await { - Err(StreamingPayloadError::Message(msg)) if msg == "Unexpected EOF" => {} - item => panic!( - "Unexpected result, expected early EOF error, got {:?}", - item - ), - } - } -} diff --git a/src/api/common/common_error.rs b/src/api/common_error.rs similarity index 65% rename from src/api/common/common_error.rs rename to src/api/common_error.rs index e596a6e9..c47555d4 100644 --- a/src/api/common/common_error.rs +++ b/src/api/common_error.rs @@ -1,7 +1,5 @@ -use std::convert::TryFrom; - +use err_derive::Error; use hyper::StatusCode; -use thiserror::Error; use garage_util::error::Error as GarageError; @@ -12,80 +10,51 @@ use garage_model::helper::error::Error as HelperError; pub enum CommonError { // ---- INTERNAL ERRORS ---- /// Error related to deeper parts of Garage - #[error("Internal error: {0}")] - InternalError(#[from] GarageError), + #[error(display = "Internal error: {}", _0)] + InternalError(#[error(source)] GarageError), /// Error related to Hyper - #[error("Internal error (Hyper error): {0}")] - Hyper(#[from] hyper::Error), + #[error(display = "Internal error (Hyper error): {}", _0)] + Hyper(#[error(source)] hyper::Error), /// Error related to HTTP - #[error("Internal error (HTTP error): {0}")] - Http(#[from] http::Error), + #[error(display = "Internal error (HTTP error): {}", _0)] + Http(#[error(source)] http::Error), // ---- GENERIC CLIENT ERRORS ---- /// Proper authentication was not provided - #[error("Forbidden: {0}")] + #[error(display = "Forbidden: {}", _0)] Forbidden(String), /// Generic bad request response with custom message - #[error("Bad request: {0}")] + #[error(display = "Bad request: {}", _0)] BadRequest(String), /// The client sent a header with invalid value - #[error("Invalid header value: {0}")] - InvalidHeader(#[from] hyper::header::ToStrError), + #[error(display = "Invalid header value: {}", _0)] + InvalidHeader(#[error(source)] hyper::header::ToStrError), // ---- SPECIFIC ERROR CONDITIONS ---- // These have to be error codes referenced in the S3 spec here: // https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ErrorCodeList /// The bucket requested don't exists - #[error("Bucket not found: {0}")] + #[error(display = "Bucket not found: {}", _0)] NoSuchBucket(String), /// Tried to create a bucket that already exist - #[error("Bucket already exists")] + #[error(display = "Bucket already exists")] BucketAlreadyExists, /// Tried to delete a non-empty bucket - #[error("Tried to delete a non-empty bucket")] + #[error(display = "Tried to delete a non-empty bucket")] BucketNotEmpty, // Category: bad request /// Bucket name is not valid according to AWS S3 specs - #[error("Invalid bucket name: {0}")] + #[error(display = "Invalid bucket name: {}", _0)] InvalidBucketName(String), } -#[macro_export] -macro_rules! commonErrorDerivative { - ( $error_struct: ident ) => { - impl From for $error_struct { - fn from(err: garage_util::error::Error) -> Self { - Self::Common(CommonError::InternalError(err)) - } - } - impl From for $error_struct { - fn from(err: http::Error) -> Self { - Self::Common(CommonError::Http(err)) - } - } - impl From for $error_struct { - fn from(err: hyper::Error) -> Self { - Self::Common(CommonError::Hyper(err)) - } - } - impl From for $error_struct { - fn from(err: hyper::header::ToStrError) -> Self { - Self::Common(CommonError::InvalidHeader(err)) - } - } - impl CommonErrorDerivative for $error_struct {} - }; -} - -pub use commonErrorDerivative; - impl CommonError { pub fn http_status_code(&self) -> StatusCode { match self { @@ -128,39 +97,18 @@ impl CommonError { } } -impl TryFrom for CommonError { - type Error = HelperError; - - fn try_from(err: HelperError) -> Result { +impl From for CommonError { + fn from(err: HelperError) -> Self { match err { - HelperError::Internal(i) => Ok(Self::InternalError(i)), - HelperError::BadRequest(b) => Ok(Self::BadRequest(b)), - HelperError::InvalidBucketName(n) => Ok(Self::InvalidBucketName(n)), - HelperError::NoSuchBucket(n) => Ok(Self::NoSuchBucket(n)), - e => Err(e), + HelperError::Internal(i) => Self::InternalError(i), + HelperError::BadRequest(b) => Self::BadRequest(b), + HelperError::InvalidBucketName(n) => Self::InvalidBucketName(n), + HelperError::NoSuchBucket(n) => Self::NoSuchBucket(n), + e => Self::bad_request(format!("{}", e)), } } } -/// This function converts HelperErrors into CommonErrors, -/// for variants that exist in CommonError. -/// This is used for helper functions that might return InvalidBucketName -/// or NoSuchBucket for instance, and we want to pass that error -/// up to our caller. -pub fn pass_helper_error(err: HelperError) -> CommonError { - match CommonError::try_from(err) { - Ok(e) => e, - Err(e) => panic!("Helper error `{}` should hot have happenned here", e), - } -} - -pub fn helper_error_as_internal(err: HelperError) -> CommonError { - match err { - HelperError::Internal(e) => CommonError::InternalError(e), - e => CommonError::InternalError(GarageError::Message(e.to_string())), - } -} - pub trait CommonErrorDerivative: From { fn internal_error(msg: M) -> Self { Self::from(CommonError::InternalError(GarageError::Message( diff --git a/src/api/common/encoding.rs b/src/api/encoding.rs similarity index 100% rename from src/api/common/encoding.rs rename to src/api/encoding.rs diff --git a/src/api/common/generic_server.rs b/src/api/generic_server.rs similarity index 81% rename from src/api/common/generic_server.rs rename to src/api/generic_server.rs index 3f14c07d..9c49fdf3 100644 --- a/src/api/common/generic_server.rs +++ b/src/api/generic_server.rs @@ -2,7 +2,8 @@ use std::convert::Infallible; use std::fs::{self, Permissions}; use std::os::unix::fs::PermissionsExt; use std::sync::Arc; -use std::time::Duration; + +use async_trait::async_trait; use futures::future::Future; use futures::stream::{futures_unordered::FuturesUnordered, StreamExt}; @@ -18,7 +19,6 @@ use hyper_util::rt::TokioIo; use tokio::io::{AsyncRead, AsyncWrite}; use tokio::net::{TcpListener, TcpStream, UnixListener, UnixStream}; use tokio::sync::watch; -use tokio::time::{sleep_until, Instant}; use opentelemetry::{ global, @@ -34,7 +34,7 @@ use garage_util::socket_address::UnixOrTCPSocketAddress; use crate::helpers::{BoxBody, ErrorBody}; -pub trait ApiEndpoint: Send + Sync + 'static { +pub(crate) trait ApiEndpoint: Send + Sync + 'static { fn name(&self) -> &'static str; fn add_span_attributes(&self, span: SpanRef<'_>); } @@ -45,7 +45,8 @@ pub trait ApiError: std::error::Error + Send + Sync + 'static { fn http_body(&self, garage_region: &str, path: &str) -> ErrorBody; } -pub trait ApiHandler: Send + Sync + 'static { +#[async_trait] +pub(crate) trait ApiHandler: Send + Sync + 'static { const API_NAME: &'static str; const API_NAME_DISPLAY: &'static str; @@ -53,20 +54,14 @@ pub trait ApiHandler: Send + Sync + 'static { type Error: ApiError; fn parse_endpoint(&self, r: &Request) -> Result; - fn handle( + async fn handle( &self, req: Request, endpoint: Self::Endpoint, - ) -> impl Future>, Self::Error>> + Send; - - /// Returns the key id used to authenticate this request. The ID returned must be safe to - /// log. - fn key_id_from_request(&self, _req: &Request) -> Option { - None - } + ) -> Result>, Self::Error>; } -pub struct ApiServer { +pub(crate) struct ApiServer { region: String, api_handler: A, @@ -148,20 +143,19 @@ impl ApiServer { ) -> Result>, http::Error> { let uri = req.uri().clone(); - let source = if let Ok(forwarded_for_ip_addr) = + if let Ok(forwarded_for_ip_addr) = forwarded_headers::handle_forwarded_for_headers(req.headers()) { - format!("{forwarded_for_ip_addr} (via {addr})") + info!( + "{} (via {}) {} {}", + forwarded_for_ip_addr, + addr, + req.method(), + uri + ); } else { - format!("{addr}") - }; - // we only do this to log the access key, so we can discard any error - let key = self - .api_handler - .key_id_from_request(&req) - .map(|k| format!("(key {k}) ")) - .unwrap_or_default(); - info!("{source} {key}{} {uri}", req.method()); + info!("{} {} {}", addr, req.method(), uri); + } debug!("{:?}", req); let tracer = opentelemetry::global::tracer("garage"); @@ -252,11 +246,13 @@ impl ApiServer { // ==== helper functions ==== +#[async_trait] pub trait Accept: Send + Sync + 'static { type Stream: AsyncRead + AsyncWrite + Send + Sync + 'static; - fn accept(&self) -> impl Future> + Send; + async fn accept(&self) -> std::io::Result<(Self::Stream, String)>; } +#[async_trait] impl Accept for TcpListener { type Stream = TcpStream; async fn accept(&self) -> std::io::Result<(Self::Stream, String)> { @@ -268,6 +264,7 @@ impl Accept for TcpListener { pub struct UnixListenerOn(pub UnixListener, pub String); +#[async_trait] impl Accept for UnixListenerOn { type Stream = UnixStream; async fn accept(&self) -> std::io::Result<(Self::Stream, String)> { @@ -294,7 +291,7 @@ where let connection_collector = tokio::spawn({ let server_name = server_name.clone(); async move { - let mut connections = FuturesUnordered::>::new(); + let mut connections = FuturesUnordered::new(); loop { let collect_next = async { if connections.is_empty() { @@ -315,34 +312,23 @@ where } } } - let deadline = Instant::now() + Duration::from_secs(10); - while !connections.is_empty() { + if !connections.is_empty() { info!( - "{} server: {} connections still open, deadline in {:.2}s", + "{} server: {} connections still open", server_name, - connections.len(), - (deadline - Instant::now()).as_secs_f32(), + connections.len() ); - tokio::select! { - conn_res = connections.next() => { - trace!( - "{} server: HTTP connection finished: {:?}", - server_name, - conn_res.unwrap(), - ); - } - _ = sleep_until(deadline) => { - warn!("{} server: exit deadline reached with {} connections still open, killing them now", - server_name, - connections.len()); - for conn in connections.iter() { - conn.abort(); - } - for conn in connections { - assert!(conn.await.unwrap_err().is_cancelled()); - } - break; - } + while let Some(conn_res) = connections.next().await { + trace!( + "{} server: HTTP connection finished: {:?}", + server_name, + conn_res + ); + info!( + "{} server: {} connections still open", + server_name, + connections.len() + ); } } } @@ -350,11 +336,7 @@ where while !*must_exit.borrow() { let (stream, client_addr) = tokio::select! { - acc = listener.accept() => match acc { - Ok(r) => r, - Err(e) if e.kind() == std::io::ErrorKind::ConnectionAborted => continue, - Err(e) => return Err(e.into()), - }, + acc = listener.accept() => acc?, _ = must_exit.changed() => continue, }; diff --git a/src/api/common/helpers.rs b/src/api/helpers.rs similarity index 97% rename from src/api/common/helpers.rs rename to src/api/helpers.rs index 6fc4aa13..cf60005d 100644 --- a/src/api/common/helpers.rs +++ b/src/api/helpers.rs @@ -8,6 +8,7 @@ use hyper::{ body::{Body, Bytes}, Request, Response, }; +use idna::domain_to_unicode; use serde::{Deserialize, Serialize}; use garage_model::bucket_table::BucketParams; @@ -96,7 +97,7 @@ pub fn authority_to_host(authority: &str) -> Result { authority ))), }; - authority.map(|h| h.to_ascii_lowercase()) + authority.map(|h| domain_to_unicode(h).0) } /// Extract the bucket name and the key name from an HTTP path and possibly a bucket provided in @@ -362,9 +363,9 @@ mod tests { } #[derive(Serialize)] -pub struct CustomApiErrorBody { - pub code: String, - pub message: String, - pub region: String, - pub path: String, +pub(crate) struct CustomApiErrorBody { + pub(crate) code: String, + pub(crate) message: String, + pub(crate) region: String, + pub(crate) path: String, } diff --git a/src/api/k2v/Cargo.toml b/src/api/k2v/Cargo.toml deleted file mode 100644 index 28f74ea3..00000000 --- a/src/api/k2v/Cargo.toml +++ /dev/null @@ -1,37 +0,0 @@ -[package] -name = "garage_api_k2v" -version = "1.3.1" -authors = ["Alex Auvolat "] -edition = "2018" -license = "AGPL-3.0" -description = "K2V API server crate for the Garage object store" -repository = "https://git.deuxfleurs.fr/Deuxfleurs/garage" -readme = "../../../README.md" - -[lib] -path = "lib.rs" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -garage_model = { workspace = true, features = [ "k2v" ] } -garage_table.workspace = true -garage_util = { workspace = true, features = [ "k2v" ] } -garage_api_common.workspace = true - -base64.workspace = true -thiserror.workspace = true -tracing.workspace = true - -futures.workspace = true -tokio.workspace = true -http.workspace = true -http-body-util.workspace = true -hyper = { workspace = true, default-features = false, features = ["server", "http1"] } -percent-encoding.workspace = true -url.workspace = true - -serde.workspace = true -serde_json.workspace = true - -opentelemetry.workspace = true diff --git a/src/api/k2v/api_server.rs b/src/api/k2v/api_server.rs index 8e10d9a6..658cfcc8 100644 --- a/src/api/k2v/api_server.rs +++ b/src/api/k2v/api_server.rs @@ -1,5 +1,7 @@ use std::sync::Arc; +use async_trait::async_trait; + use hyper::{body::Incoming as IncomingBody, Method, Request, Response}; use tokio::sync::watch; @@ -10,25 +12,26 @@ use garage_util::socket_address::UnixOrTCPSocketAddress; use garage_model::garage::Garage; -use garage_api_common::cors::*; -use garage_api_common::generic_server::*; -use garage_api_common::helpers::*; -use garage_api_common::signature::verify_request; +use crate::generic_server::*; +use crate::k2v::error::*; -use crate::batch::*; -use crate::error::*; -use crate::index::*; -use crate::item::*; -use crate::router::Endpoint; +use crate::signature::verify_request; -pub use garage_api_common::signature::streaming::ReqBody; +use crate::helpers::*; +use crate::k2v::batch::*; +use crate::k2v::index::*; +use crate::k2v::item::*; +use crate::k2v::router::Endpoint; +use crate::s3::cors::*; + +pub use crate::signature::streaming::ReqBody; pub type ResBody = BoxBody; pub struct K2VApiServer { garage: Arc, } -pub struct K2VApiEndpoint { +pub(crate) struct K2VApiEndpoint { bucket_name: String, endpoint: Endpoint, } @@ -46,6 +49,7 @@ impl K2VApiServer { } } +#[async_trait] impl ApiHandler for K2VApiServer { const API_NAME: &'static str = "k2v"; const API_NAME_DISPLAY: &'static str = "K2V"; @@ -73,7 +77,7 @@ impl ApiHandler for K2VApiServer { } = endpoint; let garage = self.garage.clone(); - // The OPTIONS method is processed early, before we even check for an API key + // The OPTIONS method is procesed early, before we even check for an API key if let Endpoint::Options = endpoint { let options_res = handle_options_api(garage, &req, Some(bucket_name)) .await @@ -81,20 +85,16 @@ impl ApiHandler for K2VApiServer { return Ok(options_res.map(|_empty_body: EmptyBody| empty_body())); } - let verified_request = verify_request(&garage, req, "k2v").await?; - let req = verified_request.request; - let api_key = verified_request.access_key; + let (req, api_key, _content_sha256) = verify_request(&garage, req, "k2v").await?; let bucket_id = garage .bucket_helper() .resolve_bucket(&bucket_name, &api_key) - .await - .map_err(pass_helper_error)?; + .await?; let bucket = garage .bucket_helper() .get_existing_bucket(bucket_id) - .await - .map_err(helper_error_as_internal)?; + .await?; let bucket_params = bucket.state.into_option().unwrap(); let allowed = match endpoint.authorization_type() { @@ -176,12 +176,6 @@ impl ApiHandler for K2VApiServer { Ok(resp_ok) } - - fn key_id_from_request(&self, req: &Request) -> Option { - garage_api_common::signature::payload::Authorization::parse_header(req.headers()) - .map(|auth| auth.key_id) - .ok() - } } impl ApiEndpoint for K2VApiEndpoint { diff --git a/src/api/k2v/batch.rs b/src/api/k2v/batch.rs index 7a03d836..02b7ae8b 100644 --- a/src/api/k2v/batch.rs +++ b/src/api/k2v/batch.rs @@ -4,14 +4,13 @@ use serde::{Deserialize, Serialize}; use garage_table::{EnumerationOrder, TableSchema}; +use garage_model::k2v::causality::*; use garage_model::k2v::item_table::*; -use garage_api_common::helpers::*; - -use crate::api_server::{ReqBody, ResBody}; -use crate::error::*; -use crate::item::parse_causality_token; -use crate::range::read_range; +use crate::helpers::*; +use crate::k2v::api_server::{ReqBody, ResBody}; +use crate::k2v::error::*; +use crate::k2v::range::read_range; pub async fn handle_insert_batch( ctx: ReqCtx, @@ -20,11 +19,11 @@ pub async fn handle_insert_batch( let ReqCtx { garage, bucket_id, .. } = &ctx; - let items = req.into_body().json::>().await?; + let items = parse_json_body::, _, Error>(req).await?; let mut items2 = vec![]; for it in items { - let ct = it.ct.map(|s| parse_causality_token(&s)).transpose()?; + let ct = it.ct.map(|s| CausalContext::parse_helper(&s)).transpose()?; let v = match it.v { Some(vs) => DvvsValue::Value( BASE64_STANDARD @@ -47,7 +46,7 @@ pub async fn handle_read_batch( ctx: ReqCtx, req: Request, ) -> Result, Error> { - let queries = req.into_body().json::>().await?; + let queries = parse_json_body::, _, Error>(req).await?; let resp_results = futures::future::join_all( queries @@ -141,7 +140,7 @@ pub async fn handle_delete_batch( ctx: ReqCtx, req: Request, ) -> Result, Error> { - let queries = req.into_body().json::>().await?; + let queries = parse_json_body::, _, Error>(req).await?; let resp_results = futures::future::join_all( queries @@ -262,7 +261,7 @@ pub(crate) async fn handle_poll_range( } = ctx; use garage_model::k2v::sub::PollRange; - let query = req.into_body().json::().await?; + let query = parse_json_body::(req).await?; let timeout_msec = query.timeout.unwrap_or(300).clamp(1, 600) * 1000; @@ -282,8 +281,7 @@ pub(crate) async fn handle_poll_range( query.seen_marker, timeout_msec, ) - .await - .map_err(pass_helper_error)?; + .await?; if let Some((items, seen_marker)) = resp { let resp = PollRangeResponse { diff --git a/src/api/k2v/error.rs b/src/api/k2v/error.rs index f1937fe5..16479227 100644 --- a/src/api/k2v/error.rs +++ b/src/api/k2v/error.rs @@ -1,54 +1,52 @@ +use err_derive::Error; use hyper::header::HeaderValue; use hyper::{HeaderMap, StatusCode}; -use thiserror::Error; -use garage_api_common::common_error::{commonErrorDerivative, CommonError}; -pub(crate) use garage_api_common::common_error::{helper_error_as_internal, pass_helper_error}; -pub use garage_api_common::common_error::{ - CommonErrorDerivative, OkOrBadRequest, OkOrInternalError, -}; -use garage_api_common::generic_server::ApiError; -use garage_api_common::helpers::*; -use garage_api_common::signature::error::Error as SignatureError; +use crate::common_error::CommonError; +pub use crate::common_error::{CommonErrorDerivative, OkOrBadRequest, OkOrInternalError}; +use crate::generic_server::ApiError; +use crate::helpers::*; +use crate::signature::error::Error as SignatureError; /// Errors of this crate #[derive(Debug, Error)] pub enum Error { - #[error("{0}")] + #[error(display = "{}", _0)] /// Error from common error - Common(#[from] CommonError), + Common(CommonError), // Category: cannot process /// Authorization Header Malformed - #[error("Authorization header malformed, unexpected scope: {0}")] + #[error(display = "Authorization header malformed, unexpected scope: {}", _0)] AuthorizationHeaderMalformed(String), - /// The provided digest (checksum) value was invalid - #[error("Invalid digest: {0}")] - InvalidDigest(String), - /// The object requested don't exists - #[error("Key not found")] + #[error(display = "Key not found")] NoSuchKey, /// Some base64 encoded data was badly encoded - #[error("Invalid base64: {0}")] - InvalidBase64(#[from] base64::DecodeError), - - /// Invalid causality token - #[error("Invalid causality token")] - InvalidCausalityToken, + #[error(display = "Invalid base64: {}", _0)] + InvalidBase64(#[error(source)] base64::DecodeError), /// The client asked for an invalid return format (invalid Accept header) - #[error("Not acceptable: {0}")] + #[error(display = "Not acceptable: {}", _0)] NotAcceptable(String), /// The request contained an invalid UTF-8 sequence in its path or in other parameters - #[error("Invalid UTF-8: {0}")] - InvalidUtf8Str(#[from] std::str::Utf8Error), + #[error(display = "Invalid UTF-8: {}", _0)] + InvalidUtf8Str(#[error(source)] std::str::Utf8Error), } -commonErrorDerivative!(Error); +impl From for Error +where + CommonError: From, +{ + fn from(err: T) -> Self { + Error::Common(CommonError::from(err)) + } +} + +impl CommonErrorDerivative for Error {} impl From for Error { fn from(err: SignatureError) -> Self { @@ -58,7 +56,6 @@ impl From for Error { Self::AuthorizationHeaderMalformed(c) } SignatureError::InvalidUtf8Str(i) => Self::InvalidUtf8Str(i), - SignatureError::InvalidDigest(d) => Self::InvalidDigest(d), } } } @@ -75,8 +72,6 @@ impl Error { Error::AuthorizationHeaderMalformed(_) => "AuthorizationHeaderMalformed", Error::InvalidBase64(_) => "InvalidBase64", Error::InvalidUtf8Str(_) => "InvalidUtf8String", - Error::InvalidCausalityToken => "CausalityToken", - Error::InvalidDigest(_) => "InvalidDigest", } } } @@ -90,9 +85,7 @@ impl ApiError for Error { Error::NotAcceptable(_) => StatusCode::NOT_ACCEPTABLE, Error::AuthorizationHeaderMalformed(_) | Error::InvalidBase64(_) - | Error::InvalidUtf8Str(_) - | Error::InvalidDigest(_) - | Error::InvalidCausalityToken => StatusCode::BAD_REQUEST, + | Error::InvalidUtf8Str(_) => StatusCode::BAD_REQUEST, } } diff --git a/src/api/k2v/index.rs b/src/api/k2v/index.rs index fbfaad98..e3397238 100644 --- a/src/api/k2v/index.rs +++ b/src/api/k2v/index.rs @@ -5,11 +5,10 @@ use garage_table::util::*; use garage_model::k2v::item_table::{BYTES, CONFLICTS, ENTRIES, VALUES}; -use garage_api_common::helpers::*; - -use crate::api_server::ResBody; -use crate::error::*; -use crate::range::read_range; +use crate::helpers::*; +use crate::k2v::api_server::ResBody; +use crate::k2v::error::*; +use crate::k2v::range::read_range; pub async fn handle_read_index( ctx: ReqCtx, diff --git a/src/api/k2v/item.rs b/src/api/k2v/item.rs index 0fb945d2..af3af4e4 100644 --- a/src/api/k2v/item.rs +++ b/src/api/k2v/item.rs @@ -6,10 +6,9 @@ use hyper::{Request, Response, StatusCode}; use garage_model::k2v::causality::*; use garage_model::k2v::item_table::*; -use garage_api_common::helpers::*; - -use crate::api_server::{ReqBody, ResBody}; -use crate::error::*; +use crate::helpers::*; +use crate::k2v::api_server::{ReqBody, ResBody}; +use crate::k2v::error::*; pub const X_GARAGE_CAUSALITY_TOKEN: &str = "X-Garage-Causality-Token"; @@ -19,10 +18,6 @@ pub enum ReturnFormat { Either, } -pub(crate) fn parse_causality_token(s: &str) -> Result { - CausalContext::parse(s).ok_or(Error::InvalidCausalityToken) -} - impl ReturnFormat { pub fn from(req: &Request) -> Result { let accept = match req.headers().get(header::ACCEPT) { @@ -141,10 +136,12 @@ pub async fn handle_insert_item( .get(X_GARAGE_CAUSALITY_TOKEN) .map(|s| s.to_str()) .transpose()? - .map(parse_causality_token) + .map(CausalContext::parse_helper) .transpose()?; - let body = req.into_body().collect().await?; + let body = http_body_util::BodyExt::collect(req.into_body()) + .await? + .to_bytes(); let value = DvvsValue::Value(body.to_vec()); @@ -179,7 +176,7 @@ pub async fn handle_delete_item( .get(X_GARAGE_CAUSALITY_TOKEN) .map(|s| s.to_str()) .transpose()? - .map(parse_causality_token) + .map(CausalContext::parse_helper) .transpose()?; let value = DvvsValue::Deleted; diff --git a/src/api/k2v/lib.rs b/src/api/k2v/mod.rs similarity index 70% rename from src/api/k2v/lib.rs rename to src/api/k2v/mod.rs index 334ae46b..b6a8c5cf 100644 --- a/src/api/k2v/lib.rs +++ b/src/api/k2v/mod.rs @@ -1,6 +1,3 @@ -#[macro_use] -extern crate tracing; - pub mod api_server; mod error; mod router; diff --git a/src/api/k2v/range.rs b/src/api/k2v/range.rs index eb4738db..bb9d3be5 100644 --- a/src/api/k2v/range.rs +++ b/src/api/k2v/range.rs @@ -7,9 +7,8 @@ use std::sync::Arc; use garage_table::replication::TableShardedReplication; use garage_table::*; -use garage_api_common::helpers::key_after_prefix; - -use crate::error::*; +use crate::helpers::key_after_prefix; +use crate::k2v::error::*; /// Read range in a Garage table. /// Returns (entries, more?, nextStart) diff --git a/src/api/k2v/router.rs b/src/api/k2v/router.rs index a04b0f81..1cc58be5 100644 --- a/src/api/k2v/router.rs +++ b/src/api/k2v/router.rs @@ -1,11 +1,11 @@ -use crate::error::*; +use crate::k2v::error::*; use std::borrow::Cow; use hyper::{Method, Request}; -use garage_api_common::helpers::Authorization; -use garage_api_common::router_macros::{generateQueryParameters, router_match}; +use crate::helpers::Authorization; +use crate::router_macros::{generateQueryParameters, router_match}; router_match! {@func diff --git a/src/api/lib.rs b/src/api/lib.rs new file mode 100644 index 00000000..370dfd7a --- /dev/null +++ b/src/api/lib.rs @@ -0,0 +1,17 @@ +//! Crate for serving a S3 compatible API +#[macro_use] +extern crate tracing; + +pub mod common_error; + +mod encoding; +pub mod generic_server; +pub mod helpers; +mod router_macros; +/// This mode is public only to help testing. Don't expect stability here +pub mod signature; + +pub mod admin; +#[cfg(feature = "k2v")] +pub mod k2v; +pub mod s3; diff --git a/src/api/common/router_macros.rs b/src/api/router_macros.rs similarity index 98% rename from src/api/common/router_macros.rs rename to src/api/router_macros.rs index d9fe86db..cfecbc92 100644 --- a/src/api/common/router_macros.rs +++ b/src/api/router_macros.rs @@ -1,6 +1,5 @@ /// This macro is used to generate very repetitive match {} blocks in this module /// It is _not_ made to be used anywhere else -#[macro_export] macro_rules! router_match { (@match $enum:expr , [ $($endpoint:ident,)* ]) => {{ // usage: router_match {@match my_enum, [ VariantWithField1, VariantWithField2 ..] } @@ -134,7 +133,6 @@ macro_rules! router_match { /// This macro is used to generate part of the code in this module. It must be called only one, and /// is useless outside of this module. -#[macro_export] macro_rules! generateQueryParameters { ( keywords: [ $($kw_param:expr => $kw_name: ident),* ], @@ -206,7 +204,7 @@ macro_rules! generateQueryParameters { } /// Get an error message in case not all parameters where used when extracting them to - /// build an Endpoint variant + /// build an Enpoint variant fn nonempty_message(&self) -> Option<&str> { if self.keyword.is_some() { Some("Keyword not used") @@ -222,5 +220,5 @@ macro_rules! generateQueryParameters { } } -pub use generateQueryParameters; -pub use router_match; +pub(crate) use generateQueryParameters; +pub(crate) use router_match; diff --git a/src/api/s3/api_server.rs b/src/api/s3/api_server.rs index acb0cf56..1737af33 100644 --- a/src/api/s3/api_server.rs +++ b/src/api/s3/api_server.rs @@ -1,5 +1,7 @@ use std::sync::Arc; +use async_trait::async_trait; + use hyper::header; use hyper::{body::Incoming as IncomingBody, Request, Response}; use tokio::sync::watch; @@ -12,33 +14,33 @@ use garage_util::socket_address::UnixOrTCPSocketAddress; use garage_model::garage::Garage; use garage_model::key_table::Key; -use garage_api_common::cors::*; -use garage_api_common::generic_server::*; -use garage_api_common::helpers::*; -use garage_api_common::signature::verify_request; +use crate::generic_server::*; +use crate::s3::error::*; -use crate::bucket::*; -use crate::copy::*; -use crate::cors::*; -use crate::delete::*; -use crate::error::*; -use crate::get::*; -use crate::lifecycle::*; -use crate::list::*; -use crate::multipart::*; -use crate::post_object::handle_post_object; -use crate::put::*; -use crate::router::Endpoint; -use crate::website::*; +use crate::signature::verify_request; -pub use garage_api_common::signature::streaming::ReqBody; +use crate::helpers::*; +use crate::s3::bucket::*; +use crate::s3::copy::*; +use crate::s3::cors::*; +use crate::s3::delete::*; +use crate::s3::get::*; +use crate::s3::lifecycle::*; +use crate::s3::list::*; +use crate::s3::multipart::*; +use crate::s3::post_object::handle_post_object; +use crate::s3::put::*; +use crate::s3::router::Endpoint; +use crate::s3::website::*; + +pub use crate::signature::streaming::ReqBody; pub type ResBody = BoxBody; pub struct S3ApiServer { garage: Arc, } -pub struct S3ApiEndpoint { +pub(crate) struct S3ApiEndpoint { bucket_name: Option, endpoint: Endpoint, } @@ -68,6 +70,7 @@ impl S3ApiServer { } } +#[async_trait] impl ApiHandler for S3ApiServer { const API_NAME: &'static str = "s3"; const API_NAME_DISPLAY: &'static str = "S3"; @@ -121,9 +124,7 @@ impl ApiHandler for S3ApiServer { return Ok(options_res.map(|_empty_body: EmptyBody| empty_body())); } - let verified_request = verify_request(&garage, req, "s3").await?; - let req = verified_request.request; - let api_key = verified_request.access_key; + let (req, api_key, content_sha256) = verify_request(&garage, req, "s3").await?; let bucket_name = match bucket_name { None => { @@ -136,14 +137,20 @@ impl ApiHandler for S3ApiServer { // Special code path for CreateBucket API endpoint if let Endpoint::CreateBucket {} = endpoint { - return handle_create_bucket(&garage, req, &api_key.key_id, bucket_name).await; + return handle_create_bucket( + &garage, + req, + content_sha256, + &api_key.key_id, + bucket_name, + ) + .await; } let bucket_id = garage .bucket_helper() .resolve_bucket(&bucket_name, &api_key) - .await - .map_err(pass_helper_error)?; + .await?; let bucket = garage .bucket_helper() .get_existing_bucket(bucket_id) @@ -174,7 +181,7 @@ impl ApiHandler for S3ApiServer { let resp = match endpoint { Endpoint::HeadObject { key, part_number, .. - } => handle_head(ctx, &req.map(|_| ()), &key, part_number).await, + } => handle_head(ctx, &req, &key, part_number).await, Endpoint::GetObject { key, part_number, @@ -194,20 +201,20 @@ impl ApiHandler for S3ApiServer { response_content_type, response_expires, }; - handle_get(ctx, &req.map(|_| ()), &key, part_number, overrides).await + handle_get(ctx, &req, &key, part_number, overrides).await } Endpoint::UploadPart { key, part_number, upload_id, - } => handle_put_part(ctx, req, &key, part_number, &upload_id).await, + } => handle_put_part(ctx, req, &key, part_number, &upload_id, content_sha256).await, Endpoint::CopyObject { key } => handle_copy(ctx, &req, &key).await, Endpoint::UploadPartCopy { key, part_number, upload_id, } => handle_upload_part_copy(ctx, &req, &key, part_number, &upload_id).await, - Endpoint::PutObject { key } => handle_put(ctx, req, &key).await, + Endpoint::PutObject { key } => handle_put(ctx, req, &key, content_sha256).await, Endpoint::AbortMultipartUpload { key, upload_id } => { handle_abort_multipart_upload(ctx, &key, &upload_id).await } @@ -216,7 +223,7 @@ impl ApiHandler for S3ApiServer { handle_create_multipart_upload(ctx, &req, &key).await } Endpoint::CompleteMultipartUpload { key, upload_id } => { - handle_complete_multipart_upload(ctx, req, &key, &upload_id).await + handle_complete_multipart_upload(ctx, req, &key, &upload_id, content_sha256).await } Endpoint::CreateBucket {} => unreachable!(), Endpoint::HeadBucket {} => { @@ -226,7 +233,6 @@ impl ApiHandler for S3ApiServer { Endpoint::DeleteBucket {} => handle_delete_bucket(ctx).await, Endpoint::GetBucketLocation {} => handle_get_bucket_location(ctx), Endpoint::GetBucketVersioning {} => handle_get_bucket_versioning(), - Endpoint::GetBucketAcl {} => handle_get_bucket_acl(ctx), Endpoint::ListObjects { delimiter, encoding_type, @@ -313,6 +319,7 @@ impl ApiHandler for S3ApiServer { } => { let query = ListPartsQuery { bucket_name: ctx.bucket_name.clone(), + bucket_id, key, upload_id, part_number_marker: part_number_marker.map(|p| p.min(10000)), @@ -320,15 +327,17 @@ impl ApiHandler for S3ApiServer { }; handle_list_parts(ctx, req, &query).await } - Endpoint::DeleteObjects {} => handle_delete_objects(ctx, req).await, + Endpoint::DeleteObjects {} => handle_delete_objects(ctx, req, content_sha256).await, Endpoint::GetBucketWebsite {} => handle_get_website(ctx).await, - Endpoint::PutBucketWebsite {} => handle_put_website(ctx, req).await, + Endpoint::PutBucketWebsite {} => handle_put_website(ctx, req, content_sha256).await, Endpoint::DeleteBucketWebsite {} => handle_delete_website(ctx).await, Endpoint::GetBucketCors {} => handle_get_cors(ctx).await, - Endpoint::PutBucketCors {} => handle_put_cors(ctx, req).await, + Endpoint::PutBucketCors {} => handle_put_cors(ctx, req, content_sha256).await, Endpoint::DeleteBucketCors {} => handle_delete_cors(ctx).await, Endpoint::GetBucketLifecycleConfiguration {} => handle_get_lifecycle(ctx).await, - Endpoint::PutBucketLifecycleConfiguration {} => handle_put_lifecycle(ctx, req).await, + Endpoint::PutBucketLifecycleConfiguration {} => { + handle_put_lifecycle(ctx, req, content_sha256).await + } Endpoint::DeleteBucketLifecycle {} => handle_delete_lifecycle(ctx).await, endpoint => Err(Error::NotImplemented(endpoint.name().to_owned())), }; @@ -343,12 +352,6 @@ impl ApiHandler for S3ApiServer { Ok(resp_ok) } - - fn key_id_from_request(&self, req: &Request) -> Option { - garage_api_common::signature::payload::Authorization::parse_header(req.headers()) - .map(|auth| auth.key_id) - .ok() - } } impl ApiEndpoint for S3ApiEndpoint { diff --git a/src/api/s3/bucket.rs b/src/api/s3/bucket.rs index 55caa6c8..6a12aa9c 100644 --- a/src/api/s3/bucket.rs +++ b/src/api/s3/bucket.rs @@ -1,22 +1,24 @@ use std::collections::HashMap; +use http_body_util::BodyExt; use hyper::{Request, Response, StatusCode}; use garage_model::bucket_alias_table::*; use garage_model::bucket_table::Bucket; use garage_model::garage::Garage; -use garage_model::key_table::{Key, KeyParams}; +use garage_model::key_table::Key; use garage_model::permission::BucketKeyPerm; use garage_table::util::*; use garage_util::crdt::*; +use garage_util::data::*; use garage_util::time::*; -use garage_api_common::common_error::CommonError; -use garage_api_common::helpers::*; - -use crate::api_server::{ReqBody, ResBody}; -use crate::error::*; -use crate::xml as s3_xml; +use crate::common_error::CommonError; +use crate::helpers::*; +use crate::s3::api_server::{ReqBody, ResBody}; +use crate::s3::error::*; +use crate::s3::xml as s3_xml; +use crate::signature::verify_signed_content; pub fn handle_get_bucket_location(ctx: ReqCtx) -> Result, Error> { let ReqCtx { garage, .. } = ctx; @@ -44,55 +46,6 @@ pub fn handle_get_bucket_versioning() -> Result, Error> { .body(string_body(xml))?) } -pub fn handle_get_bucket_acl(ctx: ReqCtx) -> Result, Error> { - let ReqCtx { - bucket_id, api_key, .. - } = ctx; - let key_p = api_key.params().ok_or_internal_error( - "Key should not be in deleted state at this point (in handle_get_bucket_acl)", - )?; - - let mut grants: Vec = vec![]; - let kp = api_key.bucket_permissions(&bucket_id); - - if kp.allow_owner { - grants.push(s3_xml::Grant { - grantee: create_grantee(&key_p, &api_key), - permission: s3_xml::Value("FULL_CONTROL".to_string()), - }); - } else { - if kp.allow_read { - grants.push(s3_xml::Grant { - grantee: create_grantee(&key_p, &api_key), - permission: s3_xml::Value("READ".to_string()), - }); - grants.push(s3_xml::Grant { - grantee: create_grantee(&key_p, &api_key), - permission: s3_xml::Value("READ_ACP".to_string()), - }); - } - if kp.allow_write { - grants.push(s3_xml::Grant { - grantee: create_grantee(&key_p, &api_key), - permission: s3_xml::Value("WRITE".to_string()), - }); - } - } - - let access_control_policy = s3_xml::AccessControlPolicy { - xmlns: (), - owner: None, - acl: s3_xml::AccessControlList { entries: grants }, - }; - - let xml = s3_xml::to_xml_with_header(&access_control_policy)?; - trace!("xml: {}", xml); - - Ok(Response::builder() - .header("Content-Type", "application/xml") - .body(string_body(xml))?) -} - pub async fn handle_list_buckets( garage: &Garage, api_key: &Key, @@ -168,10 +121,15 @@ pub async fn handle_list_buckets( pub async fn handle_create_bucket( garage: &Garage, req: Request, + content_sha256: Option, api_key_id: &String, bucket_name: String, ) -> Result, Error> { - let body = req.into_body().collect().await?; + let body = BodyExt::collect(req.into_body()).await?.to_bytes(); + + if let Some(content_sha256) = content_sha256 { + verify_signed_content(content_sha256, &body[..])?; + } let cmd = parse_create_bucket_xml(&body[..]).ok_or_bad_request("Invalid create bucket XML query")?; @@ -221,7 +179,7 @@ pub async fn handle_create_bucket( } // Create the bucket! - if !is_valid_bucket_name(&bucket_name, garage.config.allow_punycode) { + if !is_valid_bucket_name(&bucket_name) { return Err(Error::bad_request(format!( "{}: {}", bucket_name, INVALID_BUCKET_NAME_MESSAGE @@ -290,11 +248,11 @@ pub async fn handle_delete_bucket(ctx: ReqCtx) -> Result, Erro // 1. delete bucket alias if is_local_alias { helper - .purge_local_bucket_alias(*bucket_id, &api_key.key_id, bucket_name) + .unset_local_bucket_alias(*bucket_id, &api_key.key_id, bucket_name) .await?; } else { helper - .purge_global_bucket_alias(*bucket_id, bucket_name) + .unset_global_bucket_alias(*bucket_id, bucket_name) .await?; } @@ -360,15 +318,6 @@ fn parse_create_bucket_xml(xml_bytes: &[u8]) -> Option> { Some(ret) } -fn create_grantee(key_params: &KeyParams, api_key: &Key) -> s3_xml::Grantee { - s3_xml::Grantee { - xmlns_xsi: (), - typ: "CanonicalUser".to_string(), - display_name: Some(s3_xml::Value(key_params.name.get().to_string())), - id: Some(s3_xml::Value(api_key.key_id.to_string())), - } -} - #[cfg(test)] mod tests { use super::*; diff --git a/src/api/common/signature/checksum.rs b/src/api/s3/checksum.rs similarity index 55% rename from src/api/common/signature/checksum.rs rename to src/api/s3/checksum.rs index 3c5e7c53..c9dc001c 100644 --- a/src/api/common/signature/checksum.rs +++ b/src/api/s3/checksum.rs @@ -11,12 +11,11 @@ use sha2::Sha256; use http::{HeaderMap, HeaderName, HeaderValue}; use garage_util::data::*; +use garage_util::error::OkOrMessage; -use super::*; +use garage_model::s3::object_table::*; -pub use garage_model::s3::object_table::{ChecksumAlgorithm, ChecksumValue}; - -pub const CONTENT_MD5: HeaderName = HeaderName::from_static("content-md5"); +use crate::s3::error::*; pub const X_AMZ_CHECKSUM_ALGORITHM: HeaderName = HeaderName::from_static("x-amz-checksum-algorithm"); @@ -32,8 +31,8 @@ pub type Md5Checksum = [u8; 16]; pub type Sha1Checksum = [u8; 20]; pub type Sha256Checksum = [u8; 32]; -#[derive(Debug, Default, Clone)] -pub struct ExpectedChecksums { +#[derive(Debug, Default)] +pub(crate) struct ExpectedChecksums { // base64-encoded md5 (content-md5 header) pub md5: Option, // content_sha256 (as a Hash / FixedBytes32) @@ -42,7 +41,7 @@ pub struct ExpectedChecksums { pub extra: Option, } -pub struct Checksummer { +pub(crate) struct Checksummer { pub crc32: Option, pub crc32c: Option, pub md5: Option, @@ -51,7 +50,7 @@ pub struct Checksummer { } #[derive(Default)] -pub struct Checksums { +pub(crate) struct Checksums { pub crc32: Option, pub crc32c: Option, pub md5: Option, @@ -60,48 +59,34 @@ pub struct Checksums { } impl Checksummer { - pub fn new() -> Self { - Self { + pub(crate) fn init(expected: &ExpectedChecksums, require_md5: bool) -> Self { + let mut ret = Self { crc32: None, crc32c: None, md5: None, sha1: None, sha256: None, - } - } + }; - pub fn init(expected: &ExpectedChecksums, add_md5: bool) -> Self { - let mut ret = Self::new(); - ret.add_expected(expected); - if add_md5 { - ret.add_md5(); + if expected.md5.is_some() || require_md5 { + ret.md5 = Some(Md5::new()); + } + if expected.sha256.is_some() || matches!(&expected.extra, Some(ChecksumValue::Sha256(_))) { + ret.sha256 = Some(Sha256::new()); + } + if matches!(&expected.extra, Some(ChecksumValue::Crc32(_))) { + ret.crc32 = Some(Crc32::new()); + } + if matches!(&expected.extra, Some(ChecksumValue::Crc32c(_))) { + ret.crc32c = Some(Crc32c::default()); + } + if matches!(&expected.extra, Some(ChecksumValue::Sha1(_))) { + ret.sha1 = Some(Sha1::new()); } ret } - pub fn add_md5(&mut self) { - self.md5 = Some(Md5::new()); - } - - pub fn add_expected(&mut self, expected: &ExpectedChecksums) { - if expected.md5.is_some() { - self.md5 = Some(Md5::new()); - } - if expected.sha256.is_some() || matches!(&expected.extra, Some(ChecksumValue::Sha256(_))) { - self.sha256 = Some(Sha256::new()); - } - if matches!(&expected.extra, Some(ChecksumValue::Crc32(_))) { - self.crc32 = Some(Crc32::new()); - } - if matches!(&expected.extra, Some(ChecksumValue::Crc32c(_))) { - self.crc32c = Some(Crc32c::default()); - } - if matches!(&expected.extra, Some(ChecksumValue::Sha1(_))) { - self.sha1 = Some(Sha1::new()); - } - } - - pub fn add(mut self, algo: Option) -> Self { + pub(crate) fn add(mut self, algo: Option) -> Self { match algo { Some(ChecksumAlgorithm::Crc32) => { self.crc32 = Some(Crc32::new()); @@ -120,7 +105,7 @@ impl Checksummer { self } - pub fn update(&mut self, bytes: &[u8]) { + pub(crate) fn update(&mut self, bytes: &[u8]) { if let Some(crc32) = &mut self.crc32 { crc32.update(bytes); } @@ -138,7 +123,7 @@ impl Checksummer { } } - pub fn finalize(self) -> Checksums { + pub(crate) fn finalize(self) -> Checksums { Checksums { crc32: self.crc32.map(|x| u32::to_be_bytes(x.finalize())), crc32c: self @@ -198,56 +183,153 @@ impl Checksums { // ---- -pub fn parse_checksum_algorithm(algo: &str) -> Result { - match algo { - "CRC32" => Ok(ChecksumAlgorithm::Crc32), - "CRC32C" => Ok(ChecksumAlgorithm::Crc32c), - "SHA1" => Ok(ChecksumAlgorithm::Sha1), - "SHA256" => Ok(ChecksumAlgorithm::Sha256), - _ => Err(Error::bad_request("invalid checksum algorithm")), +#[derive(Default)] +pub(crate) struct MultipartChecksummer { + pub md5: Md5, + pub extra: Option, +} + +pub(crate) enum MultipartExtraChecksummer { + Crc32(Crc32), + Crc32c(Crc32c), + Sha1(Sha1), + Sha256(Sha256), +} + +impl MultipartChecksummer { + pub(crate) fn init(algo: Option) -> Self { + Self { + md5: Md5::new(), + extra: match algo { + None => None, + Some(ChecksumAlgorithm::Crc32) => { + Some(MultipartExtraChecksummer::Crc32(Crc32::new())) + } + Some(ChecksumAlgorithm::Crc32c) => { + Some(MultipartExtraChecksummer::Crc32c(Crc32c::default())) + } + Some(ChecksumAlgorithm::Sha1) => Some(MultipartExtraChecksummer::Sha1(Sha1::new())), + Some(ChecksumAlgorithm::Sha256) => { + Some(MultipartExtraChecksummer::Sha256(Sha256::new())) + } + }, + } + } + + pub(crate) fn update( + &mut self, + etag: &str, + checksum: Option, + ) -> Result<(), Error> { + self.md5 + .update(&hex::decode(&etag).ok_or_message("invalid etag hex")?); + match (&mut self.extra, checksum) { + (None, _) => (), + ( + Some(MultipartExtraChecksummer::Crc32(ref mut crc32)), + Some(ChecksumValue::Crc32(x)), + ) => { + crc32.update(&x); + } + ( + Some(MultipartExtraChecksummer::Crc32c(ref mut crc32c)), + Some(ChecksumValue::Crc32c(x)), + ) => { + crc32c.write(&x); + } + (Some(MultipartExtraChecksummer::Sha1(ref mut sha1)), Some(ChecksumValue::Sha1(x))) => { + sha1.update(&x); + } + ( + Some(MultipartExtraChecksummer::Sha256(ref mut sha256)), + Some(ChecksumValue::Sha256(x)), + ) => { + sha256.update(&x); + } + (Some(_), b) => { + return Err(Error::internal_error(format!( + "part checksum was not computed correctly, got: {:?}", + b + ))) + } + } + Ok(()) + } + + pub(crate) fn finalize(self) -> (Md5Checksum, Option) { + let md5 = self.md5.finalize()[..].try_into().unwrap(); + let extra = match self.extra { + None => None, + Some(MultipartExtraChecksummer::Crc32(crc32)) => { + Some(ChecksumValue::Crc32(u32::to_be_bytes(crc32.finalize()))) + } + Some(MultipartExtraChecksummer::Crc32c(crc32c)) => Some(ChecksumValue::Crc32c( + u32::to_be_bytes(u32::try_from(crc32c.finish()).unwrap()), + )), + Some(MultipartExtraChecksummer::Sha1(sha1)) => { + Some(ChecksumValue::Sha1(sha1.finalize()[..].try_into().unwrap())) + } + Some(MultipartExtraChecksummer::Sha256(sha256)) => Some(ChecksumValue::Sha256( + sha256.finalize()[..].try_into().unwrap(), + )), + }; + (md5, extra) } } +// ---- + /// Extract the value of the x-amz-checksum-algorithm header -pub fn request_checksum_algorithm( +pub(crate) fn request_checksum_algorithm( headers: &HeaderMap, ) -> Result, Error> { match headers.get(X_AMZ_CHECKSUM_ALGORITHM) { None => Ok(None), - Some(x) => parse_checksum_algorithm(x.to_str()?).map(Some), - } -} - -pub fn request_trailer_checksum_algorithm( - headers: &HeaderMap, -) -> Result, Error> { - match headers.get(X_AMZ_TRAILER).map(|x| x.to_str()).transpose()? { - None => Ok(None), - Some(x) if x == X_AMZ_CHECKSUM_CRC32 => Ok(Some(ChecksumAlgorithm::Crc32)), - Some(x) if x == X_AMZ_CHECKSUM_CRC32C => Ok(Some(ChecksumAlgorithm::Crc32c)), - Some(x) if x == X_AMZ_CHECKSUM_SHA1 => Ok(Some(ChecksumAlgorithm::Sha1)), - Some(x) if x == X_AMZ_CHECKSUM_SHA256 => Ok(Some(ChecksumAlgorithm::Sha256)), + Some(x) if x == "CRC32" => Ok(Some(ChecksumAlgorithm::Crc32)), + Some(x) if x == "CRC32C" => Ok(Some(ChecksumAlgorithm::Crc32c)), + Some(x) if x == "SHA1" => Ok(Some(ChecksumAlgorithm::Sha1)), + Some(x) if x == "SHA256" => Ok(Some(ChecksumAlgorithm::Sha256)), _ => Err(Error::bad_request("invalid checksum algorithm")), } } /// Extract the value of any of the x-amz-checksum-* headers -pub fn request_checksum_value( +pub(crate) fn request_checksum_value( headers: &HeaderMap, ) -> Result, Error> { let mut ret = vec![]; - if headers.contains_key(X_AMZ_CHECKSUM_CRC32) { - ret.push(extract_checksum_value(headers, ChecksumAlgorithm::Crc32)?); + if let Some(crc32_str) = headers.get(X_AMZ_CHECKSUM_CRC32) { + let crc32 = BASE64_STANDARD + .decode(&crc32_str) + .ok() + .and_then(|x| x.try_into().ok()) + .ok_or_bad_request("invalid x-amz-checksum-crc32 header")?; + ret.push(ChecksumValue::Crc32(crc32)) } - if headers.contains_key(X_AMZ_CHECKSUM_CRC32C) { - ret.push(extract_checksum_value(headers, ChecksumAlgorithm::Crc32c)?); + if let Some(crc32c_str) = headers.get(X_AMZ_CHECKSUM_CRC32C) { + let crc32c = BASE64_STANDARD + .decode(&crc32c_str) + .ok() + .and_then(|x| x.try_into().ok()) + .ok_or_bad_request("invalid x-amz-checksum-crc32c header")?; + ret.push(ChecksumValue::Crc32c(crc32c)) } - if headers.contains_key(X_AMZ_CHECKSUM_SHA1) { - ret.push(extract_checksum_value(headers, ChecksumAlgorithm::Sha1)?); + if let Some(sha1_str) = headers.get(X_AMZ_CHECKSUM_SHA1) { + let sha1 = BASE64_STANDARD + .decode(&sha1_str) + .ok() + .and_then(|x| x.try_into().ok()) + .ok_or_bad_request("invalid x-amz-checksum-sha1 header")?; + ret.push(ChecksumValue::Sha1(sha1)) } - if headers.contains_key(X_AMZ_CHECKSUM_SHA256) { - ret.push(extract_checksum_value(headers, ChecksumAlgorithm::Sha256)?); + if let Some(sha256_str) = headers.get(X_AMZ_CHECKSUM_SHA256) { + let sha256 = BASE64_STANDARD + .decode(&sha256_str) + .ok() + .and_then(|x| x.try_into().ok()) + .ok_or_bad_request("invalid x-amz-checksum-sha256 header")?; + ret.push(ChecksumValue::Sha256(sha256)) } if ret.len() > 1 { @@ -258,49 +340,50 @@ pub fn request_checksum_value( Ok(ret.pop()) } -/// Checks for the presence of x-amz-checksum-algorithm -/// if so extract the corresponding x-amz-checksum-* value -pub fn extract_checksum_value( +/// Checks for the presense of x-amz-checksum-algorithm +/// if so extract the corrseponding x-amz-checksum-* value +pub(crate) fn request_checksum_algorithm_value( headers: &HeaderMap, - algo: ChecksumAlgorithm, -) -> Result { - match algo { - ChecksumAlgorithm::Crc32 => { +) -> Result, Error> { + match headers.get(X_AMZ_CHECKSUM_ALGORITHM) { + Some(x) if x == "CRC32" => { let crc32 = headers .get(X_AMZ_CHECKSUM_CRC32) .and_then(|x| BASE64_STANDARD.decode(&x).ok()) .and_then(|x| x.try_into().ok()) .ok_or_bad_request("invalid x-amz-checksum-crc32 header")?; - Ok(ChecksumValue::Crc32(crc32)) + Ok(Some(ChecksumValue::Crc32(crc32))) } - ChecksumAlgorithm::Crc32c => { + Some(x) if x == "CRC32C" => { let crc32c = headers .get(X_AMZ_CHECKSUM_CRC32C) .and_then(|x| BASE64_STANDARD.decode(&x).ok()) .and_then(|x| x.try_into().ok()) .ok_or_bad_request("invalid x-amz-checksum-crc32c header")?; - Ok(ChecksumValue::Crc32c(crc32c)) + Ok(Some(ChecksumValue::Crc32c(crc32c))) } - ChecksumAlgorithm::Sha1 => { + Some(x) if x == "SHA1" => { let sha1 = headers .get(X_AMZ_CHECKSUM_SHA1) .and_then(|x| BASE64_STANDARD.decode(&x).ok()) .and_then(|x| x.try_into().ok()) .ok_or_bad_request("invalid x-amz-checksum-sha1 header")?; - Ok(ChecksumValue::Sha1(sha1)) + Ok(Some(ChecksumValue::Sha1(sha1))) } - ChecksumAlgorithm::Sha256 => { + Some(x) if x == "SHA256" => { let sha256 = headers .get(X_AMZ_CHECKSUM_SHA256) .and_then(|x| BASE64_STANDARD.decode(&x).ok()) .and_then(|x| x.try_into().ok()) .ok_or_bad_request("invalid x-amz-checksum-sha256 header")?; - Ok(ChecksumValue::Sha256(sha256)) + Ok(Some(ChecksumValue::Sha256(sha256))) } + Some(_) => Err(Error::bad_request("invalid x-amz-checksum-algorithm")), + None => Ok(None), } } -pub fn add_checksum_response_headers( +pub(crate) fn add_checksum_response_headers( checksum: &Option, mut resp: http::response::Builder, ) -> http::response::Builder { diff --git a/src/api/s3/copy.rs b/src/api/s3/copy.rs index 47a63c82..411a6917 100644 --- a/src/api/s3/copy.rs +++ b/src/api/s3/copy.rs @@ -1,9 +1,9 @@ use std::pin::Pin; +use std::time::{Duration, SystemTime, UNIX_EPOCH}; use futures::{stream, stream::Stream, StreamExt, TryStreamExt}; use bytes::Bytes; -use http::header::HeaderName; use hyper::{Request, Response}; use serde::Serialize; @@ -20,26 +20,15 @@ use garage_model::s3::mpu_table::*; use garage_model::s3::object_table::*; use garage_model::s3::version_table::*; -use garage_api_common::helpers::*; -use garage_api_common::signature::checksum::*; - -use crate::api_server::{ReqBody, ResBody}; -use crate::encryption::EncryptionParams; -use crate::error::*; -use crate::get::{check_version_not_deleted, full_object_byte_stream, PreconditionHeaders}; -use crate::multipart; -use crate::put::{extract_metadata_headers, save_stream, ChecksumMode, SaveStreamResult}; -use crate::website::X_AMZ_WEBSITE_REDIRECT_LOCATION; -use crate::xml::{self as s3_xml, xmlns_tag}; - -pub const X_AMZ_COPY_SOURCE_IF_MATCH: HeaderName = - HeaderName::from_static("x-amz-copy-source-if-match"); -pub const X_AMZ_COPY_SOURCE_IF_NONE_MATCH: HeaderName = - HeaderName::from_static("x-amz-copy-source-if-none-match"); -pub const X_AMZ_COPY_SOURCE_IF_MODIFIED_SINCE: HeaderName = - HeaderName::from_static("x-amz-copy-source-if-modified-since"); -pub const X_AMZ_COPY_SOURCE_IF_UNMODIFIED_SINCE: HeaderName = - HeaderName::from_static("x-amz-copy-source-if-unmodified-since"); +use crate::helpers::*; +use crate::s3::api_server::{ReqBody, ResBody}; +use crate::s3::checksum::*; +use crate::s3::encryption::EncryptionParams; +use crate::s3::error::*; +use crate::s3::get::full_object_byte_stream; +use crate::s3::multipart; +use crate::s3::put::{get_headers, save_stream, ChecksumMode, SaveStreamResult}; +use crate::s3::xml::{self as s3_xml, xmlns_tag}; // -------- CopyObject --------- @@ -48,7 +37,7 @@ pub async fn handle_copy( req: &Request, dest_key: &str, ) -> Result, Error> { - let copy_precondition = PreconditionHeaders::parse_copy_source(req)?; + let copy_precondition = CopyPreconditionHeaders::parse(req)?; let checksum_algorithm = request_checksum_algorithm(req.headers())?; @@ -58,7 +47,7 @@ pub async fn handle_copy( extract_source_info(&source_object)?; // Check precondition, e.g. x-amz-copy-source-if-match - copy_precondition.check_copy_source(source_version, &source_version_meta.etag)?; + copy_precondition.check(source_version, &source_version_meta.etag)?; // Determine encryption parameters let (source_encryption, source_object_meta_inner) = @@ -74,7 +63,7 @@ pub async fn handle_copy( let source_checksum_algorithm = source_checksum.map(|x| x.algorithm()); // If source object has a checksum, the destination object must as well. - // The x-amz-checksum-algorithm header allows to change that algorithm, + // The x-amz-checksum-algorihtm header allows to change that algorithm, // but if it is absent, we must use the same as before let checksum_algorithm = checksum_algorithm.or(source_checksum_algorithm); @@ -83,20 +72,9 @@ pub async fn handle_copy( let dest_object_meta = ObjectVersionMetaInner { headers: match req.headers().get("x-amz-metadata-directive") { Some(v) if v == hyper::header::HeaderValue::from_static("REPLACE") => { - extract_metadata_headers(req.headers())? - } - _ => { - // The x-amz-website-redirect-location header is not copied, instead - // it is replaced by the value from the request (or removed if no - // value was specified) - let is_redirect = - |(key, _): &(String, String)| key == X_AMZ_WEBSITE_REDIRECT_LOCATION.as_str(); - let mut headers: Vec<_> = source_object_meta_inner.headers.clone(); - headers.retain(|h| !is_redirect(h)); - let new_headers = extract_metadata_headers(req.headers())?; - headers.extend(new_headers.into_iter().filter(is_redirect)); - headers + get_headers(req.headers())? } + _ => source_object_meta_inner.into_owned().headers, }, checksum: source_checksum, }; @@ -237,7 +215,6 @@ async fn handle_copy_metaonly( .get(&source_version.uuid, &EmptyKey) .await?; let source_version = source_version.ok_or(Error::NoSuchKey)?; - check_version_not_deleted(&source_version)?; // Write an "uploading" marker in Object table // This holds a reference to the object in the Version table @@ -357,7 +334,7 @@ pub async fn handle_upload_part_copy( part_number: u64, upload_id: &str, ) -> Result, Error> { - let copy_precondition = PreconditionHeaders::parse_copy_source(req)?; + let copy_precondition = CopyPreconditionHeaders::parse(req)?; let dest_upload_id = multipart::decode_upload_id(upload_id)?; @@ -373,7 +350,7 @@ pub async fn handle_upload_part_copy( extract_source_info(&source_object)?; // Check precondition on source, e.g. x-amz-copy-source-if-match - copy_precondition.check_copy_source(source_object_version, &source_version_meta.etag)?; + copy_precondition.check(source_object_version, &source_version_meta.etag)?; // Determine encryption parameters let (source_encryption, _) = EncryptionParams::check_decrypt_for_copy_source( @@ -429,7 +406,6 @@ pub async fn handle_upload_part_copy( .get(&source_object_version.uuid, &EmptyKey) .await? .ok_or(Error::NoSuchKey)?; - check_version_not_deleted(&source_version)?; // We want to reuse blocks from the source version as much as possible. // However, we still need to get the data from these blocks @@ -561,7 +537,6 @@ pub async fn handle_upload_part_copy( let mut current_offset = 0; let mut next_block = defragmenter.next().await?; - let mut blocks_to_dup = dest_version.clone(); // TODO this could be optimized similarly to read_and_put_blocks // low priority because uploadpartcopy is rarely used @@ -591,7 +566,8 @@ pub async fn handle_upload_part_copy( .unwrap()?; checksummer = checksummer_updated; - let (version_block_key, version_block) = ( + dest_version.blocks.clear(); + dest_version.blocks.put( VersionBlockKey { part_number, offset: current_offset, @@ -603,56 +579,37 @@ pub async fn handle_upload_part_copy( ); current_offset += data_len; - let next = if let Some(final_data) = data_to_upload { - dest_version.blocks.clear(); - dest_version.blocks.put(version_block_key, version_block); - let block_ref = BlockRef { - block: final_hash, - version: dest_version_id, - deleted: false.into(), - }; - let (_, _, _, next) = futures::try_join!( - // Thing 1: if the block is not exactly a block that existed before, - // we need to insert that data as a new block. - garage.block_manager.rpc_put_block( - final_hash, - final_data, - dest_encryption.is_encrypted(), - None - ), - // Thing 2: we need to insert the block in the version - garage.version_table.insert(&dest_version), - // Thing 3: we need to add a block reference - garage.block_ref_table.insert(&block_ref), - // Thing 4: we need to read the next block - defragmenter.next(), - )?; - next - } else { - blocks_to_dup.blocks.put(version_block_key, version_block); - defragmenter.next().await? + let block_ref = BlockRef { + block: final_hash, + version: dest_version_id, + deleted: false.into(), }; + + let (_, _, _, next) = futures::try_join!( + // Thing 1: if the block is not exactly a block that existed before, + // we need to insert that data as a new block. + async { + if let Some(final_data) = data_to_upload { + garage + .block_manager + .rpc_put_block(final_hash, final_data, dest_encryption.is_encrypted(), None) + .await + } else { + Ok(()) + } + }, + // Thing 2: we need to insert the block in the version + garage.version_table.insert(&dest_version), + // Thing 3: we need to add a block reference + garage.block_ref_table.insert(&block_ref), + // Thing 4: we need to read the next block + defragmenter.next(), + )?; next_block = next; } assert_eq!(current_offset, source_range.length); - // Put the duplicated blocks into the version & block_refs tables - let block_refs_to_put = blocks_to_dup - .blocks - .items() - .iter() - .map(|b| BlockRef { - block: b.1.hash, - version: dest_version_id, - deleted: false.into(), - }) - .collect::>(); - futures::try_join!( - garage.version_table.insert(&blocks_to_dup), - garage.block_ref_table.insert_many(&block_refs_to_put[..]), - )?; - let checksums = checksummer.finalize(); let etag = dest_encryption.etag_from_md5(&checksums.md5); let checksum = checksums.extract(dest_object_checksum_algorithm); @@ -698,8 +655,7 @@ async fn get_copy_source(ctx: &ReqCtx, req: &Request) -> Result>, + copy_source_if_modified_since: Option, + copy_source_if_none_match: Option>, + copy_source_if_unmodified_since: Option, +} + +impl CopyPreconditionHeaders { + fn parse(req: &Request) -> Result { + Ok(Self { + copy_source_if_match: req + .headers() + .get("x-amz-copy-source-if-match") + .map(|x| x.to_str()) + .transpose()? + .map(|x| { + x.split(',') + .map(|m| m.trim().trim_matches('"').to_string()) + .collect::>() + }), + copy_source_if_modified_since: req + .headers() + .get("x-amz-copy-source-if-modified-since") + .map(|x| x.to_str()) + .transpose()? + .map(httpdate::parse_http_date) + .transpose() + .ok_or_bad_request("Invalid date in x-amz-copy-source-if-modified-since")?, + copy_source_if_none_match: req + .headers() + .get("x-amz-copy-source-if-none-match") + .map(|x| x.to_str()) + .transpose()? + .map(|x| { + x.split(',') + .map(|m| m.trim().trim_matches('"').to_string()) + .collect::>() + }), + copy_source_if_unmodified_since: req + .headers() + .get("x-amz-copy-source-if-unmodified-since") + .map(|x| x.to_str()) + .transpose()? + .map(httpdate::parse_http_date) + .transpose() + .ok_or_bad_request("Invalid date in x-amz-copy-source-if-unmodified-since")?, + }) + } + + fn check(&self, v: &ObjectVersion, etag: &str) -> Result<(), Error> { + let v_date = UNIX_EPOCH + Duration::from_millis(v.timestamp); + + let ok = match ( + &self.copy_source_if_match, + &self.copy_source_if_unmodified_since, + &self.copy_source_if_none_match, + &self.copy_source_if_modified_since, + ) { + // TODO I'm not sure all of the conditions are evaluated correctly here + + // If we have both if-match and if-unmodified-since, + // basically we don't care about if-unmodified-since, + // because in the spec it says that if if-match evaluates to + // true but if-unmodified-since evaluates to false, + // the copy is still done. + (Some(im), _, None, None) => im.iter().any(|x| x == etag || x == "*"), + (None, Some(ius), None, None) => v_date <= *ius, + + // If we have both if-none-match and if-modified-since, + // then both of the two conditions must evaluate to true + (None, None, Some(inm), Some(ims)) => { + !inm.iter().any(|x| x == etag || x == "*") && v_date > *ims + } + (None, None, Some(inm), None) => !inm.iter().any(|x| x == etag || x == "*"), + (None, None, None, Some(ims)) => v_date > *ims, + (None, None, None, None) => true, + _ => { + return Err(Error::bad_request( + "Invalid combination of x-amz-copy-source-if-xxxxx headers", + )) + } + }; + + if ok { + Ok(()) + } else { + Err(Error::PreconditionFailed) + } + } +} + type BlockStreamItemOk = (Bytes, Option); type BlockStreamItem = Result; @@ -814,7 +861,7 @@ pub struct CopyPartResult { #[cfg(test)] mod tests { use super::*; - use crate::xml::to_xml_with_header; + use crate::s3::xml::to_xml_with_header; #[test] fn copy_object_result() -> Result<(), Error> { diff --git a/src/api/s3/cors.rs b/src/api/s3/cors.rs index 1f365beb..173b7ffe 100644 --- a/src/api/s3/cors.rs +++ b/src/api/s3/cors.rs @@ -1,16 +1,29 @@ use quick_xml::de::from_reader; +use std::sync::Arc; -use hyper::{header::HeaderName, Method, Request, Response, StatusCode}; +use http::header::{ + ACCESS_CONTROL_ALLOW_HEADERS, ACCESS_CONTROL_ALLOW_METHODS, ACCESS_CONTROL_ALLOW_ORIGIN, + ACCESS_CONTROL_EXPOSE_HEADERS, ACCESS_CONTROL_REQUEST_HEADERS, ACCESS_CONTROL_REQUEST_METHOD, +}; +use hyper::{ + body::Body, body::Incoming as IncomingBody, header::HeaderName, Method, Request, Response, + StatusCode, +}; + +use http_body_util::BodyExt; use serde::{Deserialize, Serialize}; -use garage_model::bucket_table::{Bucket, CorsRule as GarageCorsRule}; +use crate::common_error::CommonError; +use crate::helpers::*; +use crate::s3::api_server::{ReqBody, ResBody}; +use crate::s3::error::*; +use crate::s3::xml::{to_xml_with_header, xmlns_tag, IntValue, Value}; +use crate::signature::verify_signed_content; -use garage_api_common::helpers::*; - -use crate::api_server::{ReqBody, ResBody}; -use crate::error::*; -use crate::xml::{to_xml_with_header, xmlns_tag, IntValue, Value}; +use garage_model::bucket_table::{Bucket, BucketParams, CorsRule as GarageCorsRule}; +use garage_model::garage::Garage; +use garage_util::data::*; pub async fn handle_get_cors(ctx: ReqCtx) -> Result, Error> { let ReqCtx { bucket_params, .. } = ctx; @@ -55,6 +68,7 @@ pub async fn handle_delete_cors(ctx: ReqCtx) -> Result, Error> pub async fn handle_put_cors( ctx: ReqCtx, req: Request, + content_sha256: Option, ) -> Result, Error> { let ReqCtx { garage, @@ -63,7 +77,11 @@ pub async fn handle_put_cors( .. } = ctx; - let body = req.into_body().collect().await?; + let body = BodyExt::collect(req.into_body()).await?.to_bytes(); + + if let Some(content_sha256) = content_sha256 { + verify_signed_content(content_sha256, &body[..])?; + } let conf: CorsConfiguration = from_reader(&body as &[u8])?; conf.validate()?; @@ -81,6 +99,154 @@ pub async fn handle_put_cors( .body(empty_body())?) } +pub async fn handle_options_api( + garage: Arc, + req: &Request, + bucket_name: Option, +) -> Result, CommonError> { + // FIXME: CORS rules of buckets with local aliases are + // not taken into account. + + // If the bucket name is a global bucket name, + // we try to apply the CORS rules of that bucket. + // If a user has a local bucket name that has + // the same name, its CORS rules won't be applied + // and will be shadowed by the rules of the globally + // existing bucket (but this is inevitable because + // OPTIONS calls are not auhtenticated). + if let Some(bn) = bucket_name { + let helper = garage.bucket_helper(); + let bucket_id = helper.resolve_global_bucket_name(&bn).await?; + if let Some(id) = bucket_id { + let bucket = garage.bucket_helper().get_existing_bucket(id).await?; + let bucket_params = bucket.state.into_option().unwrap(); + handle_options_for_bucket(req, &bucket_params) + } else { + // If there is a bucket name in the request, but that name + // does not correspond to a global alias for a bucket, + // then it's either a non-existing bucket or a local bucket. + // We have no way of knowing, because the request is not + // authenticated and thus we can't resolve local aliases. + // We take the permissive approach of allowing everything, + // because we don't want to prevent web apps that use + // local bucket names from making API calls. + Ok(Response::builder() + .header(ACCESS_CONTROL_ALLOW_ORIGIN, "*") + .header(ACCESS_CONTROL_ALLOW_METHODS, "*") + .status(StatusCode::OK) + .body(EmptyBody::new())?) + } + } else { + // If there is no bucket name in the request, + // we are doing a ListBuckets call, which we want to allow + // for all origins. + Ok(Response::builder() + .header(ACCESS_CONTROL_ALLOW_ORIGIN, "*") + .header(ACCESS_CONTROL_ALLOW_METHODS, "GET") + .status(StatusCode::OK) + .body(EmptyBody::new())?) + } +} + +pub fn handle_options_for_bucket( + req: &Request, + bucket_params: &BucketParams, +) -> Result, CommonError> { + let origin = req + .headers() + .get("Origin") + .ok_or_bad_request("Missing Origin header")? + .to_str()?; + let request_method = req + .headers() + .get(ACCESS_CONTROL_REQUEST_METHOD) + .ok_or_bad_request("Missing Access-Control-Request-Method header")? + .to_str()?; + let request_headers = match req.headers().get(ACCESS_CONTROL_REQUEST_HEADERS) { + Some(h) => h.to_str()?.split(',').map(|h| h.trim()).collect::>(), + None => vec![], + }; + + if let Some(cors_config) = bucket_params.cors_config.get() { + let matching_rule = cors_config + .iter() + .find(|rule| cors_rule_matches(rule, origin, request_method, request_headers.iter())); + if let Some(rule) = matching_rule { + let mut resp = Response::builder() + .status(StatusCode::OK) + .body(EmptyBody::new())?; + add_cors_headers(&mut resp, rule).ok_or_internal_error("Invalid CORS configuration")?; + return Ok(resp); + } + } + + Err(CommonError::Forbidden( + "This CORS request is not allowed.".into(), + )) +} + +pub fn find_matching_cors_rule<'a>( + bucket_params: &'a BucketParams, + req: &Request, +) -> Result, Error> { + if let Some(cors_config) = bucket_params.cors_config.get() { + if let Some(origin) = req.headers().get("Origin") { + let origin = origin.to_str()?; + let request_headers = match req.headers().get(ACCESS_CONTROL_REQUEST_HEADERS) { + Some(h) => h.to_str()?.split(',').map(|h| h.trim()).collect::>(), + None => vec![], + }; + return Ok(cors_config.iter().find(|rule| { + cors_rule_matches(rule, origin, req.method().as_ref(), request_headers.iter()) + })); + } + } + Ok(None) +} + +fn cors_rule_matches<'a, HI, S>( + rule: &GarageCorsRule, + origin: &'a str, + method: &'a str, + mut request_headers: HI, +) -> bool +where + HI: Iterator, + S: AsRef, +{ + rule.allow_origins.iter().any(|x| x == "*" || x == origin) + && rule.allow_methods.iter().any(|x| x == "*" || x == method) + && request_headers.all(|h| { + rule.allow_headers + .iter() + .any(|x| x == "*" || x == h.as_ref()) + }) +} + +pub fn add_cors_headers( + resp: &mut Response, + rule: &GarageCorsRule, +) -> Result<(), http::header::InvalidHeaderValue> { + let h = resp.headers_mut(); + h.insert( + ACCESS_CONTROL_ALLOW_ORIGIN, + rule.allow_origins.join(", ").parse()?, + ); + h.insert( + ACCESS_CONTROL_ALLOW_METHODS, + rule.allow_methods.join(", ").parse()?, + ); + h.insert( + ACCESS_CONTROL_ALLOW_HEADERS, + rule.allow_headers.join(", ").parse()?, + ); + h.insert( + ACCESS_CONTROL_EXPOSE_HEADERS, + rule.expose_headers.join(", ").parse()?, + ); + Ok(()) +} + // ---- SERIALIZATION AND DESERIALIZATION TO/FROM S3 XML ---- #[derive(Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord)] @@ -88,9 +254,7 @@ pub async fn handle_put_cors( pub struct CorsConfiguration { #[serde(serialize_with = "xmlns_tag", skip_deserializing)] pub xmlns: (), - // "default" is required to be able to parse an empty list of rules, - // cf https://docs.rs/quick-xml/latest/quick_xml/de/#sequences-xsall-and-xssequence-xml-schema-types - #[serde(rename = "CORSRule", default)] + #[serde(rename = "CORSRule")] pub cors_rules: Vec, } @@ -272,26 +436,4 @@ mod tests { Ok(()) } - - #[test] - fn test_deserialize_norules() -> Result<(), Error> { - let message = r#" -"#; - let conf: CorsConfiguration = from_str(message).unwrap(); - let ref_value = CorsConfiguration { - xmlns: (), - cors_rules: vec![], - }; - assert_eq! { - ref_value, - conf - }; - - let message2 = to_xml_with_header(&ref_value)?; - - let cleanup = |c: &str| c.replace(char::is_whitespace, ""); - assert_eq!(cleanup(message), cleanup(&message2)); - - Ok(()) - } } diff --git a/src/api/s3/delete.rs b/src/api/s3/delete.rs index d785b9d8..57f6f948 100644 --- a/src/api/s3/delete.rs +++ b/src/api/s3/delete.rs @@ -1,15 +1,16 @@ +use http_body_util::BodyExt; use hyper::{Request, Response, StatusCode}; use garage_util::data::*; use garage_model::s3::object_table::*; -use garage_api_common::helpers::*; - -use crate::api_server::{ReqBody, ResBody}; -use crate::error::*; -use crate::put::next_timestamp; -use crate::xml as s3_xml; +use crate::helpers::*; +use crate::s3::api_server::{ReqBody, ResBody}; +use crate::s3::error::*; +use crate::s3::put::next_timestamp; +use crate::s3::xml as s3_xml; +use crate::signature::verify_signed_content; async fn handle_delete_internal(ctx: &ReqCtx, key: &str) -> Result<(Uuid, Uuid), Error> { let ReqCtx { @@ -66,8 +67,13 @@ pub async fn handle_delete(ctx: ReqCtx, key: &str) -> Result, pub async fn handle_delete_objects( ctx: ReqCtx, req: Request, + content_sha256: Option, ) -> Result, Error> { - let body = req.into_body().collect().await?; + let body = BodyExt::collect(req.into_body()).await?.to_bytes(); + + if let Some(content_sha256) = content_sha256 { + verify_signed_content(content_sha256, &body[..])?; + } let cmd_xml = roxmltree::Document::parse(std::str::from_utf8(&body)?)?; let cmd = parse_delete_objects_xml(&cmd_xml).ok_or_bad_request("Invalid delete XML query")?; diff --git a/src/api/s3/encryption.rs b/src/api/s3/encryption.rs index fa7285ca..2e6ed65c 100644 --- a/src/api/s3/encryption.rs +++ b/src/api/s3/encryption.rs @@ -28,10 +28,9 @@ use garage_util::migrate::Migrate; use garage_model::garage::Garage; use garage_model::s3::object_table::{ObjectVersionEncryption, ObjectVersionMetaInner}; -use garage_api_common::common_error::*; -use garage_api_common::signature::checksum::Md5Checksum; - -use crate::error::Error; +use crate::common_error::*; +use crate::s3::checksum::Md5Checksum; +use crate::s3::error::Error; const X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM: HeaderName = HeaderName::from_static("x-amz-server-side-encryption-customer-algorithm"); diff --git a/src/api/s3/error.rs b/src/api/s3/error.rs index 64112084..2855e0b3 100644 --- a/src/api/s3/error.rs +++ b/src/api/s3/error.rs @@ -1,109 +1,93 @@ use std::convert::TryInto; +use err_derive::Error; use hyper::header::HeaderValue; use hyper::{HeaderMap, StatusCode}; -use thiserror::Error; -use garage_model::helper::error::Error as HelperError; - -pub(crate) use garage_api_common::common_error::pass_helper_error; - -use garage_api_common::common_error::{ - commonErrorDerivative, helper_error_as_internal, CommonError, -}; - -pub use garage_api_common::common_error::{ - CommonErrorDerivative, OkOrBadRequest, OkOrInternalError, -}; - -use garage_api_common::generic_server::ApiError; -use garage_api_common::helpers::*; -use garage_api_common::signature::error::Error as SignatureError; - -use crate::xml as s3_xml; +use crate::common_error::CommonError; +pub use crate::common_error::{CommonErrorDerivative, OkOrBadRequest, OkOrInternalError}; +use crate::generic_server::ApiError; +use crate::helpers::*; +use crate::s3::xml as s3_xml; +use crate::signature::error::Error as SignatureError; /// Errors of this crate #[derive(Debug, Error)] pub enum Error { - #[error("{0}")] + #[error(display = "{}", _0)] /// Error from common error - Common(#[from] CommonError), + Common(CommonError), // Category: cannot process /// Authorization Header Malformed - #[error("Authorization header malformed, unexpected scope: {0}")] + #[error(display = "Authorization header malformed, unexpected scope: {}", _0)] AuthorizationHeaderMalformed(String), /// The object requested don't exists - #[error("Key not found")] + #[error(display = "Key not found")] NoSuchKey, /// The multipart upload requested don't exists - #[error("Upload not found")] + #[error(display = "Upload not found")] NoSuchUpload, /// Precondition failed (e.g. x-amz-copy-source-if-match) - #[error("At least one of the preconditions you specified did not hold")] + #[error(display = "At least one of the preconditions you specified did not hold")] PreconditionFailed, /// Parts specified in CMU request do not match parts actually uploaded - #[error("Parts given to CompleteMultipartUpload do not match uploaded parts")] + #[error(display = "Parts given to CompleteMultipartUpload do not match uploaded parts")] InvalidPart, /// Parts given to CompleteMultipartUpload were not in ascending order - #[error("Parts given to CompleteMultipartUpload were not in ascending order")] + #[error(display = "Parts given to CompleteMultipartUpload were not in ascending order")] InvalidPartOrder, /// In CompleteMultipartUpload: not enough data /// (here we are more lenient than AWS S3) - #[error("Proposed upload is smaller than the minimum allowed object size")] + #[error(display = "Proposed upload is smaller than the minimum allowed object size")] EntityTooSmall, // Category: bad request /// The request contained an invalid UTF-8 sequence in its path or in other parameters - #[error("Invalid UTF-8: {0}")] - InvalidUtf8Str(#[from] std::str::Utf8Error), + #[error(display = "Invalid UTF-8: {}", _0)] + InvalidUtf8Str(#[error(source)] std::str::Utf8Error), /// The request used an invalid path - #[error("Invalid UTF-8: {0}")] - InvalidUtf8String(#[from] std::string::FromUtf8Error), + #[error(display = "Invalid UTF-8: {}", _0)] + InvalidUtf8String(#[error(source)] std::string::FromUtf8Error), /// The client sent invalid XML data - #[error("Invalid XML: {0}")] + #[error(display = "Invalid XML: {}", _0)] InvalidXml(String), /// The client sent a range header with invalid value - #[error("Invalid HTTP range: {0:?}")] - InvalidRange((http_range::HttpRangeParseError, u64)), + #[error(display = "Invalid HTTP range: {:?}", _0)] + InvalidRange(#[error(from)] (http_range::HttpRangeParseError, u64)), /// The client sent a range header with invalid value - #[error("Invalid encryption algorithm: {0:?}, should be AES256")] + #[error(display = "Invalid encryption algorithm: {:?}, should be AES256", _0)] InvalidEncryptionAlgorithm(String), - /// The provided digest (checksum) value was invalid - #[error("Invalid digest: {0}")] + /// The client sent invalid XML data + #[error(display = "Invalid digest: {}", _0)] InvalidDigest(String), /// The client sent a request for an action not supported by garage - #[error("Unimplemented action: {0}")] + #[error(display = "Unimplemented action: {}", _0)] NotImplemented(String), } -commonErrorDerivative!(Error); - -// Helper errors are always passed as internal errors by default. -// To pass the specific error code back to the client, use `pass_helper_error`. -impl From for Error { - fn from(err: HelperError) -> Error { - Error::Common(helper_error_as_internal(err)) +impl From for Error +where + CommonError: From, +{ + fn from(err: T) -> Self { + Error::Common(CommonError::from(err)) } } -impl From<(http_range::HttpRangeParseError, u64)> for Error { - fn from(err: (http_range::HttpRangeParseError, u64)) -> Error { - Error::InvalidRange(err) - } -} +impl CommonErrorDerivative for Error {} impl From for Error { fn from(err: roxmltree::Error) -> Self { @@ -125,7 +109,6 @@ impl From for Error { Self::AuthorizationHeaderMalformed(c) } SignatureError::InvalidUtf8Str(i) => Self::InvalidUtf8Str(i), - SignatureError::InvalidDigest(d) => Self::InvalidDigest(d), } } } diff --git a/src/api/s3/get.rs b/src/api/s3/get.rs index a1e4ce10..f5d3cf11 100644 --- a/src/api/s3/get.rs +++ b/src/api/s3/get.rs @@ -2,39 +2,36 @@ use std::collections::BTreeMap; use std::convert::TryInto; use std::sync::Arc; -use std::time::{Duration, SystemTime, UNIX_EPOCH}; +use std::time::{Duration, UNIX_EPOCH}; use bytes::Bytes; use futures::future; use futures::stream::{self, Stream, StreamExt}; use http::header::{ - HeaderMap, HeaderName, ACCEPT_RANGES, CACHE_CONTROL, CONTENT_DISPOSITION, CONTENT_ENCODING, - CONTENT_LANGUAGE, CONTENT_LENGTH, CONTENT_RANGE, CONTENT_TYPE, ETAG, EXPIRES, IF_MATCH, - IF_MODIFIED_SINCE, IF_NONE_MATCH, IF_UNMODIFIED_SINCE, LAST_MODIFIED, RANGE, + ACCEPT_RANGES, CACHE_CONTROL, CONTENT_DISPOSITION, CONTENT_ENCODING, CONTENT_LANGUAGE, + CONTENT_LENGTH, CONTENT_RANGE, CONTENT_TYPE, ETAG, EXPIRES, IF_MODIFIED_SINCE, IF_NONE_MATCH, + LAST_MODIFIED, RANGE, }; -use hyper::{Request, Response, StatusCode}; +use hyper::{body::Body, Request, Response, StatusCode}; use tokio::sync::mpsc; use garage_net::stream::ByteStream; use garage_rpc::rpc_helper::OrderTag; use garage_table::EmptyKey; use garage_util::data::*; -use garage_util::error::{Error as UtilError, OkOrMessage}; +use garage_util::error::OkOrMessage; use garage_model::garage::Garage; use garage_model::s3::object_table::*; use garage_model::s3::version_table::*; -use garage_api_common::common_error::CommonError; -use garage_api_common::helpers::*; -use garage_api_common::signature::checksum::{add_checksum_response_headers, X_AMZ_CHECKSUM_MODE}; +use crate::helpers::*; +use crate::s3::api_server::ResBody; +use crate::s3::checksum::{add_checksum_response_headers, X_AMZ_CHECKSUM_MODE}; +use crate::s3::encryption::EncryptionParams; +use crate::s3::error::*; -use crate::api_server::ResBody; -use crate::copy::*; -use crate::encryption::EncryptionParams; -use crate::error::*; - -const X_AMZ_MP_PARTS_COUNT: HeaderName = HeaderName::from_static("x-amz-mp-parts-count"); +const X_AMZ_MP_PARTS_COUNT: &str = "x-amz-mp-parts-count"; #[derive(Default)] pub struct GetObjectOverrides { @@ -71,11 +68,14 @@ fn object_headers( // See: https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingMetadata.html let mut headers_by_name = BTreeMap::new(); for (name, value) in meta_inner.headers.iter() { - let name_lower = name.to_ascii_lowercase(); - headers_by_name - .entry(name_lower) - .or_insert(vec![]) - .push(value.as_str()); + match headers_by_name.get_mut(name) { + None => { + headers_by_name.insert(name, vec![value.as_str()]); + } + Some(headers) => { + headers.push(value.as_str()); + } + } } for (name, values) in headers_by_name { @@ -117,29 +117,49 @@ fn getobject_override_headers( Ok(()) } -fn handle_http_precondition( +fn try_answer_cached( version: &ObjectVersion, version_meta: &ObjectVersionMeta, - req: &Request<()>, -) -> Result>, Error> { - let precondition_headers = PreconditionHeaders::parse(req)?; + req: &Request, +) -> Option> { + // It is possible, and is even usually the case, [that both If-None-Match and + // If-Modified-Since] are present in a request. In this situation If-None-Match takes + // precedence and If-Modified-Since is ignored (as per 6.Precedence from rfc7232). The rational + // being that etag based matching is more accurate, it has no issue with sub-second precision + // for instance (in case of very fast updates) + let cached = if let Some(none_match) = req.headers().get(IF_NONE_MATCH) { + let none_match = none_match.to_str().ok()?; + let expected = format!("\"{}\"", version_meta.etag); + let found = none_match + .split(',') + .map(str::trim) + .any(|etag| etag == expected || etag == "\"*\""); + found + } else if let Some(modified_since) = req.headers().get(IF_MODIFIED_SINCE) { + let modified_since = modified_since.to_str().ok()?; + let client_date = httpdate::parse_http_date(modified_since).ok()?; + let server_date = UNIX_EPOCH + Duration::from_millis(version.timestamp); + client_date >= server_date + } else { + false + }; - if let Some(status_code) = precondition_headers.check(&version, &version_meta.etag)? { - Ok(Some( + if cached { + Some( Response::builder() - .status(status_code) + .status(StatusCode::NOT_MODIFIED) .body(empty_body()) .unwrap(), - )) + ) } else { - Ok(None) + None } } /// Handle HEAD request pub async fn handle_head( ctx: ReqCtx, - req: &Request<()>, + req: &Request, key: &str, part_number: Option, ) -> Result, Error> { @@ -149,7 +169,7 @@ pub async fn handle_head( /// Handle HEAD request for website pub async fn handle_head_without_ctx( garage: Arc, - req: &Request<()>, + req: &Request, bucket_id: Uuid, key: &str, part_number: Option, @@ -178,8 +198,8 @@ pub async fn handle_head_without_ctx( _ => unreachable!(), }; - if let Some(res) = handle_http_precondition(object_version, version_meta, req)? { - return Ok(res); + if let Some(cached) = try_answer_cached(object_version, version_meta, req) { + return Ok(cached); } let (encryption, headers) = @@ -216,7 +236,6 @@ pub async fn handle_head_without_ctx( .get(&object_version.uuid, &EmptyKey) .await? .ok_or(Error::NoSuchKey)?; - check_version_not_deleted(&version)?; let (part_offset, part_end) = calculate_part_bounds(&version, pn).ok_or(Error::InvalidPart)?; @@ -261,7 +280,7 @@ pub async fn handle_head_without_ctx( /// Handle GET request pub async fn handle_get( ctx: ReqCtx, - req: &Request<()>, + req: &Request, key: &str, part_number: Option, overrides: GetObjectOverrides, @@ -272,7 +291,7 @@ pub async fn handle_get( /// Handle GET request pub async fn handle_get_without_ctx( garage: Arc, - req: &Request<()>, + req: &Request, bucket_id: Uuid, key: &str, part_number: Option, @@ -301,8 +320,8 @@ pub async fn handle_get_without_ctx( ObjectVersionData::FirstBlock(meta, _) => meta, }; - if let Some(res) = handle_http_precondition(last_v, last_v_meta, req)? { - return Ok(res); + if let Some(cached) = try_answer_cached(last_v, last_v_meta, req) { + return Ok(cached); } let (enc, headers) = @@ -323,12 +342,7 @@ pub async fn handle_get_without_ctx( enc, &headers, pn, - ChecksumMode { - // TODO: for multipart uploads, checksums of each part should be stored - // so that we can return the corresponding checksum here - // https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html - enabled: false, - }, + checksum_mode, ) .await } @@ -342,12 +356,7 @@ pub async fn handle_get_without_ctx( &headers, range.start, range.start + range.length, - ChecksumMode { - // TODO: for range queries that align with part boundaries, - // we should return the saved checksum of the part - // https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html - enabled: false, - }, + checksum_mode, ) .await } @@ -367,21 +376,6 @@ pub async fn handle_get_without_ctx( } } -pub(crate) fn check_version_not_deleted(version: &Version) -> Result<(), Error> { - if version.deleted.get() { - // the version was deleted between when the object_table was consulted - // and now, this could mean the object was deleted, or overriden. - // Rather than say the key doesn't exist, return a transient error - // to signal the client to try again. - return Err(CommonError::InternalError(UtilError::Message( - "conflict/inconsistency between object and version state, version is deleted" - .to_string(), - )) - .into()); - } - Ok(()) -} - async fn handle_get_full( garage: Arc, version: &ObjectVersion, @@ -448,7 +442,6 @@ pub fn full_object_byte_stream( .ok_or_message("channel closed")?; let version = version_fut.await.unwrap()?.ok_or(Error::NoSuchKey)?; - check_version_not_deleted(&version)?; for (i, (_, vb)) in version.blocks.items().iter().enumerate().skip(1) { let stream_block_i = encryption .get_block(&garage, &vb.hash, Some(order_stream.order(i as u64))) @@ -464,14 +457,6 @@ pub fn full_object_byte_stream( { Ok(()) => (), Err(e) => { - // TODO i think this is a bad idea, we should log - // an error and stop there. If the error happens to - // be exactly the size of what hasn't been streamed - // yet, the client will see the request as a - // success - // instead truncating the output notify the client - // something happened with their download, so that - // they can retry it let _ = tx.send(error_stream_item(e)).await; } } @@ -523,7 +508,7 @@ async fn handle_get_range( .get(&version.uuid, &EmptyKey) .await? .ok_or(Error::NoSuchKey)?; - check_version_not_deleted(&version)?; + let body = body_from_blocks_range(garage, encryption, version.blocks.items(), begin, end); Ok(resp_builder.body(body)?) @@ -574,8 +559,6 @@ async fn handle_get_part( .await? .ok_or(Error::NoSuchKey)?; - check_version_not_deleted(&version)?; - let (begin, end) = calculate_part_bounds(&version, part_number).ok_or(Error::InvalidPart)?; @@ -596,7 +579,7 @@ async fn handle_get_part( } fn parse_range_header( - req: &Request<()>, + req: &Request, total_size: u64, ) -> Result, Error> { let range = match req.headers().get(RANGE) { @@ -637,7 +620,7 @@ struct ChecksumMode { enabled: bool, } -fn checksum_mode(req: &Request<()>) -> ChecksumMode { +fn checksum_mode(req: &Request) -> ChecksumMode { ChecksumMode { enabled: req .headers() @@ -770,118 +753,3 @@ fn std_error_from_read_error(e: E) -> std::io::Error { format!("Error while reading object data: {}", e), ) } - -// ---- - -pub struct PreconditionHeaders { - if_match: Option>, - if_modified_since: Option, - if_none_match: Option>, - if_unmodified_since: Option, -} - -impl PreconditionHeaders { - fn parse(req: &Request) -> Result { - Self::parse_with( - req.headers(), - &IF_MATCH, - &IF_NONE_MATCH, - &IF_MODIFIED_SINCE, - &IF_UNMODIFIED_SINCE, - ) - } - - pub(crate) fn parse_copy_source(req: &Request) -> Result { - Self::parse_with( - req.headers(), - &X_AMZ_COPY_SOURCE_IF_MATCH, - &X_AMZ_COPY_SOURCE_IF_NONE_MATCH, - &X_AMZ_COPY_SOURCE_IF_MODIFIED_SINCE, - &X_AMZ_COPY_SOURCE_IF_UNMODIFIED_SINCE, - ) - } - - fn parse_with( - headers: &HeaderMap, - hdr_if_match: &HeaderName, - hdr_if_none_match: &HeaderName, - hdr_if_modified_since: &HeaderName, - hdr_if_unmodified_since: &HeaderName, - ) -> Result { - Ok(Self { - if_match: headers - .get(hdr_if_match) - .map(|x| x.to_str()) - .transpose()? - .map(|x| { - x.split(',') - .map(|m| m.trim().trim_matches('"').to_string()) - .collect::>() - }), - if_none_match: headers - .get(hdr_if_none_match) - .map(|x| x.to_str()) - .transpose()? - .map(|x| { - x.split(',') - .map(|m| m.trim().trim_matches('"').to_string()) - .collect::>() - }), - if_modified_since: headers - .get(hdr_if_modified_since) - .map(|x| x.to_str()) - .transpose()? - .map(httpdate::parse_http_date) - .transpose() - .ok_or_bad_request("Invalid date in if-modified-since")?, - if_unmodified_since: headers - .get(hdr_if_unmodified_since) - .map(|x| x.to_str()) - .transpose()? - .map(httpdate::parse_http_date) - .transpose() - .ok_or_bad_request("Invalid date in if-unmodified-since")?, - }) - } - - fn check(&self, v: &ObjectVersion, etag: &str) -> Result, Error> { - // we store date with ms precision, but headers are precise to the second: truncate - // the timestamp to handle the same-second edge case - let v_date = UNIX_EPOCH + Duration::from_secs(v.timestamp / 1000); - - // Implemented from https://datatracker.ietf.org/doc/html/rfc7232#section-6 - - if let Some(im) = &self.if_match { - // Step 1: if-match is present - if !im.iter().any(|x| x == etag || x == "*") { - return Ok(Some(StatusCode::PRECONDITION_FAILED)); - } - } else if let Some(ius) = &self.if_unmodified_since { - // Step 2: if-unmodified-since is present, and if-match is absent - if v_date > *ius { - return Ok(Some(StatusCode::PRECONDITION_FAILED)); - } - } - - if let Some(inm) = &self.if_none_match { - // Step 3: if-none-match is present - if inm.iter().any(|x| x == etag || x == "*") { - return Ok(Some(StatusCode::NOT_MODIFIED)); - } - } else if let Some(ims) = &self.if_modified_since { - // Step 4: if-modified-since is present, and if-none-match is absent - if v_date <= *ims { - return Ok(Some(StatusCode::NOT_MODIFIED)); - } - } - - Ok(None) - } - - pub(crate) fn check_copy_source(&self, v: &ObjectVersion, etag: &str) -> Result<(), Error> { - match self.check(v, etag)? { - Some(_) => Err(Error::PreconditionFailed), - None => Ok(()), - } - } -} diff --git a/src/api/s3/lifecycle.rs b/src/api/s3/lifecycle.rs index ccda6cfd..7eb1c2cb 100644 --- a/src/api/s3/lifecycle.rs +++ b/src/api/s3/lifecycle.rs @@ -1,19 +1,21 @@ use quick_xml::de::from_reader; +use http_body_util::BodyExt; use hyper::{Request, Response, StatusCode}; use serde::{Deserialize, Serialize}; -use garage_api_common::helpers::*; - -use crate::api_server::{ReqBody, ResBody}; -use crate::error::*; -use crate::xml::{to_xml_with_header, xmlns_tag, IntValue, Value}; +use crate::helpers::*; +use crate::s3::api_server::{ReqBody, ResBody}; +use crate::s3::error::*; +use crate::s3::xml::{to_xml_with_header, xmlns_tag, IntValue, Value}; +use crate::signature::verify_signed_content; use garage_model::bucket_table::{ parse_lifecycle_date, Bucket, LifecycleExpiration as GarageLifecycleExpiration, LifecycleFilter as GarageLifecycleFilter, LifecycleRule as GarageLifecycleRule, }; +use garage_util::data::*; pub async fn handle_get_lifecycle(ctx: ReqCtx) -> Result, Error> { let ReqCtx { bucket_params, .. } = ctx; @@ -27,7 +29,7 @@ pub async fn handle_get_lifecycle(ctx: ReqCtx) -> Result, Erro .body(string_body(xml))?) } else { Ok(Response::builder() - .status(StatusCode::NOT_FOUND) + .status(StatusCode::NO_CONTENT) .body(empty_body())?) } } @@ -53,6 +55,7 @@ pub async fn handle_delete_lifecycle(ctx: ReqCtx) -> Result, E pub async fn handle_put_lifecycle( ctx: ReqCtx, req: Request, + content_sha256: Option, ) -> Result, Error> { let ReqCtx { garage, @@ -61,7 +64,11 @@ pub async fn handle_put_lifecycle( .. } = ctx; - let body = req.into_body().collect().await?; + let body = BodyExt::collect(req.into_body()).await?.to_bytes(); + + if let Some(content_sha256) = content_sha256 { + verify_signed_content(content_sha256, &body[..])?; + } let conf: LifecycleConfiguration = from_reader(&body as &[u8])?; let config = conf diff --git a/src/api/s3/list.rs b/src/api/s3/list.rs index 94c2c895..648bace2 100644 --- a/src/api/s3/list.rs +++ b/src/api/s3/list.rs @@ -13,14 +13,13 @@ use garage_model::s3::object_table::*; use garage_table::EnumerationOrder; -use garage_api_common::encoding::*; -use garage_api_common::helpers::*; - -use crate::api_server::{ReqBody, ResBody}; -use crate::encryption::EncryptionParams; -use crate::error::*; -use crate::multipart as s3_multipart; -use crate::xml as s3_xml; +use crate::encoding::*; +use crate::helpers::*; +use crate::s3::api_server::{ReqBody, ResBody}; +use crate::s3::encryption::EncryptionParams; +use crate::s3::error::*; +use crate::s3::multipart as s3_multipart; +use crate::s3::xml as s3_xml; const DUMMY_NAME: &str = "Dummy Key"; const DUMMY_KEY: &str = "GKDummyKey"; @@ -54,6 +53,7 @@ pub struct ListMultipartUploadsQuery { #[derive(Debug)] pub struct ListPartsQuery { pub bucket_name: String, + pub bucket_id: Uuid, pub key: String, pub upload_id: String, pub part_number_marker: Option, @@ -398,7 +398,7 @@ enum ExtractionResult { key: String, }, // Fallback key is used for legacy APIs that only support - // exclusive pagination (and not inclusive one). + // exlusive pagination (and not inclusive one). SkipTo { key: String, fallback_key: Option, @@ -408,7 +408,7 @@ enum ExtractionResult { #[derive(PartialEq, Clone, Debug)] enum RangeBegin { // Fallback key is used for legacy APIs that only support - // exclusive pagination (and not inclusive one). + // exlusive pagination (and not inclusive one). IncludingKey { key: String, fallback_key: Option, @@ -1244,8 +1244,10 @@ mod tests { #[test] fn test_fetch_part_info() -> Result<(), Error> { + let uuid = Uuid::from([0x08; 32]); let mut query = ListPartsQuery { bucket_name: "a".to_string(), + bucket_id: uuid, key: "a".to_string(), upload_id: "xx".to_string(), part_number_marker: None, diff --git a/src/api/s3/lib.rs b/src/api/s3/mod.rs similarity index 79% rename from src/api/s3/lib.rs rename to src/api/s3/mod.rs index 83f684f8..b9bb1a6f 100644 --- a/src/api/s3/lib.rs +++ b/src/api/s3/mod.rs @@ -1,6 +1,3 @@ -#[macro_use] -extern crate tracing; - pub mod api_server; pub mod error; @@ -14,8 +11,9 @@ mod list; mod multipart; mod post_object; mod put; -pub mod website; +mod website; +mod checksum; mod encryption; mod router; pub mod xml; diff --git a/src/api/s3/multipart.rs b/src/api/s3/multipart.rs index d6eb26cb..3db3e8aa 100644 --- a/src/api/s3/multipart.rs +++ b/src/api/s3/multipart.rs @@ -1,20 +1,13 @@ use std::collections::HashMap; -use std::convert::{TryFrom, TryInto}; -use std::hash::Hasher; +use std::convert::TryInto; use std::sync::Arc; use base64::prelude::*; -use crc32c::Crc32cHasher as Crc32c; -use crc32fast::Hasher as Crc32; use futures::prelude::*; use hyper::{Request, Response}; -use md5::{Digest, Md5}; -use sha1::Sha1; -use sha2::Sha256; use garage_table::*; use garage_util::data::*; -use garage_util::error::OkOrMessage; use garage_model::garage::Garage; use garage_model::s3::block_ref_table::*; @@ -22,14 +15,14 @@ use garage_model::s3::mpu_table::*; use garage_model::s3::object_table::*; use garage_model::s3::version_table::*; -use garage_api_common::helpers::*; -use garage_api_common::signature::checksum::*; - -use crate::api_server::{ReqBody, ResBody}; -use crate::encryption::EncryptionParams; -use crate::error::*; -use crate::put::*; -use crate::xml as s3_xml; +use crate::helpers::*; +use crate::s3::api_server::{ReqBody, ResBody}; +use crate::s3::checksum::*; +use crate::s3::encryption::EncryptionParams; +use crate::s3::error::*; +use crate::s3::put::*; +use crate::s3::xml as s3_xml; +use crate::signature::verify_signed_content; // ---- @@ -49,7 +42,7 @@ pub async fn handle_create_multipart_upload( let upload_id = gen_uuid(); let timestamp = next_timestamp(existing_object.as_ref()); - let headers = extract_metadata_headers(req.headers())?; + let headers = get_headers(req.headers())?; let meta = ObjectVersionMetaInner { headers, checksum: None, @@ -100,6 +93,7 @@ pub async fn handle_put_part( key: &str, part_number: u64, upload_id: &str, + content_sha256: Option, ) -> Result, Error> { let ReqCtx { garage, .. } = &ctx; @@ -110,30 +104,17 @@ pub async fn handle_put_part( Some(x) => Some(x.to_str()?.to_string()), None => None, }, - sha256: None, + sha256: content_sha256, extra: request_checksum_value(req.headers())?, }; + // Read first chuck, and at the same time try to get object to see if it exists let key = key.to_string(); - let (req_head, mut req_body) = req.into_parts(); - - // Before we stream the body, configure the needed checksums. - req_body.add_expected_checksums(expected_checksums.clone()); - // TODO: avoid parsing encryption headers twice... - if !EncryptionParams::new_from_headers(&garage, &req_head.headers)?.is_encrypted() { - // For non-encrypted objects, we need to compute the md5sum in all cases - // (even if content-md5 is not set), because it is used as an etag of the - // part, which is in turn used in the etag computation of the whole object - req_body.add_md5(); - } - - let (stream, stream_checksums) = req_body.streaming_with_checksums(); - let stream = stream.map_err(Error::from); - + let (req_head, req_body) = req.into_parts(); + let stream = body_stream(req_body); let mut chunker = StreamChunker::new(stream, garage.config.block_size); - // Read first chuck, and at the same time try to get object to see if it exists let ((_, object_version, mut mpu), first_block) = futures::try_join!(get_upload(&ctx, &key, &upload_id), chunker.next(),)?; @@ -190,21 +171,21 @@ pub async fn handle_put_part( garage.version_table.insert(&version).await?; // Copy data to version - let (total_size, _, _) = read_and_put_blocks( + let checksummer = + Checksummer::init(&expected_checksums, !encryption.is_encrypted()).add(checksum_algorithm); + let (total_size, checksums, _) = read_and_put_blocks( &ctx, &version, encryption, part_number, first_block, - chunker, - Checksummer::new(), + &mut chunker, + checksummer, ) .await?; - // Verify that checksums match - let checksums = stream_checksums - .await - .ok_or_internal_error("checksum calculation")??; + // Verify that checksums map + checksums.verify(&expected_checksums)?; // Store part etag in version let etag = encryption.etag_from_md5(&checksums.md5); @@ -266,6 +247,7 @@ pub async fn handle_complete_multipart_upload( req: Request, key: &str, upload_id: &str, + content_sha256: Option, ) -> Result, Error> { let ReqCtx { garage, @@ -277,7 +259,11 @@ pub async fn handle_complete_multipart_upload( let expected_checksum = request_checksum_value(&req_head.headers)?; - let body = req_body.collect().await?; + let body = http_body_util::BodyExt::collect(req_body).await?.to_bytes(); + + if let Some(content_sha256) = content_sha256 { + verify_signed_content(content_sha256, &body[..])?; + } let body_xml = roxmltree::Document::parse(std::str::from_utf8(&body)?)?; let body_list_of_parts = parse_complete_multipart_upload_body(&body_xml) @@ -443,16 +429,7 @@ pub async fn handle_complete_multipart_upload( // Send response saying ok we're done let result = s3_xml::CompleteMultipartUploadResult { xmlns: (), - // FIXME: the location returned is not always correct: - // - we always return https, but maybe some people do http - // - if root_domain is not specified, a full URL is not returned - location: garage - .config - .s3_api - .root_domain - .as_ref() - .map(|rd| s3_xml::Value(format!("https://{}.{}/{}", bucket_name, rd, key))) - .or(Some(s3_xml::Value(format!("/{}/{}", bucket_name, key)))), + location: None, bucket: s3_xml::Value(bucket_name.to_string()), key: s3_xml::Value(key), etag: s3_xml::Value(format!("\"{}\"", etag)), @@ -615,99 +592,3 @@ fn parse_complete_multipart_upload_body( Some(parts) } - -// ====== checksummer ==== - -#[derive(Default)] -pub(crate) struct MultipartChecksummer { - pub md5: Md5, - pub extra: Option, -} - -pub(crate) enum MultipartExtraChecksummer { - Crc32(Crc32), - Crc32c(Crc32c), - Sha1(Sha1), - Sha256(Sha256), -} - -impl MultipartChecksummer { - pub(crate) fn init(algo: Option) -> Self { - Self { - md5: Md5::new(), - extra: match algo { - None => None, - Some(ChecksumAlgorithm::Crc32) => { - Some(MultipartExtraChecksummer::Crc32(Crc32::new())) - } - Some(ChecksumAlgorithm::Crc32c) => { - Some(MultipartExtraChecksummer::Crc32c(Crc32c::default())) - } - Some(ChecksumAlgorithm::Sha1) => Some(MultipartExtraChecksummer::Sha1(Sha1::new())), - Some(ChecksumAlgorithm::Sha256) => { - Some(MultipartExtraChecksummer::Sha256(Sha256::new())) - } - }, - } - } - - pub(crate) fn update( - &mut self, - etag: &str, - checksum: Option, - ) -> Result<(), Error> { - self.md5 - .update(&hex::decode(&etag).ok_or_message("invalid etag hex")?); - match (&mut self.extra, checksum) { - (None, _) => (), - ( - Some(MultipartExtraChecksummer::Crc32(ref mut crc32)), - Some(ChecksumValue::Crc32(x)), - ) => { - crc32.update(&x); - } - ( - Some(MultipartExtraChecksummer::Crc32c(ref mut crc32c)), - Some(ChecksumValue::Crc32c(x)), - ) => { - crc32c.write(&x); - } - (Some(MultipartExtraChecksummer::Sha1(ref mut sha1)), Some(ChecksumValue::Sha1(x))) => { - sha1.update(&x); - } - ( - Some(MultipartExtraChecksummer::Sha256(ref mut sha256)), - Some(ChecksumValue::Sha256(x)), - ) => { - sha256.update(&x); - } - (Some(_), b) => { - return Err(Error::internal_error(format!( - "part checksum was not computed correctly, got: {:?}", - b - ))) - } - } - Ok(()) - } - - pub(crate) fn finalize(self) -> (Md5Checksum, Option) { - let md5 = self.md5.finalize()[..].try_into().unwrap(); - let extra = match self.extra { - None => None, - Some(MultipartExtraChecksummer::Crc32(crc32)) => { - Some(ChecksumValue::Crc32(u32::to_be_bytes(crc32.finalize()))) - } - Some(MultipartExtraChecksummer::Crc32c(crc32c)) => Some(ChecksumValue::Crc32c( - u32::to_be_bytes(u32::try_from(crc32c.finish()).unwrap()), - )), - Some(MultipartExtraChecksummer::Sha1(sha1)) => { - Some(ChecksumValue::Sha1(sha1.finalize()[..].try_into().unwrap())) - } - Some(MultipartExtraChecksummer::Sha256(sha256)) => Some(ChecksumValue::Sha256( - sha256.finalize()[..].try_into().unwrap(), - )), - }; - (md5, extra) - } -} diff --git a/src/api/s3/post_object.rs b/src/api/s3/post_object.rs index 09be7e7c..2c106b3b 100644 --- a/src/api/s3/post_object.rs +++ b/src/api/s3/post_object.rs @@ -16,16 +16,15 @@ use serde::Deserialize; use garage_model::garage::Garage; use garage_model::s3::object_table::*; -use garage_api_common::cors::*; -use garage_api_common::helpers::*; -use garage_api_common::signature::checksum::*; -use garage_api_common::signature::payload::{verify_v4, Authorization}; - -use crate::api_server::ResBody; -use crate::encryption::EncryptionParams; -use crate::error::*; -use crate::put::{extract_metadata_headers, save_stream, ChecksumMode}; -use crate::xml as s3_xml; +use crate::helpers::*; +use crate::s3::api_server::ResBody; +use crate::s3::checksum::*; +use crate::s3::cors::*; +use crate::s3::encryption::EncryptionParams; +use crate::s3::error::*; +use crate::s3::put::{get_headers, save_stream, ChecksumMode}; +use crate::s3::xml as s3_xml; +use crate::signature::payload::{verify_v4, Authorization}; pub async fn handle_post_object( garage: Arc, @@ -72,11 +71,21 @@ pub async fn handle_post_object( } if let Ok(content) = HeaderValue::from_str(&field.text().await?) { - if params.insert(&name, content).is_some() { - return Err(Error::bad_request(format!( - "Field '{}' provided more than once", - name - ))); + match name.as_str() { + "tag" => (/* tag need to be reencoded, but we don't support them yet anyway */), + "acl" => { + if params.insert("x-amz-acl", content).is_some() { + return Err(Error::bad_request("Field 'acl' provided more than once")); + } + } + _ => { + if params.insert(&name, content).is_some() { + return Err(Error::bad_request(format!( + "Field '{}' provided more than once", + name + ))); + } + } } } }; @@ -108,8 +117,7 @@ pub async fn handle_post_object( let bucket_id = garage .bucket_helper() .resolve_bucket(&bucket_name, &api_key) - .await - .map_err(pass_helper_error)?; + .await?; if !api_key.allow_write(&bucket_id) { return Err(Error::forbidden("Operation is not allowed for this key.")); @@ -141,26 +149,10 @@ pub async fn handle_post_object( let mut conditions = decoded_policy.into_conditions()?; - // If there are conditions on the bucket name, check these against the actual bucket_name rather - // than the one in params, which is allowed to be absent. - if let Some(conds) = conditions.params.remove("bucket") { - for cond in conds { - let ok = match cond { - Operation::Equal(s) => s.as_str() == bucket_name, - Operation::StartsWith(s) => bucket_name.starts_with(&s), - }; - if !ok { - return Err(Error::bad_request( - "Key 'bucket' has value not allowed in policy", - )); - } - } - } - for (param_key, value) in params.iter() { let param_key = param_key.as_str(); match param_key { - "policy" | "x-amz-signature" | "bucket" => (), // this is always accepted, as it's required to validate other fields + "policy" | "x-amz-signature" => (), // this is always accepted, as it's required to validate other fields "content-type" => { let conds = conditions.params.remove("content-type").ok_or_else(|| { Error::bad_request(format!("Key '{}' is not allowed in policy", param_key)) @@ -230,11 +222,8 @@ pub async fn handle_post_object( ))); } - // if we ever start supporting ACLs, we likely want to map "acl" to x-amz-acl" somewhere - // around here to make sure the rest of the machinery takes our acl into account. - let headers = extract_metadata_headers(¶ms)?; + let headers = get_headers(¶ms)?; - let checksum_algorithm = request_checksum_algorithm(¶ms)?; let expected_checksums = ExpectedChecksums { md5: params .get("content-md5") @@ -242,9 +231,7 @@ pub async fn handle_post_object( .transpose()? .map(str::to_string), sha256: None, - extra: checksum_algorithm - .map(|algo| extract_checksum_value(¶ms, algo)) - .transpose()?, + extra: request_checksum_algorithm_value(¶ms)?, }; let meta = ObjectVersionMetaInner { diff --git a/src/api/s3/put.rs b/src/api/s3/put.rs index b915f2ec..1e3b1b44 100644 --- a/src/api/s3/put.rs +++ b/src/api/s3/put.rs @@ -30,14 +30,13 @@ use garage_model::s3::block_ref_table::*; use garage_model::s3::object_table::*; use garage_model::s3::version_table::*; -use garage_api_common::helpers::*; -use garage_api_common::signature::body::StreamingChecksumReceiver; -use garage_api_common::signature::checksum::*; +use crate::helpers::*; +use crate::s3::api_server::{ReqBody, ResBody}; +use crate::s3::checksum::*; +use crate::s3::encryption::EncryptionParams; +use crate::s3::error::*; -use crate::api_server::{ReqBody, ResBody}; -use crate::encryption::EncryptionParams; -use crate::error::*; -use crate::website::X_AMZ_WEBSITE_REDIRECT_LOCATION; +const PUT_BLOCKS_MAX_PARALLEL: usize = 3; pub(crate) struct SaveStreamResult { pub(crate) version_uuid: Uuid, @@ -48,10 +47,6 @@ pub(crate) struct SaveStreamResult { pub(crate) enum ChecksumMode<'a> { Verify(&'a ExpectedChecksums), - VerifyFrom { - checksummer: StreamingChecksumReceiver, - trailer_algo: Option, - }, Calculate(Option), } @@ -59,9 +54,10 @@ pub async fn handle_put( ctx: ReqCtx, req: Request, key: &String, + content_sha256: Option, ) -> Result, Error> { // Retrieve interesting headers from request - let headers = extract_metadata_headers(req.headers())?; + let headers = get_headers(req.headers())?; debug!("Object headers: {:?}", headers); let expected_checksums = ExpectedChecksums { @@ -69,10 +65,9 @@ pub async fn handle_put( Some(x) => Some(x.to_str()?.to_string()), None => None, }, - sha256: None, + sha256: content_sha256, extra: request_checksum_value(req.headers())?, }; - let trailer_checksum_algorithm = request_trailer_checksum_algorithm(req.headers())?; let meta = ObjectVersionMetaInner { headers, @@ -82,19 +77,7 @@ pub async fn handle_put( // Determine whether object should be encrypted, and if so the key let encryption = EncryptionParams::new_from_headers(&ctx.garage, req.headers())?; - // The request body is a special ReqBody object (see garage_api_common::signature::body) - // which supports calculating checksums while streaming the data. - // Before we start streaming, we configure it to calculate all the checksums we need. - let mut req_body = req.into_body(); - req_body.add_expected_checksums(expected_checksums.clone()); - if !encryption.is_encrypted() { - // For non-encrypted objects, we need to compute the md5sum in all cases - // (even if content-md5 is not set), because it is used as the object etag - req_body.add_md5(); - } - - let (stream, checksummer) = req_body.streaming_with_checksums(); - let stream = stream.map_err(Error::from); + let stream = body_stream(req.into_body()); let res = save_stream( &ctx, @@ -102,10 +85,7 @@ pub async fn handle_put( encryption, stream, key, - ChecksumMode::VerifyFrom { - checksummer, - trailer_algo: trailer_checksum_algorithm, - }, + ChecksumMode::Verify(&expected_checksums), ) .await?; @@ -141,15 +121,10 @@ pub(crate) async fn save_stream> + Unpin>( let version_uuid = gen_uuid(); let version_timestamp = next_timestamp(existing_object.as_ref()); - let mut checksummer = match &checksum_mode { + let mut checksummer = match checksum_mode { ChecksumMode::Verify(expected) => Checksummer::init(expected, !encryption.is_encrypted()), ChecksumMode::Calculate(algo) => { - Checksummer::init(&Default::default(), !encryption.is_encrypted()).add(*algo) - } - ChecksumMode::VerifyFrom { .. } => { - // Checksums are calculated by the garage_api_common::signature module - // so here we can just have an empty checksummer that does nothing - Checksummer::new() + Checksummer::init(&Default::default(), !encryption.is_encrypted()).add(algo) } }; @@ -157,7 +132,7 @@ pub(crate) async fn save_stream> + Unpin>( // as "inline data". We can then return immediately. if first_block.len() < INLINE_THRESHOLD { checksummer.update(&first_block); - let mut checksums = checksummer.finalize(); + let checksums = checksummer.finalize(); match checksum_mode { ChecksumMode::Verify(expected) => { @@ -166,18 +141,6 @@ pub(crate) async fn save_stream> + Unpin>( ChecksumMode::Calculate(algo) => { meta.checksum = checksums.extract(algo); } - ChecksumMode::VerifyFrom { - checksummer, - trailer_algo, - } => { - drop(chunker); - checksums = checksummer - .await - .ok_or_internal_error("checksum calculation")??; - if let Some(algo) = trailer_algo { - meta.checksum = checksums.extract(Some(algo)); - } - } }; let size = first_block.len() as u64; @@ -249,13 +212,13 @@ pub(crate) async fn save_stream> + Unpin>( garage.version_table.insert(&version).await?; // Transfer data - let (total_size, mut checksums, first_block_hash) = read_and_put_blocks( + let (total_size, checksums, first_block_hash) = read_and_put_blocks( ctx, &version, encryption, 1, first_block, - chunker, + &mut chunker, checksummer, ) .await?; @@ -268,17 +231,6 @@ pub(crate) async fn save_stream> + Unpin>( ChecksumMode::Calculate(algo) => { meta.checksum = checksums.extract(algo); } - ChecksumMode::VerifyFrom { - checksummer, - trailer_algo, - } => { - checksums = checksummer - .await - .ok_or_internal_error("checksum calculation")??; - if let Some(algo) = trailer_algo { - meta.checksum = checksums.extract(Some(algo)); - } - } }; // Verify quotas are respsected @@ -379,7 +331,7 @@ pub(crate) async fn read_and_put_blocks> + encryption: EncryptionParams, part_number: u64, first_block: Bytes, - mut chunker: StreamChunker, + chunker: &mut StreamChunker, checksummer: Checksummer, ) -> Result<(u64, Checksums, Hash), Error> { let tracer = opentelemetry::global::tracer("garage"); @@ -491,7 +443,7 @@ pub(crate) async fn read_and_put_blocks> + }; let recv_next = async { // If more than a maximum number of writes are in progress, don't add more for now - if currently_running >= ctx.garage.config.block_max_concurrent_writes_per_request { + if currently_running >= PUT_BLOCKS_MAX_PARALLEL { futures::future::pending().await } else { block_rx3.recv().await @@ -648,9 +600,7 @@ impl Drop for InterruptedCleanup { // ============ helpers ============ -pub(crate) fn extract_metadata_headers( - headers: &HeaderMap, -) -> Result { +pub(crate) fn get_headers(headers: &HeaderMap) -> Result { let mut ret = Vec::new(); // Preserve standard headers @@ -672,22 +622,10 @@ pub(crate) fn extract_metadata_headers( for (name, value) in headers.iter() { if name.as_str().starts_with("x-amz-meta-") { ret.push(( - name.as_str().to_ascii_lowercase(), + name.to_string(), std::str::from_utf8(value.as_bytes())?.to_string(), )); } - if name == X_AMZ_WEBSITE_REDIRECT_LOCATION { - let value = std::str::from_utf8(value.as_bytes())?.to_string(); - if !(value.starts_with("/") - || value.starts_with("http://") - || value.starts_with("https://")) - { - return Err(Error::bad_request(format!( - "Invalid {X_AMZ_WEBSITE_REDIRECT_LOCATION} header", - ))); - } - ret.push((X_AMZ_WEBSITE_REDIRECT_LOCATION.to_string(), value)); - } } Ok(ret) diff --git a/src/api/s3/router.rs b/src/api/s3/router.rs index e3f58490..e7ac1d77 100644 --- a/src/api/s3/router.rs +++ b/src/api/s3/router.rs @@ -3,10 +3,9 @@ use std::borrow::Cow; use hyper::header::HeaderValue; use hyper::{HeaderMap, Method, Request}; -use garage_api_common::helpers::Authorization; -use garage_api_common::router_macros::{generateQueryParameters, router_match}; - -use crate::error::*; +use crate::helpers::Authorization; +use crate::router_macros::{generateQueryParameters, router_match}; +use crate::s3::error::*; router_match! {@func @@ -352,18 +351,6 @@ impl Endpoint { _ => return Err(Error::bad_request("Unknown method")), }; - if let Some(x_id) = query.x_id.take() { - if x_id != res.name() { - // I think AWS ignores the x-id parameter. - // Let's make this at least be a warnin to help debugging. - warn!( - "x-id ({}) does not match parsed endpoint ({})", - x_id, - res.name() - ); - } - } - if let Some(message) = query.nonempty_message() { debug!("Unused query parameter: {}", message) } @@ -708,8 +695,7 @@ generateQueryParameters! { "uploadId" => upload_id, "upload-id-marker" => upload_id_marker, "versionId" => version_id, - "version-id-marker" => version_id_marker, - "x-id" => x_id + "version-id-marker" => version_id_marker ] } diff --git a/src/api/s3/website.rs b/src/api/s3/website.rs index 03cc01d8..6af55677 100644 --- a/src/api/s3/website.rs +++ b/src/api/s3/website.rs @@ -1,18 +1,17 @@ use quick_xml::de::from_reader; -use hyper::{header::HeaderName, Request, Response, StatusCode}; +use http_body_util::BodyExt; +use hyper::{Request, Response, StatusCode}; use serde::{Deserialize, Serialize}; +use crate::helpers::*; +use crate::s3::api_server::{ReqBody, ResBody}; +use crate::s3::error::*; +use crate::s3::xml::{to_xml_with_header, xmlns_tag, IntValue, Value}; +use crate::signature::verify_signed_content; + use garage_model::bucket_table::*; - -use garage_api_common::helpers::*; - -use crate::api_server::{ReqBody, ResBody}; -use crate::error::*; -use crate::xml::{to_xml_with_header, xmlns_tag, IntValue, Value}; - -pub const X_AMZ_WEBSITE_REDIRECT_LOCATION: HeaderName = - HeaderName::from_static("x-amz-website-redirect-location"); +use garage_util::data::*; pub async fn handle_get_website(ctx: ReqCtx) -> Result, Error> { let ReqCtx { bucket_params, .. } = ctx; @@ -61,6 +60,7 @@ pub async fn handle_delete_website(ctx: ReqCtx) -> Result, Err pub async fn handle_put_website( ctx: ReqCtx, req: Request, + content_sha256: Option, ) -> Result, Error> { let ReqCtx { garage, @@ -69,7 +69,11 @@ pub async fn handle_put_website( .. } = ctx; - let body = req.into_body().collect().await?; + let body = BodyExt::collect(req.into_body()).await?.to_bytes(); + + if let Some(content_sha256) = content_sha256 { + verify_signed_content(content_sha256, &body[..])?; + } let conf: WebsiteConfiguration = from_reader(&body as &[u8])?; conf.validate()?; @@ -272,7 +276,7 @@ impl Redirect { return Err(Error::bad_request("Bad XML: invalid protocol")); } } - // TODO there are probably more invalid cases, but which ones? + // TODO there are probably more invalide cases, but which ones? Ok(()) } } diff --git a/src/api/s3/xml.rs b/src/api/s3/xml.rs index fdb36318..1e569ade 100644 --- a/src/api/s3/xml.rs +++ b/src/api/s3/xml.rs @@ -1,7 +1,7 @@ use quick_xml::se::to_string; use serde::{Deserialize, Serialize, Serializer}; -use crate::error::Error as ApiError; +use crate::s3::error::Error as ApiError; pub fn to_xml_with_header(x: &T) -> Result { let mut xml = r#""#.to_string(); @@ -13,10 +13,6 @@ pub fn xmlns_tag(_v: &(), s: S) -> Result { s.serialize_str("http://s3.amazonaws.com/doc/2006-03-01/") } -pub fn xmlns_xsi_tag(_v: &(), s: S) -> Result { - s.serialize_str("http://www.w3.org/2001/XMLSchema-instance") -} - #[derive(Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord)] pub struct Value(#[serde(rename = "$value")] pub String); @@ -323,42 +319,6 @@ pub struct PostObject { pub etag: Value, } -#[derive(Debug, Serialize, PartialEq, Eq)] -pub struct Grantee { - #[serde(rename = "xmlns:xsi", serialize_with = "xmlns_xsi_tag")] - pub xmlns_xsi: (), - #[serde(rename = "xsi:type")] - pub typ: String, - #[serde(rename = "DisplayName")] - pub display_name: Option, - #[serde(rename = "ID")] - pub id: Option, -} - -#[derive(Debug, Serialize, PartialEq, Eq)] -pub struct Grant { - #[serde(rename = "Grantee")] - pub grantee: Grantee, - #[serde(rename = "Permission")] - pub permission: Value, -} - -#[derive(Debug, Serialize, PartialEq, Eq)] -pub struct AccessControlList { - #[serde(rename = "Grant")] - pub entries: Vec, -} - -#[derive(Debug, Serialize, PartialEq, Eq)] -pub struct AccessControlPolicy { - #[serde(serialize_with = "xmlns_tag")] - pub xmlns: (), - #[serde(rename = "Owner")] - pub owner: Option, - #[serde(rename = "AccessControlList")] - pub acl: AccessControlList, -} - #[cfg(test)] mod tests { use super::*; @@ -467,43 +427,6 @@ mod tests { Ok(()) } - #[test] - fn get_bucket_acl_result() -> Result<(), ApiError> { - let grant = Grant { - grantee: Grantee { - xmlns_xsi: (), - typ: "CanonicalUser".to_string(), - display_name: Some(Value("owner_name".to_string())), - id: Some(Value("qsdfjklm".to_string())), - }, - permission: Value("FULL_CONTROL".to_string()), - }; - - let get_bucket_acl = AccessControlPolicy { - xmlns: (), - owner: None, - acl: AccessControlList { - entries: vec![grant], - }, - }; - assert_eq!( - to_xml_with_header(&get_bucket_acl)?, - "\ -\ - \ - \ - \ - owner_name\ - qsdfjklm\ - \ - FULL_CONTROL\ - \ - \ -" - ); - Ok(()) - } - #[test] fn delete_result() -> Result<(), ApiError> { let delete_result = DeleteResult { diff --git a/src/api/common/signature/error.rs b/src/api/signature/error.rs similarity index 67% rename from src/api/common/signature/error.rs rename to src/api/signature/error.rs index a1b353e1..2d92a072 100644 --- a/src/api/common/signature/error.rs +++ b/src/api/signature/error.rs @@ -1,4 +1,4 @@ -use thiserror::Error; +use err_derive::Error; use crate::common_error::CommonError; pub use crate::common_error::{CommonErrorDerivative, OkOrBadRequest, OkOrInternalError}; @@ -6,22 +6,18 @@ pub use crate::common_error::{CommonErrorDerivative, OkOrBadRequest, OkOrInterna /// Errors of this crate #[derive(Debug, Error)] pub enum Error { - #[error("{0}")] + #[error(display = "{}", _0)] /// Error from common error Common(CommonError), /// Authorization Header Malformed - #[error("Authorization header malformed, unexpected scope: {0}")] + #[error(display = "Authorization header malformed, unexpected scope: {}", _0)] AuthorizationHeaderMalformed(String), // Category: bad request /// The request contained an invalid UTF-8 sequence in its path or in other parameters - #[error("Invalid UTF-8: {0}")] - InvalidUtf8Str(#[from] std::str::Utf8Error), - - /// The provided digest (checksum) value was invalid - #[error("Invalid digest: {0}")] - InvalidDigest(String), + #[error(display = "Invalid UTF-8: {}", _0)] + InvalidUtf8Str(#[error(source)] std::str::Utf8Error), } impl From for Error diff --git a/src/api/signature/mod.rs b/src/api/signature/mod.rs new file mode 100644 index 00000000..6514da43 --- /dev/null +++ b/src/api/signature/mod.rs @@ -0,0 +1,78 @@ +use chrono::{DateTime, Utc}; +use hmac::{Hmac, Mac}; +use sha2::Sha256; + +use hyper::{body::Incoming as IncomingBody, Request}; + +use garage_model::garage::Garage; +use garage_model::key_table::Key; +use garage_util::data::{sha256sum, Hash}; + +use error::*; + +pub mod error; +pub mod payload; +pub mod streaming; + +pub const SHORT_DATE: &str = "%Y%m%d"; +pub const LONG_DATETIME: &str = "%Y%m%dT%H%M%SZ"; + +type HmacSha256 = Hmac; + +pub async fn verify_request( + garage: &Garage, + mut req: Request, + service: &'static str, +) -> Result<(Request, Key, Option), Error> { + let (api_key, mut content_sha256) = + payload::check_payload_signature(&garage, &mut req, service).await?; + let api_key = + api_key.ok_or_else(|| Error::forbidden("Garage does not support anonymous access yet"))?; + + let req = streaming::parse_streaming_body( + &api_key, + req, + &mut content_sha256, + &garage.config.s3_api.s3_region, + service, + )?; + + Ok((req, api_key, content_sha256)) +} + +pub fn verify_signed_content(expected_sha256: Hash, body: &[u8]) -> Result<(), Error> { + if expected_sha256 != sha256sum(body) { + return Err(Error::bad_request( + "Request content hash does not match signed hash".to_string(), + )); + } + Ok(()) +} + +pub fn signing_hmac( + datetime: &DateTime, + secret_key: &str, + region: &str, + service: &str, +) -> Result { + let secret = String::from("AWS4") + secret_key; + let mut date_hmac = HmacSha256::new_from_slice(secret.as_bytes())?; + date_hmac.update(datetime.format(SHORT_DATE).to_string().as_bytes()); + let mut region_hmac = HmacSha256::new_from_slice(&date_hmac.finalize().into_bytes())?; + region_hmac.update(region.as_bytes()); + let mut service_hmac = HmacSha256::new_from_slice(®ion_hmac.finalize().into_bytes())?; + service_hmac.update(service.as_bytes()); + let mut signing_hmac = HmacSha256::new_from_slice(&service_hmac.finalize().into_bytes())?; + signing_hmac.update(b"aws4_request"); + let hmac = HmacSha256::new_from_slice(&signing_hmac.finalize().into_bytes())?; + Ok(hmac) +} + +pub fn compute_scope(datetime: &DateTime, region: &str, service: &str) -> String { + format!( + "{}/{}/{}/aws4_request", + datetime.format(SHORT_DATE), + region, + service + ) +} diff --git a/src/api/common/signature/payload.rs b/src/api/signature/payload.rs similarity index 85% rename from src/api/common/signature/payload.rs rename to src/api/signature/payload.rs index 3939da19..d6ff62f0 100644 --- a/src/api/common/signature/payload.rs +++ b/src/api/signature/payload.rs @@ -13,9 +13,23 @@ use garage_util::data::Hash; use garage_model::garage::Garage; use garage_model::key_table::*; -use super::*; +use super::LONG_DATETIME; +use super::{compute_scope, signing_hmac}; use crate::encoding::uri_encode; +use crate::signature::error::*; + +pub const X_AMZ_ALGORITHM: HeaderName = HeaderName::from_static("x-amz-algorithm"); +pub const X_AMZ_CREDENTIAL: HeaderName = HeaderName::from_static("x-amz-credential"); +pub const X_AMZ_DATE: HeaderName = HeaderName::from_static("x-amz-date"); +pub const X_AMZ_EXPIRES: HeaderName = HeaderName::from_static("x-amz-expires"); +pub const X_AMZ_SIGNEDHEADERS: HeaderName = HeaderName::from_static("x-amz-signedheaders"); +pub const X_AMZ_SIGNATURE: HeaderName = HeaderName::from_static("x-amz-signature"); +pub const X_AMZ_CONTENT_SH256: HeaderName = HeaderName::from_static("x-amz-content-sha256"); + +pub const AWS4_HMAC_SHA256: &str = "AWS4-HMAC-SHA256"; +pub const UNSIGNED_PAYLOAD: &str = "UNSIGNED-PAYLOAD"; +pub const STREAMING_AWS4_HMAC_SHA256_PAYLOAD: &str = "STREAMING-AWS4-HMAC-SHA256-PAYLOAD"; pub type QueryMap = HeaderMap; pub struct QueryValue { @@ -25,23 +39,16 @@ pub struct QueryValue { value: String, } -#[derive(Debug)] -pub struct CheckedSignature { - pub key: Option, - pub content_sha256_header: ContentSha256Header, - pub signature_header: Option, -} - pub async fn check_payload_signature( garage: &Garage, request: &mut Request, service: &'static str, -) -> Result { +) -> Result<(Option, Option), Error> { let query = parse_query_map(request.uri())?; if query.contains_key(&X_AMZ_ALGORITHM) { - // We check for presigned-URL-style authentication first, because - // the browser or something else could inject an Authorization header + // We check for presigned-URL-style authentification first, because + // the browser or someting else could inject an Authorization header // that is totally unrelated to AWS signatures. check_presigned_signature(garage, service, request, query).await } else if request.headers().contains_key(AUTHORIZATION) { @@ -50,46 +57,17 @@ pub async fn check_payload_signature( // Unsigned (anonymous) request let content_sha256 = request .headers() - .get(X_AMZ_CONTENT_SHA256) - .map(|x| x.to_str()) - .transpose()?; - Ok(CheckedSignature { - key: None, - content_sha256_header: parse_x_amz_content_sha256(content_sha256)?, - signature_header: None, - }) - } -} - -fn parse_x_amz_content_sha256(header: Option<&str>) -> Result { - let header = match header { - Some(x) => x, - None => return Ok(ContentSha256Header::UnsignedPayload), - }; - if header == UNSIGNED_PAYLOAD { - Ok(ContentSha256Header::UnsignedPayload) - } else if let Some(rest) = header.strip_prefix("STREAMING-") { - let (trailer, algo) = if let Some(rest2) = rest.strip_suffix("-TRAILER") { - (true, rest2) + .get("x-amz-content-sha256") + .filter(|c| c.as_bytes() != UNSIGNED_PAYLOAD.as_bytes()); + if let Some(content_sha256) = content_sha256 { + let sha256 = hex::decode(content_sha256) + .ok() + .and_then(|bytes| Hash::try_from(&bytes)) + .ok_or_bad_request("Invalid content sha256 hash")?; + Ok((None, Some(sha256))) } else { - (false, rest) - }; - let signed = match algo { - AWS4_HMAC_SHA256_PAYLOAD => true, - UNSIGNED_PAYLOAD => false, - _ => { - return Err(Error::bad_request( - "invalid or unsupported x-amz-content-sha256", - )) - } - }; - Ok(ContentSha256Header::StreamingPayload { trailer, signed }) - } else { - let sha256 = hex::decode(header) - .ok() - .and_then(|bytes| Hash::try_from(&bytes)) - .ok_or_bad_request("Invalid content sha256 hash")?; - Ok(ContentSha256Header::Sha256Checksum(sha256)) + Ok((None, None)) + } } } @@ -98,13 +76,13 @@ async fn check_standard_signature( service: &'static str, request: &Request, query: QueryMap, -) -> Result { +) -> Result<(Option, Option), Error> { let authorization = Authorization::parse_header(request.headers())?; // Verify that all necessary request headers are included in signed_headers // The following must be included for all signatures: // - the Host header (mandatory) - // - all x-amz-* headers used in the request (except x-amz-content-sha256) + // - all x-amz-* headers used in the request // AWS also indicates that the Content-Type header should be signed if // it is used, but Minio client doesn't sign it so we don't check it for compatibility. let signed_headers = split_signed_headers(&authorization)?; @@ -130,13 +108,18 @@ async fn check_standard_signature( let key = verify_v4(garage, service, &authorization, string_to_sign.as_bytes()).await?; - let content_sha256_header = parse_x_amz_content_sha256(Some(&authorization.content_sha256))?; + let content_sha256 = if authorization.content_sha256 == UNSIGNED_PAYLOAD { + None + } else if authorization.content_sha256 == STREAMING_AWS4_HMAC_SHA256_PAYLOAD { + let bytes = hex::decode(authorization.signature).ok_or_bad_request("Invalid signature")?; + Some(Hash::try_from(&bytes).ok_or_bad_request("Invalid signature")?) + } else { + let bytes = hex::decode(authorization.content_sha256) + .ok_or_bad_request("Invalid content sha256 hash")?; + Some(Hash::try_from(&bytes).ok_or_bad_request("Invalid content sha256 hash")?) + }; - Ok(CheckedSignature { - key: Some(key), - content_sha256_header, - signature_header: Some(authorization.signature), - }) + Ok((Some(key), content_sha256)) } async fn check_presigned_signature( @@ -144,14 +127,14 @@ async fn check_presigned_signature( service: &'static str, request: &mut Request, mut query: QueryMap, -) -> Result { +) -> Result<(Option, Option), Error> { let algorithm = query.get(&X_AMZ_ALGORITHM).unwrap(); let authorization = Authorization::parse_presigned(&algorithm.value, &query)?; // Verify that all necessary request headers are included in signed_headers - // For AWSv4 pre-signed URLs, the following must be included: + // For AWSv4 pre-signed URLs, the following must be incldued: // - the Host header (mandatory) - // - all x-amz-* headers used in the request (except x-amz-content-sha256) + // - all x-amz-* headers used in the request let signed_headers = split_signed_headers(&authorization)?; verify_signed_headers(request.headers(), &signed_headers)?; @@ -210,11 +193,7 @@ async fn check_presigned_signature( // Presigned URLs always use UNSIGNED-PAYLOAD, // so there is no sha256 hash to return. - Ok(CheckedSignature { - key: Some(key), - content_sha256_header: ContentSha256Header::UnsignedPayload, - signature_header: Some(authorization.signature), - }) + Ok((Some(key), None)) } pub fn parse_query_map(uri: &http::uri::Uri) -> Result { @@ -268,9 +247,7 @@ fn verify_signed_headers(headers: &HeaderMap, signed_headers: &[HeaderName]) -> return Err(Error::bad_request("Header `Host` should be signed")); } for (name, _) in headers.iter() { - // Enforce signature of all x-amz-* headers, except x-amz-content-sh256 - // because it is included in the canonical request in all cases - if name.as_str().starts_with("x-amz-") && name != X_AMZ_CONTENT_SHA256 { + if name.as_str().starts_with("x-amz-") { if !signed_headers.contains(name) { return Err(Error::bad_request(format!( "Header `{}` should be signed", @@ -329,7 +306,7 @@ pub fn canonical_request( // Note that there is also the issue of path normalization, which I hope is unrelated to the // one of URI-encoding. At least in aws-sigv4 both parameters can be set independently, // and rusoto_signature does not seem to do any effective path normalization, even though - // it mentions it in the comments (same link to the source code as above). + // it mentions it in the comments (same link to the souce code as above). // We make the explicit choice of NOT normalizing paths in the K2V API because doing so // would make non-normalized paths invalid K2V partition keys, and we don't want that. let canonical_uri: std::borrow::Cow = if service != "s3" { @@ -419,7 +396,7 @@ pub async fn verify_v4( // ============ Authorization header, or X-Amz-* query params ========= pub struct Authorization { - pub key_id: String, + key_id: String, scope: String, signed_headers: String, signature: String, @@ -428,7 +405,7 @@ pub struct Authorization { } impl Authorization { - pub fn parse_header(headers: &HeaderMap) -> Result { + fn parse_header(headers: &HeaderMap) -> Result { let authorization = headers .get(AUTHORIZATION) .ok_or_bad_request("Missing authorization header")? @@ -465,12 +442,13 @@ impl Authorization { .to_string(); let content_sha256 = headers - .get(X_AMZ_CONTENT_SHA256) + .get(X_AMZ_CONTENT_SH256) .ok_or_bad_request("Missing X-Amz-Content-Sha256 field")?; let date = headers .get(X_AMZ_DATE) - .ok_or_bad_request("Missing X-Amz-Date field")? + .ok_or_bad_request("Missing X-Amz-Date field") + .map_err(Error::from)? .to_str()?; let date = parse_date(date)?; @@ -540,7 +518,7 @@ impl Authorization { }) } - pub fn parse_form(params: &HeaderMap) -> Result { + pub(crate) fn parse_form(params: &HeaderMap) -> Result { let algorithm = params .get(X_AMZ_ALGORITHM) .ok_or_bad_request("Missing X-Amz-Algorithm header")? diff --git a/src/api/signature/streaming.rs b/src/api/signature/streaming.rs new file mode 100644 index 00000000..e223d1b1 --- /dev/null +++ b/src/api/signature/streaming.rs @@ -0,0 +1,373 @@ +use std::pin::Pin; + +use chrono::{DateTime, NaiveDateTime, TimeZone, Utc}; +use futures::prelude::*; +use futures::task; +use garage_model::key_table::Key; +use hmac::Mac; +use http_body_util::StreamBody; +use hyper::body::{Bytes, Incoming as IncomingBody}; +use hyper::Request; + +use garage_util::data::Hash; + +use super::{compute_scope, sha256sum, HmacSha256, LONG_DATETIME}; + +use crate::helpers::*; +use crate::signature::error::*; +use crate::signature::payload::{ + STREAMING_AWS4_HMAC_SHA256_PAYLOAD, X_AMZ_CONTENT_SH256, X_AMZ_DATE, +}; + +pub const AWS4_HMAC_SHA256_PAYLOAD: &str = "AWS4-HMAC-SHA256-PAYLOAD"; + +pub type ReqBody = BoxBody; + +pub fn parse_streaming_body( + api_key: &Key, + req: Request, + content_sha256: &mut Option, + region: &str, + service: &str, +) -> Result, Error> { + match req.headers().get(X_AMZ_CONTENT_SH256) { + Some(header) if header == STREAMING_AWS4_HMAC_SHA256_PAYLOAD => { + let signature = content_sha256 + .take() + .ok_or_bad_request("No signature provided")?; + + let secret_key = &api_key + .state + .as_option() + .ok_or_internal_error("Deleted key state")? + .secret_key; + + let date = req + .headers() + .get(X_AMZ_DATE) + .ok_or_bad_request("Missing X-Amz-Date field")? + .to_str()?; + let date: NaiveDateTime = NaiveDateTime::parse_from_str(date, LONG_DATETIME) + .ok_or_bad_request("Invalid date")?; + let date: DateTime = Utc.from_utc_datetime(&date); + + let scope = compute_scope(&date, region, service); + let signing_hmac = crate::signature::signing_hmac(&date, secret_key, region, service) + .ok_or_internal_error("Unable to build signing HMAC")?; + + Ok(req.map(move |body| { + let stream = body_stream::<_, Error>(body); + let signed_payload_stream = + SignedPayloadStream::new(stream, signing_hmac, date, &scope, signature) + .map(|x| x.map(hyper::body::Frame::data)) + .map_err(Error::from); + ReqBody::new(StreamBody::new(signed_payload_stream)) + })) + } + _ => Ok(req.map(|body| ReqBody::new(http_body_util::BodyExt::map_err(body, Error::from)))), + } +} + +/// Result of `sha256("")` +const EMPTY_STRING_HEX_DIGEST: &str = + "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"; + +fn compute_streaming_payload_signature( + signing_hmac: &HmacSha256, + date: DateTime, + scope: &str, + previous_signature: Hash, + content_sha256: Hash, +) -> Result { + let string_to_sign = [ + AWS4_HMAC_SHA256_PAYLOAD, + &date.format(LONG_DATETIME).to_string(), + scope, + &hex::encode(previous_signature), + EMPTY_STRING_HEX_DIGEST, + &hex::encode(content_sha256), + ] + .join("\n"); + + let mut hmac = signing_hmac.clone(); + hmac.update(string_to_sign.as_bytes()); + + Ok(Hash::try_from(&hmac.finalize().into_bytes()).ok_or_internal_error("Invalid signature")?) +} + +mod payload { + use garage_util::data::Hash; + + pub enum Error { + Parser(nom::error::Error), + BadSignature, + } + + impl Error { + pub fn description(&self) -> &str { + match *self { + Error::Parser(ref e) => e.code.description(), + Error::BadSignature => "Bad signature", + } + } + } + + #[derive(Debug, Clone)] + pub struct Header { + pub size: usize, + pub signature: Hash, + } + + impl Header { + pub fn parse(input: &[u8]) -> nom::IResult<&[u8], Self, Error<&[u8]>> { + use nom::bytes::streaming::tag; + use nom::character::streaming::hex_digit1; + use nom::combinator::map_res; + use nom::number::streaming::hex_u32; + + macro_rules! try_parse { + ($expr:expr) => { + $expr.map_err(|e| e.map(Error::Parser))? + }; + } + + let (input, size) = try_parse!(hex_u32(input)); + let (input, _) = try_parse!(tag(";")(input)); + + let (input, _) = try_parse!(tag("chunk-signature=")(input)); + let (input, data) = try_parse!(map_res(hex_digit1, hex::decode)(input)); + let signature = Hash::try_from(&data).ok_or(nom::Err::Failure(Error::BadSignature))?; + + let (input, _) = try_parse!(tag("\r\n")(input)); + + let header = Header { + size: size as usize, + signature, + }; + + Ok((input, header)) + } + } +} + +#[derive(Debug)] +pub enum SignedPayloadStreamError { + Stream(Error), + InvalidSignature, + Message(String), +} + +impl SignedPayloadStreamError { + fn message(msg: &str) -> Self { + SignedPayloadStreamError::Message(msg.into()) + } +} + +impl From for Error { + fn from(err: SignedPayloadStreamError) -> Self { + match err { + SignedPayloadStreamError::Stream(e) => e, + SignedPayloadStreamError::InvalidSignature => { + Error::bad_request("Invalid payload signature") + } + SignedPayloadStreamError::Message(e) => { + Error::bad_request(format!("Chunk format error: {}", e)) + } + } + } +} + +impl From> for SignedPayloadStreamError { + fn from(err: payload::Error) -> Self { + Self::message(err.description()) + } +} + +impl From> for SignedPayloadStreamError { + fn from(err: nom::error::Error) -> Self { + Self::message(err.code.description()) + } +} + +struct SignedPayload { + header: payload::Header, + data: Bytes, +} + +#[pin_project::pin_project] +pub struct SignedPayloadStream +where + S: Stream>, +{ + #[pin] + stream: S, + buf: bytes::BytesMut, + datetime: DateTime, + scope: String, + signing_hmac: HmacSha256, + previous_signature: Hash, +} + +impl SignedPayloadStream +where + S: Stream>, +{ + pub fn new( + stream: S, + signing_hmac: HmacSha256, + datetime: DateTime, + scope: &str, + seed_signature: Hash, + ) -> Self { + Self { + stream, + buf: bytes::BytesMut::new(), + datetime, + scope: scope.into(), + signing_hmac, + previous_signature: seed_signature, + } + } + + fn parse_next(input: &[u8]) -> nom::IResult<&[u8], SignedPayload, SignedPayloadStreamError> { + use nom::bytes::streaming::{tag, take}; + + macro_rules! try_parse { + ($expr:expr) => { + $expr.map_err(nom::Err::convert)? + }; + } + + let (input, header) = try_parse!(payload::Header::parse(input)); + + // 0-sized chunk is the last + if header.size == 0 { + return Ok(( + input, + SignedPayload { + header, + data: Bytes::new(), + }, + )); + } + + let (input, data) = try_parse!(take::<_, _, nom::error::Error<_>>(header.size)(input)); + let (input, _) = try_parse!(tag::<_, _, nom::error::Error<_>>("\r\n")(input)); + + let data = Bytes::from(data.to_vec()); + + Ok((input, SignedPayload { header, data })) + } +} + +impl Stream for SignedPayloadStream +where + S: Stream> + Unpin, +{ + type Item = Result; + + fn poll_next( + self: Pin<&mut Self>, + cx: &mut task::Context<'_>, + ) -> task::Poll> { + use std::task::Poll; + + let mut this = self.project(); + + loop { + let (input, payload) = match Self::parse_next(this.buf) { + Ok(res) => res, + Err(nom::Err::Incomplete(_)) => { + match futures::ready!(this.stream.as_mut().poll_next(cx)) { + Some(Ok(bytes)) => { + this.buf.extend(bytes); + continue; + } + Some(Err(e)) => { + return Poll::Ready(Some(Err(SignedPayloadStreamError::Stream(e)))) + } + None => { + return Poll::Ready(Some(Err(SignedPayloadStreamError::message( + "Unexpected EOF", + )))); + } + } + } + Err(nom::Err::Error(e)) | Err(nom::Err::Failure(e)) => { + return Poll::Ready(Some(Err(e))) + } + }; + + // 0-sized chunk is the last + if payload.data.is_empty() { + return Poll::Ready(None); + } + + let data_sha256sum = sha256sum(&payload.data); + + let expected_signature = compute_streaming_payload_signature( + this.signing_hmac, + *this.datetime, + this.scope, + *this.previous_signature, + data_sha256sum, + ) + .map_err(|e| { + SignedPayloadStreamError::Message(format!("Could not build signature: {}", e)) + })?; + + if payload.header.signature != expected_signature { + return Poll::Ready(Some(Err(SignedPayloadStreamError::InvalidSignature))); + } + + *this.buf = input.into(); + *this.previous_signature = payload.header.signature; + + return Poll::Ready(Some(Ok(payload.data))); + } + } + + fn size_hint(&self) -> (usize, Option) { + self.stream.size_hint() + } +} + +#[cfg(test)] +mod tests { + use futures::prelude::*; + + use super::{SignedPayloadStream, SignedPayloadStreamError}; + + #[tokio::test] + async fn test_interrupted_signed_payload_stream() { + use chrono::{DateTime, Utc}; + + use garage_util::data::Hash; + + let datetime = DateTime::parse_from_rfc3339("2021-12-13T13:12:42+01:00") // TODO UNIX 0 + .unwrap() + .with_timezone(&Utc); + let secret_key = "test"; + let region = "test"; + let scope = crate::signature::compute_scope(&datetime, region, "s3"); + let signing_hmac = + crate::signature::signing_hmac(&datetime, secret_key, region, "s3").unwrap(); + + let data: &[&[u8]] = &[b"1"]; + let body = futures::stream::iter(data.iter().map(|block| Ok(block.to_vec().into()))); + + let seed_signature = Hash::default(); + + let mut stream = + SignedPayloadStream::new(body, signing_hmac, datetime, &scope, seed_signature); + + assert!(stream.try_next().await.is_err()); + match stream.try_next().await { + Err(SignedPayloadStreamError::Message(msg)) if msg == "Unexpected EOF" => {} + item => panic!( + "Unexpected result, expected early EOF error, got {:?}", + item + ), + } + } +} diff --git a/src/block/Cargo.toml b/src/block/Cargo.toml index c4dbba44..7eb6bca8 100644 --- a/src/block/Cargo.toml +++ b/src/block/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "garage_block" -version = "1.3.1" +version = "1.0.0" authors = ["Alex Auvolat "] edition = "2018" license = "AGPL-3.0" @@ -34,8 +34,10 @@ async-compression.workspace = true zstd.workspace = true serde.workspace = true +serde_bytes.workspace = true futures.workspace = true +futures-util.workspace = true tokio.workspace = true tokio-util.workspace = true diff --git a/src/block/layout.rs b/src/block/layout.rs index 00e3debb..e78f3f08 100644 --- a/src/block/layout.rs +++ b/src/block/layout.rs @@ -279,8 +279,7 @@ impl DataLayout { u16::from_be_bytes([ hash.as_slice()[HASH_DRIVE_BYTES.0], hash.as_slice()[HASH_DRIVE_BYTES.1], - ]) as usize - % DRIVE_NPART + ]) as usize % DRIVE_NPART } fn block_dir_from(&self, hash: &Hash, dir: &PathBuf) -> PathBuf { diff --git a/src/block/manager.rs b/src/block/manager.rs index 96ca9c90..40b177a2 100644 --- a/src/block/manager.rs +++ b/src/block/manager.rs @@ -4,6 +4,7 @@ use std::sync::Arc; use std::time::Duration; use arc_swap::{ArcSwap, ArcSwapOption}; +use async_trait::async_trait; use bytes::Bytes; use rand::prelude::*; use serde::{Deserialize, Serialize}; @@ -50,8 +51,6 @@ pub const INLINE_THRESHOLD: usize = 3072; // to delete the block locally. pub(crate) const BLOCK_GC_DELAY: Duration = Duration::from_secs(600); -const BLOCK_READ_SEMAPHORE_TIMEOUT: Duration = Duration::from_secs(15); - /// RPC messages used to share blocks of data between nodes #[derive(Debug, Serialize, Deserialize)] pub enum BlockRpc { @@ -89,7 +88,6 @@ pub struct BlockManager { disable_scrub: bool, mutation_lock: Vec>, - read_semaphore: Semaphore, pub rc: BlockRc, pub resync: BlockResyncManager, @@ -179,8 +177,6 @@ impl BlockManager { .iter() .map(|_| Mutex::new(BlockManagerLocked())) .collect::>(), - - read_semaphore: Semaphore::new(config.block_max_concurrent_reads), rc, resync, system, @@ -375,7 +371,7 @@ impl BlockManager { prevent_compression: bool, order_tag: Option, ) -> Result<(), Error> { - let who = self.system.cluster_layout().current_storage_nodes_of(&hash); + let who = self.replication.write_sets(&hash); let compression_level = self.compression_level.filter(|_| !prevent_compression); let (header, bytes) = DataBlock::from_buffer(data, compression_level) @@ -401,7 +397,7 @@ impl BlockManager { .rpc_helper() .try_write_many_sets( &self.endpoint, - &[who], + who.as_ref(), put_block_rpc, RequestStrategy::with_priority(PRIO_NORMAL | PRIO_SECONDARY) .with_drop_on_completion(permit) @@ -413,8 +409,8 @@ impl BlockManager { } /// Get number of items in the refcount table - pub fn rc_approximate_len(&self) -> Result { - Ok(self.rc.rc_table.approximate_len()?) + pub fn rc_len(&self) -> Result { + Ok(self.rc.rc_table.len()?) } /// Send command to start/stop/manager scrub worker @@ -432,7 +428,7 @@ impl BlockManager { /// List all resync errors pub fn list_resync_errors(&self) -> Result, Error> { - let mut blocks = Vec::with_capacity(self.resync.errors.approximate_len()?); + let mut blocks = Vec::with_capacity(self.resync.errors.len()?); for ent in self.resync.errors.iter()? { let (hash, cnt) = ent?; let cnt = ErrorCounter::decode(&cnt); @@ -562,6 +558,9 @@ impl BlockManager { match self.find_block(hash).await { Some(p) => self.read_block_from(hash, &p).await, None => { + // Not found but maybe we should have had it ?? + self.resync + .put_to_resync(hash, 2 * self.system.rpc_helper().rpc_timeout())?; return Err(Error::Message(format!( "block {:?} not found on node", hash @@ -583,15 +582,6 @@ impl BlockManager { ) -> Result { let (header, path) = block_path.as_parts_ref(); - let permit = tokio::select! { - sem = self.read_semaphore.acquire() => sem.ok_or_message("acquire read semaphore")?, - _ = tokio::time::sleep(BLOCK_READ_SEMAPHORE_TIMEOUT) => { - self.metrics.block_read_semaphore_timeouts.add(1); - debug!("read block {:?}: read_semaphore acquire timeout", hash); - return Err(Error::Message("read block: read_semaphore acquire timeout".into())); - } - }; - let mut f = fs::File::open(&path).await?; let mut data = vec![]; f.read_to_end(&mut data).await?; @@ -616,8 +606,6 @@ impl BlockManager { return Err(Error::CorruptData(*hash)); } - drop(permit); - Ok(data) } @@ -681,12 +669,10 @@ impl BlockManager { hash: &Hash, wrong_path: DataBlockPath, ) -> Result { - let data = self.read_block_from(hash, &wrong_path).await?; self.lock_mutate(hash) .await - .write_block_inner(hash, &data, self, Some(wrong_path)) - .await?; - Ok(data.as_parts_ref().1.len()) + .fix_block_location(hash, wrong_path, self) + .await } async fn lock_mutate(&self, hash: &Hash) -> MutexGuard<'_, BlockManagerLocked> { @@ -702,6 +688,7 @@ impl BlockManager { } } +#[async_trait] impl StreamingEndpointHandler for BlockManager { async fn handle(self: &Arc, mut message: Req, _from: NodeID) -> Resp { match message.msg() { @@ -783,7 +770,6 @@ impl BlockManagerLocked { let mut f = fs::File::create(&path_tmp).await?; f.write_all(data).await?; - f.flush().await?; mgr.metrics.bytes_written.add(data.len() as u64); if mgr.data_fsync { @@ -843,6 +829,18 @@ impl BlockManagerLocked { } Ok(()) } + + async fn fix_block_location( + &self, + hash: &Hash, + wrong_path: DataBlockPath, + mgr: &BlockManager, + ) -> Result { + let data = mgr.read_block_from(hash, &wrong_path).await?; + self.write_block_inner(hash, &data, mgr, Some(wrong_path)) + .await?; + Ok(data.as_parts_ref().1.len()) + } } struct DeleteOnDrop(Option); diff --git a/src/block/metrics.rs b/src/block/metrics.rs index 81021fe1..2d41e365 100644 --- a/src/block/metrics.rs +++ b/src/block/metrics.rs @@ -22,7 +22,6 @@ pub struct BlockManagerMetrics { pub(crate) bytes_read: BoundCounter, pub(crate) block_read_duration: BoundValueRecorder, - pub(crate) block_read_semaphore_timeouts: BoundCounter, pub(crate) bytes_written: BoundCounter, pub(crate) block_write_duration: BoundValueRecorder, pub(crate) delete_counter: BoundCounter, @@ -51,7 +50,7 @@ impl BlockManagerMetrics { .init(), _rc_size: meter .u64_value_observer("block.rc_size", move |observer| { - if let Ok(value) = rc_tree.approximate_len() { + if let Ok(value) = rc_tree.len() { observer.observe(value as u64, &[]) } }) @@ -59,7 +58,7 @@ impl BlockManagerMetrics { .init(), _resync_queue_len: meter .u64_value_observer("block.resync_queue_length", move |observer| { - if let Ok(value) = resync_queue.approximate_len() { + if let Ok(value) = resync_queue.len() { observer.observe(value as u64, &[]); } }) @@ -69,7 +68,7 @@ impl BlockManagerMetrics { .init(), _resync_errored_blocks: meter .u64_value_observer("block.resync_errored_blocks", move |observer| { - if let Ok(value) = resync_errors.approximate_len() { + if let Ok(value) = resync_errors.len() { observer.observe(value as u64, &[]); } }) @@ -120,11 +119,6 @@ impl BlockManagerMetrics { .with_description("Duration of block read operations") .init() .bind(&[]), - block_read_semaphore_timeouts: meter - .u64_counter("block.read_semaphore_timeouts") - .with_description("Number of block reads that failed due to semaphore acquire timeout") - .init() - .bind(&[]), bytes_written: meter .u64_counter("block.bytes_written") .with_description("Number of bytes written to disk") diff --git a/src/block/resync.rs b/src/block/resync.rs index 7056a828..ab4604ad 100644 --- a/src/block/resync.rs +++ b/src/block/resync.rs @@ -105,14 +105,14 @@ impl BlockResyncManager { } } - /// Get length of resync queue - pub fn queue_approximate_len(&self) -> Result { - Ok(self.queue.approximate_len()?) + /// Get lenght of resync queue + pub fn queue_len(&self) -> Result { + Ok(self.queue.len()?) } /// Get number of blocks that have an error - pub fn errors_approximate_len(&self) -> Result { - Ok(self.errors.approximate_len()?) + pub fn errors_len(&self) -> Result { + Ok(self.errors.len()?) } /// Clear the error counter for a block and put it in queue immediately @@ -133,14 +133,6 @@ impl BlockResyncManager { ))) } - /// Clear the entire resync queue and list of errored blocks - /// Corresponds to `garage repair clear-resync-queue` - pub fn clear_resync_queue(&self) -> Result<(), Error> { - self.queue.clear()?; - self.errors.clear()?; - Ok(()) - } - pub fn register_bg_vars(&self, vars: &mut vars::BgVars) { let notify = self.notify.clone(); vars.register_rw( @@ -193,10 +185,10 @@ impl BlockResyncManager { // // - resync.errors: a tree that indicates for each block // if the last resync resulted in an error, and if so, - // the following two information (see the ErrorCounter struct): + // the following two informations (see the ErrorCounter struct): // - how many consecutive resync errors for this block? // - when was the last try? - // These two information are used to implement an + // These two informations are used to implement an // exponential backoff retry strategy. // The key in this tree is the 32-byte hash of the block, // and the value is the encoded ErrorCounter value. @@ -385,10 +377,7 @@ impl BlockResyncManager { info!("Resync block {:?}: offloading and deleting", hash); let existing_path = existing_path.unwrap(); - let mut who = manager - .system - .cluster_layout() - .current_storage_nodes_of(hash); + let mut who = manager.replication.storage_nodes(hash); if who.len() < manager.replication.write_quorum() { return Err(Error::Message("Not trying to offload block because we don't have a quorum of nodes to write to".to_string())); } @@ -466,25 +455,6 @@ impl BlockResyncManager { } if rc.is_nonzero() && !exists { - // The refcount is > 0, and the block is not present locally. - // We might need to fetch it from another node. - - // First, check whether we are still supposed to store that - // block in the latest cluster layout version. - let storage_nodes = manager - .system - .cluster_layout() - .current_storage_nodes_of(&hash); - - if !storage_nodes.contains(&manager.system.id) { - info!( - "Resync block {:?}: block is absent with refcount > 0, but it will drop to zero after all metadata is synced. Not fetching the block.", - hash - ); - return Ok(()); - } - - // We know we need the block. Fetch it. info!( "Resync block {:?}: fetching absent but needed block (refcount > 0)", hash @@ -556,11 +526,9 @@ impl Worker for ResyncWorker { } WorkerStatus { - queue_length: Some(self.manager.resync.queue_approximate_len().unwrap_or(0) as u64), + queue_length: Some(self.manager.resync.queue_len().unwrap_or(0) as u64), tranquility: Some(tranquility), - persistent_errors: Some( - self.manager.resync.errors_approximate_len().unwrap_or(0) as u64 - ), + persistent_errors: Some(self.manager.resync.errors_len().unwrap_or(0) as u64), ..Default::default() } } diff --git a/src/db/Cargo.toml b/src/db/Cargo.toml index 9e860e7d..aefbb960 100644 --- a/src/db/Cargo.toml +++ b/src/db/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "garage_db" -version = "1.3.1" +version = "1.0.0" authors = ["Alex Auvolat "] edition = "2018" license = "AGPL-3.0" @@ -12,18 +12,16 @@ readme = "../../README.md" path = "lib.rs" [dependencies] -thiserror.workspace = true +err-derive.workspace = true +hexdump.workspace = true tracing.workspace = true +opentelemetry.workspace = true heed = { workspace = true, optional = true } - rusqlite = { workspace = true, optional = true, features = ["backup"] } r2d2 = { workspace = true, optional = true } r2d2_sqlite = { workspace = true, optional = true } -fjall = { workspace = true, optional = true } -parking_lot = { workspace = true, optional = true } - [dev-dependencies] mktemp.workspace = true @@ -31,5 +29,4 @@ mktemp.workspace = true default = [ "lmdb", "sqlite" ] bundled-libs = [ "rusqlite?/bundled" ] lmdb = [ "heed" ] -fjall = [ "dep:fjall", "dep:parking_lot" ] sqlite = [ "rusqlite", "r2d2", "r2d2_sqlite" ] diff --git a/src/db/fjall_adapter.rs b/src/db/fjall_adapter.rs deleted file mode 100644 index 25913a1f..00000000 --- a/src/db/fjall_adapter.rs +++ /dev/null @@ -1,453 +0,0 @@ -use core::ops::Bound; - -use std::path::PathBuf; -use std::sync::Arc; - -use parking_lot::{MappedRwLockReadGuard, RwLock, RwLockReadGuard}; - -use fjall::{ - PartitionCreateOptions, PersistMode, TransactionalKeyspace, TransactionalPartitionHandle, - WriteTransaction, -}; - -use crate::{ - open::{Engine, OpenOpt}, - Db, Error, IDb, ITx, ITxFn, OnCommit, Result, TxError, TxFnResult, TxOpError, TxOpResult, - TxResult, TxValueIter, Value, ValueIter, -}; - -pub use fjall; - -// -- - -pub(crate) fn open_db(path: &PathBuf, opt: &OpenOpt) -> Result { - info!("Opening Fjall database at: {}", path.display()); - if opt.fsync { - return Err(Error( - "metadata_fsync is not supported with the Fjall database engine".into(), - )); - } - let mut config = fjall::Config::new(path); - if let Some(block_cache_size) = opt.fjall_block_cache_size { - config = config.cache_size(block_cache_size as u64); - } - let keyspace = config.open_transactional()?; - Ok(FjallDb::init(keyspace)) -} - -// -- err - -impl From for Error { - fn from(e: fjall::Error) -> Error { - Error(format!("fjall: {}", e).into()) - } -} - -impl From for Error { - fn from(e: fjall::LsmError) -> Error { - Error(format!("fjall lsm_tree: {}", e).into()) - } -} - -impl From for TxOpError { - fn from(e: fjall::Error) -> TxOpError { - TxOpError(e.into()) - } -} - -// -- db - -pub struct FjallDb { - keyspace: TransactionalKeyspace, - trees: RwLock>, -} - -type ByteRefRangeBound<'r> = (Bound<&'r [u8]>, Bound<&'r [u8]>); - -impl FjallDb { - pub fn init(keyspace: TransactionalKeyspace) -> Db { - let s = Self { - keyspace, - trees: RwLock::new(Vec::new()), - }; - Db(Arc::new(s)) - } - - fn get_tree( - &self, - i: usize, - ) -> Result> { - RwLockReadGuard::try_map(self.trees.read(), |trees: &Vec<_>| { - trees.get(i).map(|tup| &tup.1) - }) - .map_err(|_| Error("invalid tree id".into())) - } -} - -impl IDb for FjallDb { - fn engine(&self) -> String { - "Fjall (EXPERIMENTAL!)".into() - } - - fn open_tree(&self, name: &str) -> Result { - let mut trees = self.trees.write(); - let safe_name = encode_name(name)?; - if let Some(i) = trees.iter().position(|(name, _)| *name == safe_name) { - Ok(i) - } else { - let tree = self - .keyspace - .open_partition(&safe_name, PartitionCreateOptions::default())?; - let i = trees.len(); - trees.push((safe_name, tree)); - Ok(i) - } - } - - fn list_trees(&self) -> Result> { - Ok(self - .keyspace - .list_partitions() - .iter() - .map(|n| decode_name(&n)) - .collect::>>()?) - } - - fn snapshot(&self, base_path: &PathBuf) -> Result<()> { - std::fs::create_dir_all(base_path)?; - let path = Engine::Fjall.db_path(base_path); - - let source_state = self.keyspace.read_tx(); - let copy_keyspace = fjall::Config::new(path).open()?; - - for partition_name in self.keyspace.list_partitions() { - let source_partition = self - .keyspace - .open_partition(&partition_name, PartitionCreateOptions::default())?; - let copy_partition = - copy_keyspace.open_partition(&partition_name, PartitionCreateOptions::default())?; - - for entry in source_state.iter(&source_partition) { - let (key, value) = entry?; - copy_partition.insert(key, value)?; - } - } - - copy_keyspace.persist(PersistMode::SyncAll)?; - Ok(()) - } - - // ---- - - fn get(&self, tree_idx: usize, key: &[u8]) -> Result> { - let tree = self.get_tree(tree_idx)?; - let tx = self.keyspace.read_tx(); - let val = tx.get(&tree, key)?; - match val { - None => Ok(None), - Some(v) => Ok(Some(v.to_vec())), - } - } - - fn approximate_len(&self, tree_idx: usize) -> Result { - let tree = self.get_tree(tree_idx)?; - Ok(tree.approximate_len()) - } - fn is_empty(&self, tree_idx: usize) -> Result { - let tree = self.get_tree(tree_idx)?; - let tx = self.keyspace.read_tx(); - Ok(tx.is_empty(&tree)?) - } - - fn insert(&self, tree_idx: usize, key: &[u8], value: &[u8]) -> Result<()> { - let tree = self.get_tree(tree_idx)?; - let mut tx = self.keyspace.write_tx(); - tx.insert(&tree, key, value); - tx.commit()?; - Ok(()) - } - - fn remove(&self, tree_idx: usize, key: &[u8]) -> Result<()> { - let tree = self.get_tree(tree_idx)?; - let mut tx = self.keyspace.write_tx(); - tx.remove(&tree, key); - tx.commit()?; - Ok(()) - } - - fn clear(&self, tree_idx: usize) -> Result<()> { - let mut trees = self.trees.write(); - - if tree_idx >= trees.len() { - return Err(Error("invalid tree id".into())); - } - let (name, tree) = trees.remove(tree_idx); - - self.keyspace.delete_partition(tree)?; - let tree = self - .keyspace - .open_partition(&name, PartitionCreateOptions::default())?; - trees.insert(tree_idx, (name, tree)); - - Ok(()) - } - - fn iter(&self, tree_idx: usize) -> Result> { - let tree = self.get_tree(tree_idx)?; - let tx = self.keyspace.read_tx(); - Ok(Box::new(tx.iter(&tree).map(iterator_remap))) - } - - fn iter_rev(&self, tree_idx: usize) -> Result> { - let tree = self.get_tree(tree_idx)?; - let tx = self.keyspace.read_tx(); - Ok(Box::new(tx.iter(&tree).rev().map(iterator_remap))) - } - - fn range<'r>( - &self, - tree_idx: usize, - low: Bound<&'r [u8]>, - high: Bound<&'r [u8]>, - ) -> Result> { - let tree = self.get_tree(tree_idx)?; - let tx = self.keyspace.read_tx(); - Ok(Box::new( - tx.range::<&'r [u8], ByteRefRangeBound>(&tree, (low, high)) - .map(iterator_remap), - )) - } - fn range_rev<'r>( - &self, - tree_idx: usize, - low: Bound<&'r [u8]>, - high: Bound<&'r [u8]>, - ) -> Result> { - let tree = self.get_tree(tree_idx)?; - let tx = self.keyspace.read_tx(); - Ok(Box::new( - tx.range::<&'r [u8], ByteRefRangeBound>(&tree, (low, high)) - .rev() - .map(iterator_remap), - )) - } - - // ---- - - fn transaction(&self, f: &dyn ITxFn) -> TxResult { - let trees = self.trees.read(); - let mut tx = FjallTx { - trees: &trees[..], - tx: self.keyspace.write_tx(), - }; - - let res = f.try_on(&mut tx); - match res { - TxFnResult::Ok(on_commit) => { - tx.tx.commit().map_err(Error::from).map_err(TxError::Db)?; - Ok(on_commit) - } - TxFnResult::Abort => { - tx.tx.rollback(); - Err(TxError::Abort(())) - } - TxFnResult::DbErr => { - tx.tx.rollback(); - Err(TxError::Db(Error( - "(this message will be discarded)".into(), - ))) - } - } - } -} - -// ---- - -struct FjallTx<'a> { - trees: &'a [(String, TransactionalPartitionHandle)], - tx: WriteTransaction<'a>, -} - -impl<'a> FjallTx<'a> { - fn get_tree(&self, i: usize) -> TxOpResult<&TransactionalPartitionHandle> { - self.trees.get(i).map(|tup| &tup.1).ok_or_else(|| { - TxOpError(Error( - "invalid tree id (it might have been openned after the transaction started)".into(), - )) - }) - } -} - -impl<'a> ITx for FjallTx<'a> { - fn get(&self, tree_idx: usize, key: &[u8]) -> TxOpResult> { - let tree = self.get_tree(tree_idx)?; - match self.tx.get(tree, key)? { - Some(v) => Ok(Some(v.to_vec())), - None => Ok(None), - } - } - fn len(&self, tree_idx: usize) -> TxOpResult { - let tree = self.get_tree(tree_idx)?; - Ok(self.tx.len(tree)? as usize) - } - - fn insert(&mut self, tree_idx: usize, key: &[u8], value: &[u8]) -> TxOpResult<()> { - let tree = self.get_tree(tree_idx)?.clone(); - self.tx.insert(&tree, key, value); - Ok(()) - } - fn remove(&mut self, tree_idx: usize, key: &[u8]) -> TxOpResult<()> { - let tree = self.get_tree(tree_idx)?.clone(); - self.tx.remove(&tree, key); - Ok(()) - } - fn clear(&mut self, _tree_idx: usize) -> TxOpResult<()> { - unimplemented!("LSM tree clearing in cross-partition transaction is not supported") - } - - fn iter(&self, tree_idx: usize) -> TxOpResult> { - let tree = self.get_tree(tree_idx)?.clone(); - Ok(Box::new(self.tx.iter(&tree).map(iterator_remap_tx))) - } - fn iter_rev(&self, tree_idx: usize) -> TxOpResult> { - let tree = self.get_tree(tree_idx)?.clone(); - Ok(Box::new(self.tx.iter(&tree).rev().map(iterator_remap_tx))) - } - - fn range<'r>( - &self, - tree_idx: usize, - low: Bound<&'r [u8]>, - high: Bound<&'r [u8]>, - ) -> TxOpResult> { - let tree = self.get_tree(tree_idx)?; - let low = clone_bound(low); - let high = clone_bound(high); - Ok(Box::new( - self.tx - .range::, ByteVecRangeBounds>(&tree, (low, high)) - .map(iterator_remap_tx), - )) - } - fn range_rev<'r>( - &self, - tree_idx: usize, - low: Bound<&'r [u8]>, - high: Bound<&'r [u8]>, - ) -> TxOpResult> { - let tree = self.get_tree(tree_idx)?; - let low = clone_bound(low); - let high = clone_bound(high); - Ok(Box::new( - self.tx - .range::, ByteVecRangeBounds>(&tree, (low, high)) - .rev() - .map(iterator_remap_tx), - )) - } -} - -// -- maps fjall's (k, v) to ours - -fn iterator_remap(r: fjall::Result<(fjall::Slice, fjall::Slice)>) -> Result<(Value, Value)> { - r.map(|(k, v)| (k.to_vec(), v.to_vec())) - .map_err(|e| e.into()) -} - -fn iterator_remap_tx(r: fjall::Result<(fjall::Slice, fjall::Slice)>) -> TxOpResult<(Value, Value)> { - r.map(|(k, v)| (k.to_vec(), v.to_vec())) - .map_err(|e| e.into()) -} - -// -- utils to deal with Garage's tightness on Bound lifetimes - -type ByteVecBound = Bound>; -type ByteVecRangeBounds = (ByteVecBound, ByteVecBound); - -fn clone_bound(bound: Bound<&[u8]>) -> ByteVecBound { - let value = match bound { - Bound::Excluded(v) | Bound::Included(v) => v.to_vec(), - Bound::Unbounded => vec![], - }; - - match bound { - Bound::Included(_) => Bound::Included(value), - Bound::Excluded(_) => Bound::Excluded(value), - Bound::Unbounded => Bound::Unbounded, - } -} - -// -- utils to encode table names -- - -fn encode_name(s: &str) -> Result { - let base = 'A' as u32; - - let mut ret = String::with_capacity(s.len() + 10); - for c in s.chars() { - if c.is_alphanumeric() || c == '_' || c == '-' || c == '#' { - ret.push(c); - } else if c <= u8::MAX as char { - ret.push('$'); - let c_hi = c as u32 / 16; - let c_lo = c as u32 % 16; - ret.push(char::from_u32(base + c_hi).unwrap()); - ret.push(char::from_u32(base + c_lo).unwrap()); - } else { - return Err(Error( - format!("table name {} could not be safely encoded", s).into(), - )); - } - } - Ok(ret) -} - -fn decode_name(s: &str) -> Result { - use std::convert::TryFrom; - - let errfn = || Error(format!("encoded table name {} is invalid", s).into()); - let c_map = |c: char| { - let c = c as u32; - let base = 'A' as u32; - if (base..base + 16).contains(&c) { - Some(c - base) - } else { - None - } - }; - - let mut ret = String::with_capacity(s.len()); - let mut it = s.chars(); - while let Some(c) = it.next() { - if c == '$' { - let c_hi = it.next().and_then(c_map).ok_or_else(errfn)?; - let c_lo = it.next().and_then(c_map).ok_or_else(errfn)?; - let c_dec = char::try_from(c_hi * 16 + c_lo).map_err(|_| errfn())?; - ret.push(c_dec); - } else { - ret.push(c); - } - } - Ok(ret) -} - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn test_encdec_name() { - for name in [ - "testname", - "test_name", - "test name", - "test$name", - "test:name@help.me$get/this**right", - ] { - let encname = encode_name(name).unwrap(); - assert!(!encname.contains(' ')); - assert!(!encname.contains('.')); - assert!(!encname.contains('*')); - assert_eq!(*name, decode_name(&encname).unwrap()); - } - } -} diff --git a/src/db/lib.rs b/src/db/lib.rs index 2a467c7c..504f1b4c 100644 --- a/src/db/lib.rs +++ b/src/db/lib.rs @@ -1,10 +1,11 @@ #[macro_use] extern crate tracing; -#[cfg(feature = "fjall")] -pub mod fjall_adapter; #[cfg(feature = "lmdb")] pub mod lmdb_adapter; +#[cfg(feature = "lmdb")] +pub mod metric_proxy; + #[cfg(feature = "sqlite")] pub mod sqlite_adapter; @@ -20,7 +21,7 @@ use std::cell::Cell; use std::path::PathBuf; use std::sync::Arc; -use thiserror::Error; +use err_derive::Error; pub use open::*; @@ -44,7 +45,7 @@ pub type TxValueIter<'a> = Box); impl From for Error { @@ -56,7 +57,7 @@ impl From for Error { pub type Result = std::result::Result; #[derive(Debug, Error)] -#[error("{0}")] +#[error(display = "{}", _0)] pub struct TxOpError(pub(crate) Error); pub type TxOpResult = std::result::Result; @@ -106,44 +107,32 @@ impl Db { result: Cell::new(None), }; let tx_res = self.0.transaction(&f); - let fn_res = f.result.into_inner(); + let ret = f + .result + .into_inner() + .expect("Transaction did not store result"); - match (tx_res, fn_res) { - (Ok(on_commit), Some(Ok(value))) => { - // Transaction succeeded - // TxFn stored the value to return to the user in fn_res - // tx_res contains the on_commit list of callbacks, run them now - on_commit.into_iter().for_each(|f| f()); - Ok(value) - } - (Err(TxError::Abort(())), Some(Err(TxError::Abort(e)))) => { - // Transaction was aborted by user code - // The abort error value is stored in fn_res - Err(TxError::Abort(e)) - } - (Err(TxError::Db(_tx_e)), Some(Err(TxError::Db(fn_e)))) => { - // Transaction encountered a DB error in user code - // The error value encountered is the one in fn_res, - // tx_res contains only a dummy error message - Err(TxError::Db(fn_e)) - } - (Err(TxError::Db(tx_e)), None) => { - // Transaction encounterred a DB error when initializing the transaction, - // before user code was called - Err(TxError::Db(tx_e)) - } - (Err(TxError::Db(tx_e)), Some(Ok(_))) => { - // Transaction encounterred a DB error when commiting the transaction, - // after user code was called - Err(TxError::Db(tx_e)) - } - (tx_res, fn_res) => { - panic!( - "unexpected error case: tx_res={:?}, fn_res={:?}", - tx_res.map(|_| "..."), - fn_res.map(|x| x.map(|_| "...").map_err(|_| "...")) - ); - } + match tx_res { + Ok(on_commit) => match ret { + Ok(value) => { + on_commit.into_iter().for_each(|f| f()); + Ok(value) + } + _ => unreachable!(), + }, + Err(TxError::Abort(())) => match ret { + Err(TxError::Abort(e)) => Err(TxError::Abort(e)), + _ => unreachable!(), + }, + Err(TxError::Db(e2)) => match ret { + // Ok was stored -> the error occured when finalizing + // transaction + Ok(_) => Err(TxError::Db(e2)), + // An error was already stored: that's the one we want to + // return + Err(TxError::Db(e)) => Err(TxError::Db(e)), + _ => unreachable!(), + }, } } @@ -166,7 +155,7 @@ impl Db { let tree_names = other.list_trees()?; for name in tree_names { let tree = self.open_tree(&name)?; - if !tree.is_empty()? { + if tree.len()? > 0 { return Err(Error(format!("tree {} already contains data", name).into())); } @@ -208,12 +197,8 @@ impl Tree { self.0.get(self.1, key.as_ref()) } #[inline] - pub fn approximate_len(&self) -> Result { - self.0.approximate_len(self.1) - } - #[inline] - pub fn is_empty(&self) -> Result { - self.0.is_empty(self.1) + pub fn len(&self) -> Result { + self.0.len(self.1) } #[inline] @@ -229,12 +214,16 @@ impl Tree { /// Returns the old value if there was one #[inline] - pub fn insert, U: AsRef<[u8]>>(&self, key: T, value: U) -> Result<()> { + pub fn insert, U: AsRef<[u8]>>( + &self, + key: T, + value: U, + ) -> Result> { self.0.insert(self.1, key.as_ref(), value.as_ref()) } /// Returns the old value if there was one #[inline] - pub fn remove>(&self, key: T) -> Result<()> { + pub fn remove>(&self, key: T) -> Result> { self.0.remove(self.1, key.as_ref()) } /// Clears all values from the tree @@ -292,12 +281,12 @@ impl<'a> Transaction<'a> { tree: &Tree, key: T, value: U, - ) -> TxOpResult<()> { + ) -> TxOpResult> { self.tx.insert(tree.1, key.as_ref(), value.as_ref()) } /// Returns the old value if there was one #[inline] - pub fn remove>(&mut self, tree: &Tree, key: T) -> TxOpResult<()> { + pub fn remove>(&mut self, tree: &Tree, key: T) -> TxOpResult> { self.tx.remove(tree.1, key.as_ref()) } /// Clears all values in a tree @@ -351,11 +340,10 @@ pub(crate) trait IDb: Send + Sync { fn snapshot(&self, path: &PathBuf) -> Result<()>; fn get(&self, tree: usize, key: &[u8]) -> Result>; - fn approximate_len(&self, tree: usize) -> Result; - fn is_empty(&self, tree: usize) -> Result; + fn len(&self, tree: usize) -> Result; - fn insert(&self, tree: usize, key: &[u8], value: &[u8]) -> Result<()>; - fn remove(&self, tree: usize, key: &[u8]) -> Result<()>; + fn insert(&self, tree: usize, key: &[u8], value: &[u8]) -> Result>; + fn remove(&self, tree: usize, key: &[u8]) -> Result>; fn clear(&self, tree: usize) -> Result<()>; fn iter(&self, tree: usize) -> Result>; @@ -381,8 +369,8 @@ pub(crate) trait ITx { fn get(&self, tree: usize, key: &[u8]) -> TxOpResult>; fn len(&self, tree: usize) -> TxOpResult; - fn insert(&mut self, tree: usize, key: &[u8], value: &[u8]) -> TxOpResult<()>; - fn remove(&mut self, tree: usize, key: &[u8]) -> TxOpResult<()>; + fn insert(&mut self, tree: usize, key: &[u8], value: &[u8]) -> TxOpResult>; + fn remove(&mut self, tree: usize, key: &[u8]) -> TxOpResult>; fn clear(&mut self, tree: usize) -> TxOpResult<()>; fn iter(&self, tree: usize) -> TxOpResult>; diff --git a/src/db/lmdb_adapter.rs b/src/db/lmdb_adapter.rs index ac185ae9..a8fa15e8 100644 --- a/src/db/lmdb_adapter.rs +++ b/src/db/lmdb_adapter.rs @@ -1,8 +1,8 @@ use core::ops::Bound; +use core::ptr::NonNull; use std::collections::HashMap; use std::convert::TryInto; -use std::marker::PhantomPinned; use std::path::PathBuf; use std::pin::Pin; use std::sync::{Arc, RwLock}; @@ -11,55 +11,12 @@ use heed::types::ByteSlice; use heed::{BytesDecode, Env, RoTxn, RwTxn, UntypedDatabase as Database}; use crate::{ - open::{Engine, OpenOpt}, Db, Error, IDb, ITx, ITxFn, OnCommit, Result, TxError, TxFnResult, TxOpError, TxOpResult, TxResult, TxValueIter, Value, ValueIter, }; pub use heed; -// ---- top-level open function - -pub(crate) fn open_db(path: &PathBuf, opt: &OpenOpt) -> Result { - info!("Opening LMDB database at: {}", path.display()); - if let Err(e) = std::fs::create_dir_all(&path) { - return Err(Error( - format!("Unable to create LMDB data directory: {}", e).into(), - )); - } - - let map_size = match opt.lmdb_map_size { - None => recommended_map_size(), - Some(v) => v - (v % 4096), - }; - - let mut env_builder = heed::EnvOpenOptions::new(); - env_builder.max_dbs(100); - env_builder.map_size(map_size); - env_builder.max_readers(2048); - unsafe { - env_builder.flag(heed::flags::Flags::MdbNoRdAhead); - env_builder.flag(heed::flags::Flags::MdbNoMetaSync); - if !opt.fsync { - env_builder.flag(heed::flags::Flags::MdbNoSync); - } - } - match env_builder.open(&path) { - Err(heed::Error::Io(e)) if e.kind() == std::io::ErrorKind::OutOfMemory => { - return Err(Error( - "OutOfMemory error while trying to open LMDB database. This can happen \ - if your operating system is not allowing you to use sufficient virtual \ - memory address space. Please check that no limit is set (ulimit -v). \ - You may also try to set a smaller `lmdb_map_size` configuration parameter. \ - On 32-bit machines, you should probably switch to another database engine." - .into(), - )) - } - Err(e) => Err(Error(format!("Cannot open LMDB database: {}", e).into())), - Ok(db) => Ok(LmdbDb::init(db)), - } -} - // -- err impl From for Error { @@ -82,12 +39,15 @@ pub struct LmdbDb { } impl LmdbDb { - pub fn init(db: Env) -> Db { - let s = Self { + pub fn to_wrap(db: Env) -> Self { + Self { db, trees: RwLock::new((Vec::new(), HashMap::new())), - }; - Db(Arc::new(s)) + } + } + + pub fn init(db: Env) -> Db { + Db(Arc::new(Self::to_wrap(db))) } fn get_tree(&self, i: usize) -> Result { @@ -147,11 +107,12 @@ impl IDb for LmdbDb { Ok(ret2) } - fn snapshot(&self, base_path: &PathBuf) -> Result<()> { - std::fs::create_dir_all(base_path)?; - let path = Engine::Lmdb.db_path(base_path); + fn snapshot(&self, to: &PathBuf) -> Result<()> { + std::fs::create_dir_all(to)?; + let mut path = to.clone(); + path.push("data.mdb"); self.db - .copy_to_path(path, heed::CompactionOption::Enabled)?; + .copy_to_path(path, heed::CompactionOption::Disabled)?; Ok(()) } @@ -168,31 +129,28 @@ impl IDb for LmdbDb { } } - fn approximate_len(&self, tree: usize) -> Result { + fn len(&self, tree: usize) -> Result { let tree = self.get_tree(tree)?; let tx = self.db.read_txn()?; Ok(tree.len(&tx)?.try_into().unwrap()) } - fn is_empty(&self, tree: usize) -> Result { - let tree = self.get_tree(tree)?; - let tx = self.db.read_txn()?; - Ok(tree.is_empty(&tx)?) - } - fn insert(&self, tree: usize, key: &[u8], value: &[u8]) -> Result<()> { + fn insert(&self, tree: usize, key: &[u8], value: &[u8]) -> Result> { let tree = self.get_tree(tree)?; let mut tx = self.db.write_txn()?; + let old_val = tree.get(&tx, key)?.map(Vec::from); tree.put(&mut tx, key, value)?; tx.commit()?; - Ok(()) + Ok(old_val) } - fn remove(&self, tree: usize, key: &[u8]) -> Result<()> { + fn remove(&self, tree: usize, key: &[u8]) -> Result> { let tree = self.get_tree(tree)?; let mut tx = self.db.write_txn()?; + let old_val = tree.get(&tx, key)?.map(Vec::from); tree.delete(&mut tx, key)?; tx.commit()?; - Ok(()) + Ok(old_val) } fn clear(&self, tree: usize) -> Result<()> { @@ -206,15 +164,13 @@ impl IDb for LmdbDb { fn iter(&self, tree: usize) -> Result> { let tree = self.get_tree(tree)?; let tx = self.db.read_txn()?; - // Safety: the cloture does not store its argument anywhere, - unsafe { TxAndIterator::make(tx, |tx| Ok(tree.iter(tx)?)) } + TxAndIterator::make(tx, |tx| Ok(tree.iter(tx)?)) } fn iter_rev(&self, tree: usize) -> Result> { let tree = self.get_tree(tree)?; let tx = self.db.read_txn()?; - // Safety: the cloture does not store its argument anywhere, - unsafe { TxAndIterator::make(tx, |tx| Ok(tree.rev_iter(tx)?)) } + TxAndIterator::make(tx, |tx| Ok(tree.rev_iter(tx)?)) } fn range<'r>( @@ -225,8 +181,7 @@ impl IDb for LmdbDb { ) -> Result> { let tree = self.get_tree(tree)?; let tx = self.db.read_txn()?; - // Safety: the cloture does not store its argument anywhere, - unsafe { TxAndIterator::make(tx, |tx| Ok(tree.range(tx, &(low, high))?)) } + TxAndIterator::make(tx, |tx| Ok(tree.range(tx, &(low, high))?)) } fn range_rev<'r>( &self, @@ -236,8 +191,7 @@ impl IDb for LmdbDb { ) -> Result> { let tree = self.get_tree(tree)?; let tx = self.db.read_txn()?; - // Safety: the cloture does not store its argument anywhere, - unsafe { TxAndIterator::make(tx, |tx| Ok(tree.rev_range(tx, &(low, high))?)) } + TxAndIterator::make(tx, |tx| Ok(tree.rev_range(tx, &(low, high))?)) } // ---- @@ -275,7 +229,7 @@ impl IDb for LmdbDb { // ---- -struct LmdbTx<'a> { +pub(crate) struct LmdbTx<'a> { trees: &'a [Database], tx: RwTxn<'a, 'a>, } @@ -284,7 +238,7 @@ impl<'a> LmdbTx<'a> { fn get_tree(&self, i: usize) -> TxOpResult<&Database> { self.trees.get(i).ok_or_else(|| { TxOpError(Error( - "invalid tree id (it might have been opened after the transaction started)".into(), + "invalid tree id (it might have been openned after the transaction started)".into(), )) }) } @@ -303,15 +257,17 @@ impl<'a> ITx for LmdbTx<'a> { Ok(tree.len(&self.tx)? as usize) } - fn insert(&mut self, tree: usize, key: &[u8], value: &[u8]) -> TxOpResult<()> { + fn insert(&mut self, tree: usize, key: &[u8], value: &[u8]) -> TxOpResult> { let tree = *self.get_tree(tree)?; + let old_val = tree.get(&self.tx, key)?.map(Vec::from); tree.put(&mut self.tx, key, value)?; - Ok(()) + Ok(old_val) } - fn remove(&mut self, tree: usize, key: &[u8]) -> TxOpResult<()> { + fn remove(&mut self, tree: usize, key: &[u8]) -> TxOpResult> { let tree = *self.get_tree(tree)?; + let old_val = tree.get(&self.tx, key)?.map(Vec::from); tree.delete(&mut self.tx, key)?; - Ok(()) + Ok(old_val) } fn clear(&mut self, tree: usize) -> TxOpResult<()> { let tree = *self.get_tree(tree)?; @@ -367,41 +323,28 @@ where { tx: RoTxn<'a>, iter: Option, - _pin: PhantomPinned, } impl<'a, I> TxAndIterator<'a, I> where I: Iterator> + 'a, { - fn iter(self: Pin<&mut Self>) -> &mut Option { - // Safety: iter is not structural - unsafe { &mut self.get_unchecked_mut().iter } - } - - /// Safety: iterfun must not store its argument anywhere but in its result. - unsafe fn make(tx: RoTxn<'a>, iterfun: F) -> Result> + fn make(tx: RoTxn<'a>, iterfun: F) -> Result> where F: FnOnce(&'a RoTxn<'a>) -> Result, { - let res = TxAndIterator { - tx, - iter: None, - _pin: PhantomPinned, - }; + let res = TxAndIterator { tx, iter: None }; let mut boxed = Box::pin(res); - let tx_lifetime_overextended: &'a RoTxn<'a> = { - let tx = &boxed.tx; - // Safety: Artificially extending the lifetime because - // this reference will only be stored and accessed from the - // returned ValueIter which guarantees that it is destroyed - // before the tx it is pointing to. - unsafe { &*&raw const *tx } - }; - let iter = iterfun(&tx_lifetime_overextended)?; + // This unsafe allows us to bypass lifetime checks + let tx = unsafe { NonNull::from(&boxed.tx).as_ref() }; + let iter = iterfun(tx)?; - *boxed.as_mut().iter() = Some(iter); + let mut_ref = Pin::as_mut(&mut boxed); + // This unsafe allows us to write in a field of the pinned struct + unsafe { + Pin::get_unchecked_mut(mut_ref).iter = Some(iter); + } Ok(Box::new(TxAndIteratorPin(boxed))) } @@ -412,10 +355,8 @@ where I: Iterator> + 'a, { fn drop(&mut self) { - // Safety: `new_unchecked` is okay because we know this value is never - // used again after being dropped. - let this = unsafe { Pin::new_unchecked(self) }; - drop(this.iter().take()); + // ensure the iterator is dropped before the RoTxn it references + drop(self.iter.take()); } } @@ -431,12 +372,13 @@ where fn next(&mut self) -> Option { let mut_ref = Pin::as_mut(&mut self.0); - let next = mut_ref.iter().as_mut()?.next()?; - let res = match next { - Err(e) => Err(e.into()), - Ok((k, v)) => Ok((k.to_vec(), v.to_vec())), - }; - Some(res) + // This unsafe allows us to mutably access the iterator field + let next = unsafe { Pin::get_unchecked_mut(mut_ref).iter.as_mut()?.next() }; + match next { + None => None, + Some(Err(e)) => Some(Err(e.into())), + Some(Ok((k, v))) => Some(Ok((k.to_vec(), v.to_vec()))), + } } } diff --git a/src/db/metric_proxy.rs b/src/db/metric_proxy.rs new file mode 100644 index 00000000..e5221a7f --- /dev/null +++ b/src/db/metric_proxy.rs @@ -0,0 +1,217 @@ +use std::path::PathBuf; +use std::sync::Arc; +use std::time::Instant; + +use crate::lmdb_adapter::LmdbDb; +use crate::{ + Bound, Db, IDb, ITx, ITxFn, OnCommit, Result, TxFnResult, TxOpResult, TxResult, TxValueIter, + Value, ValueIter, +}; +use opentelemetry::{ + global, + metrics::{Unit, ValueRecorder}, + KeyValue, +}; + +pub struct MetricDbProxy { + //@FIXME Replace with a template + db: LmdbDb, + op: ValueRecorder, +} + +impl MetricDbProxy { + pub fn init(db: LmdbDb) -> Db { + let meter = global::meter("garage/db"); + let s = Self { + db, + op: meter + .f64_value_recorder("db.op") + .with_description("Duration and amount of operations on the local metadata engine") + .with_unit(Unit::new("ms")) + .init(), + }; + Db(Arc::new(s)) + } + + fn instrument( + &self, + fx: impl FnOnce() -> T, + op: &'static str, + cat: &'static str, + tx: &'static str, + ) -> T { + let metric_tags = [ + KeyValue::new("op", op), + KeyValue::new("cat", cat), + KeyValue::new("tx", tx), + ]; + + let request_start = Instant::now(); + let res = fx(); + let delay_nanos = Instant::now() + .saturating_duration_since(request_start) + .as_nanos(); + let delay_millis: f64 = delay_nanos as f64 / 1_000_000f64; + self.op.record(delay_millis, &metric_tags); + + res + } +} + +impl IDb for MetricDbProxy { + fn engine(&self) -> String { + format!("Metric Proxy on {}", self.db.engine()) + } + + fn open_tree(&self, name: &str) -> Result { + self.instrument(|| self.db.open_tree(name), "open_tree", "control", "no") + } + + fn list_trees(&self) -> Result> { + self.instrument(|| self.db.list_trees(), "list_trees", "control", "no") + } + + fn snapshot(&self, to: &PathBuf) -> Result<()> { + self.instrument(|| self.db.snapshot(to), "snapshot", "control", "no") + } + + // --- + + fn get(&self, tree: usize, key: &[u8]) -> Result> { + self.instrument(|| self.db.get(tree, key), "get", "data", "no") + } + + fn len(&self, tree: usize) -> Result { + self.instrument(|| self.db.len(tree), "len", "data", "no") + } + + fn insert(&self, tree: usize, key: &[u8], value: &[u8]) -> Result> { + self.instrument(|| self.db.insert(tree, key, value), "insert", "data", "no") + } + + fn remove(&self, tree: usize, key: &[u8]) -> Result> { + self.instrument(|| self.db.remove(tree, key), "remove", "data", "no") + } + + fn clear(&self, tree: usize) -> Result<()> { + self.instrument(|| self.db.clear(tree), "clear", "data", "no") + } + + fn iter(&self, tree: usize) -> Result> { + self.instrument(|| self.db.iter(tree), "iter", "data", "no") + } + + fn iter_rev(&self, tree: usize) -> Result> { + self.instrument(|| self.db.iter_rev(tree), "iter_rev", "data", "no") + } + + fn range<'r>( + &self, + tree: usize, + low: Bound<&'r [u8]>, + high: Bound<&'r [u8]>, + ) -> Result> { + self.instrument(|| self.db.range(tree, low, high), "range", "data", "no") + } + + fn range_rev<'r>( + &self, + tree: usize, + low: Bound<&'r [u8]>, + high: Bound<&'r [u8]>, + ) -> Result> { + self.instrument( + || self.db.range_rev(tree, low, high), + "range_rev", + "data", + "no", + ) + } + + // ---- + + fn transaction(&self, f: &dyn ITxFn) -> TxResult { + self.instrument( + || self.db.transaction(&MetricITxFnProxy { f, metrics: self }), + "transaction", + "control", + "yes", + ) + } +} + +struct MetricITxFnProxy<'a> { + f: &'a dyn ITxFn, + metrics: &'a MetricDbProxy, +} +impl<'a> ITxFn for MetricITxFnProxy<'a> { + fn try_on(&self, tx: &mut dyn ITx) -> TxFnResult { + self.f.try_on(&mut MetricTxProxy { + tx, + metrics: self.metrics, + }) + } +} + +struct MetricTxProxy<'a> { + tx: &'a mut dyn ITx, + metrics: &'a MetricDbProxy, +} +impl<'a> ITx for MetricTxProxy<'a> { + fn get(&self, tree: usize, key: &[u8]) -> TxOpResult> { + self.metrics + .instrument(|| self.tx.get(tree, key), "get", "data", "yes") + } + + fn len(&self, tree: usize) -> TxOpResult { + self.metrics + .instrument(|| self.tx.len(tree), "len", "data", "yes") + } + + fn insert(&mut self, tree: usize, key: &[u8], value: &[u8]) -> TxOpResult> { + self.metrics + .instrument(|| self.tx.insert(tree, key, value), "insert", "data", "yes") + } + + fn remove(&mut self, tree: usize, key: &[u8]) -> TxOpResult> { + self.metrics + .instrument(|| self.tx.remove(tree, key), "remove", "data", "yes") + } + + fn clear(&mut self, tree: usize) -> TxOpResult<()> { + self.metrics + .instrument(|| self.tx.clear(tree), "clear", "data", "yes") + } + + fn iter(&self, tree: usize) -> TxOpResult> { + self.metrics + .instrument(|| self.tx.iter(tree), "iter", "data", "yes") + } + fn iter_rev(&self, tree: usize) -> TxOpResult> { + self.metrics + .instrument(|| self.tx.iter_rev(tree), "iter_rev", "data", "yes") + } + fn range<'r>( + &self, + tree: usize, + low: Bound<&'r [u8]>, + high: Bound<&'r [u8]>, + ) -> TxOpResult> { + self.metrics + .instrument(|| self.tx.range(tree, low, high), "range", "data", "yes") + } + + fn range_rev<'r>( + &self, + tree: usize, + low: Bound<&'r [u8]>, + high: Bound<&'r [u8]>, + ) -> TxOpResult> { + self.metrics.instrument( + || self.tx.range_rev(tree, low, high), + "range_rev", + "data", + "yes", + ) + } +} diff --git a/src/db/open.rs b/src/db/open.rs index 23391c61..057c7ae4 100644 --- a/src/db/open.rs +++ b/src/db/open.rs @@ -10,8 +10,8 @@ use crate::{Db, Error, Result}; #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub enum Engine { Lmdb, + LmdbWithMetrics, Sqlite, - Fjall, } impl Engine { @@ -19,27 +19,10 @@ impl Engine { pub fn as_str(&self) -> &'static str { match self { Self::Lmdb => "lmdb", + Self::LmdbWithMetrics => "lmdb-with-metrics", Self::Sqlite => "sqlite", - Self::Fjall => "fjall", } } - - /// Return engine-specific DB path from base path - pub fn db_path(&self, base_path: &PathBuf) -> PathBuf { - let mut ret = base_path.clone(); - match self { - Self::Lmdb => { - ret.push("db.lmdb"); - } - Self::Sqlite => { - ret.push("db.sqlite"); - } - Self::Fjall => { - ret.push("db.fjall"); - } - } - ret - } } impl std::fmt::Display for Engine { @@ -54,12 +37,12 @@ impl std::str::FromStr for Engine { fn from_str(text: &str) -> Result { match text { "lmdb" | "heed" => Ok(Self::Lmdb), + "lmdb-with-metrics" | "heed-with-metrics" => Ok(Self::LmdbWithMetrics), "sqlite" | "sqlite3" | "rusqlite" => Ok(Self::Sqlite), - "fjall" => Ok(Self::Fjall), "sled" => Err(Error("Sled is no longer supported as a database engine. Converting your old metadata db can be done using an older Garage binary (e.g. v0.9.4).".into())), kind => Err(Error( format!( - "Invalid DB engine: {} (options are: lmdb, sqlite, fjall)", + "Invalid DB engine: {} (options are: lmdb, sqlite)", kind ) .into(), @@ -71,7 +54,6 @@ impl std::str::FromStr for Engine { pub struct OpenOpt { pub fsync: bool, pub lmdb_map_size: Option, - pub fjall_block_cache_size: Option, } impl Default for OpenOpt { @@ -79,7 +61,6 @@ impl Default for OpenOpt { Self { fsync: false, lmdb_map_size: None, - fjall_block_cache_size: None, } } } @@ -88,15 +69,59 @@ pub fn open_db(path: &PathBuf, engine: Engine, opt: &OpenOpt) -> Result { match engine { // ---- Sqlite DB ---- #[cfg(feature = "sqlite")] - Engine::Sqlite => crate::sqlite_adapter::open_db(path, opt), + Engine::Sqlite => { + info!("Opening Sqlite database at: {}", path.display()); + let manager = r2d2_sqlite::SqliteConnectionManager::file(path); + Ok(crate::sqlite_adapter::SqliteDb::new(manager, opt.fsync)?) + } // ---- LMDB DB ---- #[cfg(feature = "lmdb")] - Engine::Lmdb => crate::lmdb_adapter::open_db(path, opt), + Engine::Lmdb | Engine::LmdbWithMetrics => { + info!("Opening LMDB database at: {}", path.display()); + if let Err(e) = std::fs::create_dir_all(&path) { + return Err(Error( + format!("Unable to create LMDB data directory: {}", e).into(), + )); + } - // ---- Fjall DB ---- - #[cfg(feature = "fjall")] - Engine::Fjall => crate::fjall_adapter::open_db(path, opt), + let map_size = match opt.lmdb_map_size { + None => crate::lmdb_adapter::recommended_map_size(), + Some(v) => v - (v % 4096), + }; + + let mut env_builder = heed::EnvOpenOptions::new(); + env_builder.max_dbs(100); + env_builder.map_size(map_size); + env_builder.max_readers(2048); + unsafe { + env_builder.flag(crate::lmdb_adapter::heed::flags::Flags::MdbNoRdAhead); + env_builder.flag(crate::lmdb_adapter::heed::flags::Flags::MdbNoMetaSync); + if !opt.fsync { + env_builder.flag(heed::flags::Flags::MdbNoSync); + } + } + match env_builder.open(&path) { + Err(heed::Error::Io(e)) if e.kind() == std::io::ErrorKind::OutOfMemory => { + return Err(Error( + "OutOfMemory error while trying to open LMDB database. This can happen \ + if your operating system is not allowing you to use sufficient virtual \ + memory address space. Please check that no limit is set (ulimit -v). \ + You may also try to set a smaller `lmdb_map_size` configuration parameter. \ + On 32-bit machines, you should probably switch to another database engine." + .into(), + )) + } + Err(e) => Err(Error(format!("Cannot open LMDB database: {}", e).into())), + Ok(db) => match engine { + Engine::LmdbWithMetrics => { + let to_wrap = crate::lmdb_adapter::LmdbDb::to_wrap(db); + Ok(crate::metric_proxy::MetricDbProxy::init(to_wrap)) + } + _ => Ok(crate::lmdb_adapter::LmdbDb::init(db)), + }, + } + } // Pattern is unreachable when all supported DB engines are compiled into binary. The allow // attribute is added so that we won't have to change this match in case stop building diff --git a/src/db/sqlite_adapter.rs b/src/db/sqlite_adapter.rs index a03ee8ef..a91b9011 100644 --- a/src/db/sqlite_adapter.rs +++ b/src/db/sqlite_adapter.rs @@ -11,23 +11,12 @@ use r2d2_sqlite::SqliteConnectionManager; use rusqlite::{params, Rows, Statement, Transaction}; use crate::{ - open::{Engine, OpenOpt}, Db, Error, IDb, ITx, ITxFn, OnCommit, Result, TxError, TxFnResult, TxOpError, TxOpResult, TxResult, TxValueIter, Value, ValueIter, }; pub use rusqlite; -// ---- top-level open function - -pub(crate) fn open_db(path: &PathBuf, opt: &OpenOpt) -> Result { - info!("Opening Sqlite database at: {}", path.display()); - let manager = r2d2_sqlite::SqliteConnectionManager::file(path); - Ok(SqliteDb::new(manager, opt.fsync)?) -} - -// ---- - type Connection = r2d2::PooledConnection; // --- err @@ -150,18 +139,14 @@ impl IDb for SqliteDb { Ok(trees) } - fn snapshot(&self, base_path: &PathBuf) -> Result<()> { - std::fs::create_dir_all(base_path)?; - let path = Engine::Sqlite - .db_path(&base_path) - .into_os_string() - .into_string() - .map_err(|_| Error("invalid sqlite path string".into()))?; - - info!("Start sqlite VACUUM INTO `{}`", path); - self.db.get()?.execute("VACUUM INTO ?1", params![path])?; - info!("Finished sqlite VACUUM INTO `{}`", path); - + fn snapshot(&self, to: &PathBuf) -> Result<()> { + fn progress(p: rusqlite::backup::Progress) { + let percent = (p.pagecount - p.remaining) * 100 / p.pagecount; + info!("Sqlite snapshot progres: {}%", percent); + } + self.db + .get()? + .backup(rusqlite::DatabaseName::Main, to, Some(progress))?; Ok(()) } @@ -172,7 +157,7 @@ impl IDb for SqliteDb { self.internal_get(&self.db.get()?, &tree, key) } - fn approximate_len(&self, tree: usize) -> Result { + fn len(&self, tree: usize) -> Result { let tree = self.get_tree(tree)?; let db = self.db.get()?; @@ -184,11 +169,7 @@ impl IDb for SqliteDb { } } - fn is_empty(&self, tree: usize) -> Result { - Ok(self.approximate_len(tree)? == 0) - } - - fn insert(&self, tree: usize, key: &[u8], value: &[u8]) -> Result<()> { + fn insert(&self, tree: usize, key: &[u8], value: &[u8]) -> Result> { let tree = self.get_tree(tree)?; let db = self.db.get()?; let lock = self.write_lock.lock(); @@ -203,18 +184,23 @@ impl IDb for SqliteDb { assert_eq!(n, 1); drop(lock); - Ok(()) + Ok(old_val) } - fn remove(&self, tree: usize, key: &[u8]) -> Result<()> { + fn remove(&self, tree: usize, key: &[u8]) -> Result> { let tree = self.get_tree(tree)?; let db = self.db.get()?; let lock = self.write_lock.lock(); - db.execute(&format!("DELETE FROM {} WHERE k = ?1", tree), params![key])?; + let old_val = self.internal_get(&db, &tree, key)?; + + if old_val.is_some() { + let n = db.execute(&format!("DELETE FROM {} WHERE k = ?1", tree), params![key])?; + assert_eq!(n, 1); + } drop(lock); - Ok(()) + Ok(old_val) } fn clear(&self, tree: usize) -> Result<()> { @@ -323,7 +309,7 @@ impl<'a> SqliteTx<'a> { fn get_tree(&self, i: usize) -> TxOpResult<&'_ str> { self.trees.get(i).map(Arc::as_ref).ok_or_else(|| { TxOpError(Error( - "invalid tree id (it might have been opened after the transaction started)".into(), + "invalid tree id (it might have been openned after the transaction started)".into(), )) }) } @@ -355,17 +341,31 @@ impl<'a> ITx for SqliteTx<'a> { } } - fn insert(&mut self, tree: usize, key: &[u8], value: &[u8]) -> TxOpResult<()> { + fn insert(&mut self, tree: usize, key: &[u8], value: &[u8]) -> TxOpResult> { let tree = self.get_tree(tree)?; - let sql = format!("INSERT OR REPLACE INTO {} (k, v) VALUES (?1, ?2)", tree); - self.tx.execute(&sql, params![key, value])?; - Ok(()) + let old_val = self.internal_get(tree, key)?; + + let sql = match &old_val { + Some(_) => format!("UPDATE {} SET v = ?2 WHERE k = ?1", tree), + None => format!("INSERT INTO {} (k, v) VALUES (?1, ?2)", tree), + }; + let n = self.tx.execute(&sql, params![key, value])?; + assert_eq!(n, 1); + + Ok(old_val) } - fn remove(&mut self, tree: usize, key: &[u8]) -> TxOpResult<()> { + fn remove(&mut self, tree: usize, key: &[u8]) -> TxOpResult> { let tree = self.get_tree(tree)?; - self.tx - .execute(&format!("DELETE FROM {} WHERE k = ?1", tree), params![key])?; - Ok(()) + let old_val = self.internal_get(tree, key)?; + + if old_val.is_some() { + let n = self + .tx + .execute(&format!("DELETE FROM {} WHERE k = ?1", tree), params![key])?; + assert_eq!(n, 1); + } + + Ok(old_val) } fn clear(&mut self, tree: usize) -> TxOpResult<()> { let tree = self.get_tree(tree)?; diff --git a/src/db/test.rs b/src/db/test.rs index 977dc965..adb429e7 100644 --- a/src/db/test.rs +++ b/src/db/test.rs @@ -1,7 +1,7 @@ use crate::*; fn test_suite(db: Db) { - let tree = db.open_tree("tree:this_is_a_tree").unwrap(); + let tree = db.open_tree("tree").unwrap(); let ka: &[u8] = &b"test"[..]; let kb: &[u8] = &b"zwello"[..]; @@ -12,16 +12,16 @@ fn test_suite(db: Db) { // ---- test simple insert/delete ---- - assert!(tree.insert(ka, va).is_ok()); + assert!(tree.insert(ka, va).unwrap().is_none()); assert_eq!(tree.get(ka).unwrap().unwrap(), va); - assert_eq!(tree.iter().unwrap().count(), 1); + assert_eq!(tree.len().unwrap(), 1); // ---- test transaction logic ---- let res = db.transaction::<_, (), _>(|tx| { assert_eq!(tx.get(&tree, ka).unwrap().unwrap(), va); - assert_eq!(tx.insert(&tree, ka, vb).unwrap(), ()); + assert_eq!(tx.insert(&tree, ka, vb).unwrap().unwrap(), va); assert_eq!(tx.get(&tree, ka).unwrap().unwrap(), vb); @@ -33,7 +33,7 @@ fn test_suite(db: Db) { let res = db.transaction::<(), _, _>(|tx| { assert_eq!(tx.get(&tree, ka).unwrap().unwrap(), vb); - assert_eq!(tx.insert(&tree, ka, vc).unwrap(), ()); + assert_eq!(tx.insert(&tree, ka, vc).unwrap().unwrap(), vb); assert_eq!(tx.get(&tree, ka).unwrap().unwrap(), vc); @@ -50,7 +50,7 @@ fn test_suite(db: Db) { assert!(iter.next().is_none()); drop(iter); - assert!(tree.insert(kb, vc).is_ok()); + assert!(tree.insert(kb, vc).unwrap().is_none()); assert_eq!(tree.get(kb).unwrap().unwrap(), vc); let mut iter = tree.iter().unwrap(); @@ -148,15 +148,3 @@ fn test_sqlite_db() { let db = SqliteDb::new(manager, false).unwrap(); test_suite(db); } - -#[test] -#[cfg(feature = "fjall")] -fn test_fjall_db() { - use crate::fjall_adapter::{fjall, FjallDb}; - - let path = mktemp::Temp::new_dir().unwrap(); - let config = fjall::Config::new(path).temporary(true); - let keyspace = config.open_transactional().unwrap(); - let db = FjallDb::init(keyspace); - test_suite(db); -} diff --git a/src/garage/Cargo.toml b/src/garage/Cargo.toml index a4f695a4..9cc71abd 100644 --- a/src/garage/Cargo.toml +++ b/src/garage/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "garage" -version = "1.3.1" +version = "1.0.0" authors = ["Alex Auvolat "] edition = "2018" license = "AGPL-3.0" @@ -23,9 +23,7 @@ path = "tests/lib.rs" [dependencies] format_table.workspace = true garage_db.workspace = true -garage_api_admin.workspace = true -garage_api_s3.workspace = true -garage_api_k2v = { workspace = true, optional = true } +garage_api.workspace = true garage_block.workspace = true garage_model.workspace = true garage_net.workspace = true @@ -42,6 +40,7 @@ parse_duration.workspace = true hex.workspace = true tracing.workspace = true tracing-subscriber.workspace = true +rand.workspace = true async-trait.workspace = true sha1.workspace = true sodiumoxide.workspace = true @@ -49,21 +48,22 @@ structopt.workspace = true git-version.workspace = true serde.workspace = true +serde_bytes.workspace = true +toml.workspace = true futures.workspace = true +futures-util.workspace = true tokio.workspace = true opentelemetry.workspace = true opentelemetry-prometheus = { workspace = true, optional = true } opentelemetry-otlp = { workspace = true, optional = true } +prometheus = { workspace = true, optional = true } syslog-tracing = { workspace = true, optional = true } -tracing-journald = { workspace = true, optional = true } [dev-dependencies] -garage_api_common.workspace = true - +aws-config.workspace = true aws-sdk-s3.workspace = true -aws-smithy-runtime.workspace = true chrono.workspace = true http.workspace = true hmac.workspace = true @@ -73,12 +73,10 @@ hyper-util.workspace = true mktemp.workspace = true sha2.workspace = true - static_init.workspace = true assert-json-diff.workspace = true serde_json.workspace = true base64.workspace = true -crc32fast.workspace = true k2v-client.workspace = true @@ -86,25 +84,22 @@ k2v-client.workspace = true [features] default = [ "bundled-libs", "metrics", "lmdb", "sqlite", "k2v" ] -k2v = [ "garage_util/k2v", "garage_api_k2v" ] +k2v = [ "garage_util/k2v", "garage_api/k2v" ] # Database engines lmdb = [ "garage_model/lmdb" ] sqlite = [ "garage_model/sqlite" ] -fjall = [ "garage_model/fjall" ] # Automatic registration and discovery via Consul API consul-discovery = [ "garage_rpc/consul-discovery" ] # Automatic registration and discovery via Kubernetes API kubernetes-discovery = [ "garage_rpc/kubernetes-discovery" ] # Prometheus exporter (/metrics endpoint). -metrics = [ "garage_api_admin/metrics", "opentelemetry-prometheus" ] +metrics = [ "garage_api/metrics", "opentelemetry-prometheus", "prometheus" ] # Exporter for the OpenTelemetry Collector. telemetry-otlp = [ "opentelemetry-otlp" ] # Logging to syslog syslog = [ "syslog-tracing" ] -# Logging to journald -journald = [ "tracing-journald" ] # NOTE: bundled-libs and system-libs should be treat as mutually exclusive; # exactly one of them should be enabled. diff --git a/src/garage/admin/block.rs b/src/garage/admin/block.rs index 5f908ce4..edeb88c0 100644 --- a/src/garage/admin/block.rs +++ b/src/garage/admin/block.rs @@ -101,7 +101,6 @@ impl AdminRpcHandler { let mut obj_dels = 0; let mut mpu_dels = 0; let mut ver_dels = 0; - let mut br_dels = 0; for hash in blocks { let hash = hex::decode(hash).ok_or_bad_request("invalid hash")?; @@ -132,19 +131,12 @@ impl AdminRpcHandler { ver_dels += 1; } } - if !br.deleted.get() { - let mut br = br; - br.deleted.set(); - self.garage.block_ref_table.insert(&br).await?; - br_dels += 1; - } } } Ok(AdminRpc::Ok(format!( - "Purged {} blocks: marked {} block refs, {} versions, {} objects and {} multipart uploads as deleted", + "Purged {} blocks, {} versions, {} objects, {} multipart uploads", blocks.len(), - br_dels, ver_dels, obj_dels, mpu_dels, diff --git a/src/garage/admin/bucket.rs b/src/garage/admin/bucket.rs index 073329c1..1bdc6086 100644 --- a/src/garage/admin/bucket.rs +++ b/src/garage/admin/bucket.rs @@ -126,7 +126,7 @@ impl AdminRpcHandler { #[allow(clippy::ptr_arg)] async fn handle_create_bucket(&self, name: &String) -> Result { - if !is_valid_bucket_name(name, self.garage.config.allow_punycode) { + if !is_valid_bucket_name(name) { return Err(Error::BadRequest(format!( "{}: {}", name, INVALID_BUCKET_NAME_MESSAGE diff --git a/src/garage/admin/mod.rs b/src/garage/admin/mod.rs index 6ae8fa88..e2468143 100644 --- a/src/garage/admin/mod.rs +++ b/src/garage/admin/mod.rs @@ -4,11 +4,9 @@ mod key; use std::collections::HashMap; use std::fmt::Write; -use std::future::Future; use std::sync::Arc; -use futures::future::FutureExt; - +use async_trait::async_trait; use serde::{Deserialize, Serialize}; use format_table::format_table_to_string; @@ -146,12 +144,7 @@ impl AdminRpcHandler { async fn handle_stats(&self, opt: StatsOpt) -> Result { if opt.all_nodes { let mut ret = String::new(); - let mut all_nodes = self.garage.system.cluster_layout().all_nodes().to_vec(); - for node in self.garage.system.get_known_nodes().iter() { - if node.is_up && !all_nodes.contains(&node.id) { - all_nodes.push(node.id); - } - } + let all_nodes = self.garage.system.cluster_layout().all_nodes().to_vec(); for node in all_nodes.iter() { let mut opt = opt.clone(); @@ -219,7 +212,7 @@ impl AdminRpcHandler { // Gather block manager statistics writeln!(&mut ret, "\nBlock manager stats:").unwrap(); - let rc_len = self.garage.block_manager.rc_approximate_len()?.to_string(); + let rc_len = self.garage.block_manager.rc_len()?.to_string(); writeln!( &mut ret, @@ -230,13 +223,13 @@ impl AdminRpcHandler { writeln!( &mut ret, " resync queue length: {}", - self.garage.block_manager.resync.queue_approximate_len()? + self.garage.block_manager.resync.queue_len()? ) .unwrap(); writeln!( &mut ret, " blocks with resync errors: {}", - self.garage.block_manager.resync.errors_approximate_len()? + self.garage.block_manager.resync.errors_len()? ) .unwrap(); @@ -346,21 +339,16 @@ impl AdminRpcHandler { F: TableSchema + 'static, R: TableReplication + 'static, { - let data_len = t - .data - .store - .approximate_len() - .map_err(GarageError::from)? - .to_string(); - let mkl_len = t.merkle_updater.merkle_tree_approximate_len()?.to_string(); + let data_len = t.data.store.len().map_err(GarageError::from)?.to_string(); + let mkl_len = t.merkle_updater.merkle_tree_len()?.to_string(); Ok(format!( " {}\t{}\t{}\t{}\t{}", F::TABLE_NAME, data_len, mkl_len, - t.merkle_updater.todo_approximate_len()?, - t.data.gc_todo_approximate_len()? + t.merkle_updater.todo_len()?, + t.data.gc_todo_len()? )) } @@ -494,7 +482,7 @@ impl AdminRpcHandler { AdminRpc::MetaOperation(MetaOperation::Snapshot { all: false }), PRIO_NORMAL, ) - .await? + .await })) .await; @@ -507,11 +495,7 @@ impl AdminRpcHandler { ret.push(format!("{:?}\t{}", to, res_str)); } - if resps.iter().any(Result::is_err) { - Err(GarageError::Message(format_table_to_string(ret)).into()) - } else { - Ok(AdminRpc::Ok(format_table_to_string(ret))) - } + Ok(AdminRpc::Ok(format_table_to_string(ret))) } MetaOperation::Snapshot { all: false } => { garage_model::snapshot::async_snapshot_metadata(&self.garage).await?; @@ -521,25 +505,22 @@ impl AdminRpcHandler { } } +#[async_trait] impl EndpointHandler for AdminRpcHandler { - fn handle( + async fn handle( self: &Arc, message: &AdminRpc, _from: NodeID, - ) -> impl Future> + Send { - let self2 = self.clone(); - async move { - match message { - AdminRpc::BucketOperation(bo) => self2.handle_bucket_cmd(bo).await, - AdminRpc::KeyOperation(ko) => self2.handle_key_cmd(ko).await, - AdminRpc::LaunchRepair(opt) => self2.handle_launch_repair(opt.clone()).await, - AdminRpc::Stats(opt) => self2.handle_stats(opt.clone()).await, - AdminRpc::Worker(wo) => self2.handle_worker_cmd(wo).await, - AdminRpc::BlockOperation(bo) => self2.handle_block_cmd(bo).await, - AdminRpc::MetaOperation(mo) => self2.handle_meta_cmd(mo).await, - m => Err(GarageError::unexpected_rpc_message(m).into()), - } + ) -> Result { + match message { + AdminRpc::BucketOperation(bo) => self.handle_bucket_cmd(bo).await, + AdminRpc::KeyOperation(ko) => self.handle_key_cmd(ko).await, + AdminRpc::LaunchRepair(opt) => self.handle_launch_repair(opt.clone()).await, + AdminRpc::Stats(opt) => self.handle_stats(opt.clone()).await, + AdminRpc::Worker(wo) => self.handle_worker_cmd(wo).await, + AdminRpc::BlockOperation(bo) => self.handle_block_cmd(bo).await, + AdminRpc::MetaOperation(mo) => self.handle_meta_cmd(mo).await, + m => Err(GarageError::unexpected_rpc_message(m).into()), } - .boxed() } } diff --git a/src/garage/cli/convert_db.rs b/src/garage/cli/convert_db.rs index a40fb61f..5346d55a 100644 --- a/src/garage/cli/convert_db.rs +++ b/src/garage/cli/convert_db.rs @@ -24,7 +24,6 @@ pub struct ConvertDbOpt { output_engine: Engine, #[structopt(flatten)] - #[allow(dead_code)] db_open: OpenDbOpt, } @@ -53,7 +52,6 @@ pub(crate) fn do_conversion(args: ConvertDbOpt) -> Result<()> { } let opt = OpenOpt { - #[cfg(feature = "lmdb")] lmdb_map_size: args.db_open.lmdb.map_size.map(|x| x.as_u64() as usize), ..Default::default() }; diff --git a/src/garage/cli/layout.rs b/src/garage/cli/layout.rs index f053eef4..f76e33c5 100644 --- a/src/garage/cli/layout.rs +++ b/src/garage/cli/layout.rs @@ -129,7 +129,7 @@ pub async fn cmd_assign_role( zone: args .zone .clone() - .ok_or("Please specify a zone with the -z flag")?, + .ok_or("Please specifiy a zone with the -z flag")?, capacity, tags: args.tags.clone(), } @@ -145,7 +145,7 @@ pub async fn cmd_assign_role( send_layout(rpc_cli, rpc_host, layout).await?; - println!("Role changes are staged but not yet committed."); + println!("Role changes are staged but not yet commited."); println!("Use `garage layout show` to view staged role changes,"); println!("and `garage layout apply` to enact staged changes."); Ok(()) @@ -172,7 +172,7 @@ pub async fn cmd_remove_role( send_layout(rpc_cli, rpc_host, layout).await?; - println!("Role removal is staged but not yet committed."); + println!("Role removal is staged but not yet commited."); println!("Use `garage layout show` to view staged role changes,"); println!("and `garage layout apply` to enact staged changes."); Ok(()) @@ -358,7 +358,7 @@ pub async fn cmd_layout_history( if layout.versions.len() > 1 { println!("==== UPDATE TRACKERS ===="); - println!("Several layout versions are currently live in the cluster, and data is being migrated."); + println!("Several layout versions are currently live in the version, and data is being migrated."); println!( "This is the internal data that Garage stores to know which nodes have what data." ); @@ -377,27 +377,15 @@ pub async fn cmd_layout_history( table[1..].sort(); format_table(table); - let min_ack = layout - .update_trackers - .ack_map - .min_among(&all_nodes, layout.min_stored()); - println!(); println!( "If some nodes are not catching up to the latest layout version in the update trackers," ); println!("it might be because they are offline or unable to complete a sync successfully."); - if min_ack < layout.current().version { - println!( - "You may force progress using `garage layout skip-dead-nodes --version {}`", - layout.current().version - ); - } else { - println!( - "You may force progress using `garage layout skip-dead-nodes --version {} --allow-missing-data`.", - layout.current().version - ); - } + println!( + "You may force progress using `garage layout skip-dead-nodes --version {}`", + layout.current().version + ); } else { println!("Your cluster is currently in a stable state with a single live layout version."); println!("No metadata migration is in progress. Note that the migration of data blocks is not tracked,"); @@ -438,15 +426,15 @@ pub async fn cmd_layout_skip_dead_nodes( let all_nodes = layout.get_all_nodes(); let mut did_something = false; for node in all_nodes.iter() { - // Update ACK tracker for dead nodes or for all nodes if --allow-missing-data - if opt.allow_missing_data || !status.iter().any(|x| x.id == *node && x.is_up) { - if layout.update_trackers.ack_map.set_max(*node, opt.version) { - println!("Increased the ACK tracker for node {:?}", node); - did_something = true; - } + if status.iter().any(|x| x.id == *node && x.is_up) { + continue; + } + + if layout.update_trackers.ack_map.set_max(*node, opt.version) { + println!("Increased the ACK tracker for node {:?}", node); + did_something = true; } - // If --allow-missing-data, update SYNC tracker for all nodes. if opt.allow_missing_data { if layout.update_trackers.sync_map.set_max(*node, opt.version) { println!("Increased the SYNC tracker for node {:?}", node); diff --git a/src/garage/cli/structs.rs b/src/garage/cli/structs.rs index 386a213b..6a9e6bfb 100644 --- a/src/garage/cli/structs.rs +++ b/src/garage/cli/structs.rs @@ -184,7 +184,7 @@ pub struct SkipDeadNodesOpt { /// This will generally be the current layout version. #[structopt(long = "version")] pub(crate) version: u64, - /// Allow the skip even if a quorum of nodes could not be found for + /// Allow the skip even if a quorum of ndoes could not be found for /// the data among the remaining nodes #[structopt(long = "allow-missing-data")] pub(crate) allow_missing_data: bool, @@ -466,10 +466,6 @@ pub enum RepairWhat { /// Repair (resync/rebalance) the set of stored blocks in the cluster #[structopt(name = "blocks", version = garage_version())] Blocks, - /// Clear the block resync queue. The list of blocks in errored state - /// is cleared as well. You MUST run `garage repair blocks` after invoking this. - #[structopt(name = "clear-resync-queue", version = garage_version())] - ClearResyncQueue, /// Repropagate object deletions to the version table #[structopt(name = "versions", version = garage_version())] Versions, @@ -482,9 +478,6 @@ pub enum RepairWhat { /// Recalculate block reference counters #[structopt(name = "block-rc", version = garage_version())] BlockRc, - /// Fix inconsistency in bucket aliases (WARNING: EXPERIMENTAL) - #[structopt(name = "aliases", version = garage_version())] - Aliases, /// Verify integrity of all blocks on disc #[structopt(name = "scrub", version = garage_version())] Scrub { diff --git a/src/garage/main.rs b/src/garage/main.rs index 2703bedd..92fd4d0c 100644 --- a/src/garage/main.rs +++ b/src/garage/main.rs @@ -107,7 +107,7 @@ async fn main() { ); // Initialize panic handler that aborts on panic and shows a nice message. - // By default, Tokio continues running normally when a task panics. We want + // By default, Tokio continues runing normally when a task panics. We want // to avoid this behavior in Garage as this would risk putting the process in an // unknown/uncontrollable state. We prefer to exit the process and restart it // from scratch, so that it boots back into a fresh, known state. @@ -208,43 +208,6 @@ fn init_logging(opt: &Opt) { } } - if std::env::var("GARAGE_LOG_TO_JOURNALD") - .map(|x| x == "1" || x == "true") - .unwrap_or(false) - { - #[cfg(feature = "journald")] - { - use tracing_journald::{Priority, PriorityMappings}; - use tracing_subscriber::layer::SubscriberExt; - use tracing_subscriber::util::SubscriberInitExt; - - let registry = tracing_subscriber::registry() - .with(tracing_subscriber::fmt::layer().with_writer(std::io::sink)) - .with(env_filter); - match tracing_journald::layer() { - Ok(layer) => { - registry - .with(layer.with_priority_mappings(PriorityMappings { - info: Priority::Informational, - debug: Priority::Debug, - ..PriorityMappings::new() - })) - .init(); - } - Err(e) => { - eprintln!("Couldn't connect to journald: {}.", e); - std::process::exit(1); - } - } - return; - } - #[cfg(not(feature = "journald"))] - { - eprintln!("Journald support is not enabled in this build."); - std::process::exit(1); - } - } - tracing_subscriber::fmt() .with_writer(std::io::stderr) .with_env_filter(env_filter) diff --git a/src/garage/repair/online.rs b/src/garage/repair/online.rs index 6a7dafcf..2c5227d2 100644 --- a/src/garage/repair/online.rs +++ b/src/garage/repair/online.rs @@ -1,4 +1,3 @@ -use std::future::Future; use std::sync::Arc; use std::time::Duration; @@ -88,31 +87,23 @@ pub async fn launch_online_repair( garage.block_manager.clone(), )); } - RepairWhat::Aliases => { - info!("Repairing bucket aliases (foreground)"); - garage.locked_helper().await.repair_aliases().await?; - } - RepairWhat::ClearResyncQueue => { - let garage = garage.clone(); - tokio::task::spawn_blocking(move || garage.block_manager.resync.clear_resync_queue()) - .await?? - } } Ok(()) } // ---- +#[async_trait] trait TableRepair: Send + Sync + 'static { type T: TableSchema; fn table(garage: &Garage) -> &Table; - fn process( + async fn process( &mut self, garage: &Garage, entry: <::T as TableSchema>::E, - ) -> impl Future> + Send; + ) -> Result; } struct TableRepairWorker { @@ -183,6 +174,7 @@ impl Worker for TableRepairWorker { struct RepairVersions; +#[async_trait] impl TableRepair for RepairVersions { type T = VersionTable; @@ -229,6 +221,7 @@ impl TableRepair for RepairVersions { struct RepairBlockRefs; +#[async_trait] impl TableRepair for RepairBlockRefs { type T = BlockRefTable; @@ -264,6 +257,7 @@ impl TableRepair for RepairBlockRefs { struct RepairMpu; +#[async_trait] impl TableRepair for RepairMpu { type T = MultipartUploadTable; diff --git a/src/garage/secrets.rs b/src/garage/secrets.rs index 17781efe..8d2ff475 100644 --- a/src/garage/secrets.rs +++ b/src/garage/secrets.rs @@ -104,7 +104,7 @@ pub(crate) fn fill_secret( if let Some(val) = cli_value { if config_secret.is_some() || config_secret_file.is_some() { - debug!("Overriding secret `{}` using value specified using CLI argument or environment variable.", name); + debug!("Overriding secret `{}` using value specified using CLI argument or environnement variable.", name); } *config_secret = Some(val); diff --git a/src/garage/server.rs b/src/garage/server.rs index b81ae334..65bf34db 100644 --- a/src/garage/server.rs +++ b/src/garage/server.rs @@ -6,13 +6,13 @@ use garage_util::background::*; use garage_util::config::*; use garage_util::error::Error; -use garage_api_admin::api_server::AdminApiServer; -use garage_api_s3::api_server::S3ApiServer; +use garage_api::admin::api_server::AdminApiServer; +use garage_api::s3::api_server::S3ApiServer; use garage_model::garage::Garage; use garage_web::WebServer; #[cfg(feature = "k2v")] -use garage_api_k2v::api_server::K2VApiServer; +use garage_api::k2v::api_server::K2VApiServer; use crate::admin::*; use crate::secrets::{fill_secrets, Secrets}; @@ -113,7 +113,7 @@ pub async fn run_server(config_file: PathBuf, secrets: Secrets) -> Result<(), Er if let Some(web_config) = &config.s3_web { info!("Initializing web server..."); - let web_server = WebServer::new(garage.clone(), &web_config); + let web_server = WebServer::new(garage.clone(), web_config.root_domain.clone()); servers.push(( "Web", tokio::spawn(web_server.run(web_config.bind_addr.clone(), watch_cancel.clone())), @@ -183,21 +183,10 @@ fn watch_shutdown_signal() -> watch::Receiver { let mut sigterm = signal(SignalKind::terminate()).expect("Failed to install SIGTERM handler"); let mut sighup = signal(SignalKind::hangup()).expect("Failed to install SIGHUP handler"); - loop { - tokio::select! { - _ = sigint.recv() => { - info!("Received SIGINT, shutting down."); - break - } - _ = sigterm.recv() => { - info!("Received SIGTERM, shutting down."); - break - } - _ = sighup.recv() => { - info!("Received SIGHUP, reload not supported."); - continue - } - } + tokio::select! { + _ = sigint.recv() => info!("Received SIGINT, shutting down."), + _ = sigterm.recv() => info!("Received SIGTERM, shutting down."), + _ = sighup.recv() => info!("Received SIGHUP, shutting down."), } send_cancel.send(true).unwrap(); }); diff --git a/src/garage/tests/common/client.rs b/src/garage/tests/common/client.rs index 7a6612cb..ffa4cae8 100644 --- a/src/garage/tests/common/client.rs +++ b/src/garage/tests/common/client.rs @@ -12,7 +12,7 @@ pub fn build_client(key: &Key) -> Client { .endpoint_url(format!("http://127.0.0.1:{}", DEFAULT_PORT)) .region(super::REGION) .credentials_provider(credentials) - .behavior_version(BehaviorVersion::v2024_03_28()) + .behavior_version(BehaviorVersion::v2023_11_09()) .build(); Client::from_conf(config) diff --git a/src/garage/tests/common/custom_requester.rs b/src/garage/tests/common/custom_requester.rs index 6a8eed38..8e1eaa56 100644 --- a/src/garage/tests/common/custom_requester.rs +++ b/src/garage/tests/common/custom_requester.rs @@ -15,7 +15,7 @@ use hyper_util::client::legacy::{connect::HttpConnector, Client}; use hyper_util::rt::TokioExecutor; use super::garage::{Instance, Key}; -use garage_api_common::signature; +use garage_api::signature; pub type Body = FullBody; @@ -153,7 +153,7 @@ impl<'a> RequestBuilder<'a> { pub async fn send(&mut self) -> Result, String> { // TODO this is a bit incorrect in that path and query params should be url-encoded and - // aren't, but this is good enough for now. + // aren't, but this is good enought for now. let query = query_param_to_string(&self.query_params); let (host, path) = if self.vhost_style { @@ -192,13 +192,16 @@ impl<'a> RequestBuilder<'a> { .collect::(); let date = now.format(signature::LONG_DATETIME).to_string(); - all_headers.insert(signature::X_AMZ_DATE, HeaderValue::from_str(&date).unwrap()); + all_headers.insert( + signature::payload::X_AMZ_DATE, + HeaderValue::from_str(&date).unwrap(), + ); all_headers.insert(HOST, HeaderValue::from_str(&host).unwrap()); - let body_sha = match &self.body_signature { + let body_sha = match self.body_signature { BodySignature::Unsigned => "UNSIGNED-PAYLOAD".to_owned(), BodySignature::Classic => hex::encode(garage_util::data::sha256sum(&self.body)), - BodySignature::Streaming { chunk_size } => { + BodySignature::Streaming(size) => { all_headers.insert( CONTENT_ENCODING, HeaderValue::from_str("aws-chunked").unwrap(), @@ -207,65 +210,24 @@ impl<'a> RequestBuilder<'a> { HeaderName::from_static("x-amz-decoded-content-length"), HeaderValue::from_str(&self.body.len().to_string()).unwrap(), ); - // Get length of body by doing the conversion to a streaming body with an + // Get lenght of body by doing the conversion to a streaming body with an // invalid signature (we don't know the seed) just to get its length. This - // is a pretty lazy and inefficient way to do it, but it's enough for test + // is a pretty lazy and inefficient way to do it, but it's enought for test // code. all_headers.insert( CONTENT_LENGTH, - to_streaming_body( - &self.body, - *chunk_size, - String::new(), - signer.clone(), - now, - "", - ) - .len() - .to_string() - .try_into() - .unwrap(), + to_streaming_body(&self.body, size, String::new(), signer.clone(), now, "") + .len() + .to_string() + .try_into() + .unwrap(), ); "STREAMING-AWS4-HMAC-SHA256-PAYLOAD".to_owned() } - BodySignature::StreamingUnsignedTrailer { - chunk_size, - trailer_algorithm, - trailer_value, - } => { - all_headers.insert( - CONTENT_ENCODING, - HeaderValue::from_str("aws-chunked").unwrap(), - ); - all_headers.insert( - HeaderName::from_static("x-amz-decoded-content-length"), - HeaderValue::from_str(&self.body.len().to_string()).unwrap(), - ); - all_headers.insert( - HeaderName::from_static("x-amz-trailer"), - HeaderValue::from_str(&trailer_algorithm).unwrap(), - ); - - all_headers.insert( - CONTENT_LENGTH, - to_streaming_unsigned_trailer_body( - &self.body, - *chunk_size, - &trailer_algorithm, - &trailer_value, - ) - .len() - .to_string() - .try_into() - .unwrap(), - ); - - "STREAMING-UNSIGNED-PAYLOAD-TRAILER".to_owned() - } }; all_headers.insert( - signature::X_AMZ_CONTENT_SHA256, + signature::payload::X_AMZ_CONTENT_SH256, HeaderValue::from_str(&body_sha).unwrap(), ); @@ -314,26 +276,10 @@ impl<'a> RequestBuilder<'a> { let mut request = Request::builder(); *request.headers_mut().unwrap() = all_headers; - let body = match &self.body_signature { - BodySignature::Streaming { chunk_size } => to_streaming_body( - &self.body, - *chunk_size, - signature, - streaming_signer, - now, - &scope, - ), - BodySignature::StreamingUnsignedTrailer { - chunk_size, - trailer_algorithm, - trailer_value, - } => to_streaming_unsigned_trailer_body( - &self.body, - *chunk_size, - &trailer_algorithm, - &trailer_value, - ), - _ => self.body.clone(), + let body = if let BodySignature::Streaming(size) = self.body_signature { + to_streaming_body(&self.body, size, signature, streaming_signer, now, &scope) + } else { + self.body.clone() }; let request = request .uri(uri) @@ -362,14 +308,7 @@ impl<'a> RequestBuilder<'a> { pub enum BodySignature { Unsigned, Classic, - Streaming { - chunk_size: usize, - }, - StreamingUnsignedTrailer { - chunk_size: usize, - trailer_algorithm: String, - trailer_value: String, - }, + Streaming(usize), } fn query_param_to_string(params: &HashMap>) -> String { @@ -424,26 +363,3 @@ fn to_streaming_body( res } - -fn to_streaming_unsigned_trailer_body( - body: &[u8], - chunk_size: usize, - trailer_algorithm: &str, - trailer_value: &str, -) -> Vec { - let mut res = Vec::with_capacity(body.len()); - for chunk in body.chunks(chunk_size) { - let header = format!("{:x}\r\n", chunk.len()); - res.extend_from_slice(header.as_bytes()); - res.extend_from_slice(chunk); - res.extend_from_slice(b"\r\n"); - } - - res.extend_from_slice(b"0\r\n"); - res.extend_from_slice(trailer_algorithm.as_bytes()); - res.extend_from_slice(b":"); - res.extend_from_slice(trailer_value.as_bytes()); - res.extend_from_slice(b"\n\r\n\r\n"); - - res -} diff --git a/src/garage/tests/common/garage.rs b/src/garage/tests/common/garage.rs index 2b0a381c..db23d316 100644 --- a/src/garage/tests/common/garage.rs +++ b/src/garage/tests/common/garage.rs @@ -13,6 +13,7 @@ static GARAGE_TEST_SECRET: &str = #[derive(Debug, Default, Clone)] pub struct Key { + pub name: Option, pub id: String, pub secret: String, } @@ -63,8 +64,6 @@ rpc_bind_addr = "127.0.0.1:{rpc_port}" rpc_public_addr = "127.0.0.1:{rpc_port}" rpc_secret = "{secret}" -allow_punycode = true - [s3_api] s3_region = "{region}" api_bind_addr = "127.0.0.1:{s3_port}" @@ -101,10 +100,7 @@ api_bind_addr = "127.0.0.1:{admin_port}" .arg("server") .stdout(stdout) .stderr(stderr) - .env( - "RUST_LOG", - "garage=debug,garage_api_common=trace,garage_api_s3=trace", - ) + .env("RUST_LOG", "garage=debug,garage_api=trace") .spawn() .expect("Could not start garage"); @@ -217,7 +213,10 @@ api_bind_addr = "127.0.0.1:{admin_port}" assert!(!key.id.is_empty(), "Invalid key: Key ID is empty"); assert!(!key.secret.is_empty(), "Invalid key: Key secret is empty"); - key + Key { + name: maybe_name.map(String::from), + ..key + } } } diff --git a/src/garage/tests/s3/objects.rs b/src/garage/tests/s3/objects.rs index 53e8231d..77eca2b1 100644 --- a/src/garage/tests/s3/objects.rs +++ b/src/garage/tests/s3/objects.rs @@ -1,6 +1,5 @@ use crate::common; -use aws_sdk_s3::error::SdkError; -use aws_sdk_s3::primitives::{ByteStream, DateTime}; +use aws_sdk_s3::primitives::ByteStream; use aws_sdk_s3::types::{Delete, ObjectIdentifier}; const STD_KEY: &str = "hello world"; @@ -126,153 +125,6 @@ async fn test_putobject() { } } -#[tokio::test] -async fn test_precondition() { - let ctx = common::context(); - let bucket = ctx.create_bucket("precondition"); - - let etag = "\"46cf18a9b447991b450cad3facf5937e\""; - let etag2 = "\"ae4984b984cd984fe98d4efa954dce98\""; - let data = ByteStream::from_static(BODY); - - let r = ctx - .client - .put_object() - .bucket(&bucket) - .key(STD_KEY) - .body(data) - .send() - .await - .unwrap(); - - assert_eq!(r.e_tag.unwrap().as_str(), etag); - - let last_modified; - { - let o = ctx - .client - .get_object() - .bucket(&bucket) - .key(STD_KEY) - .if_match(etag) - .send() - .await - .unwrap(); - assert_eq!(o.e_tag.as_ref().unwrap().as_str(), etag); - last_modified = o.last_modified.unwrap(); - - let err = ctx - .client - .get_object() - .bucket(&bucket) - .key(STD_KEY) - .if_match(etag2) - .send() - .await; - assert!( - matches!(err, Err(SdkError::ServiceError(se)) if se.raw().status().as_u16() == 412) - ); - } - { - let o = ctx - .client - .get_object() - .bucket(&bucket) - .key(STD_KEY) - .if_none_match(etag2) - .send() - .await - .unwrap(); - assert_eq!(o.e_tag.as_ref().unwrap().as_str(), etag); - - let err = ctx - .client - .get_object() - .bucket(&bucket) - .key(STD_KEY) - .if_none_match(etag) - .send() - .await; - assert!( - matches!(err, Err(SdkError::ServiceError(se)) if se.raw().status().as_u16() == 304) - ); - } - let older_date = DateTime::from_secs_f64(last_modified.as_secs_f64() - 10.0); - let same_date = DateTime::from_secs_f64(last_modified.as_secs_f64()); - let newer_date = DateTime::from_secs_f64(last_modified.as_secs_f64() + 10.0); - { - let err = ctx - .client - .get_object() - .bucket(&bucket) - .key(STD_KEY) - .if_modified_since(newer_date) - .send() - .await; - assert!( - matches!(err, Err(SdkError::ServiceError(se)) if se.raw().status().as_u16() == 304) - ); - - let err = ctx - .client - .get_object() - .bucket(&bucket) - .key(STD_KEY) - .if_modified_since(same_date) - .send() - .await; - assert!( - matches!(err, Err(SdkError::ServiceError(se)) if se.raw().status().as_u16() == 304) - ); - - let o = ctx - .client - .get_object() - .bucket(&bucket) - .key(STD_KEY) - .if_modified_since(older_date) - .send() - .await - .unwrap(); - assert_eq!(o.e_tag.as_ref().unwrap().as_str(), etag); - } - { - let err = ctx - .client - .get_object() - .bucket(&bucket) - .key(STD_KEY) - .if_unmodified_since(older_date) - .send() - .await; - assert!( - matches!(err, Err(SdkError::ServiceError(se)) if se.raw().status().as_u16() == 412) - ); - - let o = ctx - .client - .get_object() - .bucket(&bucket) - .key(STD_KEY) - .if_unmodified_since(same_date) - .send() - .await - .unwrap(); - assert_eq!(o.e_tag.as_ref().unwrap().as_str(), etag); - - let o = ctx - .client - .get_object() - .bucket(&bucket) - .key(STD_KEY) - .if_unmodified_since(newer_date) - .send() - .await - .unwrap(); - assert_eq!(o.e_tag.as_ref().unwrap().as_str(), etag); - } -} - #[tokio::test] async fn test_getobject() { let ctx = common::context(); @@ -337,14 +189,12 @@ async fn test_getobject() { #[tokio::test] async fn test_metadata() { - use aws_sdk_s3::primitives::{DateTime, DateTimeFormat}; - let ctx = common::context(); let bucket = ctx.create_bucket("testmetadata"); let etag = "\"46cf18a9b447991b450cad3facf5937e\""; - let exp = DateTime::from_secs(10000000000); - let exp2 = DateTime::from_secs(10000500000); + let exp = aws_sdk_s3::primitives::DateTime::from_secs(10000000000); + let exp2 = aws_sdk_s3::primitives::DateTime::from_secs(10000500000); { // Note. The AWS client SDK adds a Content-Type header @@ -377,7 +227,7 @@ async fn test_metadata() { assert_eq!(o.content_disposition, None); assert_eq!(o.content_encoding, None); assert_eq!(o.content_language, None); - assert_eq!(o.expires_string, None); + assert_eq!(o.expires, None); assert_eq!(o.metadata.unwrap_or_default().len(), 0); let o = ctx @@ -400,10 +250,7 @@ async fn test_metadata() { assert_eq!(o.content_disposition.unwrap().as_str(), "cddummy"); assert_eq!(o.content_encoding.unwrap().as_str(), "cedummy"); assert_eq!(o.content_language.unwrap().as_str(), "cldummy"); - assert_eq!( - o.expires_string.unwrap(), - exp.fmt(DateTimeFormat::HttpDate).unwrap() - ); + assert_eq!(o.expires.unwrap(), exp); } { @@ -441,10 +288,7 @@ async fn test_metadata() { assert_eq!(o.content_disposition.unwrap().as_str(), "cdtest"); assert_eq!(o.content_encoding.unwrap().as_str(), "cetest"); assert_eq!(o.content_language.unwrap().as_str(), "cltest"); - assert_eq!( - o.expires_string.unwrap(), - exp2.fmt(DateTimeFormat::HttpDate).unwrap() - ); + assert_eq!(o.expires.unwrap(), exp2); let mut meta = o.metadata.unwrap(); assert_eq!(meta.remove("testmeta").unwrap(), "hello people"); assert_eq!(meta.remove("nice-unicode-meta").unwrap(), "宅配便"); @@ -470,10 +314,7 @@ async fn test_metadata() { assert_eq!(o.content_disposition.unwrap().as_str(), "cddummy"); assert_eq!(o.content_encoding.unwrap().as_str(), "cedummy"); assert_eq!(o.content_language.unwrap().as_str(), "cldummy"); - assert_eq!( - o.expires_string.unwrap(), - exp.fmt(DateTimeFormat::HttpDate).unwrap() - ); + assert_eq!(o.expires.unwrap(), exp); } } diff --git a/src/garage/tests/s3/streaming_signature.rs b/src/garage/tests/s3/streaming_signature.rs index a86feefc..351aa422 100644 --- a/src/garage/tests/s3/streaming_signature.rs +++ b/src/garage/tests/s3/streaming_signature.rs @@ -1,8 +1,5 @@ use std::collections::HashMap; -use base64::prelude::*; -use crc32fast::Hasher as Crc32; - use crate::common; use crate::common::ext::CommandExt; use common::custom_requester::BodySignature; @@ -24,7 +21,7 @@ async fn test_putobject_streaming() { let content_type = "text/csv"; let mut headers = HashMap::new(); headers.insert("content-type".to_owned(), content_type.to_owned()); - let res = ctx + let _ = ctx .custom_request .builder(bucket.clone()) .method(Method::PUT) @@ -32,11 +29,10 @@ async fn test_putobject_streaming() { .signed_headers(headers) .vhost_style(true) .body(vec![]) - .body_signature(BodySignature::Streaming { chunk_size: 10 }) + .body_signature(BodySignature::Streaming(10)) .send() .await .unwrap(); - assert!(res.status().is_success(), "got response: {:?}", res); // assert_eq!(r.e_tag.unwrap().as_str(), etag); // We return a version ID here @@ -69,14 +65,7 @@ async fn test_putobject_streaming() { { let etag = "\"46cf18a9b447991b450cad3facf5937e\""; - let mut crc32 = Crc32::new(); - crc32.update(&BODY[..]); - let crc32 = BASE64_STANDARD.encode(&u32::to_be_bytes(crc32.finalize())[..]); - - let mut headers = HashMap::new(); - headers.insert("x-amz-checksum-crc32".to_owned(), crc32.clone()); - - let res = ctx + let _ = ctx .custom_request .builder(bucket.clone()) .method(Method::PUT) @@ -84,13 +73,11 @@ async fn test_putobject_streaming() { //fail .path("abc".to_owned()) .vhost_style(true) - .signed_headers(headers) .body(BODY.to_vec()) - .body_signature(BodySignature::Streaming { chunk_size: 16 }) + .body_signature(BodySignature::Streaming(16)) .send() .await .unwrap(); - assert!(res.status().is_success(), "got response: {:?}", res); // assert_eq!(r.e_tag.unwrap().as_str(), etag); // assert!(r.version_id.is_some()); @@ -101,7 +88,6 @@ async fn test_putobject_streaming() { .bucket(&bucket) //.key(CTRL_KEY) .key("abc") - .checksum_mode(aws_sdk_s3::types::ChecksumMode::Enabled) .send() .await .unwrap(); @@ -112,142 +98,6 @@ async fn test_putobject_streaming() { assert_eq!(o.content_length.unwrap(), 62); assert_eq!(o.parts_count, None); assert_eq!(o.tag_count, None); - assert_eq!(o.checksum_crc32.unwrap(), crc32); - } -} - -#[tokio::test] -async fn test_putobject_streaming_unsigned_trailer() { - let ctx = common::context(); - let bucket = ctx.create_bucket("putobject-streaming-unsigned-trailer"); - - { - // Send an empty object (can serve as a directory marker) - // with a content type - let etag = "\"d41d8cd98f00b204e9800998ecf8427e\""; - let content_type = "text/csv"; - let mut headers = HashMap::new(); - headers.insert("content-type".to_owned(), content_type.to_owned()); - - let empty_crc32 = BASE64_STANDARD.encode(&u32::to_be_bytes(Crc32::new().finalize())[..]); - - let res = ctx - .custom_request - .builder(bucket.clone()) - .method(Method::PUT) - .path(STD_KEY.to_owned()) - .signed_headers(headers) - .vhost_style(true) - .body(vec![]) - .body_signature(BodySignature::StreamingUnsignedTrailer { - chunk_size: 10, - trailer_algorithm: "x-amz-checksum-crc32".into(), - trailer_value: empty_crc32, - }) - .send() - .await - .unwrap(); - assert!(res.status().is_success(), "got response: {:?}", res); - - // assert_eq!(r.e_tag.unwrap().as_str(), etag); - // We return a version ID here - // We should check if Amazon is returning one when versioning is not enabled - // assert!(r.version_id.is_some()); - - //let _version = r.version_id.unwrap(); - - let o = ctx - .client - .get_object() - .bucket(&bucket) - .key(STD_KEY) - .send() - .await - .unwrap(); - - assert_bytes_eq!(o.body, b""); - assert_eq!(o.e_tag.unwrap(), etag); - // We do not return version ID - // We should check if Amazon is returning one when versioning is not enabled - // assert_eq!(o.version_id.unwrap(), _version); - assert_eq!(o.content_type.unwrap(), content_type); - assert!(o.last_modified.is_some()); - assert_eq!(o.content_length.unwrap(), 0); - assert_eq!(o.parts_count, None); - assert_eq!(o.tag_count, None); - } - - { - let etag = "\"46cf18a9b447991b450cad3facf5937e\""; - - let mut crc32 = Crc32::new(); - crc32.update(&BODY[..]); - let crc32 = BASE64_STANDARD.encode(&u32::to_be_bytes(crc32.finalize())[..]); - - // try sending with wrong crc32, check that it fails - let err_res = ctx - .custom_request - .builder(bucket.clone()) - .method(Method::PUT) - //.path(CTRL_KEY.to_owned()) at the moment custom_request does not encode url so this - //fail - .path("abc".to_owned()) - .vhost_style(true) - .body(BODY.to_vec()) - .body_signature(BodySignature::StreamingUnsignedTrailer { - chunk_size: 16, - trailer_algorithm: "x-amz-checksum-crc32".into(), - trailer_value: "2Yp9Yw==".into(), - }) - .send() - .await - .unwrap(); - assert!( - err_res.status().is_client_error(), - "got response: {:?}", - err_res - ); - - let res = ctx - .custom_request - .builder(bucket.clone()) - .method(Method::PUT) - //.path(CTRL_KEY.to_owned()) at the moment custom_request does not encode url so this - //fail - .path("abc".to_owned()) - .vhost_style(true) - .body(BODY.to_vec()) - .body_signature(BodySignature::StreamingUnsignedTrailer { - chunk_size: 16, - trailer_algorithm: "x-amz-checksum-crc32".into(), - trailer_value: crc32.clone(), - }) - .send() - .await - .unwrap(); - assert!(res.status().is_success(), "got response: {:?}", res); - - // assert_eq!(r.e_tag.unwrap().as_str(), etag); - // assert!(r.version_id.is_some()); - - let o = ctx - .client - .get_object() - .bucket(&bucket) - //.key(CTRL_KEY) - .key("abc") - .checksum_mode(aws_sdk_s3::types::ChecksumMode::Enabled) - .send() - .await - .unwrap(); - - assert_bytes_eq!(o.body, BODY); - assert_eq!(o.e_tag.unwrap(), etag); - assert!(o.last_modified.is_some()); - assert_eq!(o.content_length.unwrap(), 62); - assert_eq!(o.parts_count, None); - assert_eq!(o.tag_count, None); - assert_eq!(o.checksum_crc32.unwrap(), crc32); } } @@ -269,7 +119,7 @@ async fn test_create_bucket_streaming() { .custom_request .builder(bucket.to_owned()) .method(Method::PUT) - .body_signature(BodySignature::Streaming { chunk_size: 10 }) + .body_signature(BodySignature::Streaming(10)) .send() .await .unwrap(); @@ -324,7 +174,7 @@ async fn test_put_website_streaming() { .method(Method::PUT) .query_params(query) .body(website_config.as_bytes().to_vec()) - .body_signature(BodySignature::Streaming { chunk_size: 10 }) + .body_signature(BodySignature::Streaming(10)) .send() .await .unwrap(); diff --git a/src/garage/tests/s3/website.rs b/src/garage/tests/s3/website.rs index bbac3de5..0cadc388 100644 --- a/src/garage/tests/s3/website.rs +++ b/src/garage/tests/s3/website.rs @@ -11,7 +11,6 @@ use http::{Request, StatusCode}; use http_body_util::BodyExt; use http_body_util::Full as FullBody; use hyper::body::Bytes; -use hyper::header::LOCATION; use hyper_util::client::legacy::Client; use hyper_util::rt::TokioExecutor; use serde_json::json; @@ -296,33 +295,6 @@ async fn test_website_s3_api() { ); } - // Test x-amz-website-redirect-location - { - ctx.client - .put_object() - .bucket(&bucket) - .key("test-redirect.html") - .website_redirect_location("https://perdu.com") - .send() - .await - .unwrap(); - - let req = Request::builder() - .method("GET") - .uri(format!( - "http://127.0.0.1:{}/test-redirect.html", - ctx.garage.web_port - )) - .header("Host", format!("{}.web.garage", BCKT_NAME)) - .body(Body::new(Bytes::new())) - .unwrap(); - - let resp = client.request(req).await.unwrap(); - - assert_eq!(resp.status(), StatusCode::MOVED_PERMANENTLY); - assert_eq!(resp.headers().get(LOCATION).unwrap(), "https://perdu.com"); - } - // Test CORS with an allowed preflight request { let req = Request::builder() @@ -533,118 +505,3 @@ async fn test_website_check_domain() { }) ); } - -#[tokio::test] -async fn test_website_puny() { - const BCKT_NAME: &str = "xn--pda.eu"; - let ctx = common::context(); - let bucket = ctx.create_bucket(BCKT_NAME); - - let data = ByteStream::from_static(BODY); - - ctx.client - .put_object() - .bucket(&bucket) - .key("index.html") - .body(data) - .send() - .await - .unwrap(); - - let client = Client::builder(TokioExecutor::new()).build_http(); - - let req = |suffix| { - Request::builder() - .method("GET") - .uri(format!("http://127.0.0.1:{}/", ctx.garage.web_port)) - .header("Host", format!("{}{}", BCKT_NAME, suffix)) - .body(Body::new(Bytes::new())) - .unwrap() - }; - - ctx.garage - .command() - .args(["bucket", "website", "--allow", BCKT_NAME]) - .quiet() - .expect_success_status("Could not allow website on bucket"); - - let mut resp = client.request(req("")).await.unwrap(); - assert_eq!(resp.status(), StatusCode::OK); - assert_eq!( - resp.into_body().collect().await.unwrap().to_bytes(), - BODY.as_ref() - ); - - resp = client.request(req(".web.garage")).await.unwrap(); - assert_eq!(resp.status(), StatusCode::OK); - assert_eq!( - resp.into_body().collect().await.unwrap().to_bytes(), - BODY.as_ref() - ); - - for bname in [ - BCKT_NAME.to_string(), - format!("{BCKT_NAME}.web.garage"), - format!("{BCKT_NAME}.s3.garage"), - ] { - let admin_req = || { - Request::builder() - .method("GET") - .uri(format!( - "http://127.0.0.1:{0}/check?domain={1}", - ctx.garage.admin_port, bname - )) - .body(Body::new(Bytes::new())) - .unwrap() - }; - - let admin_resp = client.request(admin_req()).await.unwrap(); - assert_eq!(admin_resp.status(), StatusCode::OK); - assert_eq!( - admin_resp.into_body().collect().await.unwrap().to_bytes(), - format!("Domain '{bname}' is managed by Garage").as_bytes() - ); - } -} - -#[tokio::test] -async fn test_website_object_not_found() { - const BCKT_NAME: &str = "not-found"; - let ctx = common::context(); - let _bucket = ctx.create_bucket(BCKT_NAME); - - let client = Client::builder(TokioExecutor::new()).build_http(); - - let req = |suffix| { - Request::builder() - .method("GET") - .uri(format!("http://127.0.0.1:{}/", ctx.garage.web_port)) - .header("Host", format!("{}{}", BCKT_NAME, suffix)) - .body(Body::new(Bytes::new())) - .unwrap() - }; - - ctx.garage - .command() - .args(["bucket", "website", "--allow", BCKT_NAME]) - .quiet() - .expect_success_status("Could not allow website on bucket"); - - let resp = client.request(req("")).await.unwrap(); - assert_eq!(resp.status(), StatusCode::NOT_FOUND); - // the error we return by default are *not* xml - assert_eq!( - resp.headers().get(http::header::CONTENT_TYPE).unwrap(), - "text/html; charset=utf-8" - ); - let result = String::from_utf8( - resp.into_body() - .collect() - .await - .unwrap() - .to_bytes() - .to_vec(), - ) - .unwrap(); - assert!(result.contains("not found")); -} diff --git a/src/k2v-client/Cargo.toml b/src/k2v-client/Cargo.toml index bbd09b19..694be1f8 100644 --- a/src/k2v-client/Cargo.toml +++ b/src/k2v-client/Cargo.toml @@ -29,11 +29,12 @@ tokio.workspace = true # cli deps clap = { workspace = true, optional = true } format_table = { workspace = true, optional = true } +tracing = { workspace = true, optional = true } tracing-subscriber = { workspace = true, optional = true } [features] -cli = ["clap", "tokio/fs", "tokio/io-std", "tracing-subscriber", "format_table"] +cli = ["clap", "tokio/fs", "tokio/io-std", "tracing", "tracing-subscriber", "format_table"] [lib] path = "lib.rs" diff --git a/src/k2v-client/bin/k2v-cli.rs b/src/k2v-client/bin/k2v-cli.rs index b1c2169b..b9461c89 100644 --- a/src/k2v-client/bin/k2v-cli.rs +++ b/src/k2v-client/bin/k2v-cli.rs @@ -54,7 +54,7 @@ enum Command { partition_key: String, /// Sort key to read from sort_key: String, - /// Output formatting + /// Output formating #[clap(flatten)] output_kind: ReadOutputKind, }, @@ -70,7 +70,7 @@ enum Command { /// Timeout, in seconds #[clap(short = 'T', long)] timeout: Option, - /// Output formatting + /// Output formating #[clap(flatten)] output_kind: ReadOutputKind, }, @@ -87,7 +87,7 @@ enum Command { /// Timeout, in seconds #[clap(short = 'T', long)] timeout: Option, - /// Output formatting + /// Output formating #[clap(flatten)] output_kind: BatchOutputKind, }, @@ -103,7 +103,7 @@ enum Command { }, /// List partition keys ReadIndex { - /// Output formatting + /// Output formating #[clap(flatten)] output_kind: BatchOutputKind, /// Output only partition keys matching this filter @@ -114,7 +114,7 @@ enum Command { ReadRange { /// Partition key to read from partition_key: String, - /// Output formatting + /// Output formating #[clap(flatten)] output_kind: BatchOutputKind, /// Output only sort keys matching this filter @@ -125,7 +125,7 @@ enum Command { DeleteRange { /// Partition key to delete from partition_key: String, - /// Output formatting + /// Output formating #[clap(flatten)] output_kind: BatchOutputKind, /// Delete only sort keys matching this filter @@ -185,10 +185,10 @@ struct ReadOutputKind { /// Raw output. Conflicts generate error, causality token is not returned #[clap(short, long, group = "output-kind")] raw: bool, - /// Human formatted output + /// Human formated output #[clap(short = 'H', long, group = "output-kind")] human: bool, - /// JSON formatted output + /// JSON formated output #[clap(short, long, group = "output-kind")] json: bool, } @@ -207,7 +207,7 @@ impl ReadOutputKind { let mut val = val.value; if val.len() != 1 { eprintln!( - "Raw mode can only read non-concurrent values, found {} values, expected 1", + "Raw mode can only read non-concurent values, found {} values, expected 1", val.len() ); exit(1); @@ -265,10 +265,10 @@ impl ReadOutputKind { #[derive(Parser, Debug)] #[clap(group = clap::ArgGroup::new("output-kind").multiple(false).required(false))] struct BatchOutputKind { - /// Human formatted output + /// Human formated output #[clap(short = 'H', long, group = "output-kind")] human: bool, - /// JSON formatted output + /// JSON formated output #[clap(short, long, group = "output-kind")] json: bool, } diff --git a/src/k2v-client/lib.rs b/src/k2v-client/lib.rs index fe8fd3e0..852274a7 100644 --- a/src/k2v-client/lib.rs +++ b/src/k2v-client/lib.rs @@ -72,16 +72,6 @@ impl K2vClient { .enable_http2() .build(); let client = HttpClient::builder(TokioExecutor::new()).build(connector); - Self::new_with_client(config, client) - } - - /// Create a new K2V client with an external client. - /// Useful for example if you plan on creating many clients but you want to mutualize the - /// underlying thread pools & co. - pub fn new_with_client( - config: K2vClientConfig, - client: HttpClient, Body>, - ) -> Result { let user_agent: std::borrow::Cow = match &config.user_agent { Some(ua) => ua.into(), None => format!("k2v/{}", env!("CARGO_PKG_VERSION")).into(), @@ -346,7 +336,7 @@ impl K2vClient { .collect()) } - /// Perform a DeleteBatch request, deleting multiple values or range of values at once, without + /// Perform a DeleteBatch request, deleting mutiple values or range of values at once, without /// providing causality information. pub async fn delete_batch(&self, operations: &[BatchDeleteOp<'_>]) -> Result, Error> { let url = self.build_url(None, &[("delete", "")]); diff --git a/src/model/Cargo.toml b/src/model/Cargo.toml index 289c0024..25926080 100644 --- a/src/model/Cargo.toml +++ b/src/model/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "garage_model" -version = "1.3.1" +version = "1.0.0" authors = ["Alex Auvolat "] edition = "2018" license = "AGPL-3.0" @@ -22,9 +22,10 @@ garage_util.workspace = true garage_net.workspace = true async-trait.workspace = true +arc-swap.workspace = true blake2.workspace = true chrono.workspace = true -thiserror.workspace = true +err-derive.workspace = true hex.workspace = true http.workspace = true base64.workspace = true @@ -37,11 +38,12 @@ serde.workspace = true serde_bytes.workspace = true futures.workspace = true +futures-util.workspace = true tokio.workspace = true +opentelemetry.workspace = true [features] default = [ "lmdb", "sqlite" ] k2v = [ "garage_util/k2v" ] lmdb = [ "garage_db/lmdb" ] sqlite = [ "garage_db/sqlite" ] -fjall = [ "garage_db/fjall" ] diff --git a/src/model/bucket_alias_table.rs b/src/model/bucket_alias_table.rs index 276d0d1c..54d7fbad 100644 --- a/src/model/bucket_alias_table.rs +++ b/src/model/bucket_alias_table.rs @@ -22,10 +22,14 @@ mod v08 { pub use v08::*; impl BucketAlias { - pub fn new(name: String, ts: u64, bucket_id: Option) -> Self { - BucketAlias { - name, - state: crdt::Lww::raw(ts, bucket_id), + pub fn new(name: String, ts: u64, bucket_id: Option) -> Option { + if !is_valid_bucket_name(&name) { + None + } else { + Some(BucketAlias { + name, + state: crdt::Lww::raw(ts, bucket_id), + }) } } @@ -76,7 +80,7 @@ impl TableSchema for BucketAliasTable { /// In the case of Garage, bucket names must not be hex-encoded /// 32 byte string, which is excluded thanks to the /// maximum length of 63 bytes given in the spec. -pub fn is_valid_bucket_name(n: &str, puny: bool) -> bool { +pub fn is_valid_bucket_name(n: &str) -> bool { // Bucket names must be between 3 and 63 characters n.len() >= 3 && n.len() <= 63 // Bucket names must be composed of lowercase letters, numbers, @@ -85,12 +89,10 @@ pub fn is_valid_bucket_name(n: &str, puny: bool) -> bool { // Bucket names must start and end with a letter or a number && !n.starts_with(&['-', '.'][..]) && !n.ends_with(&['-', '.'][..]) - // Bucket names must not be formatted as an IP address + // Bucket names must not be formated as an IP address && n.parse::().is_err() - // Bucket names must not start with "xn--" - && (!n.starts_with("xn--") || puny) - // We are a bit stricter, to properly restrict punycode in all labels - && (!n.contains(".xn--") || puny) + // Bucket names must not start wih "xn--" + && !n.starts_with("xn--") // Bucket names must not end with "-s3alias" && !n.ends_with("-s3alias") } diff --git a/src/model/bucket_table.rs b/src/model/bucket_table.rs index f1cc032e..1dbdfac2 100644 --- a/src/model/bucket_table.rs +++ b/src/model/bucket_table.rs @@ -14,7 +14,7 @@ mod v08 { /// A bucket is a collection of objects /// /// Its parameters are not directly accessible as: - /// - It must be possible to merge parameters, hence the use of a LWW CRDT. + /// - It must be possible to merge paramaters, hence the use of a LWW CRDT. /// - A bucket has 2 states, Present or Deleted and parameters make sense only if present. #[derive(PartialEq, Eq, Clone, Debug, Serialize, Deserialize)] pub struct Bucket { @@ -126,7 +126,7 @@ impl AutoCrdt for BucketQuotas { } impl BucketParams { - /// Create an empty BucketParams with no authorized keys and no website access + /// Create an empty BucketParams with no authorized keys and no website accesss fn new() -> Self { BucketParams { creation_date: now_msec(), diff --git a/src/model/garage.rs b/src/model/garage.rs index f4f6f693..91add8ac 100644 --- a/src/model/garage.rs +++ b/src/model/garage.rs @@ -116,17 +116,21 @@ impl Garage { info!("Opening database..."); let db_engine = db::Engine::from_str(&config.db_engine) .ok_or_message("Invalid `db_engine` value in configuration file")?; - let db_path = db_engine.db_path(&config.metadata_dir); + let mut db_path = config.metadata_dir.clone(); + match db_engine { + db::Engine::Sqlite => { + db_path.push("db.sqlite"); + } + db::Engine::Lmdb | db::Engine::LmdbWithMetrics => { + db_path.push("db.lmdb"); + } + } let db_opt = db::OpenOpt { fsync: config.metadata_fsync, lmdb_map_size: match config.lmdb_map_size { v if v == usize::default() => None, v => Some(v), }, - fjall_block_cache_size: match config.fjall_block_cache_size { - v if v == usize::default() => None, - v => Some(v), - }, }; let db = db::open_db(&db_path, db_engine, &db_opt) .ok_or_message("Unable to open metadata db")?; @@ -137,7 +141,7 @@ impl Garage { )?) .ok() .and_then(|x| NetworkKey::from_slice(&x)) - .ok_or_message("Invalid RPC secret key: expected 32 bytes of random hex, please check the documentation for requirements")?; + .ok_or_message("Invalid RPC secret key: expected 32 bits of entropy, please check the documentation for requirements")?; let (replication_factor, consistency_mode) = parse_replication_mode(&config)?; @@ -315,17 +319,17 @@ impl Garage { Ok(()) } - pub fn bucket_helper(&self) -> helper::bucket::BucketHelper<'_> { + pub fn bucket_helper(&self) -> helper::bucket::BucketHelper { helper::bucket::BucketHelper(self) } - pub fn key_helper(&self) -> helper::key::KeyHelper<'_> { + pub fn key_helper(&self) -> helper::key::KeyHelper { helper::key::KeyHelper(self) } - pub async fn locked_helper(&self) -> helper::locked::LockedHelper<'_> { + pub async fn locked_helper(&self) -> helper::locked::LockedHelper { let lock = self.bucket_lock.lock().await; - helper::locked::LockedHelper(self, Some(lock)) + helper::locked::LockedHelper(self, lock) } } diff --git a/src/model/helper/error.rs b/src/model/helper/error.rs index bc483c7d..e2ffdd68 100644 --- a/src/model/helper/error.rs +++ b/src/model/helper/error.rs @@ -1,24 +1,24 @@ +use err_derive::Error; use serde::{Deserialize, Serialize}; -use thiserror::Error; use garage_util::error::Error as GarageError; #[derive(Debug, Error, Serialize, Deserialize)] pub enum Error { - #[error("Internal error: {0}")] - Internal(#[from] GarageError), + #[error(display = "Internal error: {}", _0)] + Internal(#[error(source)] GarageError), - #[error("Bad request: {0}")] + #[error(display = "Bad request: {}", _0)] BadRequest(String), /// Bucket name is not valid according to AWS S3 specs - #[error("Invalid bucket name: {0}")] + #[error(display = "Invalid bucket name: {}", _0)] InvalidBucketName(String), - #[error("Access key not found: {0}")] + #[error(display = "Access key not found: {}", _0)] NoSuchAccessKey(String), - #[error("Bucket not found: {0}")] + #[error(display = "Bucket not found: {}", _0)] NoSuchBucket(String), } diff --git a/src/model/helper/locked.rs b/src/model/helper/locked.rs index 98344b63..f8e06add 100644 --- a/src/model/helper/locked.rs +++ b/src/model/helper/locked.rs @@ -1,7 +1,3 @@ -use std::collections::{HashMap, HashSet}; - -use garage_db as db; - use garage_util::crdt::*; use garage_util::data::*; use garage_util::error::{Error as GarageError, OkOrMessage}; @@ -31,16 +27,9 @@ use crate::permission::BucketKeyPerm; /// See issues: #649, #723 pub struct LockedHelper<'a>( pub(crate) &'a Garage, - pub(crate) Option>, + pub(crate) tokio::sync::MutexGuard<'a, ()>, ); -impl<'a> Drop for LockedHelper<'a> { - fn drop(&mut self) { - // make it explicit that the mutexguard lives until here - drop(self.1.take()) - } -} - #[allow(clippy::ptr_arg)] impl<'a> LockedHelper<'a> { pub fn bucket(&self) -> BucketHelper<'a> { @@ -51,10 +40,6 @@ impl<'a> LockedHelper<'a> { KeyHelper(self.0) } - // ================================================ - // global bucket aliases - // ================================================ - /// Sets a new alias for a bucket in global namespace. /// This function fails if: /// - alias name is not valid according to S3 spec @@ -65,7 +50,7 @@ impl<'a> LockedHelper<'a> { bucket_id: Uuid, alias_name: &String, ) -> Result<(), Error> { - if !is_valid_bucket_name(alias_name, self.0.config.allow_punycode) { + if !is_valid_bucket_name(alias_name) { return Err(Error::InvalidBucketName(alias_name.to_string())); } @@ -96,7 +81,8 @@ impl<'a> LockedHelper<'a> { // writes are now done and all writes use timestamp alias_ts let alias = match alias { - None => BucketAlias::new(alias_name.clone(), alias_ts, Some(bucket_id)), + None => BucketAlias::new(alias_name.clone(), alias_ts, Some(bucket_id)) + .ok_or_else(|| Error::InvalidBucketName(alias_name.clone()))?, Some(mut a) => { a.state = Lww::raw(alias_ts, Some(bucket_id)); a @@ -187,14 +173,13 @@ impl<'a> LockedHelper<'a> { .ok_or_else(|| Error::NoSuchBucket(alias_name.to_string()))?; // Checks ok, remove alias - let alias_ts = increment_logical_clock_2( - alias.state.timestamp(), - bucket - .state - .as_option() - .map(|p| p.aliases.get_timestamp(alias_name)) - .unwrap_or(0), - ); + let alias_ts = match bucket.state.as_option() { + Some(bucket_state) => increment_logical_clock_2( + alias.state.timestamp(), + bucket_state.aliases.get_timestamp(alias_name), + ), + None => increment_logical_clock(alias.state.timestamp()), + }; // ---- timestamp-ensured causality barrier ---- // writes are now done and all writes use timestamp alias_ts @@ -212,10 +197,6 @@ impl<'a> LockedHelper<'a> { Ok(()) } - // ================================================ - // local bucket aliases - // ================================================ - /// Sets a new alias for a bucket in the local namespace of a key. /// This function fails if: /// - alias name is not valid according to S3 spec @@ -228,12 +209,14 @@ impl<'a> LockedHelper<'a> { key_id: &String, alias_name: &String, ) -> Result<(), Error> { - if !is_valid_bucket_name(alias_name, self.0.config.allow_punycode) { + let key_helper = KeyHelper(self.0); + + if !is_valid_bucket_name(alias_name) { return Err(Error::InvalidBucketName(alias_name.to_string())); } let mut bucket = self.bucket().get_existing_bucket(bucket_id).await?; - let mut key = self.key().get_existing_key(key_id).await?; + let mut key = key_helper.get_existing_key(key_id).await?; let key_param = key.state.as_option_mut().unwrap(); @@ -248,7 +231,7 @@ impl<'a> LockedHelper<'a> { let bucket_p_local_alias_key = (key.key_id.clone(), alias_name.clone()); // Calculate the timestamp to assign to this aliasing in the two local_aliases maps - // (the one from key to bucket, and the reverse one stored in the bucket itself) + // (the one from key to bucket, and the reverse one stored in the bucket iself) // so that merges on both maps in case of a concurrent operation resolve // to the same alias being set let alias_ts = increment_logical_clock_2( @@ -282,13 +265,22 @@ impl<'a> LockedHelper<'a> { key_id: &String, alias_name: &String, ) -> Result<(), Error> { - let mut bucket = self.bucket().get_existing_bucket(bucket_id).await?; - let mut key = self.key().get_existing_key(key_id).await?; + let key_helper = KeyHelper(self.0); + + let mut bucket = self.bucket().get_existing_bucket(bucket_id).await?; + let mut key = key_helper.get_existing_key(key_id).await?; - let key_p = key.state.as_option().unwrap(); let bucket_p = bucket.state.as_option_mut().unwrap(); - if key_p.local_aliases.get(alias_name).cloned().flatten() != Some(bucket_id) { + if key + .state + .as_option() + .unwrap() + .local_aliases + .get(alias_name) + .cloned() + .flatten() != Some(bucket_id) + { return Err(GarageError::Message(format!( "Bucket {:?} does not have alias {} in namespace of key {}", bucket_id, alias_name, key_id @@ -305,17 +297,17 @@ impl<'a> LockedHelper<'a> { .local_aliases .items() .iter() - .any(|((k, n), _, active)| (*k != key.key_id || n != alias_name) && *active); - + .any(|((k, n), _, active)| *k == key.key_id && n == alias_name && *active); if !has_other_global_aliases && !has_other_local_aliases { return Err(Error::BadRequest(format!("Bucket {} doesn't have other aliases, please delete it instead of just unaliasing.", alias_name))); } // Checks ok, remove alias + let key_param = key.state.as_option_mut().unwrap(); let bucket_p_local_alias_key = (key.key_id.clone(), alias_name.clone()); let alias_ts = increment_logical_clock_2( - key_p.local_aliases.get_timestamp(alias_name), + key_param.local_aliases.get_timestamp(alias_name), bucket_p .local_aliases .get_timestamp(&bucket_p_local_alias_key), @@ -324,8 +316,7 @@ impl<'a> LockedHelper<'a> { // ---- timestamp-ensured causality barrier ---- // writes are now done and all writes use timestamp alias_ts - key.state.as_option_mut().unwrap().local_aliases = - LwwMap::raw_item(alias_name.clone(), alias_ts, None); + key_param.local_aliases = LwwMap::raw_item(alias_name.clone(), alias_ts, None); self.0.key_table.insert(&key).await?; bucket_p.local_aliases = LwwMap::raw_item(bucket_p_local_alias_key, alias_ts, false); @@ -334,68 +325,21 @@ impl<'a> LockedHelper<'a> { Ok(()) } - /// Ensures a bucket does not have a certain local alias. - /// Contrarily to unset_local_bucket_alias, this does not - /// fail on any condition other than: - /// - bucket cannot be found (its fine if it is in deleted state) - /// - key cannot be found (its fine if alias in key points to nothing - /// or to another bucket) - pub async fn purge_local_bucket_alias( - &self, - bucket_id: Uuid, - key_id: &String, - alias_name: &String, - ) -> Result<(), Error> { - let mut bucket = self.bucket().get_internal_bucket(bucket_id).await?; - let mut key = self.key().get_internal_key(key_id).await?; - - let bucket_p_local_alias_key = (key.key_id.clone(), alias_name.clone()); - - let alias_ts = increment_logical_clock_2( - key.state - .as_option() - .map(|p| p.local_aliases.get_timestamp(alias_name)) - .unwrap_or(0), - bucket - .state - .as_option() - .map(|p| p.local_aliases.get_timestamp(&bucket_p_local_alias_key)) - .unwrap_or(0), - ); - - // ---- timestamp-ensured causality barrier ---- - // writes are now done and all writes use timestamp alias_ts - - if let Some(kp) = key.state.as_option_mut() { - kp.local_aliases = LwwMap::raw_item(alias_name.clone(), alias_ts, None); - self.0.key_table.insert(&key).await?; - } - - if let Some(bp) = bucket.state.as_option_mut() { - bp.local_aliases = LwwMap::raw_item(bucket_p_local_alias_key, alias_ts, false); - self.0.bucket_table.insert(&bucket).await?; - } - - Ok(()) - } - - // ================================================ - // permissions - // ================================================ - /// Sets permissions for a key on a bucket. /// This function fails if: /// - bucket or key cannot be found at all (its ok if they are in deleted state) - /// - bucket or key is in deleted state and we are trying to set - /// permissions other than "deny all" + /// - bucket or key is in deleted state and we are trying to set permissions other than "deny + /// all" pub async fn set_bucket_key_permissions( &self, bucket_id: Uuid, key_id: &String, mut perm: BucketKeyPerm, ) -> Result<(), Error> { + let key_helper = KeyHelper(self.0); + let mut bucket = self.bucket().get_internal_bucket(bucket_id).await?; - let mut key = self.key().get_internal_key(key_id).await?; + let mut key = key_helper.get_internal_key(key_id).await?; if let Some(bstate) = bucket.state.as_option() { if let Some(kp) = bstate.authorized_keys.get(key_id) { @@ -432,20 +376,21 @@ impl<'a> LockedHelper<'a> { Ok(()) } - // ================================================ - // keys - // ================================================ + // ---- /// Deletes an API access key pub async fn delete_key(&self, key: &mut Key) -> Result<(), Error> { let state = key.state.as_option_mut().unwrap(); // --- done checking, now commit --- + // (the step at unset_local_bucket_alias will fail if a bucket + // does not have another alias, the deletion will be + // interrupted in the middle if that happens) // 1. Delete local aliases for (alias, _, to) in state.local_aliases.items().iter() { if let Some(bucket_id) = to { - self.purge_local_bucket_alias(*bucket_id, &key.key_id, alias) + self.unset_local_bucket_alias(*bucket_id, &key.key_id, alias) .await?; } } @@ -462,193 +407,4 @@ impl<'a> LockedHelper<'a> { Ok(()) } - - // ================================================ - // repair procedure - // ================================================ - - pub async fn repair_aliases(&self) -> Result<(), GarageError> { - self.0.db.transaction(|tx| { - info!("--- begin repair_aliases transaction ----"); - - // 1. List all non-deleted buckets, so that we can fix bad aliases - let mut all_buckets: HashSet = HashSet::new(); - - for item in tx.range::<&[u8], _>(&self.0.bucket_table.data.store, ..)? { - let bucket = self - .0 - .bucket_table - .data - .decode_entry(&(item?.1)) - .map_err(db::TxError::Abort)?; - if !bucket.is_deleted() { - all_buckets.insert(bucket.id); - } - } - - info!("number of buckets: {}", all_buckets.len()); - - // 2. List all aliases declared in bucket_alias_table and key_table - // Take note of aliases that point to non-existing buckets - let mut global_aliases: HashMap = HashMap::new(); - - { - let mut delete_global = vec![]; - for item in tx.range::<&[u8], _>(&self.0.bucket_alias_table.data.store, ..)? { - let mut alias = self - .0 - .bucket_alias_table - .data - .decode_entry(&(item?.1)) - .map_err(db::TxError::Abort)?; - if let Some(id) = alias.state.get() { - if all_buckets.contains(id) { - // keep aliases - global_aliases.insert(alias.name().to_string(), *id); - } else { - // delete alias - warn!( - "global alias: remove {} -> {:?} (bucket is deleted)", - alias.name(), - id - ); - alias.state.update(None); - delete_global.push(alias); - } - } - } - - info!("number of global aliases: {}", global_aliases.len()); - - info!("global alias table: {} entries fixed", delete_global.len()); - for ga in delete_global { - debug!("Enqueue update to global alias table: {:?}", ga); - self.0.bucket_alias_table.queue_insert(tx, &ga)?; - } - } - - let mut local_aliases: HashMap<(String, String), Uuid> = HashMap::new(); - - { - let mut delete_local = vec![]; - - for item in tx.range::<&[u8], _>(&self.0.key_table.data.store, ..)? { - let mut key = self - .0 - .key_table - .data - .decode_entry(&(item?.1)) - .map_err(db::TxError::Abort)?; - let Some(p) = key.state.as_option_mut() else { - continue; - }; - let mut has_changes = false; - for (name, _, to) in p.local_aliases.items().to_vec() { - if let Some(id) = to { - if all_buckets.contains(&id) { - local_aliases.insert((key.key_id.clone(), name), id); - } else { - warn!( - "local alias: remove ({}, {}) -> {:?} (bucket is deleted)", - key.key_id, name, id - ); - p.local_aliases.update_in_place(name, None); - has_changes = true; - } - } - } - if has_changes { - delete_local.push(key); - } - } - - info!("number of local aliases: {}", local_aliases.len()); - - info!("key table: {} entries fixed", delete_local.len()); - for la in delete_local { - debug!("Enqueue update to key table: {:?}", la); - self.0.key_table.queue_insert(tx, &la)?; - } - } - - // 4. Reverse the alias maps to determine the aliases per-bucket - let mut bucket_global: HashMap> = HashMap::new(); - let mut bucket_local: HashMap> = HashMap::new(); - - for (name, bucket) in global_aliases { - bucket_global.entry(bucket).or_default().push(name); - } - for ((key, name), bucket) in local_aliases { - bucket_local.entry(bucket).or_default().push((key, name)); - } - - // 5. Fix the bucket table to ensure consistency - let mut bucket_updates = vec![]; - - for item in tx.range::<&[u8], _>(&self.0.bucket_table.data.store, ..)? { - let bucket = self - .0 - .bucket_table - .data - .decode_entry(&(item?.1)) - .map_err(db::TxError::Abort)?; - let mut bucket2 = bucket.clone(); - let Some(param) = bucket2.state.as_option_mut() else { - continue; - }; - - // fix global aliases - { - let ga = bucket_global.remove(&bucket.id).unwrap_or_default(); - for (name, _, active) in param.aliases.items().to_vec() { - if active && !ga.contains(&name) { - warn!("bucket {:?}: remove global alias {}", bucket.id, name); - param.aliases.update_in_place(name, false); - } - } - for name in ga { - if param.aliases.get(&name).copied() != Some(true) { - warn!("bucket {:?}: add global alias {}", bucket.id, name); - param.aliases.update_in_place(name, true); - } - } - } - - // fix local aliases - { - let la = bucket_local.remove(&bucket.id).unwrap_or_default(); - for (pair, _, active) in param.local_aliases.items().to_vec() { - if active && !la.contains(&pair) { - warn!("bucket {:?}: remove local alias {:?}", bucket.id, pair); - param.local_aliases.update_in_place(pair, false); - } - } - for pair in la { - if param.local_aliases.get(&pair).copied() != Some(true) { - warn!("bucket {:?}: add local alias {:?}", bucket.id, pair); - param.local_aliases.update_in_place(pair, true); - } - } - } - - if bucket2 != bucket { - bucket_updates.push(bucket2); - } - } - - info!("bucket table: {} entries fixed", bucket_updates.len()); - for b in bucket_updates { - debug!("Enqueue update to bucket table: {:?}", b); - self.0.bucket_table.queue_insert(tx, &b)?; - } - - info!("--- end repair_aliases transaction ----"); - - Ok(()) - })?; - - info!("repair_aliases is done"); - - Ok(()) - } } diff --git a/src/model/k2v/causality.rs b/src/model/k2v/causality.rs index 7d311ede..c80ebd39 100644 --- a/src/model/k2v/causality.rs +++ b/src/model/k2v/causality.rs @@ -16,6 +16,8 @@ use serde::{Deserialize, Serialize}; use garage_util::data::*; +use crate::helper::error::{Error as HelperError, OkOrBadRequest}; + /// Node IDs used in K2V are u64 integers that are the abbreviation /// of full Garage node IDs which are 256-bit UUIDs. pub type K2VNodeId = u64; @@ -97,6 +99,10 @@ impl CausalContext { Some(ret) } + pub fn parse_helper(s: &str) -> Result { + Self::parse(s).ok_or_bad_request("Invalid causality token") + } + /// Check if this causal context contains newer items than another one pub fn is_newer_than(&self, other: &Self) -> bool { vclock_gt(&self.vector_clock, &other.vector_clock) diff --git a/src/model/k2v/rpc.rs b/src/model/k2v/rpc.rs index 821f4549..4d7186a7 100644 --- a/src/model/k2v/rpc.rs +++ b/src/model/k2v/rpc.rs @@ -10,6 +10,7 @@ use std::convert::TryInto; use std::sync::{Arc, Mutex, MutexGuard}; use std::time::{Duration, Instant}; +use async_trait::async_trait; use futures::stream::FuturesUnordered; use futures::StreamExt; use serde::{Deserialize, Serialize}; @@ -309,7 +310,7 @@ impl K2VRpcHandler { // - we have a response to a read quorum of requests (e.g. 2/3), and an extra delay // has passed since the quorum was achieved // - a global RPC timeout expired - // The extra delay after a quorum was received is useful if the third response was to + // The extra delay after a quorum was received is usefull if the third response was to // arrive during this short interval: this would allow us to consider all the data seen // by that last node in the response we produce, and would likely help reduce the // size of the seen marker that we will return (because we would have an info of the @@ -499,7 +500,7 @@ impl K2VRpcHandler { } else { // If no seen marker was specified, we do not poll for anything. // We return immediately with the set of known items (even if - // it is empty), which will give the client an initial view of + // it is empty), which will give the client an inital view of // the dataset and an initial seen marker for further // PollRange calls. self.poll_range_read_range(range, &RangeSeenMarker::default()) @@ -536,6 +537,7 @@ impl K2VRpcHandler { } } +#[async_trait] impl EndpointHandler for K2VRpcHandler { async fn handle(self: &Arc, message: &K2VRpc, _from: NodeID) -> Result { match message { diff --git a/src/model/s3/lifecycle_worker.rs b/src/model/s3/lifecycle_worker.rs index af00437e..9ecf168c 100644 --- a/src/model/s3/lifecycle_worker.rs +++ b/src/model/s3/lifecycle_worker.rs @@ -70,7 +70,7 @@ pub fn register_bg_vars( impl LifecycleWorker { pub fn new(garage: Arc, persister: PersisterShared) -> Self { - let today = today(garage.config.use_local_tz); + let today = today(); let last_completed = persister.get_with(|x| { x.last_completed .as_deref() @@ -121,13 +121,13 @@ impl Worker for LifecycleWorker { mpu_aborted, .. } => { - let n_objects = self.garage.object_table.data.store.approximate_len().ok(); + let n_objects = self.garage.object_table.data.store.len().ok(); let progress = match n_objects { - Some(total) if total > 0 => format!( + None => "...".to_string(), + Some(total) => format!( "~{:.2}%", 100. * std::cmp::min(*counter, total) as f32 / total as f32 ), - _ => "...".to_string(), }; WorkerStatus { progress: Some(progress), @@ -205,9 +205,8 @@ impl Worker for LifecycleWorker { async fn wait_for_work(&mut self) -> WorkerState { match &self.state { State::Completed(d) => { - let use_local_tz = self.garage.config.use_local_tz; let next_day = d.succ_opt().expect("no next day"); - let next_start = midnight_ts(next_day, use_local_tz); + let next_start = midnight_ts(next_day); loop { let now = now_msec(); if now < next_start { @@ -219,7 +218,7 @@ impl Worker for LifecycleWorker { break; } } - self.state = State::start(std::cmp::max(next_day, today(use_local_tz))); + self.state = State::start(std::cmp::max(next_day, today())); } State::Running { .. } => (), } @@ -386,29 +385,20 @@ fn check_size_filter(version_data: &ObjectVersionData, filter: &LifecycleFilter) true } -fn midnight_ts(date: NaiveDate, use_local_tz: bool) -> u64 { - let midnight = date.and_hms_opt(0, 0, 0).expect("midnight does not exist"); - if use_local_tz { - return midnight - .and_local_timezone(Local) - .single() - .expect("bad local midnight") - .timestamp_millis() as u64; - } - midnight.and_utc().timestamp_millis() as u64 +fn midnight_ts(date: NaiveDate) -> u64 { + date.and_hms_opt(0, 0, 0) + .expect("midnight does not exist") + .timestamp_millis() as u64 } fn next_date(ts: u64) -> NaiveDate { - DateTime::::from_timestamp_millis(ts as i64) + NaiveDateTime::from_timestamp_millis(ts as i64) .expect("bad timestamp") - .date_naive() + .date() .succ_opt() .expect("no next day") } -fn today(use_local_tz: bool) -> NaiveDate { - if use_local_tz { - return Local::now().naive_local().date(); - } +fn today() -> NaiveDate { Utc::now().naive_utc().date() } diff --git a/src/model/s3/object_table.rs b/src/model/s3/object_table.rs index 6c33b79b..5c721148 100644 --- a/src/model/s3/object_table.rs +++ b/src/model/s3/object_table.rs @@ -31,11 +31,11 @@ mod v08 { /// The key at which the object is stored in its bucket, used as sorting key pub key: String, - /// The list of currently stored versions of the object + /// The list of currenty stored versions of the object pub(super) versions: Vec, } - /// Information about a version of an object + /// Informations about a version of an object #[derive(PartialEq, Eq, Clone, Debug, Serialize, Deserialize)] pub struct ObjectVersion { /// Id of the version @@ -109,11 +109,11 @@ mod v09 { /// The key at which the object is stored in its bucket, used as sorting key pub key: String, - /// The list of currently stored versions of the object + /// The list of currenty stored versions of the object pub(super) versions: Vec, } - /// Information about a version of an object + /// Informations about a version of an object #[derive(PartialEq, Eq, Clone, Debug, Serialize, Deserialize)] pub struct ObjectVersion { /// Id of the version @@ -186,11 +186,11 @@ mod v010 { /// The key at which the object is stored in its bucket, used as sorting key pub key: String, - /// The list of currently stored versions of the object + /// The list of currenty stored versions of the object pub(super) versions: Vec, } - /// Information about a version of an object + /// Informations about a version of an object #[derive(PartialEq, Eq, Clone, Debug, Serialize, Deserialize)] pub struct ObjectVersion { /// Id of the version diff --git a/src/model/s3/version_table.rs b/src/model/s3/version_table.rs index 45be5af8..d611a9e3 100644 --- a/src/model/s3/version_table.rs +++ b/src/model/s3/version_table.rs @@ -49,7 +49,7 @@ mod v08 { pub offset: u64, } - /// Information about a single block + /// Informations about a single block #[derive(PartialEq, Eq, Ord, PartialOrd, Clone, Copy, Debug, Serialize, Deserialize)] pub struct VersionBlock { /// Blake2 sum of the block diff --git a/src/model/snapshot.rs b/src/model/snapshot.rs index 8e8995f9..36f9ec7d 100644 --- a/src/model/snapshot.rs +++ b/src/model/snapshot.rs @@ -20,7 +20,7 @@ static SNAPSHOT_MUTEX: Mutex<()> = Mutex::new(()); // ================ snapshotting logic ===================== -/// Run snapshot_metadata in a blocking thread and async await on it +/// Run snashot_metadata in a blocking thread and async await on it pub async fn async_snapshot_metadata(garage: &Arc) -> Result<(), Error> { let garage = garage.clone(); let worker = tokio::task::spawn_blocking(move || snapshot_metadata(&garage)); @@ -41,14 +41,8 @@ pub fn snapshot_metadata(garage: &Garage) -> Result<(), Error> { } }; - let snapshots_dir = match &garage.config.metadata_snapshots_dir { - Some(d) => d.clone(), - None => { - let mut default_snapshots_dir = garage.config.metadata_dir.clone(); - default_snapshots_dir.push("snapshots"); - default_snapshots_dir - } - }; + let mut snapshots_dir = garage.config.metadata_dir.clone(); + snapshots_dir.push("snapshots"); fs::create_dir_all(&snapshots_dir)?; let mut new_path = snapshots_dir.clone(); diff --git a/src/net/Cargo.toml b/src/net/Cargo.toml index 71f42c68..c12b39a4 100644 --- a/src/net/Cargo.toml +++ b/src/net/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "garage_net" -version = "1.3.1" +version = "1.0.0" authors = ["Alex Auvolat "] edition = "2018" license = "AGPL-3.0" @@ -30,7 +30,8 @@ rand.workspace = true log.workspace = true arc-swap.workspace = true -thiserror.workspace = true +async-trait.workspace = true +err-derive.workspace = true bytes.workspace = true cfg-if.workspace = true diff --git a/src/net/client.rs b/src/net/client.rs index 20e1dacd..607dd173 100644 --- a/src/net/client.rs +++ b/src/net/client.rs @@ -6,6 +6,7 @@ use std::sync::{Arc, Mutex}; use std::task::Poll; use arc_swap::ArcSwapOption; +use async_trait::async_trait; use bytes::Bytes; use log::{debug, error, trace}; @@ -219,6 +220,7 @@ impl ClientConn { impl SendLoop for ClientConn {} +#[async_trait] impl RecvLoop for ClientConn { fn recv_handler(self: &Arc, id: RequestID, stream: ByteStream) { trace!("ClientConn recv_handler {}", id); diff --git a/src/net/endpoint.rs b/src/net/endpoint.rs index 3ab1048a..3cafafeb 100644 --- a/src/net/endpoint.rs +++ b/src/net/endpoint.rs @@ -1,9 +1,8 @@ -use std::future::Future; use std::marker::PhantomData; use std::sync::Arc; use arc_swap::ArcSwapOption; -use futures::future::{BoxFuture, FutureExt}; +use async_trait::async_trait; use crate::error::Error; use crate::message::*; @@ -15,17 +14,19 @@ use crate::netapp::*; /// attached to the response.. /// /// The handler object should be in an Arc, see `Endpoint::set_handler` +#[async_trait] pub trait StreamingEndpointHandler: Send + Sync where M: Message, { - fn handle(self: &Arc, m: Req, from: NodeID) -> impl Future> + Send; + async fn handle(self: &Arc, m: Req, from: NodeID) -> Resp; } /// If one simply wants to use an endpoint in a client fashion, /// without locally serving requests to that endpoint, /// use the unit type `()` as the handler type: /// it will panic if it is ever made to handle request. +#[async_trait] impl EndpointHandler for () { async fn handle(self: &Arc<()>, _m: &M, _from: NodeID) -> M::Response { panic!("This endpoint should not have a local handler."); @@ -37,13 +38,15 @@ impl EndpointHandler for () { /// This trait should be implemented by an object of your application /// that can handle a message of type `M`, in the cases where it doesn't /// care about attached stream in the request nor in the response. +#[async_trait] pub trait EndpointHandler: Send + Sync where M: Message, { - fn handle(self: &Arc, m: &M, from: NodeID) -> impl Future + Send; + async fn handle(self: &Arc, m: &M, from: NodeID) -> M::Response; } +#[async_trait] impl StreamingEndpointHandler for T where T: EndpointHandler, @@ -158,8 +161,9 @@ where pub(crate) type DynEndpoint = Box; +#[async_trait] pub(crate) trait GenericEndpoint { - fn handle(&self, req_enc: ReqEnc, from: NodeID) -> BoxFuture<'_, Result>; + async fn handle(&self, req_enc: ReqEnc, from: NodeID) -> Result; fn drop_handler(&self); fn clone_endpoint(&self) -> DynEndpoint; } @@ -170,23 +174,21 @@ where M: Message, H: StreamingEndpointHandler; +#[async_trait] impl GenericEndpoint for EndpointArc where M: Message, H: StreamingEndpointHandler + 'static, { - fn handle(&self, req_enc: ReqEnc, from: NodeID) -> BoxFuture<'_, Result> { - async move { - match self.0.handler.load_full() { - None => Err(Error::NoHandler), - Some(h) => { - let req = Req::from_enc(req_enc)?; - let res = h.handle(req, from).await; - Ok(res.into_enc()?) - } + async fn handle(&self, req_enc: ReqEnc, from: NodeID) -> Result { + match self.0.handler.load_full() { + None => Err(Error::NoHandler), + Some(h) => { + let req = Req::from_enc(req_enc)?; + let res = h.handle(req, from).await; + Ok(res.into_enc()?) } } - .boxed() } fn drop_handler(&self) { diff --git a/src/net/error.rs b/src/net/error.rs index f67794ed..c0aeeacc 100644 --- a/src/net/error.rs +++ b/src/net/error.rs @@ -1,49 +1,49 @@ use std::io; +use err_derive::Error; use log::error; -use thiserror::Error; #[derive(Debug, Error)] pub enum Error { - #[error("IO error: {0}")] - Io(#[from] io::Error), + #[error(display = "IO error: {}", _0)] + Io(#[error(source)] io::Error), - #[error("Messagepack encode error: {0}")] - RMPEncode(#[from] rmp_serde::encode::Error), - #[error("Messagepack decode error: {0}")] - RMPDecode(#[from] rmp_serde::decode::Error), + #[error(display = "Messagepack encode error: {}", _0)] + RMPEncode(#[error(source)] rmp_serde::encode::Error), + #[error(display = "Messagepack decode error: {}", _0)] + RMPDecode(#[error(source)] rmp_serde::decode::Error), - #[error("Tokio join error: {0}")] - TokioJoin(#[from] tokio::task::JoinError), + #[error(display = "Tokio join error: {}", _0)] + TokioJoin(#[error(source)] tokio::task::JoinError), - #[error("oneshot receive error: {0}")] - OneshotRecv(#[from] tokio::sync::oneshot::error::RecvError), + #[error(display = "oneshot receive error: {}", _0)] + OneshotRecv(#[error(source)] tokio::sync::oneshot::error::RecvError), - #[error("Handshake error: {0}")] - Handshake(#[from] kuska_handshake::async_std::Error), + #[error(display = "Handshake error: {}", _0)] + Handshake(#[error(source)] kuska_handshake::async_std::Error), - #[error("UTF8 error: {0}")] - UTF8(#[from] std::string::FromUtf8Error), + #[error(display = "UTF8 error: {}", _0)] + UTF8(#[error(source)] std::string::FromUtf8Error), - #[error("Framing protocol error")] + #[error(display = "Framing protocol error")] Framing, - #[error("Remote error ({0:?}): {1}")] + #[error(display = "Remote error ({:?}): {}", _0, _1)] Remote(io::ErrorKind, String), - #[error("Request ID collision")] + #[error(display = "Request ID collision")] IdCollision, - #[error("{0}")] + #[error(display = "{}", _0)] Message(String), - #[error("No handler / shutting down")] + #[error(display = "No handler / shutting down")] NoHandler, - #[error("Connection closed")] + #[error(display = "Connection closed")] ConnectionClosed, - #[error("Version mismatch: {0}")] + #[error(display = "Version mismatch: {}", _0)] VersionMismatch(String), } @@ -59,7 +59,7 @@ impl From> for Error { } } -/// The trait adds a `.log_err()` method on `Result<(), E>` types, +/// Ths trait adds a `.log_err()` method on `Result<(), E>` types, /// which dismisses the error by logging it to stderr. pub trait LogError { fn log_err(self, msg: &'static str); diff --git a/src/net/message.rs b/src/net/message.rs index 59afb058..af98ca12 100644 --- a/src/net/message.rs +++ b/src/net/message.rs @@ -18,7 +18,7 @@ use crate::util::*; /// in the send queue of the client, and their responses in the send queue of the /// server. Lower values mean higher priority. /// -/// This mechanism is useful for messages bigger than the maximum chunk size +/// This mechanism is usefull for messages bigger than the maximum chunk size /// (set at `0x4000` bytes), such as large file transfers. /// In such case, all of the messages in the send queue with the highest priority /// will take turns to send individual chunks, in a round-robin fashion. @@ -102,7 +102,7 @@ pub trait Message: Serialize + for<'de> Deserialize<'de> + Send + Sync + 'static /// The Req is a helper object used to create requests and attach them /// a stream of data. If the stream is a fixed Bytes and not a ByteStream, -/// Req is cheaply cloneable to allow the request to be sent to different +/// Req is cheaply clonable to allow the request to be sent to different /// peers (Clone will panic if the stream is a ByteStream). pub struct Req { pub(crate) msg: Arc, diff --git a/src/net/netapp.rs b/src/net/netapp.rs index 36c6fc88..f1e9f1ae 100644 --- a/src/net/netapp.rs +++ b/src/net/netapp.rs @@ -5,6 +5,7 @@ use std::sync::{Arc, RwLock}; use log::{debug, error, info, trace, warn}; use arc_swap::ArcSwapOption; +use async_trait::async_trait; use serde::{Deserialize, Serialize}; use sodiumoxide::crypto::auth; @@ -40,7 +41,7 @@ pub(crate) type VersionTag = [u8; 16]; pub(crate) const NETAPP_VERSION_TAG: u64 = 0x6772676e65740010; // grgnet 0x0010 (1.0) /// HelloMessage is sent by the client on a Netapp connection to indicate -/// that they are also a server and ready to receive incoming connections +/// that they are also a server and ready to recieve incoming connections /// at the specified address and port. If the client doesn't know their /// public address, they don't need to specify it and we look at the /// remote address of the socket is used instead. @@ -289,7 +290,7 @@ impl NetApp { /// Attempt to connect to a peer, given by its ip:port and its public key. /// The public key will be checked during the secret handshake process. /// This function returns once the connection has been established and a - /// successful handshake was made. At this point we can send messages to + /// successfull handshake was made. At this point we can send messages to /// the other node with `Netapp::request` pub async fn try_connect(self: Arc, ip: SocketAddr, id: NodeID) -> Result<(), Error> { // Don't connect to ourself, we don't care @@ -456,6 +457,7 @@ impl NetApp { } } +#[async_trait] impl EndpointHandler for NetApp { async fn handle(self: &Arc, msg: &HelloMessage, from: NodeID) { debug!("Hello from {:?}: {:?}", hex::encode(&from[..8]), msg); diff --git a/src/net/peering.rs b/src/net/peering.rs index 08378a08..168162d9 100644 --- a/src/net/peering.rs +++ b/src/net/peering.rs @@ -5,6 +5,7 @@ use std::sync::{Arc, RwLock}; use std::time::{Duration, Instant}; use arc_swap::ArcSwap; +use async_trait::async_trait; use log::{debug, info, trace, warn}; use serde::{Deserialize, Serialize}; @@ -137,7 +138,7 @@ pub enum PeerConnState { /// A connection tentative is in progress (the nth, where n is the value stored) Trying(usize), - /// We abandoned trying to connect to this peer (too many failed attempts) + /// We abandonned trying to connect to this peer (too many failed attempts) Abandonned, } @@ -591,6 +592,7 @@ impl PeeringManager { } } +#[async_trait] impl EndpointHandler for PeeringManager { async fn handle(self: &Arc, ping: &PingMessage, from: NodeID) -> PingMessage { let ping_resp = PingMessage { @@ -602,6 +604,7 @@ impl EndpointHandler for PeeringManager { } } +#[async_trait] impl EndpointHandler for PeeringManager { async fn handle( self: &Arc, diff --git a/src/net/recv.rs b/src/net/recv.rs index 35a6d71a..0de7bef2 100644 --- a/src/net/recv.rs +++ b/src/net/recv.rs @@ -1,6 +1,7 @@ use std::collections::HashMap; use std::sync::Arc; +use async_trait::async_trait; use bytes::Bytes; use log::*; @@ -49,6 +50,7 @@ impl Drop for Sender { /// according to the protocol defined above: chunks of message in progress of being /// received are stored in a buffer, and when the last chunk of a message is received, /// the full message is passed to the receive handler. +#[async_trait] pub(crate) trait RecvLoop: Sync + 'static { fn recv_handler(self: &Arc, id: RequestID, stream: ByteStream); fn cancel_handler(self: &Arc, _id: RequestID) {} diff --git a/src/net/send.rs b/src/net/send.rs index 6f1ac02c..c60fc6b2 100644 --- a/src/net/send.rs +++ b/src/net/send.rs @@ -3,6 +3,7 @@ use std::pin::Pin; use std::sync::Arc; use std::task::{Context, Poll}; +use async_trait::async_trait; use bytes::{BufMut, Bytes, BytesMut}; use log::*; @@ -27,7 +28,7 @@ use crate::stream::*; // - if error: // - u8: error kind, encoded using error::io_errorkind_to_u8 // - rest: error message -// - absent for cancel message +// - absent for cancel messag pub(crate) type RequestID = u32; pub(crate) type ChunkLength = u16; @@ -216,7 +217,7 @@ impl<'a> futures::Future for SendQueuePollNextReady<'a> { enum DataFrame { /// a fixed size buffer containing some data + a boolean indicating whether - /// there may be more data coming from this stream. Can be used for some + /// there may be more data comming from this stream. Can be used for some /// optimization. It's an error to set it to false if there is more data, but it is correct /// (albeit sub-optimal) to set it to true if there is nothing coming after Data(Bytes, bool), @@ -272,6 +273,7 @@ impl DataFrame { /// /// The `.send_loop()` exits when the sending end of the channel is closed, /// or if there is an error at any time writing to the async writer. +#[async_trait] pub(crate) trait SendLoop: Sync { async fn send_loop( self: Arc, @@ -308,7 +310,7 @@ pub(crate) trait SendLoop: Sync { // recv_fut is cancellation-safe according to tokio doc, // send_fut is cancellation-safe as implemented above? tokio::select! { - biased; // always read incoming channel first if it has data + biased; // always read incomming channel first if it has data sth = recv_fut => { match sth { Some(SendItem::Stream(id, prio, order_tag, data)) => { diff --git a/src/net/server.rs b/src/net/server.rs index fb6c6366..36dccb2f 100644 --- a/src/net/server.rs +++ b/src/net/server.rs @@ -3,6 +3,7 @@ use std::net::SocketAddr; use std::sync::{Arc, Mutex}; use arc_swap::ArcSwapOption; +use async_trait::async_trait; use log::*; use futures::io::{AsyncReadExt, AsyncWriteExt}; @@ -173,6 +174,7 @@ impl ServerConn { impl SendLoop for ServerConn {} +#[async_trait] impl RecvLoop for ServerConn { fn recv_handler(self: &Arc, id: RequestID, stream: ByteStream) { let resp_send = match self.resp_send.load_full() { diff --git a/src/net/stream.rs b/src/net/stream.rs index c973f9a7..3ac6896d 100644 --- a/src/net/stream.rs +++ b/src/net/stream.rs @@ -16,7 +16,7 @@ use crate::bytes_buf::BytesBuf; /// /// Items sent in the ByteStream may be errors of type `std::io::Error`. /// An error indicates the end of the ByteStream: a reader should no longer read -/// after receiving an error, and a writer should stop writing after sending an error. +/// after recieving an error, and a writer should stop writing after sending an error. pub type ByteStream = Pin + Send + Sync>>; /// A packet sent in a ByteStream, which may contain either diff --git a/src/net/test.rs b/src/net/test.rs index 3cf446bd..5a3f236d 100644 --- a/src/net/test.rs +++ b/src/net/test.rs @@ -66,7 +66,7 @@ async fn run_test_inner(port_base: u16) { println!("A pl2: {:?}", pl2); assert_eq!(pl2.len(), 2); - // Connect third node and check it peers with everyone + // Connect third ndoe and check it peers with everyone let (thread3, _netapp3, peering3) = run_netapp(netid, pk3, sk3, addr3, vec![(pk2, addr2)], stop_rx.clone()); tokio::time::sleep(Duration::from_secs(3)).await; diff --git a/src/net/util.rs b/src/net/util.rs index 35a3be1e..56230b73 100644 --- a/src/net/util.rs +++ b/src/net/util.rs @@ -25,7 +25,7 @@ where /// This async function returns only when a true signal was received /// from a watcher that tells us when to exit. /// -/// Useful in a select statement to interrupt another +/// Usefull in a select statement to interrupt another /// future: /// ```ignore /// select!( diff --git a/src/rpc/Cargo.toml b/src/rpc/Cargo.toml index e23f4bca..4c8cafd9 100644 --- a/src/rpc/Cargo.toml +++ b/src/rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "garage_rpc" -version = "1.3.1" +version = "1.0.0" authors = ["Alex Auvolat "] edition = "2018" license = "AGPL-3.0" @@ -15,10 +15,12 @@ path = "lib.rs" [dependencies] format_table.workspace = true +garage_db.workspace = true garage_util.workspace = true garage_net.workspace = true arc-swap.workspace = true +bytes.workspace = true bytesize.workspace = true gethostname.workspace = true hex.workspace = true @@ -33,7 +35,7 @@ async-trait.workspace = true serde.workspace = true serde_bytes.workspace = true serde_json.workspace = true -thiserror = { workspace = true, optional = true } +err-derive = { workspace = true, optional = true } # newer version requires rust edition 2021 kube = { workspace = true, optional = true } @@ -44,10 +46,12 @@ reqwest = { workspace = true, optional = true } pnet_datalink.workspace = true futures.workspace = true +futures-util.workspace = true tokio.workspace = true +tokio-stream.workspace = true opentelemetry.workspace = true [features] kubernetes-discovery = [ "kube", "k8s-openapi", "schemars" ] -consul-discovery = [ "reqwest", "thiserror" ] +consul-discovery = [ "reqwest", "err-derive" ] system-libs = [ "sodiumoxide/use-pkg-config" ] diff --git a/src/rpc/consul.rs b/src/rpc/consul.rs index 760e9fcb..f088bf3f 100644 --- a/src/rpc/consul.rs +++ b/src/rpc/consul.rs @@ -3,8 +3,8 @@ use std::fs::File; use std::io::Read; use std::net::{IpAddr, SocketAddr}; +use err_derive::Error; use serde::{Deserialize, Serialize}; -use thiserror::Error; use garage_net::NodeID; @@ -219,12 +219,12 @@ impl ConsulDiscovery { /// Regroup all Consul discovery errors #[derive(Debug, Error)] pub enum ConsulError { - #[error("IO error: {0}")] - Io(#[from] std::io::Error), - #[error("HTTP error: {0}")] - Reqwest(#[from] reqwest::Error), - #[error("Invalid Consul TLS configuration")] + #[error(display = "IO error: {}", _0)] + Io(#[error(source)] std::io::Error), + #[error(display = "HTTP error: {}", _0)] + Reqwest(#[error(source)] reqwest::Error), + #[error(display = "Invalid Consul TLS configuration")] InvalidTLSConfig, - #[error("Token error: {0}")] - Token(#[from] reqwest::header::InvalidHeaderValue), + #[error(display = "Token error: {}", _0)] + Token(#[error(source)] reqwest::header::InvalidHeaderValue), } diff --git a/src/rpc/layout/graph_algo.rs b/src/rpc/layout/graph_algo.rs index 29d4a043..bd33e97f 100644 --- a/src/rpc/layout/graph_algo.rs +++ b/src/rpc/layout/graph_algo.rs @@ -133,7 +133,7 @@ impl Graph { /// This function shuffles the order of the edge lists. It keeps the ids of the /// reversed edges consistent. fn shuffle_edges(&mut self) { - // We use deterministic randomness so that the layout calculation algorithm + // We use deterministic randomness so that the layout calculation algorihtm // will output the same thing every time it is run. This way, the results // pre-calculated in `garage layout show` will match exactly those used // in practice with `garage layout apply` diff --git a/src/rpc/layout/helper.rs b/src/rpc/layout/helper.rs index c08a5629..3a033ab2 100644 --- a/src/rpc/layout/helper.rs +++ b/src/rpc/layout/helper.rs @@ -90,7 +90,7 @@ impl LayoutHelper { // sync_map_min is the minimum value of sync_map among storage nodes // in the cluster (non-gateway nodes only, current and previous layouts). // It is the highest layout version for which we know that all relevant - // storage nodes have fulfilled a sync, and therefore it is safe to + // storage nodes have fullfilled a sync, and therefore it is safe to // use a read quorum within that layout to ensure consistency. // Gateway nodes are excluded here because they hold no relevant data // (they store the bucket and access key tables, but we don't have @@ -219,11 +219,6 @@ impl LayoutHelper { ret } - pub fn current_storage_nodes_of(&self, position: &Hash) -> Vec { - let ver = self.current(); - ver.nodes_of(position, ver.replication_factor).collect() - } - pub fn trackers_hash(&self) -> Hash { self.trackers_hash } diff --git a/src/rpc/layout/history.rs b/src/rpc/layout/history.rs index 574c50c2..af2cbc63 100644 --- a/src/rpc/layout/history.rs +++ b/src/rpc/layout/history.rs @@ -227,29 +227,24 @@ impl LayoutHistory { // ================== updates to layout, public interface =================== pub fn merge(&mut self, other: &LayoutHistory) -> bool { - // If our current layout version is completely out-of-date, - // forget everything we know and replace it by incoming layout data. - if self.current().version < other.min_stored() { - *self = other.clone(); - return true; - } - let mut changed = false; // Add any new versions to history for v2 in other.versions.iter() { - if v2.version == self.current().version + 1 { - // This is the next version, add it to our version list - self.versions.push(v2.clone()); - changed = true; - } else if let Some(v1) = self.versions.iter().find(|v| v.version == v2.version) { + if let Some(v1) = self.versions.iter().find(|v| v.version == v2.version) { // Version is already present, check consistency if v1 != v2 { error!("Inconsistent layout histories: different layout compositions for version {}. Your cluster will be broken as long as this layout version is not replaced.", v2.version); } + } else if self.versions.iter().all(|v| v.version != v2.version - 1) { + error!( + "Cannot receive new layout version {}, version {} is missing", + v2.version, + v2.version - 1 + ); } else { - // This is an older version - assert!(v2.version < self.min_stored()); + self.versions.push(v2.clone()); + changed = true; } } diff --git a/src/rpc/layout/manager.rs b/src/rpc/layout/manager.rs index bb8000bd..a0dcf50e 100644 --- a/src/rpc/layout/manager.rs +++ b/src/rpc/layout/manager.rs @@ -48,7 +48,7 @@ impl LayoutManager { Ok(x) => { if x.current().replication_factor != replication_factor.replication_factor() { return Err(Error::Message(format!( - "Previous cluster layout has replication factor {}, which is different than the one specified in the config file ({}). The previous cluster layout can be purged, if you know what you are doing, simply by deleting the `cluster_layout` file in your metadata directory.", + "Prevous cluster layout has replication factor {}, which is different than the one specified in the config file ({}). The previous cluster layout can be purged, if you know what you are doing, simply by deleting the `cluster_layout` file in your metadata directory.", x.current().replication_factor, replication_factor.replication_factor() ))); @@ -229,11 +229,13 @@ impl LayoutManager { } /// Save cluster layout data to disk - async fn save_cluster_layout(&self) { + async fn save_cluster_layout(&self) -> Result<(), Error> { let layout = self.layout.read().unwrap().inner().clone(); - if let Err(e) = self.persist_cluster_layout.save_async(&layout).await { - error!("Failed to save cluster_layout: {}", e); - } + self.persist_cluster_layout + .save_async(&layout) + .await + .expect("Cannot save current cluster layout"); + Ok(()) } fn broadcast_update(self: &Arc, rpc: SystemRpc) { @@ -311,7 +313,7 @@ impl LayoutManager { self.change_notify.notify_waiters(); self.broadcast_update(SystemRpc::AdvertiseClusterLayout(new_layout)); - self.save_cluster_layout().await; + self.save_cluster_layout().await?; } Ok(SystemRpc::Ok) @@ -326,7 +328,7 @@ impl LayoutManager { if let Some(new_trackers) = self.merge_layout_trackers(trackers) { self.change_notify.notify_waiters(); self.broadcast_update(SystemRpc::AdvertiseClusterLayoutTrackers(new_trackers)); - self.save_cluster_layout().await; + self.save_cluster_layout().await?; } Ok(SystemRpc::Ok) diff --git a/src/rpc/layout/mod.rs b/src/rpc/layout/mod.rs index ce21a524..33676c37 100644 --- a/src/rpc/layout/mod.rs +++ b/src/rpc/layout/mod.rs @@ -241,7 +241,7 @@ mod v010 { /// The versions currently in use in the cluster pub versions: Vec, /// At most 5 of the previous versions, not used by the garage_table - /// module, but useful for the garage_block module to find data blocks + /// module, but usefull for the garage_block module to find data blocks /// that have not yet been moved pub old_versions: Vec, @@ -455,7 +455,7 @@ impl UpdateTracker { } } - pub fn min_among(&self, storage_nodes: &[Uuid], min_version: u64) -> u64 { + pub(crate) fn min_among(&self, storage_nodes: &[Uuid], min_version: u64) -> u64 { storage_nodes .iter() .map(|x| self.get(x, min_version)) diff --git a/src/rpc/layout/test.rs b/src/rpc/layout/test.rs index 5462160b..fcbb9dfc 100644 --- a/src/rpc/layout/test.rs +++ b/src/rpc/layout/test.rs @@ -9,7 +9,7 @@ use crate::replication_mode::ReplicationFactor; // This function checks that the partition size S computed is at least better than the // one given by a very naive algorithm. To do so, we try to run the naive algorithm -// assuming a partition size of S+1. If we succeed, it means that the optimal assignment +// assuming a partion size of S+1. If we succed, it means that the optimal assignment // was not optimal. The naive algorithm is the following : // - we compute the max number of partitions associated to every node, capped at the // partition number. It gives the number of tokens of every node. diff --git a/src/rpc/layout/version.rs b/src/rpc/layout/version.rs index a02fce89..ee4b2821 100644 --- a/src/rpc/layout/version.rs +++ b/src/rpc/layout/version.rs @@ -471,7 +471,7 @@ impl LayoutVersion { } } - // We clear the ring assignment data + // We clear the ring assignemnt data self.ring_assignment_data = Vec::::new(); Ok(Some(old_assignment)) @@ -507,7 +507,7 @@ impl LayoutVersion { g.compute_maximal_flow()?; if g.get_flow_value()? < (NB_PARTITIONS * self.replication_factor) as i64 { return Err(Error::Message( - "The storage capacity of the cluster is too small. It is \ + "The storage capacity of he cluster is to small. It is \ impossible to store partitions of size 1." .into(), )); @@ -650,11 +650,8 @@ impl LayoutVersion { let mut cost = CostFunction::new(); for (p, assoc_p) in prev_assign.iter().enumerate() { for n in assoc_p.iter() { - if let Some(&node_zone) = - zone_to_id.get(self.expect_get_node_zone(&self.node_id_vec[*n])) - { - cost.insert((Vertex::PZ(p, node_zone), Vertex::N(*n)), -1); - } + let node_zone = zone_to_id[self.expect_get_node_zone(&self.node_id_vec[*n])]; + cost.insert((Vertex::PZ(p, node_zone), Vertex::N(*n)), -1); } } @@ -754,11 +751,8 @@ impl LayoutVersion { if let Some(prev_assign) = prev_assign_opt { let mut old_zones_of_p = Vec::::new(); for n in prev_assign[p].iter() { - if let Some(&zone_id) = - zone_to_id.get(self.expect_get_node_zone(&self.node_id_vec[*n])) - { - old_zones_of_p.push(zone_id); - } + old_zones_of_p + .push(zone_to_id[self.expect_get_node_zone(&self.node_id_vec[*n])]); } if !old_zones_of_p.contains(&z) { new_partitions_zone[z] += 1; diff --git a/src/rpc/rpc_helper.rs b/src/rpc/rpc_helper.rs index 2505c2ce..ea3e5e76 100644 --- a/src/rpc/rpc_helper.rs +++ b/src/rpc/rpc_helper.rs @@ -413,7 +413,7 @@ impl RpcHelper { /// Make a RPC call to multiple servers, returning either a Vec of responses, /// or an error if quorum could not be reached due to too many errors /// - /// Contrary to try_call_many, this function is especially made for broadcast + /// Contrary to try_call_many, this fuction is especially made for broadcast /// write operations. In particular: /// /// - The request are sent to all specified nodes as soon as `try_write_many_sets` @@ -506,7 +506,7 @@ impl RpcHelper { // If we have a quorum of ok in all quorum sets, then it's a success! if result_tracker.all_quorums_ok() { - // Continue all other requests in background + // Continue all other requets in background tokio::spawn(async move { resp_stream.collect::)>>().await; drop(drop_on_complete); @@ -540,73 +540,19 @@ impl RpcHelper { // ---- functions not related to MAKING RPCs, but just determining to what nodes // they should be made and in which order ---- - /// Determine to what nodes, and in what order, requests to read a data block - /// should be sent. All nodes in the Vec returned by this function are tried - /// one by one until there is one that returns the block (in block/manager.rs). - /// - /// We want to have the best chance of finding the block in as few requests - /// as possible, and we want to avoid nodes that answer slowly. - /// - /// Note that when there are several active layout versions, the block might - /// be stored only by nodes of the latest version (in case of a block that was - /// written after the layout change), or only by nodes of the oldest active - /// version (for all blocks that were written before). So we have to try nodes - /// of all layout versions. We also want to try nodes of all layout versions - /// fast, so as to optimize the chance of finding the block fast. - /// - /// Therefore, the strategy is the following: - /// - /// 1. ask first all nodes of all currently active layout versions - /// -> ask the preferred node in all layout versions (older to newer), - /// then the second preferred onde in all verions, etc. - /// -> we start by the oldest active layout version first, because a majority - /// of blocks will have been saved before the layout change - /// 2. ask all nodes of historical layout versions, for blocks which have not - /// yet been transferred to their new storage nodes - /// - /// The preference order, for each layout version, is given by `request_order`, - /// based on factors such as nodes being in the same datacenter, - /// having low ping, etc. pub fn block_read_nodes_of(&self, position: &Hash, rpc_helper: &RpcHelper) -> Vec { let layout = self.0.layout.read().unwrap(); - // Compute, for each layout version, the set of nodes that might store - // the block, and put them in their preferred order as of `request_order`. - let mut vernodes = layout.versions().iter().map(|ver| { - let nodes = ver.nodes_of(position, ver.replication_factor); - rpc_helper.request_order(layout.current(), nodes) - }); - - let mut ret = if layout.versions().len() == 1 { - // If we have only one active layout version, then these are the - // only nodes we ask in step 1 - vernodes.next().unwrap() - } else { - let vernodes = vernodes.collect::>(); - - let mut nodes = Vec::::with_capacity(12); - for i in 0..layout.current().replication_factor { - for vn in vernodes.iter() { - if let Some(n) = vn.get(i) { - if !nodes.contains(&n) { - if *n == self.0.our_node_id { - // it's always fast (almost free) to ask locally, - // so always put that as first choice - nodes.insert(0, *n); - } else { - nodes.push(*n); - } - } - } - } + let mut ret = Vec::with_capacity(12); + let ver_iter = layout + .versions() + .iter() + .rev() + .chain(layout.inner().old_versions.iter().rev()); + for ver in ver_iter { + if ver.version > layout.sync_map_min() { + continue; } - - nodes - }; - - // Second step: add nodes of older layout versions - let old_ver_iter = layout.inner().old_versions.iter().rev(); - for ver in old_ver_iter { let nodes = ver.nodes_of(position, ver.replication_factor); for node in rpc_helper.request_order(layout.current(), nodes) { if !ret.contains(&node) { @@ -614,7 +560,6 @@ impl RpcHelper { } } } - ret } diff --git a/src/rpc/system.rs b/src/rpc/system.rs index 2a52ae5d..d94d4eec 100644 --- a/src/rpc/system.rs +++ b/src/rpc/system.rs @@ -7,6 +7,7 @@ use std::sync::{Arc, RwLock, RwLockReadGuard}; use std::time::{Duration, Instant}; use arc_swap::ArcSwapOption; +use async_trait::async_trait; use futures::join; use serde::{Deserialize, Serialize}; use sodiumoxide::crypto::sign::ed25519; @@ -53,7 +54,7 @@ pub const SYSTEM_RPC_PATH: &str = "garage_rpc/system.rs/SystemRpc"; /// RPC messages related to membership #[derive(Debug, Serialize, Deserialize, Clone)] pub enum SystemRpc { - /// Response to successful advertisements + /// Response to successfull advertisements Ok, /// Request to connect to a specific node (in @: format, pubkey = full-length node ID) Connect(String), @@ -171,7 +172,7 @@ pub struct ClusterHealth { pub enum ClusterHealthStatus { /// All nodes are available Healthy, - /// Some storage nodes are unavailable, but quorum is still + /// Some storage nodes are unavailable, but quorum is stil /// achieved for all partitions Degraded, /// Quorum is not available for some partitions @@ -285,7 +286,7 @@ impl System { let mut local_status = NodeStatus::initial(replication_factor, &layout_manager); local_status.update_disk_usage(&config.metadata_dir, &config.data_dir); - // ---- if enabled, set up additional peer discovery methods ---- + // ---- if enabled, set up additionnal peer discovery methods ---- #[cfg(feature = "consul-discovery")] let consul_discovery = match &config.consul_discovery { Some(cfg) => Some( @@ -336,7 +337,7 @@ impl System { Ok(sys) } - /// Perform bootstrapping, starting the ping loop + /// Perform bootstraping, starting the ping loop pub async fn run(self: Arc, must_exit: watch::Receiver) { join!( self.netapp.clone().listen( @@ -748,6 +749,7 @@ impl System { } } +#[async_trait] impl EndpointHandler for System { async fn handle(self: &Arc, msg: &SystemRpc, from: NodeID) -> Result { match msg { @@ -805,16 +807,6 @@ impl NodeStatus { fn update_disk_usage(&mut self, meta_dir: &Path, data_dir: &DataDirEnum) { use nix::sys::statvfs::statvfs; - - // The HashMap used below requires a filesystem identifier from statfs (instead of statvfs) on FreeBSD, as - // FreeBSD's statvfs filesystem identifier is "not meaningful in this implementation" (man 3 statvfs). - - #[cfg(target_os = "freebsd")] - let get_filesystem_id = |path: &Path| match nix::sys::statfs::statfs(path) { - Ok(fs) => Some(fs.filesystem_id()), - Err(_) => None, - }; - let mount_avail = |path: &Path| match statvfs(path) { Ok(x) => { let avail = x.blocks_available() as u64 * x.fragment_size() as u64; @@ -825,7 +817,6 @@ impl NodeStatus { }; self.meta_disk_avail = mount_avail(meta_dir).map(|(_, a, t)| (a, t)); - self.data_disk_avail = match data_dir { DataDirEnum::Single(dir) => mount_avail(dir).map(|(_, a, t)| (a, t)), DataDirEnum::Multiple(dirs) => (|| { @@ -836,25 +827,12 @@ impl NodeStatus { if dir.capacity.is_none() { continue; } - - #[cfg(not(target_os = "freebsd"))] match mount_avail(&dir.path) { Some((fsid, avail, total)) => { mounts.insert(fsid, (avail, total)); } None => return None, } - - #[cfg(target_os = "freebsd")] - match get_filesystem_id(&dir.path) { - Some(fsid) => match mount_avail(&dir.path) { - Some((_, avail, total)) => { - mounts.insert(fsid, (avail, total)); - } - None => return None, - }, - None => return None, - } } Some( mounts diff --git a/src/table/Cargo.toml b/src/table/Cargo.toml index 478dbd18..171118ea 100644 --- a/src/table/Cargo.toml +++ b/src/table/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "garage_table" -version = "1.3.1" +version = "1.0.0" authors = ["Alex Auvolat "] edition = "2018" license = "AGPL-3.0" @@ -22,6 +22,7 @@ opentelemetry.workspace = true async-trait.workspace = true arc-swap.workspace = true +bytes.workspace = true hex.workspace = true hexdump.workspace = true tracing.workspace = true diff --git a/src/table/data.rs b/src/table/data.rs index 1d0308ce..09f4e008 100644 --- a/src/table/data.rs +++ b/src/table/data.rs @@ -367,7 +367,7 @@ impl TableData { } } - pub fn gc_todo_approximate_len(&self) -> Result { - Ok(self.gc_todo.approximate_len()?) + pub fn gc_todo_len(&self) -> Result { + Ok(self.gc_todo.len()?) } } diff --git a/src/table/gc.rs b/src/table/gc.rs index 1f30bd76..d30a1849 100644 --- a/src/table/gc.rs +++ b/src/table/gc.rs @@ -4,7 +4,6 @@ use std::sync::Arc; use std::time::Duration; use async_trait::async_trait; - use serde::{Deserialize, Serialize}; use serde_bytes::ByteBuf; @@ -259,20 +258,21 @@ impl TableGc { .await .err_context("GC: remote delete tombstones")?; - // GC has been successful for all of these entries. + // GC has been successfull for all of these entries. // We now remove them all from our local table and from the GC todo list. for item in items { self.data .delete_if_equal_hash(&item.key[..], item.value_hash) .err_context("GC: local delete tombstones")?; item.remove_if_equal(&self.data.gc_todo) - .err_context("GC: remove from todo list after successful GC")?; + .err_context("GC: remove from todo list after successfull GC")?; } Ok(()) } } +#[async_trait] impl EndpointHandler for TableGc { async fn handle(self: &Arc, message: &GcRpc, _from: NodeID) -> Result { match message { @@ -313,7 +313,7 @@ impl Worker for GcWorker { fn status(&self) -> WorkerStatus { WorkerStatus { - queue_length: Some(self.gc.data.gc_todo_approximate_len().unwrap_or(0) as u64), + queue_length: Some(self.gc.data.gc_todo_len().unwrap_or(0) as u64), ..Default::default() } } @@ -383,7 +383,7 @@ impl GcTodoEntry { /// Removes the GcTodoEntry from the gc_todo tree if the /// hash of the serialized value is the same here as in the tree. - /// This is useful to remove a todo entry only under the condition + /// This is usefull to remove a todo entry only under the condition /// that it has not changed since the time it was read, i.e. /// what we have to do is still the same pub(crate) fn remove_if_equal(&self, gc_todo_tree: &db::Tree) -> Result<(), Error> { diff --git a/src/table/merkle.rs b/src/table/merkle.rs index 7ba1f007..596d5805 100644 --- a/src/table/merkle.rs +++ b/src/table/merkle.rs @@ -287,12 +287,12 @@ impl MerkleUpdater { MerkleNode::decode_opt(&ent) } - pub fn merkle_tree_approximate_len(&self) -> Result { - Ok(self.data.merkle_tree.approximate_len()?) + pub fn merkle_tree_len(&self) -> Result { + Ok(self.data.merkle_tree.len()?) } - pub fn todo_approximate_len(&self) -> Result { - Ok(self.data.merkle_todo.approximate_len()?) + pub fn todo_len(&self) -> Result { + Ok(self.data.merkle_todo.len()?) } } @@ -306,7 +306,7 @@ impl Worker for MerkleWorker { fn status(&self) -> WorkerStatus { WorkerStatus { - queue_length: Some(self.0.todo_approximate_len().unwrap_or(0) as u64), + queue_length: Some(self.0.todo_len().unwrap_or(0) as u64), ..Default::default() } } diff --git a/src/table/metrics.rs b/src/table/metrics.rs index 78593202..7bb0959a 100644 --- a/src/table/metrics.rs +++ b/src/table/metrics.rs @@ -34,7 +34,7 @@ impl TableMetrics { .u64_value_observer( "table.size", move |observer| { - if let Ok(value) = store.approximate_len() { + if let Ok(value) = store.len() { observer.observe( value as u64, &[KeyValue::new("table_name", table_name)], @@ -48,7 +48,7 @@ impl TableMetrics { .u64_value_observer( "table.merkle_tree_size", move |observer| { - if let Ok(value) = merkle_tree.approximate_len() { + if let Ok(value) = merkle_tree.len() { observer.observe( value as u64, &[KeyValue::new("table_name", table_name)], @@ -62,7 +62,7 @@ impl TableMetrics { .u64_value_observer( "table.merkle_updater_todo_queue_length", move |observer| { - if let Ok(v) = merkle_todo.approximate_len() { + if let Ok(v) = merkle_todo.len() { observer.observe( v as u64, &[KeyValue::new("table_name", table_name)], @@ -76,7 +76,7 @@ impl TableMetrics { .u64_value_observer( "table.gc_todo_queue_length", move |observer| { - if let Ok(value) = gc_todo.approximate_len() { + if let Ok(value) = gc_todo.len() { observer.observe( value as u64, &[KeyValue::new("table_name", table_name)], diff --git a/src/table/queue.rs b/src/table/queue.rs index 7ef1f16e..ffe0a4a7 100644 --- a/src/table/queue.rs +++ b/src/table/queue.rs @@ -27,7 +27,7 @@ impl Worker for InsertQueueWorker { fn status(&self) -> WorkerStatus { WorkerStatus { - queue_length: Some(self.0.data.insert_queue.approximate_len().unwrap_or(0) as u64), + queue_length: Some(self.0.data.insert_queue.len().unwrap_or(0) as u64), ..Default::default() } } diff --git a/src/table/replication/parameters.rs b/src/table/replication/parameters.rs index 3649fad3..682c1ea6 100644 --- a/src/table/replication/parameters.rs +++ b/src/table/replication/parameters.rs @@ -13,12 +13,12 @@ pub trait TableReplication: Send + Sync + 'static { /// Which nodes to send read requests to fn read_nodes(&self, hash: &Hash) -> Vec; - /// Responses needed to consider a read successful + /// Responses needed to consider a read succesfull fn read_quorum(&self) -> usize; /// Which nodes to send writes to fn write_sets(&self, hash: &Hash) -> Self::WriteSets; - /// Responses needed to consider a write successful in each set + /// Responses needed to consider a write succesfull in each set fn write_quorum(&self) -> usize; // Accessing partitions, for Merkle tree & sync diff --git a/src/table/sync.rs b/src/table/sync.rs index 2d43b9fc..cd080df0 100644 --- a/src/table/sync.rs +++ b/src/table/sync.rs @@ -316,7 +316,7 @@ impl TableSyncer { SyncRpc::RootCkDifferent(true) => VecDeque::from(vec![root_ck_key]), x => { return Err(Error::Message(format!( - "Invalid response to RootCkHash RPC: {}", + "Invalid respone to RootCkHash RPC: {}", debug_serialize(x) ))); } @@ -362,7 +362,7 @@ impl TableSyncer { SyncRpc::Node(_, node) => node, x => { return Err(Error::Message(format!( - "Invalid response to GetNode RPC: {}", + "Invalid respone to GetNode RPC: {}", debug_serialize(x) ))); } @@ -444,6 +444,7 @@ impl TableSyncer { // ======= SYNCHRONIZATION PROCEDURE -- RECEIVER SIDE ====== +#[async_trait] impl EndpointHandler for TableSyncer { async fn handle(self: &Arc, message: &SyncRpc, from: NodeID) -> Result { match message { diff --git a/src/table/table.rs b/src/table/table.rs index c96f4731..a5be2910 100644 --- a/src/table/table.rs +++ b/src/table/table.rs @@ -2,6 +2,7 @@ use std::borrow::Borrow; use std::collections::{BTreeMap, BTreeSet, HashMap}; use std::sync::Arc; +use async_trait::async_trait; use futures::stream::*; use serde::{Deserialize, Serialize}; use serde_bytes::ByteBuf; @@ -170,11 +171,11 @@ impl Table { // We will here batch all items into a single request for each concerned // node, with all of the entries it must store within that request. // Each entry has to be saved to a specific list of "write sets", i.e. a set - // of node within which a quorum must be achieved. In normal operation, there + // of node within wich a quorum must be achieved. In normal operation, there // is a single write set which corresponds to the quorum in the current // cluster layout, but when the layout is updated, multiple write sets might // have to be handled at once. Here, since we are sending many entries, we - // will have to handle many write sets in all cases. The algorithm is thus + // will have to handle many write sets in all cases. The algorihtm is thus // to send one request to each node with all the items it must save, // and keep track of the OK responses within each write set: if for all sets // a quorum of nodes has answered OK, then the insert has succeeded and @@ -203,10 +204,6 @@ impl Table { entries_vec.push((write_sets, e_enc)); } - if entries_vec.is_empty() { - return Ok(()); - } - // Compute a deduplicated list of all of the write sets, // and compute an index from each node to the position of the sets in which // it takes part, to optimize the detection of a quorum. @@ -499,6 +496,7 @@ impl Table { } } +#[async_trait] impl EndpointHandler> for Table { async fn handle( self: &Arc, diff --git a/src/util/Cargo.toml b/src/util/Cargo.toml index 46fa6590..883c0aa4 100644 --- a/src/util/Cargo.toml +++ b/src/util/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "garage_util" -version = "1.3.1" +version = "1.0.0" authors = ["Alex Auvolat "] edition = "2018" license = "AGPL-3.0" @@ -20,8 +20,10 @@ garage_net.workspace = true arc-swap.workspace = true async-trait.workspace = true blake2.workspace = true +bytes.workspace = true bytesize.workspace = true -thiserror.workspace = true +digest.workspace = true +err-derive.workspace = true hexdump.workspace = true xxhash-rust.workspace = true hex.workspace = true diff --git a/src/util/background/worker.rs b/src/util/background/worker.rs index 3c938b7e..22f747b6 100644 --- a/src/util/background/worker.rs +++ b/src/util/background/worker.rs @@ -1,11 +1,13 @@ use std::collections::HashMap; use std::sync::Arc; use std::time::Duration; +use std::time::Instant; use async_trait::async_trait; use futures::future::*; use futures::stream::FuturesUnordered; use futures::StreamExt; +use opentelemetry::{global, metrics::ValueRecorder, KeyValue}; use serde::{Deserialize, Serialize}; use tokio::select; use tokio::sync::{mpsc, watch}; @@ -14,7 +16,7 @@ use crate::background::{WorkerInfo, WorkerStatus}; use crate::error::Error; use crate::time::now_msec; -// All workers that haven't exited for this time after an exit signal was received +// All workers that haven't exited for this time after an exit signal was recieved // will be interrupted in the middle of whatever they are doing. const EXIT_DEADLINE: Duration = Duration::from_secs(8); @@ -54,7 +56,7 @@ pub trait Worker: Send { async fn work(&mut self, must_exit: &mut watch::Receiver) -> Result; /// Wait for work: await for some task to become available. This future can be interrupted in - /// the middle for any reason, for example if an interrupt signal was received. + /// the middle for any reason, for example if an interrupt signal was recieved. async fn wait_for_work(&mut self) -> WorkerState; } @@ -62,6 +64,7 @@ pub(crate) struct WorkerProcessor { stop_signal: watch::Receiver, worker_chan: mpsc::UnboundedReceiver>, worker_info: Arc>>, + metrics: ValueRecorder, } impl WorkerProcessor { @@ -70,10 +73,15 @@ impl WorkerProcessor { stop_signal: watch::Receiver, worker_info: Arc>>, ) -> Self { + let meter = global::meter("garage/util"); Self { stop_signal, worker_chan, worker_info, + metrics: meter + .f64_value_recorder("util.worker_step") + .with_description("Duration and amount of worker steps executed") + .init(), } } @@ -103,6 +111,7 @@ impl WorkerProcessor { errors: 0, consecutive_errors: 0, last_error: None, + metrics: self.metrics.clone(), }; workers.push(async move { worker.step().await; @@ -115,39 +124,32 @@ impl WorkerProcessor { trace!("{} (TID {}): {:?}", worker.worker.name(), worker.task_id, worker.state); // Save worker info - { - let mut wi = self.worker_info.lock().unwrap(); - match wi.get_mut(&worker.task_id) { - Some(i) => { - i.state = worker.state; - i.status = worker.worker.status(); - i.errors = worker.errors; - i.consecutive_errors = worker.consecutive_errors; - if worker.last_error.is_some() { - i.last_error = worker.last_error.take(); - } - } - None => { - wi.insert(worker.task_id, WorkerInfo { - name: worker.worker.name(), - state: worker.state, - status: worker.worker.status(), - errors: worker.errors, - consecutive_errors: worker.consecutive_errors, - last_error: worker.last_error.take(), - }); + let mut wi = self.worker_info.lock().unwrap(); + match wi.get_mut(&worker.task_id) { + Some(i) => { + i.state = worker.state; + i.status = worker.worker.status(); + i.errors = worker.errors; + i.consecutive_errors = worker.consecutive_errors; + if worker.last_error.is_some() { + i.last_error = worker.last_error.take(); } } + None => { + wi.insert(worker.task_id, WorkerInfo { + name: worker.worker.name(), + state: worker.state, + status: worker.worker.status(), + errors: worker.errors, + consecutive_errors: worker.consecutive_errors, + last_error: worker.last_error.take(), + }); + } } if worker.state == WorkerState::Done { info!("Worker {} (TID {}) exited", worker.worker.name(), worker.task_id); } else { - // Yield to the Tokio scheduler between consecutive Busy steps so - // that a worker which never suspends on its own cannot starve other tasks. - if worker.state == WorkerState::Busy { - tokio::task::yield_now().await; - } workers.push(async move { worker.step().await; worker @@ -190,10 +192,13 @@ struct WorkerHandler { errors: usize, consecutive_errors: usize, last_error: Option<(String, u64)>, + metrics: ValueRecorder, } impl WorkerHandler { async fn step(&mut self) { + let request_start = Instant::now(); + //@FIXME we also want to track errors in metrics but I don't know how yet. match self.state { WorkerState::Busy => match self.worker.work(&mut self.stop_signal).await { Ok(s) => { @@ -236,5 +241,17 @@ impl WorkerHandler { } WorkerState::Done => unreachable!(), } + + // metrics + let metric_tags = [ + KeyValue::new("state", self.state.to_string()), + KeyValue::new("name", self.worker.name()), + KeyValue::new("id", format!("{}", self.task_id)), + ]; + + let delay_secs = Instant::now() + .saturating_duration_since(request_start) + .as_secs_f64(); + self.metrics.record(delay_secs, &metric_tags); } } diff --git a/src/util/config.rs b/src/util/config.rs index eb889ebe..59329c0b 100644 --- a/src/util/config.rs +++ b/src/util/config.rs @@ -27,13 +27,6 @@ pub struct Config { #[serde(default)] pub disable_scrub: bool, - /// Use local timezone - #[serde(default)] - pub use_local_tz: bool, - - /// Optional directory where metadata snapshots will be store - pub metadata_snapshots_dir: Option, - /// Automatic snapshot interval for metadata #[serde(default)] pub metadata_auto_snapshot_interval: Option, @@ -45,11 +38,6 @@ pub struct Config { )] pub block_size: usize, - /// Maximum number of parallel block writes per PUT request - /// Higher values improve throughput but increase memory usage - /// Default: 3, Recommended: 10-30 for NVMe, 3-10 for HDD - #[serde(default = "default_block_max_concurrent_writes_per_request")] - pub block_max_concurrent_writes_per_request: usize, /// Number of replicas. Can be any positive integer, but uneven numbers are more favorable. /// - 1 for single-node clusters, or to disable replication /// - 3 is the recommended and supported setting. @@ -80,10 +68,6 @@ pub struct Config { )] pub block_ram_buffer_max: usize, - /// Maximum number of concurrent reads of block files on disk - #[serde(default = "default_block_max_concurrent_reads")] - pub block_max_concurrent_reads: usize, - /// Skip the permission check of secret files. Useful when /// POSIX ACLs (or more complex chmods) are used. #[serde(default)] @@ -105,12 +89,12 @@ pub struct Config { /// the addresses announced to other peers to a specific subnet. pub rpc_public_addr_subnet: Option, - /// Timeout for Netapp's ping messages + /// Timeout for Netapp's ping messagess pub rpc_ping_timeout_msec: Option, /// Timeout for Netapp RPC calls pub rpc_timeout_msec: Option, - // -- Bootstrapping and discovery + // -- Bootstraping and discovery /// Bootstrap peers RPC address #[serde(default)] pub bootstrap_peers: Vec, @@ -131,10 +115,6 @@ pub struct Config { #[serde(deserialize_with = "deserialize_capacity", default)] pub lmdb_map_size: usize, - /// Fjall block cache size - #[serde(deserialize_with = "deserialize_capacity", default)] - pub fjall_block_cache_size: usize, - // -- APIs /// Configuration for S3 api pub s3_api: S3ApiConfig, @@ -148,10 +128,6 @@ pub struct Config { /// Configuration for the admin API endpoint #[serde(default = "Default::default")] pub admin: AdminConfig, - - /// Allow punycode in bucket names - #[serde(default)] - pub allow_punycode: bool, } /// Value for data_dir: either a single directory or a list of dirs with attributes @@ -200,9 +176,6 @@ pub struct WebConfig { pub bind_addr: UnixOrTCPSocketAddress, /// Suffix to remove from domain name to find bucket pub root_domain: String, - /// Whether to add the requested domain to exported Prometheus metrics - #[serde(default)] - pub add_host_to_metrics: bool, } /// Configuration for the admin and monitoring HTTP API @@ -272,9 +245,6 @@ pub struct KubernetesDiscoveryConfig { pub skip_crd: bool, } -pub fn default_block_max_concurrent_writes_per_request() -> usize { - 3 -} /// Read and parse configuration pub fn read_config(config_file: PathBuf) -> Result { let config = std::fs::read_to_string(config_file)?; @@ -292,9 +262,6 @@ fn default_block_size() -> usize { fn default_block_ram_buffer_max() -> usize { 256 * 1024 * 1024 } -fn default_block_max_concurrent_reads() -> usize { - 16 -} fn default_consistency_mode() -> String { "consistent".into() diff --git a/src/util/crdt/crdt.rs b/src/util/crdt/crdt.rs index fdf63084..06876897 100644 --- a/src/util/crdt/crdt.rs +++ b/src/util/crdt/crdt.rs @@ -33,8 +33,8 @@ pub trait Crdt { /// arises very often, for example with a Lww or a LwwMap: the value type has to be a CRDT so that /// we have a rule for what to do when timestamps aren't enough to disambiguate (in a distributed /// system, anything can happen!), and with AutoCrdt the rule is to make an arbitrary (but -/// deterministic) choice between the two. When using an Option instead with this impl, ambiguity -/// cases are explicitly stored as None, which allows us to detect the ambiguity and handle it in +/// determinstic) choice between the two. When using an Option instead with this impl, ambiguity +/// cases are explicitely stored as None, which allows us to detect the ambiguity and handle it in /// the way we want. (this can only work if we are happy with losing the value when an ambiguity /// arises) impl Crdt for Option diff --git a/src/util/crdt/lww.rs b/src/util/crdt/lww.rs index 80747406..958844c9 100644 --- a/src/util/crdt/lww.rs +++ b/src/util/crdt/lww.rs @@ -16,7 +16,7 @@ use crate::crdt::crdt::*; /// In our case, we add the constraint that the value that is wrapped inside the LWW CRDT must /// itself be a CRDT: in the case when the timestamp does not allow us to decide on which value to /// keep, the merge rule of the inner CRDT is applied on the wrapped values. (Note that all types -/// that implement the `Ord` trait get a default CRDT implementation that keeps the maximum value. +/// that implement the `Ord` trait get a default CRDT implemetnation that keeps the maximum value. /// This enables us to use LWW directly with primitive data types such as numbers or strings. It is /// generally desirable in this case to never explicitly produce LWW values with the same timestamp /// but different inner values, as the rule to keep the maximum value isn't generally the desired @@ -28,9 +28,9 @@ use crate::crdt::crdt::*; /// /// Given that clocks are not too desynchronized, this assumption /// is enough for most cases, as there is few chance that two humans -/// coordinate themself faster than the time difference between two NTP servers. +/// coordonate themself faster than the time difference between two NTP servers. /// -/// As a more concrete example, let's suppose you want to upload a file +/// As a more concret example, let's suppose you want to upload a file /// with the same key (path) in the same bucket at the very same time. /// For each request, the file will be timestamped by the receiving server /// and may differ from what you observed with your atomic clock! @@ -84,16 +84,16 @@ where &self.v } - /// Take the value inside the CRDT (discards the timestamp) + /// Take the value inside the CRDT (discards the timesamp) pub fn take(self) -> T { self.v } /// Get a mutable reference to the CRDT's value /// - /// This is useful to mutate the inside value without changing the LWW timestamp. + /// This is usefull to mutate the inside value without changing the LWW timestamp. /// When such mutation is done, the merge between two LWW values is done using the inner - /// CRDT's merge operation. This is useful in the case where the inner CRDT is a large + /// CRDT's merge operation. This is usefull in the case where the inner CRDT is a large /// data type, such as a map, and we only want to change a single item in the map. /// To do this, we can produce a "CRDT delta", i.e. a LWW that contains only the modification. /// This delta consists in a LWW with the same timestamp, and the map diff --git a/src/util/crdt/lww_map.rs b/src/util/crdt/lww_map.rs index def0ebeb..88113856 100644 --- a/src/util/crdt/lww_map.rs +++ b/src/util/crdt/lww_map.rs @@ -109,7 +109,7 @@ where } /// Takes all of the values of the map and returns them. The current map is reset to the - /// empty map. This is very useful to produce in-place a new map that contains only a delta + /// empty map. This is very usefull to produce in-place a new map that contains only a delta /// that modifies a certain value: /// /// ```ignore @@ -162,7 +162,7 @@ where } } - /// Gets a reference to all of the items, as a slice. Useful to iterate on all map values. + /// Gets a reference to all of the items, as a slice. Usefull to iterate on all map values. /// In most case you will want to ignore the timestamp (second item of the tuple). pub fn items(&self) -> &[(K, u64, V)] { &self.vals[..] diff --git a/src/util/crdt/map.rs b/src/util/crdt/map.rs index adac3c38..5d1e1520 100644 --- a/src/util/crdt/map.rs +++ b/src/util/crdt/map.rs @@ -57,7 +57,7 @@ where Err(_) => None, } } - /// Gets a reference to all of the items, as a slice. Useful to iterate on all map values. + /// Gets a reference to all of the items, as a slice. Usefull to iterate on all map values. pub fn items(&self) -> &[(K, V)] { &self.vals[..] } diff --git a/src/util/encode.rs b/src/util/encode.rs index c6815d49..a9ab9a35 100644 --- a/src/util/encode.rs +++ b/src/util/encode.rs @@ -1,7 +1,7 @@ use serde::{Deserialize, Serialize}; -/// Serialize to MessagePack, without versioning -/// (see garage_util::migrate for functions that manage versioned +/// Serialize to MessagePacki, without versionning +/// (see garage_util::migrate for functions that manage versionned /// data formats) pub fn nonversioned_encode(val: &T) -> Result, rmp_serde::encode::Error> where @@ -13,8 +13,8 @@ where Ok(wr) } -/// Deserialize from MessagePack, without versioning -/// (see garage_util::migrate for functions that manage versioned +/// Deserialize from MessagePacki, without versionning +/// (see garage_util::migrate for functions that manage versionned /// data formats) pub fn nonversioned_decode(bytes: &[u8]) -> Result where diff --git a/src/util/error.rs b/src/util/error.rs index 170d2687..75fd3f9c 100644 --- a/src/util/error.rs +++ b/src/util/error.rs @@ -2,7 +2,7 @@ use std::fmt; use std::io; -use thiserror::Error; +use err_derive::Error; use serde::{de::Visitor, Deserialize, Deserializer, Serialize, Serializer}; @@ -12,61 +12,68 @@ use crate::encode::debug_serialize; /// Regroup all Garage errors #[derive(Debug, Error)] pub enum Error { - #[error("IO error: {0}")] - Io(#[from] io::Error), + #[error(display = "IO error: {}", _0)] + Io(#[error(source)] io::Error), - #[error("Hyper error: {0}")] - Hyper(#[from] hyper::Error), + #[error(display = "Hyper error: {}", _0)] + Hyper(#[error(source)] hyper::Error), - #[error("HTTP error: {0}")] - Http(#[from] http::Error), + #[error(display = "HTTP error: {}", _0)] + Http(#[error(source)] http::Error), - #[error("Invalid HTTP header value: {0}")] - HttpHeader(#[from] http::header::ToStrError), + #[error(display = "Invalid HTTP header value: {}", _0)] + HttpHeader(#[error(source)] http::header::ToStrError), - #[error("Network error: {0}")] - Net(#[from] garage_net::error::Error), + #[error(display = "Network error: {}", _0)] + Net(#[error(source)] garage_net::error::Error), - #[error("DB error: {0}")] - Db(#[from] garage_db::Error), + #[error(display = "DB error: {}", _0)] + Db(#[error(source)] garage_db::Error), - #[error("Messagepack encode error: {0}")] - RmpEncode(#[from] rmp_serde::encode::Error), - #[error("Messagepack decode error: {0}")] - RmpDecode(#[from] rmp_serde::decode::Error), - #[error("JSON error: {0}")] - Json(#[from] serde_json::error::Error), - #[error("TOML decode error: {0}")] - TomlDecode(#[from] toml::de::Error), + #[error(display = "Messagepack encode error: {}", _0)] + RmpEncode(#[error(source)] rmp_serde::encode::Error), + #[error(display = "Messagepack decode error: {}", _0)] + RmpDecode(#[error(source)] rmp_serde::decode::Error), + #[error(display = "JSON error: {}", _0)] + Json(#[error(source)] serde_json::error::Error), + #[error(display = "TOML decode error: {}", _0)] + TomlDecode(#[error(source)] toml::de::Error), - #[error("Tokio join error: {0}")] - TokioJoin(#[from] tokio::task::JoinError), + #[error(display = "Tokio join error: {}", _0)] + TokioJoin(#[error(source)] tokio::task::JoinError), - #[error("Tokio semaphore acquire error: {0}")] - TokioSemAcquire(#[from] tokio::sync::AcquireError), + #[error(display = "Tokio semaphore acquire error: {}", _0)] + TokioSemAcquire(#[error(source)] tokio::sync::AcquireError), - #[error("Tokio broadcast receive error: {0}")] - TokioBcastRecv(#[from] tokio::sync::broadcast::error::RecvError), + #[error(display = "Tokio broadcast receive error: {}", _0)] + TokioBcastRecv(#[error(source)] tokio::sync::broadcast::error::RecvError), - #[error("Remote error: {0}")] + #[error(display = "Remote error: {}", _0)] RemoteError(String), - #[error("Timeout")] + #[error(display = "Timeout")] Timeout, - #[error("Could not reach quorum of {0} (sets={1:?}). {2} of {3} request succeeded, others returned errors: {4:?}")] + #[error( + display = "Could not reach quorum of {} (sets={:?}). {} of {} request succeeded, others returned errors: {:?}", + _0, + _1, + _2, + _3, + _4 + )] Quorum(usize, Option, usize, usize, Vec), - #[error("Unexpected RPC message: {0}")] + #[error(display = "Unexpected RPC message: {}", _0)] UnexpectedRpcMessage(String), - #[error("Corrupt data: does not match hash {0:?}")] + #[error(display = "Corrupt data: does not match hash {:?}", _0)] CorruptData(Hash), - #[error("Missing block {0:?}: no node returned a valid block")] + #[error(display = "Missing block {:?}: no node returned a valid block", _0)] MissingBlock(Hash), - #[error("{0}")] + #[error(display = "{}", _0)] Message(String), } diff --git a/src/web/Cargo.toml b/src/web/Cargo.toml index e0cb317f..f097755c 100644 --- a/src/web/Cargo.toml +++ b/src/web/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "garage_web" -version = "1.3.1" +version = "1.0.0" authors = ["Alex Auvolat ", "Quentin Dufour "] edition = "2018" license = "AGPL-3.0" @@ -14,19 +14,21 @@ path = "lib.rs" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -garage_api_common.workspace = true -garage_api_s3.workspace = true +garage_api.workspace = true garage_model.workspace = true garage_util.workspace = true garage_table.workspace = true -thiserror.workspace = true +err-derive.workspace = true tracing.workspace = true percent-encoding.workspace = true +futures.workspace = true + http.workspace = true http-body-util.workspace = true hyper.workspace = true +hyper-util.workspace = true tokio.workspace = true diff --git a/src/web/error.rs b/src/web/error.rs index aef74923..bd8f17b5 100644 --- a/src/web/error.rs +++ b/src/web/error.rs @@ -1,31 +1,31 @@ +use err_derive::Error; use hyper::header::HeaderValue; use hyper::{HeaderMap, StatusCode}; -use thiserror::Error; -use garage_api_common::generic_server::ApiError; +use garage_api::generic_server::ApiError; /// Errors of this crate #[derive(Debug, Error)] pub enum Error { /// An error received from the API crate - #[error("API error: {0}")] - ApiError(garage_api_s3::error::Error), + #[error(display = "API error: {}", _0)] + ApiError(garage_api::s3::error::Error), /// The file does not exist - #[error("Not found")] + #[error(display = "Not found")] NotFound, /// The client sent a request without host, or with unsupported method - #[error("Bad request: {0}")] + #[error(display = "Bad request: {}", _0)] BadRequest(String), } impl From for Error where - garage_api_s3::error::Error: From, + garage_api::s3::error::Error: From, { fn from(err: T) -> Self { - Error::ApiError(garage_api_s3::error::Error::from(err)) + Error::ApiError(garage_api::s3::error::Error::from(err)) } } diff --git a/src/web/web_server.rs b/src/web/web_server.rs index ea02ab0f..69939f65 100644 --- a/src/web/web_server.rs +++ b/src/web/web_server.rs @@ -1,13 +1,13 @@ use std::fs::{self, Permissions}; use std::os::unix::prelude::PermissionsExt; -use std::sync::Arc; +use std::{convert::Infallible, sync::Arc}; use tokio::net::{TcpListener, UnixListener}; use tokio::sync::watch; use hyper::{ body::Incoming as IncomingBody, - header::{HeaderValue, HOST, LOCATION}, + header::{HeaderValue, HOST}, Method, Request, Response, StatusCode, }; @@ -20,21 +20,17 @@ use opentelemetry::{ use crate::error::*; -use garage_api_common::cors::{ - add_cors_headers, find_matching_cors_rule, handle_options_for_bucket, -}; -use garage_api_common::generic_server::{server_loop, UnixListenerOn}; -use garage_api_common::helpers::*; -use garage_api_s3::error::{ +use garage_api::generic_server::{server_loop, UnixListenerOn}; +use garage_api::helpers::*; +use garage_api::s3::cors::{add_cors_headers, find_matching_cors_rule, handle_options_for_bucket}; +use garage_api::s3::error::{ CommonErrorDerivative, Error as ApiError, OkOrBadRequest, OkOrInternalError, }; -use garage_api_s3::get::{handle_get_without_ctx, handle_head_without_ctx}; -use garage_api_s3::website::X_AMZ_WEBSITE_REDIRECT_LOCATION; +use garage_api::s3::get::{handle_get_without_ctx, handle_head_without_ctx}; use garage_model::garage::Garage; use garage_table::*; -use garage_util::config::WebConfig; use garage_util::data::Uuid; use garage_util::error::Error as GarageError; use garage_util::forwarded_headers; @@ -71,18 +67,16 @@ pub struct WebServer { garage: Arc, metrics: Arc, root_domain: String, - add_host_to_metrics: bool, } impl WebServer { /// Run a web server - pub fn new(garage: Arc, config: &WebConfig) -> Arc { + pub fn new(garage: Arc, root_domain: String) -> Arc { let metrics = Arc::new(WebMetrics::new()); Arc::new(WebServer { garage, metrics, - root_domain: config.root_domain.clone(), - add_host_to_metrics: config.add_host_to_metrics, + root_domain, }) } @@ -124,27 +118,18 @@ impl WebServer { req: Request, addr: String, ) -> Result>, http::Error> { - let host_header = req - .headers() - .get(HOST) - .and_then(|x| x.to_str().ok()) - .unwrap_or("") - .to_string(); - if let Ok(forwarded_for_ip_addr) = forwarded_headers::handle_forwarded_for_headers(req.headers()) { - // uri() below has a preceding '/', so no space with host info!( - "{} (via {}) {} {}{}", + "{} (via {}) {} {}", forwarded_for_ip_addr, addr, req.method(), - host_header, req.uri() ); } else { - info!("{} {} {}{}", addr, req.method(), host_header, req.uri()); + info!("{} {} {}", addr, req.method(), req.uri()); } // Lots of instrumentation @@ -153,18 +138,12 @@ impl WebServer { .span_builder(format!("Web {} request", req.method())) .with_trace_id(gen_trace_id()) .with_attributes(vec![ - KeyValue::new("host", format!("{}", host_header.clone())), KeyValue::new("method", format!("{}", req.method())), KeyValue::new("uri", req.uri().to_string()), ]) .start(&tracer); - let mut metrics_tags = vec![KeyValue::new("method", req.method().to_string())]; - if self.add_host_to_metrics { - metrics_tags.push(KeyValue::new("host", host_header.clone())); - } - - let req = req.map(|_| ()); + let metrics_tags = &[KeyValue::new("method", req.method().to_string())]; // The actual handler let res = self @@ -179,30 +158,25 @@ impl WebServer { // Returning the result match res { Ok(res) => { - debug!( - "{} {} {}{}", - req.method(), - res.status(), - host_header, - req.uri() - ); + debug!("{} {} {}", req.method(), res.status(), req.uri()); Ok(res .map(|body| BoxBody::new(http_body_util::BodyExt::map_err(body, Error::from)))) } Err(error) => { info!( - "{} {} {}{} {}", + "{} {} {} {}", req.method(), error.http_status_code(), - host_header, req.uri(), error ); - metrics_tags.push(KeyValue::new( - "status_code", - error.http_status_code().to_string(), - )); - self.metrics.error_counter.add(1, &metrics_tags); + self.metrics.error_counter.add( + 1, + &[ + metrics_tags[0].clone(), + KeyValue::new("status_code", error.http_status_code().to_string()), + ], + ); Ok(error_to_res(error)) } } @@ -221,7 +195,7 @@ impl WebServer { async fn serve_file( self: &Arc, - req: &Request<()>, + req: &Request, ) -> Result>, Error> { // Get http authority string (eg. [::1]:3902 or garage.tld:80) let authority = req @@ -295,15 +269,7 @@ impl WebServer { { Ok(Response::builder() .status(StatusCode::FOUND) - .header(LOCATION, url) - .body(empty_body()) - .unwrap()) - } - (Ok(ret), _) if ret.headers().contains_key(X_AMZ_WEBSITE_REDIRECT_LOCATION) => { - let redirect_location = ret.headers().get(X_AMZ_WEBSITE_REDIRECT_LOCATION).unwrap(); - Ok(Response::builder() - .status(StatusCode::MOVED_PERMANENTLY) - .header(LOCATION, redirect_location) + .header("Location", url) .body(empty_body()) .unwrap()) } @@ -333,7 +299,7 @@ impl WebServer { // Create a fake HTTP request with path = the error document let req2 = Request::builder() .uri(format!("http://{}/{}", host, &error_document)) - .body(()) + .body(empty_body::()) .unwrap(); match handle_get_without_ctx( @@ -397,30 +363,10 @@ fn error_to_res(e: Error) -> Response> { // was a HEAD request or we couldn't get the error document) // We do NOT enter this code path when returning the bucket's // error document (this is handled in serve_file) - let mut body_str = format!( - r"{http_code} {code_text} -

{http_code} {code_text}

", - http_code = e.http_status_code().as_u16(), - code_text = e.http_status_code().canonical_reason().unwrap_or("Unknown"), - ); - if let Error::ApiError(ref err) = e { - body_str.push_str(&format!( - r" -
    -
  • Code: {s3_code}
  • -
  • Message: {s3_message}.
  • -
", - s3_code = err.aws_code(), - s3_message = err, - )); - } - let mut http_error = Response::new(string_body(body_str)); + let body = string_body(format!("{}\n", e)); + let mut http_error = Response::new(body); *http_error.status_mut() = e.http_status_code(); e.add_headers(http_error.headers_mut()); - http_error.headers_mut().insert( - http::header::CONTENT_TYPE, - "text/html; charset=utf-8".parse().unwrap(), - ); http_error }