From 6cb92b21b475d1addd5599683b6f7144e45ee8ae Mon Sep 17 00:00:00 2001 From: Stu Schwartz Date: Sat, 24 Jun 2023 23:58:29 -0700 Subject: [PATCH 01/31] Setup Prost and Tonic rules. --- WORKSPACE.bazel | 6 +- crate_universe/private/crates_vendor.bzl | 2 +- proto/defs.bzl | 18 + proto/prost/BUILD.bazel | 50 + proto/prost/defs.bzl | 56 + proto/prost/private/3rdparty/BUILD.bazel | 54 + proto/prost/private/3rdparty/Cargo.Bazel.lock | 1106 ++++++++++++ .../3rdparty/crates/BUILD.anyhow-1.0.71.bazel | 125 ++ .../crates/BUILD.async-trait-0.1.68.bazel | 120 ++ .../3rdparty/crates/BUILD.autocfg-1.1.0.bazel | 76 + .../3rdparty/crates/BUILD.axum-0.6.18.bazel | 141 ++ .../crates/BUILD.axum-core-0.3.4.bazel | 130 ++ .../3rdparty/crates/BUILD.base64-0.21.2.bazel | 80 + .../prost/private/3rdparty/crates/BUILD.bazel | 87 + .../crates/BUILD.bitflags-1.3.2.bazel | 79 + .../3rdparty/crates/BUILD.bytes-1.4.0.bazel | 80 + .../3rdparty/crates/BUILD.cc-1.0.79.bazel | 76 + .../3rdparty/crates/BUILD.cfg-if-1.0.0.bazel | 76 + .../3rdparty/crates/BUILD.either-1.8.1.bazel | 80 + .../3rdparty/crates/BUILD.errno-0.3.1.bazel | 154 ++ .../crates/BUILD.errno-dragonfly-0.1.2.bazel | 121 ++ .../crates/BUILD.fastrand-1.9.0.bazel | 82 + .../crates/BUILD.fixedbitset-0.4.2.bazel | 76 + .../3rdparty/crates/BUILD.fnv-1.0.7.bazel | 80 + .../crates/BUILD.futures-channel-0.3.28.bazel | 128 ++ .../crates/BUILD.futures-core-0.3.28.bazel | 127 ++ .../crates/BUILD.futures-sink-0.3.28.bazel | 81 + .../crates/BUILD.futures-task-0.3.28.bazel | 123 ++ .../crates/BUILD.futures-util-0.3.28.bazel | 127 ++ .../crates/BUILD.getrandom-0.2.10.bazel | 150 ++ .../3rdparty/crates/BUILD.h2-0.3.19.bazel | 89 + .../crates/BUILD.hashbrown-0.12.3.bazel | 79 + .../3rdparty/crates/BUILD.heck-0.4.1.bazel | 79 + .../crates/BUILD.hermit-abi-0.2.6.bazel | 79 + .../crates/BUILD.hermit-abi-0.3.1.bazel | 76 + .../3rdparty/crates/BUILD.http-0.2.9.bazel | 81 + .../crates/BUILD.http-body-0.4.5.bazel | 81 + .../crates/BUILD.httparse-1.8.0.bazel | 125 ++ .../crates/BUILD.httpdate-1.0.2.bazel | 76 + .../3rdparty/crates/BUILD.hyper-0.14.26.bazel | 107 ++ .../crates/BUILD.hyper-timeout-0.4.1.bazel | 82 + .../crates/BUILD.indexmap-1.9.3.bazel | 127 ++ .../crates/BUILD.instant-0.1.12.bazel | 79 + .../crates/BUILD.io-lifetimes-1.0.11.bazel | 224 +++ .../crates/BUILD.itertools-0.10.5.bazel | 82 + .../3rdparty/crates/BUILD.itoa-1.0.6.bazel | 76 + .../crates/BUILD.lazy_static-1.4.0.bazel | 76 + .../3rdparty/crates/BUILD.libc-0.2.146.bazel | 127 ++ .../crates/BUILD.linux-raw-sys-0.3.8.bazel | 82 + .../crates/BUILD.lock_api-0.4.10.bazel | 129 ++ .../3rdparty/crates/BUILD.log-0.4.19.bazel | 76 + .../3rdparty/crates/BUILD.matchit-0.7.0.bazel | 79 + .../3rdparty/crates/BUILD.memchr-2.5.0.bazel | 125 ++ .../3rdparty/crates/BUILD.mime-0.3.17.bazel | 76 + .../3rdparty/crates/BUILD.mio-0.8.8.bazel | 160 ++ .../crates/BUILD.multimap-0.8.3.bazel | 76 + .../crates/BUILD.num_cpus-1.15.0.bazel | 163 ++ .../crates/BUILD.once_cell-1.18.0.bazel | 82 + .../crates/BUILD.parking_lot-0.12.1.bazel | 83 + .../crates/BUILD.parking_lot_core-0.9.8.bazel | 193 ++ .../crates/BUILD.percent-encoding-2.3.0.bazel | 81 + .../crates/BUILD.petgraph-0.6.3.bazel | 80 + .../crates/BUILD.pin-project-1.1.0.bazel | 79 + .../BUILD.pin-project-internal-1.1.0.bazel | 81 + .../crates/BUILD.pin-project-lite-0.2.9.bazel | 76 + .../crates/BUILD.pin-utils-0.1.0.bazel | 76 + .../crates/BUILD.ppv-lite86-0.2.17.bazel | 80 + .../crates/BUILD.prettyplease-0.1.25.bazel | 120 ++ .../crates/BUILD.proc-macro2-1.0.60.bazel | 126 ++ .../3rdparty/crates/BUILD.prost-0.11.9.bazel | 87 + .../crates/BUILD.prost-build-0.11.9.bazel | 98 ++ .../crates/BUILD.prost-derive-0.11.9.bazel | 83 + .../crates/BUILD.prost-types-0.11.9.bazel | 83 + .../crates/BUILD.protoc-gen-prost-0.2.2.bazel | 156 ++ .../crates/BUILD.protoc-gen-tonic-0.2.2.bazel | 164 ++ .../3rdparty/crates/BUILD.quote-1.0.28.bazel | 126 ++ .../3rdparty/crates/BUILD.rand-0.8.5.bazel | 155 ++ .../crates/BUILD.rand_chacha-0.3.1.bazel | 83 + .../crates/BUILD.rand_core-0.6.4.bazel | 84 + .../crates/BUILD.redox_syscall-0.3.5.bazel | 79 + .../3rdparty/crates/BUILD.regex-1.8.4.bazel | 83 + .../crates/BUILD.regex-syntax-0.7.2.bazel | 79 + .../crates/BUILD.rustix-0.37.20.bazel | 348 ++++ .../crates/BUILD.rustversion-1.0.12.bazel | 117 ++ .../crates/BUILD.scopeguard-1.1.0.bazel | 76 + .../3rdparty/crates/BUILD.serde-1.0.164.bazel | 125 ++ .../BUILD.signal-hook-registry-1.4.1.bazel | 79 + .../3rdparty/crates/BUILD.slab-0.4.8.bazel | 128 ++ .../crates/BUILD.smallvec-1.10.0.bazel | 76 + .../3rdparty/crates/BUILD.socket2-0.4.9.bazel | 154 ++ .../3rdparty/crates/BUILD.syn-1.0.109.bazel | 142 ++ .../3rdparty/crates/BUILD.syn-2.0.18.bazel | 93 + .../crates/BUILD.sync_wrapper-0.1.2.bazel | 76 + .../crates/BUILD.tempfile-3.6.0.bazel | 199 +++ .../3rdparty/crates/BUILD.tokio-1.28.2.bazel | 310 ++++ .../crates/BUILD.tokio-io-timeout-1.2.0.bazel | 80 + .../crates/BUILD.tokio-macros-2.1.0.bazel | 81 + .../crates/BUILD.tokio-stream-0.1.14.bazel | 85 + .../crates/BUILD.tokio-util-0.7.8.bazel | 89 + .../3rdparty/crates/BUILD.tonic-0.9.2.bazel | 107 ++ .../crates/BUILD.tonic-build-0.8.4.bazel | 89 + .../3rdparty/crates/BUILD.tower-0.4.13.bazel | 112 ++ .../crates/BUILD.tower-layer-0.3.2.bazel | 76 + .../crates/BUILD.tower-service-0.3.2.bazel | 76 + .../crates/BUILD.tracing-0.1.37.bazel | 90 + .../BUILD.tracing-attributes-0.1.26.bazel | 81 + .../crates/BUILD.tracing-core-0.1.31.bazel | 83 + .../crates/BUILD.try-lock-0.2.4.bazel | 76 + .../crates/BUILD.unicode-ident-1.0.9.bazel | 76 + .../3rdparty/crates/BUILD.want-0.3.1.bazel | 79 + ...D.wasi-0.11.0+wasi-snapshot-preview1.bazel | 80 + .../3rdparty/crates/BUILD.which-4.4.0.bazel | 91 + .../3rdparty/crates/BUILD.winapi-0.3.9.bazel | 127 ++ ...ILD.winapi-i686-pc-windows-gnu-0.4.0.bazel | 117 ++ ...D.winapi-x86_64-pc-windows-gnu-0.4.0.bazel | 117 ++ .../crates/BUILD.windows-sys-0.48.0.bazel | 101 ++ .../crates/BUILD.windows-targets-0.48.0.bazel | 94 + ...BUILD.windows_aarch64_gnullvm-0.48.0.bazel | 117 ++ .../BUILD.windows_aarch64_msvc-0.48.0.bazel | 117 ++ .../BUILD.windows_i686_gnu-0.48.0.bazel | 117 ++ .../BUILD.windows_i686_msvc-0.48.0.bazel | 117 ++ .../BUILD.windows_x86_64_gnu-0.48.0.bazel | 117 ++ .../BUILD.windows_x86_64_gnullvm-0.48.0.bazel | 117 ++ .../BUILD.windows_x86_64_msvc-0.48.0.bazel | 117 ++ .../prost/private/3rdparty/crates/crates.bzl | 25 + proto/prost/private/3rdparty/crates/defs.bzl | 1556 +++++++++++++++++ proto/prost/private/BUILD.bazel | 23 + proto/prost/private/prost.bzl | 442 +++++ proto/prost/private/protoc_wrapper.rs | 565 ++++++ proto/prost/private/providers.bzl | 21 + proto/prost/private/tests/proto/BUILD.bazel | 0 proto/prost/private/tests/proto/a/BUILD.bazel | 31 + proto/prost/private/tests/proto/a/a.proto | 17 + proto/prost/private/tests/proto/a/a_test.rs | 39 + .../prost/private/tests/proto/a/b/BUILD.bazel | 30 + proto/prost/private/tests/proto/a/b/b.proto | 14 + proto/prost/private/tests/proto/a/b/b_test.rs | 17 + .../private/tests/proto/a/b/c/BUILD.bazel | 31 + proto/prost/private/tests/proto/a/b/c/c.proto | 14 + .../prost/private/tests/proto/a/b/c/c_test.rs | 18 + .../private/tests/proto/packages/BUILD.bazel | 65 + .../tests/proto/packages/package_test.rs | 25 + .../tests/proto/packages/pkg.a.b.proto | 6 + .../private/tests/proto/packages/pkg.a.proto | 6 + .../tests/proto/packages/pkg.empty.proto | 5 + .../private/tests/proto/packages/pkg.proto | 6 + .../private/tests/proto/services/BUILD.bazel | 0 .../tests/proto/services/echo/BUILD.bazel | 45 + .../tests/proto/services/echo/client.rs | 81 + .../tests/proto/services/echo/echo.proto | 29 + .../tests/proto/services/echo/server.rs | 150 ++ .../proto/services/helloworld/BUILD.bazel | 41 + .../tests/proto/services/helloworld/client.rs | 17 + .../services/helloworld/helloworld.proto | 19 + .../tests/proto/services/helloworld/server.rs | 37 + proto/prost/repositories.bzl | 16 + proto/repositories.bzl | 35 +- 157 files changed, 17080 insertions(+), 14 deletions(-) create mode 100644 proto/defs.bzl create mode 100644 proto/prost/BUILD.bazel create mode 100644 proto/prost/defs.bzl create mode 100644 proto/prost/private/3rdparty/BUILD.bazel create mode 100644 proto/prost/private/3rdparty/Cargo.Bazel.lock create mode 100644 proto/prost/private/3rdparty/crates/BUILD.anyhow-1.0.71.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.async-trait-0.1.68.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.autocfg-1.1.0.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.axum-0.6.18.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.axum-core-0.3.4.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.base64-0.21.2.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.bitflags-1.3.2.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.bytes-1.4.0.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.cc-1.0.79.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.cfg-if-1.0.0.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.either-1.8.1.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.errno-0.3.1.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.errno-dragonfly-0.1.2.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.fastrand-1.9.0.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.fixedbitset-0.4.2.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.fnv-1.0.7.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.futures-channel-0.3.28.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.futures-core-0.3.28.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.futures-sink-0.3.28.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.futures-task-0.3.28.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.futures-util-0.3.28.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.getrandom-0.2.10.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.h2-0.3.19.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.hashbrown-0.12.3.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.heck-0.4.1.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.hermit-abi-0.2.6.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.hermit-abi-0.3.1.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.http-0.2.9.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.http-body-0.4.5.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.httparse-1.8.0.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.httpdate-1.0.2.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.hyper-0.14.26.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.hyper-timeout-0.4.1.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.indexmap-1.9.3.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.instant-0.1.12.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.io-lifetimes-1.0.11.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.itertools-0.10.5.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.itoa-1.0.6.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.lazy_static-1.4.0.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.libc-0.2.146.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.linux-raw-sys-0.3.8.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.lock_api-0.4.10.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.log-0.4.19.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.matchit-0.7.0.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.memchr-2.5.0.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.mime-0.3.17.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.mio-0.8.8.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.multimap-0.8.3.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.num_cpus-1.15.0.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.once_cell-1.18.0.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.parking_lot-0.12.1.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.parking_lot_core-0.9.8.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.percent-encoding-2.3.0.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.petgraph-0.6.3.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.pin-project-1.1.0.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.pin-project-internal-1.1.0.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.pin-project-lite-0.2.9.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.pin-utils-0.1.0.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.ppv-lite86-0.2.17.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.prettyplease-0.1.25.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.proc-macro2-1.0.60.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.prost-0.11.9.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.prost-build-0.11.9.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.prost-derive-0.11.9.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.prost-types-0.11.9.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.protoc-gen-prost-0.2.2.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.protoc-gen-tonic-0.2.2.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.quote-1.0.28.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.rand-0.8.5.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.rand_chacha-0.3.1.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.rand_core-0.6.4.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.redox_syscall-0.3.5.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.regex-1.8.4.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.regex-syntax-0.7.2.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.rustix-0.37.20.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.rustversion-1.0.12.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.scopeguard-1.1.0.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.serde-1.0.164.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.signal-hook-registry-1.4.1.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.slab-0.4.8.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.smallvec-1.10.0.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.socket2-0.4.9.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.syn-1.0.109.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.syn-2.0.18.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.sync_wrapper-0.1.2.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.tempfile-3.6.0.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.tokio-1.28.2.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.tokio-io-timeout-1.2.0.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.tokio-macros-2.1.0.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.tokio-stream-0.1.14.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.tokio-util-0.7.8.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.tonic-0.9.2.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.tonic-build-0.8.4.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.tower-0.4.13.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.tower-layer-0.3.2.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.tower-service-0.3.2.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.tracing-0.1.37.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.tracing-attributes-0.1.26.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.tracing-core-0.1.31.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.try-lock-0.2.4.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.unicode-ident-1.0.9.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.want-0.3.1.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.wasi-0.11.0+wasi-snapshot-preview1.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.which-4.4.0.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.winapi-0.3.9.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.winapi-i686-pc-windows-gnu-0.4.0.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.winapi-x86_64-pc-windows-gnu-0.4.0.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.windows-sys-0.48.0.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.windows-targets-0.48.0.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.windows_aarch64_gnullvm-0.48.0.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.windows_aarch64_msvc-0.48.0.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.windows_i686_gnu-0.48.0.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.windows_i686_msvc-0.48.0.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.windows_x86_64_gnu-0.48.0.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.windows_x86_64_gnullvm-0.48.0.bazel create mode 100644 proto/prost/private/3rdparty/crates/BUILD.windows_x86_64_msvc-0.48.0.bazel create mode 100644 proto/prost/private/3rdparty/crates/crates.bzl create mode 100644 proto/prost/private/3rdparty/crates/defs.bzl create mode 100644 proto/prost/private/BUILD.bazel create mode 100644 proto/prost/private/prost.bzl create mode 100644 proto/prost/private/protoc_wrapper.rs create mode 100644 proto/prost/private/providers.bzl create mode 100644 proto/prost/private/tests/proto/BUILD.bazel create mode 100644 proto/prost/private/tests/proto/a/BUILD.bazel create mode 100644 proto/prost/private/tests/proto/a/a.proto create mode 100644 proto/prost/private/tests/proto/a/a_test.rs create mode 100644 proto/prost/private/tests/proto/a/b/BUILD.bazel create mode 100644 proto/prost/private/tests/proto/a/b/b.proto create mode 100644 proto/prost/private/tests/proto/a/b/b_test.rs create mode 100644 proto/prost/private/tests/proto/a/b/c/BUILD.bazel create mode 100644 proto/prost/private/tests/proto/a/b/c/c.proto create mode 100644 proto/prost/private/tests/proto/a/b/c/c_test.rs create mode 100644 proto/prost/private/tests/proto/packages/BUILD.bazel create mode 100644 proto/prost/private/tests/proto/packages/package_test.rs create mode 100644 proto/prost/private/tests/proto/packages/pkg.a.b.proto create mode 100644 proto/prost/private/tests/proto/packages/pkg.a.proto create mode 100644 proto/prost/private/tests/proto/packages/pkg.empty.proto create mode 100644 proto/prost/private/tests/proto/packages/pkg.proto create mode 100644 proto/prost/private/tests/proto/services/BUILD.bazel create mode 100644 proto/prost/private/tests/proto/services/echo/BUILD.bazel create mode 100644 proto/prost/private/tests/proto/services/echo/client.rs create mode 100644 proto/prost/private/tests/proto/services/echo/echo.proto create mode 100644 proto/prost/private/tests/proto/services/echo/server.rs create mode 100644 proto/prost/private/tests/proto/services/helloworld/BUILD.bazel create mode 100644 proto/prost/private/tests/proto/services/helloworld/client.rs create mode 100644 proto/prost/private/tests/proto/services/helloworld/helloworld.proto create mode 100644 proto/prost/private/tests/proto/services/helloworld/server.rs create mode 100644 proto/prost/repositories.bzl diff --git a/WORKSPACE.bazel b/WORKSPACE.bazel index 97c1167848..71a3c612ec 100644 --- a/WORKSPACE.bazel +++ b/WORKSPACE.bazel @@ -10,9 +10,11 @@ load("@rules_rust//crate_universe:repositories.bzl", "crate_universe_dependencie crate_universe_dependencies(bootstrap = True) -load("@rules_rust//proto:repositories.bzl", "rust_proto_repositories") +load("@rules_rust//proto:repositories.bzl", "rust_proto_dependencies", "rust_proto_register_toolchains") -rust_proto_repositories() +rust_proto_dependencies() + +rust_proto_register_toolchains() load("@rules_rust//proto:transitive_repositories.bzl", "rust_proto_transitive_repositories") diff --git a/crate_universe/private/crates_vendor.bzl b/crate_universe/private/crates_vendor.bzl index 4eb7ec95c8..19fefc319a 100644 --- a/crate_universe/private/crates_vendor.bzl +++ b/crate_universe/private/crates_vendor.bzl @@ -346,7 +346,7 @@ bazel run //3rdparty:crates_vendor -- --repin ``` Under the hood, `--repin` will trigger a [cargo update](https://doc.rust-lang.org/cargo/commands/cargo-update.html) -call against the generated workspace. The following table describes how to controll particular values passed to the +call against the generated workspace. The following table describes how to control particular values passed to the `cargo update` command. | Value | Cargo command | diff --git a/proto/defs.bzl b/proto/defs.bzl new file mode 100644 index 0000000000..cc38b48b4b --- /dev/null +++ b/proto/defs.bzl @@ -0,0 +1,18 @@ +"""Rust proto rules.""" + +load( + "//proto/prost:defs.bzl", + _rust_prost_library = "rust_prost_library", + _rust_tonic_library = "rust_tonic_library", +) +load( + ":proto.bzl", + _rust_grpc_library = "rust_grpc_library", + _rust_proto_library = "rust_proto_library", +) + +rust_proto_library = _rust_proto_library +rust_grpc_library = _rust_grpc_library + +rust_prost_library = _rust_prost_library +rust_tonic_library = _rust_tonic_library diff --git a/proto/prost/BUILD.bazel b/proto/prost/BUILD.bazel new file mode 100644 index 0000000000..13a18a1ced --- /dev/null +++ b/proto/prost/BUILD.bazel @@ -0,0 +1,50 @@ +load("@bazel_skylib//:bzl_library.bzl", "bzl_library") +load("//rust:defs.bzl", "rust_library_group") +load(":defs.bzl", "rust_prost_toolchain") + +package(default_visibility = ["//visibility:public"]) + +toolchain_type( + name = "toolchain_type", +) + +rust_library_group( + name = "prost_runtime", + deps = [ + "//proto/prost/private/3rdparty/crates:prost", + ], +) + +rust_library_group( + name = "tonic_runtime", + deps = [ + ":prost_runtime", + "//proto/prost/private/3rdparty/crates:tonic", + ], +) + +rust_prost_toolchain( + name = "default_prost_toolchain_impl", + prost_plugin = "//proto/prost/private/3rdparty/crates:protoc-gen-prost__protoc-gen-prost", + prost_plugin_flag = "--plugin=protoc-gen-prost=%s", + prost_runtime = ":prost_runtime", + proto_compiler = "@com_google_protobuf//:protoc", + tonic_plugin = "//proto/prost/private/3rdparty/crates:protoc-gen-tonic__protoc-gen-tonic", + tonic_plugin_flag = "--plugin=protoc-gen-tonic=%s", + tonic_runtime = ":tonic_runtime", +) + +toolchain( + name = "default_prost_toolchain", + toolchain = "default_prost_toolchain_impl", + toolchain_type = "//proto/prost:toolchain_type", +) + +bzl_library( + name = "bzl_lib", + srcs = glob(["**/*.bzl"]), + deps = [ + "//proto/prost/private:bzl_lib", + "//rust:bzl_lib", + ], +) diff --git a/proto/prost/defs.bzl b/proto/prost/defs.bzl new file mode 100644 index 0000000000..56a45c5ad5 --- /dev/null +++ b/proto/prost/defs.bzl @@ -0,0 +1,56 @@ +"""Rules for building proto libraries in Rust.""" + +load( + "//proto/prost/private:prost.bzl", + _rust_prost_library = "rust_prost_library", + _rust_prost_toolchain = "rust_prost_toolchain", + _rust_tonic_library = "rust_tonic_library", +) + +def rust_prost_library(name, **kwargs): + """A rule for generating a Rust library using Prost. + + Args: + name (str): The name of the target. + **kwargs (dict): Additional keyword arguments for the underlying + `rust_prost_library` rule. + """ + + # Clippy and Rustfmt will attempt to run on these targets. + # This is not correct and likely a bug in target detection. + tags = kwargs.pop("tags", []) + if "no-clippy" not in tags: + tags.append("no-clippy") + if "no-rustfmt" not in tags: + tags.append("no-rustfmt") + + _rust_prost_library( + name = name, + tags = tags, + **kwargs + ) + +def rust_tonic_library(name, **kwargs): + """A rule for generating a Rust library using Prost and Tonic. + + Args: + name (str): The name of the target. + **kwargs (dict): Additional keyword arguments for the underlying + `rust_tonic_library` rule. + """ + + # Clippy and Rustfmt will attempt to run on these targets. + # This is not correct and likely a bug in target detection. + tags = kwargs.pop("tags", []) + if "no-clippy" not in tags: + tags.append("no-clippy") + if "no-rustfmt" not in tags: + tags.append("no-rustfmt") + + _rust_tonic_library( + name = name, + tags = tags, + **kwargs + ) + +rust_prost_toolchain = _rust_prost_toolchain diff --git a/proto/prost/private/3rdparty/BUILD.bazel b/proto/prost/private/3rdparty/BUILD.bazel new file mode 100644 index 0000000000..00ff5804fe --- /dev/null +++ b/proto/prost/private/3rdparty/BUILD.bazel @@ -0,0 +1,54 @@ +load("@bazel_skylib//:bzl_library.bzl", "bzl_library") +load("//crate_universe:defs.bzl", "crate", "crates_vendor") + +crates_vendor( + name = "crates_vendor", + annotations = { + "protoc-gen-prost": [crate.annotation( + gen_binaries = ["protoc-gen-prost"], + )], + "protoc-gen-tonic": [crate.annotation( + gen_binaries = ["protoc-gen-tonic"], + )], + }, + cargo_lockfile = "Cargo.Bazel.lock", + mode = "remote", + packages = { + "h2": crate.spec( + version = "0.3.19", + ), + "prost": crate.spec( + version = "0.11.9", + ), + "prost-types": crate.spec( + version = "0.11.9", + ), + "protoc-gen-prost": crate.spec( + version = "0.2.2", + ), + "protoc-gen-tonic": crate.spec( + version = "0.2.2", + ), + "tokio": crate.spec( + features = ["full"], + version = "1.28.2", + ), + "tokio-stream": crate.spec( + version = "0.1.14", + ), + "tonic": crate.spec( + version = "0.9.2", + ), + }, + repository_name = "rules_rust_prost", + tags = ["manual"], +) + +bzl_library( + name = "bzl_lib", + srcs = [ + "//proto/prost/private/3rdparty/crates:crates.bzl", + "//proto/prost/private/3rdparty/crates:defs.bzl", + ], + visibility = ["//proto/prost/private:__pkg__"], +) diff --git a/proto/prost/private/3rdparty/Cargo.Bazel.lock b/proto/prost/private/3rdparty/Cargo.Bazel.lock new file mode 100644 index 0000000000..d659b572d3 --- /dev/null +++ b/proto/prost/private/3rdparty/Cargo.Bazel.lock @@ -0,0 +1,1106 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "anyhow" +version = "1.0.71" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" + +[[package]] +name = "async-trait" +version = "0.1.68" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.18", +] + +[[package]] +name = "autocfg" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" + +[[package]] +name = "axum" +version = "0.6.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8175979259124331c1d7bf6586ee7e0da434155e4b2d48ec2c8386281d8df39" +dependencies = [ + "async-trait", + "axum-core", + "bitflags", + "bytes", + "futures-util", + "http", + "http-body", + "hyper", + "itoa", + "matchit", + "memchr", + "mime", + "percent-encoding", + "pin-project-lite", + "rustversion", + "serde", + "sync_wrapper", + "tower", + "tower-layer", + "tower-service", +] + +[[package]] +name = "axum-core" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" +dependencies = [ + "async-trait", + "bytes", + "futures-util", + "http", + "http-body", + "mime", + "rustversion", + "tower-layer", + "tower-service", +] + +[[package]] +name = "base64" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bytes" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" + +[[package]] +name = "cc" +version = "1.0.79" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "direct-cargo-bazel-deps" +version = "0.0.1" +dependencies = [ + "h2", + "prost", + "prost-types", + "protoc-gen-prost", + "protoc-gen-tonic", + "tokio", + "tokio-stream", + "tonic", +] + +[[package]] +name = "either" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" + +[[package]] +name = "errno" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" +dependencies = [ + "errno-dragonfly", + "libc", + "windows-sys", +] + +[[package]] +name = "errno-dragonfly" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "fastrand" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" +dependencies = [ + "instant", +] + +[[package]] +name = "fixedbitset" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "futures-channel" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" +dependencies = [ + "futures-core", +] + +[[package]] +name = "futures-core" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" + +[[package]] +name = "futures-sink" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" + +[[package]] +name = "futures-task" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" + +[[package]] +name = "futures-util" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" +dependencies = [ + "futures-core", + "futures-task", + "pin-project-lite", + "pin-utils", +] + +[[package]] +name = "getrandom" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "h2" +version = "0.3.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d357c7ae988e7d2182f7d7871d0b963962420b0678b0997ce7de72001aeab782" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "hermit-abi" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" +dependencies = [ + "libc", +] + +[[package]] +name = "hermit-abi" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" + +[[package]] +name = "http" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +dependencies = [ + "bytes", + "http", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" + +[[package]] +name = "httpdate" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" + +[[package]] +name = "hyper" +version = "0.14.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab302d72a6f11a3b910431ff93aae7e773078c769f0a3ef15fb9ec692ed147d4" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "hyper-timeout" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" +dependencies = [ + "hyper", + "pin-project-lite", + "tokio", + "tokio-io-timeout", +] + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown", +] + +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "io-lifetimes" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" +dependencies = [ + "hermit-abi 0.3.1", + "libc", + "windows-sys", +] + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "libc" +version = "0.2.146" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b" + +[[package]] +name = "linux-raw-sys" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" + +[[package]] +name = "lock_api" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" + +[[package]] +name = "matchit" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b87248edafb776e59e6ee64a79086f65890d3510f2c656c000bf2a7e8a0aea40" + +[[package]] +name = "memchr" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "mio" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" +dependencies = [ + "libc", + "wasi", + "windows-sys", +] + +[[package]] +name = "multimap" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" + +[[package]] +name = "num_cpus" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" +dependencies = [ + "hermit-abi 0.2.6", + "libc", +] + +[[package]] +name = "once_cell" +version = "1.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" + +[[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", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets", +] + +[[package]] +name = "percent-encoding" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" + +[[package]] +name = "petgraph" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dd7d28ee937e54fe3080c91faa1c3a46c06de6252988a7f4592ba2310ef22a4" +dependencies = [ + "fixedbitset", + "indexmap", +] + +[[package]] +name = "pin-project" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c95a7476719eab1e366eaf73d0260af3021184f18177925b07f54b30089ceead" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39407670928234ebc5e6e580247dd567ad73a3578460c5990f9503df207e8f07" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.18", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "prettyplease" +version = "0.1.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c8646e95016a7a6c4adea95bafa8a16baab64b583356217f2c85db4a39d9a86" +dependencies = [ + "proc-macro2", + "syn 1.0.109", +] + +[[package]] +name = "proc-macro2" +version = "1.0.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dec2b086b7a862cf4de201096214fa870344cf922b2b30c167badb3af3195406" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "prost" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd" +dependencies = [ + "bytes", + "prost-derive", +] + +[[package]] +name = "prost-build" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "119533552c9a7ffacc21e099c24a0ac8bb19c2a2a3f363de84cd9b844feab270" +dependencies = [ + "bytes", + "heck", + "itertools", + "lazy_static", + "log", + "multimap", + "petgraph", + "prettyplease", + "prost", + "prost-types", + "regex", + "syn 1.0.109", + "tempfile", + "which", +] + +[[package]] +name = "prost-derive" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4" +dependencies = [ + "anyhow", + "itertools", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "prost-types" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "213622a1460818959ac1181aaeb2dc9c7f63df720db7d788b3e24eacd1983e13" +dependencies = [ + "prost", +] + +[[package]] +name = "protoc-gen-prost" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a81e3a9bb429fec47008b209896f0b9ab99fbcbc1c3733b385d43fbfd64dd2ca" +dependencies = [ + "once_cell", + "prost", + "prost-build", + "prost-types", + "regex", +] + +[[package]] +name = "protoc-gen-tonic" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "725a07a704f9cf7a956b302c21d81b5516ed5ee6cfbbf827edb69beeaae6cc30" +dependencies = [ + "heck", + "prettyplease", + "prost", + "prost-build", + "prost-types", + "protoc-gen-prost", + "regex", + "syn 1.0.109", + "tonic-build", +] + +[[package]] +name = "quote" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + +[[package]] +name = "redox_syscall" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +dependencies = [ + "bitflags", +] + +[[package]] +name = "regex" +version = "1.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0ab3ca65655bb1e41f2a8c8cd662eb4fb035e67c3f78da1d61dffe89d07300f" +dependencies = [ + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78" + +[[package]] +name = "rustix" +version = "0.37.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b96e891d04aa506a6d1f318d2771bcb1c7dfda84e126660ace067c9b474bb2c0" +dependencies = [ + "bitflags", + "errno", + "io-lifetimes", + "libc", + "linux-raw-sys", + "windows-sys", +] + +[[package]] +name = "rustversion" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" + +[[package]] +name = "scopeguard" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" + +[[package]] +name = "serde" +version = "1.0.164" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e8c8cf938e98f769bc164923b06dce91cea1751522f46f8466461af04c9027d" + +[[package]] +name = "signal-hook-registry" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +dependencies = [ + "libc", +] + +[[package]] +name = "slab" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" +dependencies = [ + "autocfg", +] + +[[package]] +name = "smallvec" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" + +[[package]] +name = "socket2" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + +[[package]] +name = "tempfile" +version = "3.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31c0432476357e58790aaa47a8efb0c5138f137343f3b5f23bd36a27e3b0a6d6" +dependencies = [ + "autocfg", + "cfg-if", + "fastrand", + "redox_syscall", + "rustix", + "windows-sys", +] + +[[package]] +name = "tokio" +version = "1.28.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94d7b1cfd2aa4011f2de74c2c4c63665e27a71006b0a192dcd2710272e73dfa2" +dependencies = [ + "autocfg", + "bytes", + "libc", + "mio", + "num_cpus", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "socket2", + "tokio-macros", + "windows-sys", +] + +[[package]] +name = "tokio-io-timeout" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" +dependencies = [ + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tokio-macros" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.18", +] + +[[package]] +name = "tokio-stream" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", + "tracing", +] + +[[package]] +name = "tonic" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3082666a3a6433f7f511c7192923fa1fe07c69332d3c6a2e6bb040b569199d5a" +dependencies = [ + "async-trait", + "axum", + "base64", + "bytes", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "hyper", + "hyper-timeout", + "percent-encoding", + "pin-project", + "prost", + "tokio", + "tokio-stream", + "tower", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tonic-build" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5bf5e9b9c0f7e0a7c027dcfaba7b2c60816c7049171f679d99ee2ff65d0de8c4" +dependencies = [ + "prettyplease", + "proc-macro2", + "prost-build", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "futures-core", + "futures-util", + "indexmap", + "pin-project", + "pin-project-lite", + "rand", + "slab", + "tokio", + "tokio-util", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-layer" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" + +[[package]] +name = "tower-service" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" + +[[package]] +name = "tracing" +version = "0.1.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +dependencies = [ + "cfg-if", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.18", +] + +[[package]] +name = "tracing-core" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" +dependencies = [ + "once_cell", +] + +[[package]] +name = "try-lock" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" + +[[package]] +name = "unicode-ident" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "which" +version = "4.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2441c784c52b289a054b7201fc93253e288f094e2f4be9058343127c4226a269" +dependencies = [ + "either", + "libc", + "once_cell", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" diff --git a/proto/prost/private/3rdparty/crates/BUILD.anyhow-1.0.71.bazel b/proto/prost/private/3rdparty/crates/BUILD.anyhow-1.0.71.bazel new file mode 100644 index 0000000000..b22fb7397a --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.anyhow-1.0.71.bazel @@ -0,0 +1,125 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//cargo:defs.bzl", "cargo_build_script") +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "anyhow", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "default", + "std", + ], + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=anyhow", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "1.0.71", + deps = [ + "@rules_rust_prost__anyhow-1.0.71//:build_script_build", + ], +) + +cargo_build_script( + name = "anyhow_build_script", + srcs = glob(["**/*.rs"]), + crate_features = [ + "default", + "std", + ], + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + edition = "2018", + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-bazel", + "crate-name=anyhow", + "manual", + "noclippy", + "norustfmt", + ], + version = "1.0.71", + visibility = ["//visibility:private"], +) + +alias( + name = "build_script_build", + actual = "anyhow_build_script", + tags = ["manual"], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.async-trait-0.1.68.bazel b/proto/prost/private/3rdparty/crates/BUILD.async-trait-0.1.68.bazel new file mode 100644 index 0000000000..d6ab28e5d1 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.async-trait-0.1.68.bazel @@ -0,0 +1,120 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//cargo:defs.bzl", "cargo_build_script") +load("@rules_rust//rust:defs.bzl", "rust_proc_macro") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_proc_macro( + name = "async_trait", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=async-trait", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.1.68", + deps = [ + "@rules_rust_prost__async-trait-0.1.68//:build_script_build", + "@rules_rust_prost__proc-macro2-1.0.60//:proc_macro2", + "@rules_rust_prost__quote-1.0.28//:quote", + "@rules_rust_prost__syn-2.0.18//:syn", + ], +) + +cargo_build_script( + name = "async-trait_build_script", + srcs = glob(["**/*.rs"]), + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + edition = "2018", + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-bazel", + "crate-name=async-trait", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.1.68", + visibility = ["//visibility:private"], +) + +alias( + name = "build_script_build", + actual = "async-trait_build_script", + tags = ["manual"], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.autocfg-1.1.0.bazel b/proto/prost/private/3rdparty/crates/BUILD.autocfg-1.1.0.bazel new file mode 100644 index 0000000000..4cb2ab6df2 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.autocfg-1.1.0.bazel @@ -0,0 +1,76 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # Apache-2.0 OR MIT +# ]) + +rust_library( + name = "autocfg", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2015", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=autocfg", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "1.1.0", +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.axum-0.6.18.bazel b/proto/prost/private/3rdparty/crates/BUILD.axum-0.6.18.bazel new file mode 100644 index 0000000000..dc329e7b43 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.axum-0.6.18.bazel @@ -0,0 +1,141 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//cargo:defs.bzl", "cargo_build_script") +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT +# ]) + +rust_library( + name = "axum", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2021", + proc_macro_deps = [ + "@rules_rust_prost__async-trait-0.1.68//:async_trait", + ], + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=axum", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.6.18", + deps = [ + "@rules_rust_prost__axum-0.6.18//:build_script_build", + "@rules_rust_prost__axum-core-0.3.4//:axum_core", + "@rules_rust_prost__bitflags-1.3.2//:bitflags", + "@rules_rust_prost__bytes-1.4.0//:bytes", + "@rules_rust_prost__futures-util-0.3.28//:futures_util", + "@rules_rust_prost__http-0.2.9//:http", + "@rules_rust_prost__http-body-0.4.5//:http_body", + "@rules_rust_prost__hyper-0.14.26//:hyper", + "@rules_rust_prost__itoa-1.0.6//:itoa", + "@rules_rust_prost__matchit-0.7.0//:matchit", + "@rules_rust_prost__memchr-2.5.0//:memchr", + "@rules_rust_prost__mime-0.3.17//:mime", + "@rules_rust_prost__percent-encoding-2.3.0//:percent_encoding", + "@rules_rust_prost__pin-project-lite-0.2.9//:pin_project_lite", + "@rules_rust_prost__serde-1.0.164//:serde", + "@rules_rust_prost__sync_wrapper-0.1.2//:sync_wrapper", + "@rules_rust_prost__tower-0.4.13//:tower", + "@rules_rust_prost__tower-layer-0.3.2//:tower_layer", + "@rules_rust_prost__tower-service-0.3.2//:tower_service", + ], +) + +cargo_build_script( + name = "axum_build_script", + srcs = glob(["**/*.rs"]), + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + edition = "2021", + proc_macro_deps = [ + "@rules_rust_prost__rustversion-1.0.12//:rustversion", + ], + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-bazel", + "crate-name=axum", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.6.18", + visibility = ["//visibility:private"], +) + +alias( + name = "build_script_build", + actual = "axum_build_script", + tags = ["manual"], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.axum-core-0.3.4.bazel b/proto/prost/private/3rdparty/crates/BUILD.axum-core-0.3.4.bazel new file mode 100644 index 0000000000..43ef780e83 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.axum-core-0.3.4.bazel @@ -0,0 +1,130 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//cargo:defs.bzl", "cargo_build_script") +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT +# ]) + +rust_library( + name = "axum_core", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2021", + proc_macro_deps = [ + "@rules_rust_prost__async-trait-0.1.68//:async_trait", + ], + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=axum-core", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.3.4", + deps = [ + "@rules_rust_prost__axum-core-0.3.4//:build_script_build", + "@rules_rust_prost__bytes-1.4.0//:bytes", + "@rules_rust_prost__futures-util-0.3.28//:futures_util", + "@rules_rust_prost__http-0.2.9//:http", + "@rules_rust_prost__http-body-0.4.5//:http_body", + "@rules_rust_prost__mime-0.3.17//:mime", + "@rules_rust_prost__tower-layer-0.3.2//:tower_layer", + "@rules_rust_prost__tower-service-0.3.2//:tower_service", + ], +) + +cargo_build_script( + name = "axum-core_build_script", + srcs = glob(["**/*.rs"]), + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + edition = "2021", + proc_macro_deps = [ + "@rules_rust_prost__rustversion-1.0.12//:rustversion", + ], + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-bazel", + "crate-name=axum-core", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.3.4", + visibility = ["//visibility:private"], +) + +alias( + name = "build_script_build", + actual = "axum-core_build_script", + tags = ["manual"], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.base64-0.21.2.bazel b/proto/prost/private/3rdparty/crates/BUILD.base64-0.21.2.bazel new file mode 100644 index 0000000000..8bbe9dc8a2 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.base64-0.21.2.bazel @@ -0,0 +1,80 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "base64", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "default", + "std", + ], + crate_root = "src/lib.rs", + edition = "2021", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=base64", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.21.2", +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.bazel b/proto/prost/private/3rdparty/crates/BUILD.bazel new file mode 100644 index 0000000000..047ad27f63 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.bazel @@ -0,0 +1,87 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +package(default_visibility = ["//visibility:public"]) + +exports_files( + [ + "cargo-bazel.json", + "crates.bzl", + "defs.bzl", + ] + glob(["*.bazel"]), +) + +filegroup( + name = "srcs", + srcs = glob([ + "*.bazel", + "*.bzl", + ]), +) + +# Workspace Member Dependencies +alias( + name = "h2", + actual = "@rules_rust_prost__h2-0.3.19//:h2", + tags = ["manual"], +) + +alias( + name = "prost", + actual = "@rules_rust_prost__prost-0.11.9//:prost", + tags = ["manual"], +) + +alias( + name = "prost-types", + actual = "@rules_rust_prost__prost-types-0.11.9//:prost_types", + tags = ["manual"], +) + +alias( + name = "protoc-gen-prost", + actual = "@rules_rust_prost__protoc-gen-prost-0.2.2//:protoc_gen_prost", + tags = ["manual"], +) + +alias( + name = "protoc-gen-tonic", + actual = "@rules_rust_prost__protoc-gen-tonic-0.2.2//:protoc_gen_tonic", + tags = ["manual"], +) + +alias( + name = "tokio", + actual = "@rules_rust_prost__tokio-1.28.2//:tokio", + tags = ["manual"], +) + +alias( + name = "tokio-stream", + actual = "@rules_rust_prost__tokio-stream-0.1.14//:tokio_stream", + tags = ["manual"], +) + +alias( + name = "tonic", + actual = "@rules_rust_prost__tonic-0.9.2//:tonic", + tags = ["manual"], +) + +# Binaries +alias( + name = "protoc-gen-prost__protoc-gen-prost", + actual = "@rules_rust_prost__protoc-gen-prost-0.2.2//:protoc-gen-prost__bin", + tags = ["manual"], +) + +alias( + name = "protoc-gen-tonic__protoc-gen-tonic", + actual = "@rules_rust_prost__protoc-gen-tonic-0.2.2//:protoc-gen-tonic__bin", + tags = ["manual"], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.bitflags-1.3.2.bazel b/proto/prost/private/3rdparty/crates/BUILD.bitflags-1.3.2.bazel new file mode 100644 index 0000000000..3ae59e1b42 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.bitflags-1.3.2.bazel @@ -0,0 +1,79 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "bitflags", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "default", + ], + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=bitflags", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "1.3.2", +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.bytes-1.4.0.bazel b/proto/prost/private/3rdparty/crates/BUILD.bytes-1.4.0.bazel new file mode 100644 index 0000000000..f4bc9192bd --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.bytes-1.4.0.bazel @@ -0,0 +1,80 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT +# ]) + +rust_library( + name = "bytes", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "default", + "std", + ], + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=bytes", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "1.4.0", +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.cc-1.0.79.bazel b/proto/prost/private/3rdparty/crates/BUILD.cc-1.0.79.bazel new file mode 100644 index 0000000000..c451ceaa38 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.cc-1.0.79.bazel @@ -0,0 +1,76 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "cc", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=cc", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "1.0.79", +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.cfg-if-1.0.0.bazel b/proto/prost/private/3rdparty/crates/BUILD.cfg-if-1.0.0.bazel new file mode 100644 index 0000000000..18c8eeb481 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.cfg-if-1.0.0.bazel @@ -0,0 +1,76 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "cfg_if", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=cfg-if", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "1.0.0", +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.either-1.8.1.bazel b/proto/prost/private/3rdparty/crates/BUILD.either-1.8.1.bazel new file mode 100644 index 0000000000..2f3ed73c6c --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.either-1.8.1.bazel @@ -0,0 +1,80 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "either", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "default", + "use_std", + ], + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=either", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "1.8.1", +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.errno-0.3.1.bazel b/proto/prost/private/3rdparty/crates/BUILD.errno-0.3.1.bazel new file mode 100644 index 0000000000..ffd2e52b2a --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.errno-0.3.1.bazel @@ -0,0 +1,154 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "errno", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=errno", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.3.1", + deps = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:aarch64-apple-ios": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:aarch64-fuchsia": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:aarch64-linux-android": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [ + "@rules_rust_prost__windows-sys-0.48.0//:windows_sys", # cfg(windows) + ], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:armv7-linux-androideabi": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:i686-apple-darwin": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:i686-linux-android": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [ + "@rules_rust_prost__windows-sys-0.48.0//:windows_sys", # cfg(windows) + ], + "@rules_rust//rust/platform:i686-unknown-freebsd": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:wasm32-wasi": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(target_os = "wasi") + ], + "@rules_rust//rust/platform:x86_64-apple-darwin": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:x86_64-apple-ios": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:x86_64-fuchsia": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:x86_64-linux-android": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [ + "@rules_rust_prost__windows-sys-0.48.0//:windows_sys", # cfg(windows) + ], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "//conditions:default": [], + }), +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.errno-dragonfly-0.1.2.bazel b/proto/prost/private/3rdparty/crates/BUILD.errno-dragonfly-0.1.2.bazel new file mode 100644 index 0000000000..31b9730547 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.errno-dragonfly-0.1.2.bazel @@ -0,0 +1,121 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//cargo:defs.bzl", "cargo_build_script") +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT +# ]) + +rust_library( + name = "errno_dragonfly", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=errno-dragonfly", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.1.2", + deps = [ + "@rules_rust_prost__errno-dragonfly-0.1.2//:build_script_build", + "@rules_rust_prost__libc-0.2.146//:libc", + ], +) + +cargo_build_script( + name = "errno-dragonfly_build_script", + srcs = glob(["**/*.rs"]), + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + edition = "2018", + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-bazel", + "crate-name=errno-dragonfly", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.1.2", + visibility = ["//visibility:private"], + deps = [ + "@rules_rust_prost__cc-1.0.79//:cc", + ], +) + +alias( + name = "build_script_build", + actual = "errno-dragonfly_build_script", + tags = ["manual"], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.fastrand-1.9.0.bazel b/proto/prost/private/3rdparty/crates/BUILD.fastrand-1.9.0.bazel new file mode 100644 index 0000000000..a729bd39d7 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.fastrand-1.9.0.bazel @@ -0,0 +1,82 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # Apache-2.0 OR MIT +# ]) + +rust_library( + name = "fastrand", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=fastrand", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "1.9.0", + deps = select({ + "@rules_rust//rust/platform:wasm32-unknown-unknown": [ + "@rules_rust_prost__instant-0.1.12//:instant", # cfg(all(target_arch = "wasm32", not(target_os = "wasi"))) + ], + "//conditions:default": [], + }), +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.fixedbitset-0.4.2.bazel b/proto/prost/private/3rdparty/crates/BUILD.fixedbitset-0.4.2.bazel new file mode 100644 index 0000000000..6b8ce4ad34 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.fixedbitset-0.4.2.bazel @@ -0,0 +1,76 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "fixedbitset", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2015", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=fixedbitset", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.4.2", +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.fnv-1.0.7.bazel b/proto/prost/private/3rdparty/crates/BUILD.fnv-1.0.7.bazel new file mode 100644 index 0000000000..a476be0438 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.fnv-1.0.7.bazel @@ -0,0 +1,80 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # Apache-2.0 / MIT +# ]) + +rust_library( + name = "fnv", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "default", + "std", + ], + crate_root = "lib.rs", + edition = "2015", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=fnv", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "1.0.7", +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.futures-channel-0.3.28.bazel b/proto/prost/private/3rdparty/crates/BUILD.futures-channel-0.3.28.bazel new file mode 100644 index 0000000000..a8c6c4c815 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.futures-channel-0.3.28.bazel @@ -0,0 +1,128 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//cargo:defs.bzl", "cargo_build_script") +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "futures_channel", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "alloc", + "default", + "std", + ], + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=futures-channel", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.3.28", + deps = [ + "@rules_rust_prost__futures-channel-0.3.28//:build_script_build", + "@rules_rust_prost__futures-core-0.3.28//:futures_core", + ], +) + +cargo_build_script( + name = "futures-channel_build_script", + srcs = glob(["**/*.rs"]), + crate_features = [ + "alloc", + "default", + "std", + ], + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + edition = "2018", + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-bazel", + "crate-name=futures-channel", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.3.28", + visibility = ["//visibility:private"], +) + +alias( + name = "build_script_build", + actual = "futures-channel_build_script", + tags = ["manual"], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.futures-core-0.3.28.bazel b/proto/prost/private/3rdparty/crates/BUILD.futures-core-0.3.28.bazel new file mode 100644 index 0000000000..f5e308a62b --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.futures-core-0.3.28.bazel @@ -0,0 +1,127 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//cargo:defs.bzl", "cargo_build_script") +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "futures_core", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "alloc", + "default", + "std", + ], + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=futures-core", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.3.28", + deps = [ + "@rules_rust_prost__futures-core-0.3.28//:build_script_build", + ], +) + +cargo_build_script( + name = "futures-core_build_script", + srcs = glob(["**/*.rs"]), + crate_features = [ + "alloc", + "default", + "std", + ], + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + edition = "2018", + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-bazel", + "crate-name=futures-core", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.3.28", + visibility = ["//visibility:private"], +) + +alias( + name = "build_script_build", + actual = "futures-core_build_script", + tags = ["manual"], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.futures-sink-0.3.28.bazel b/proto/prost/private/3rdparty/crates/BUILD.futures-sink-0.3.28.bazel new file mode 100644 index 0000000000..c0f3488ac4 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.futures-sink-0.3.28.bazel @@ -0,0 +1,81 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "futures_sink", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "alloc", + "default", + "std", + ], + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=futures-sink", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.3.28", +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.futures-task-0.3.28.bazel b/proto/prost/private/3rdparty/crates/BUILD.futures-task-0.3.28.bazel new file mode 100644 index 0000000000..f6c682f434 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.futures-task-0.3.28.bazel @@ -0,0 +1,123 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//cargo:defs.bzl", "cargo_build_script") +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "futures_task", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "alloc", + ], + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=futures-task", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.3.28", + deps = [ + "@rules_rust_prost__futures-task-0.3.28//:build_script_build", + ], +) + +cargo_build_script( + name = "futures-task_build_script", + srcs = glob(["**/*.rs"]), + crate_features = [ + "alloc", + ], + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + edition = "2018", + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-bazel", + "crate-name=futures-task", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.3.28", + visibility = ["//visibility:private"], +) + +alias( + name = "build_script_build", + actual = "futures-task_build_script", + tags = ["manual"], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.futures-util-0.3.28.bazel b/proto/prost/private/3rdparty/crates/BUILD.futures-util-0.3.28.bazel new file mode 100644 index 0000000000..1191141f1b --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.futures-util-0.3.28.bazel @@ -0,0 +1,127 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//cargo:defs.bzl", "cargo_build_script") +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "futures_util", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "alloc", + ], + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=futures-util", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.3.28", + deps = [ + "@rules_rust_prost__futures-core-0.3.28//:futures_core", + "@rules_rust_prost__futures-task-0.3.28//:futures_task", + "@rules_rust_prost__futures-util-0.3.28//:build_script_build", + "@rules_rust_prost__pin-project-lite-0.2.9//:pin_project_lite", + "@rules_rust_prost__pin-utils-0.1.0//:pin_utils", + ], +) + +cargo_build_script( + name = "futures-util_build_script", + srcs = glob(["**/*.rs"]), + crate_features = [ + "alloc", + ], + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + edition = "2018", + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-bazel", + "crate-name=futures-util", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.3.28", + visibility = ["//visibility:private"], +) + +alias( + name = "build_script_build", + actual = "futures-util_build_script", + tags = ["manual"], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.getrandom-0.2.10.bazel b/proto/prost/private/3rdparty/crates/BUILD.getrandom-0.2.10.bazel new file mode 100644 index 0000000000..d7927b9424 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.getrandom-0.2.10.bazel @@ -0,0 +1,150 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "getrandom", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "std", + ], + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=getrandom", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.2.10", + deps = [ + "@rules_rust_prost__cfg-if-1.0.0//:cfg_if", + ] + select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:aarch64-apple-ios": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:aarch64-fuchsia": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:aarch64-linux-android": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:armv7-linux-androideabi": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:i686-apple-darwin": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:i686-linux-android": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:i686-unknown-freebsd": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:wasm32-wasi": [ + "@rules_rust_prost__wasi-0.11.0-wasi-snapshot-preview1//:wasi", # cfg(target_os = "wasi") + ], + "@rules_rust//rust/platform:x86_64-apple-darwin": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:x86_64-apple-ios": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:x86_64-fuchsia": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:x86_64-linux-android": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "//conditions:default": [], + }), +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.h2-0.3.19.bazel b/proto/prost/private/3rdparty/crates/BUILD.h2-0.3.19.bazel new file mode 100644 index 0000000000..bf5d8512c1 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.h2-0.3.19.bazel @@ -0,0 +1,89 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT +# ]) + +rust_library( + name = "h2", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=h2", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.3.19", + deps = [ + "@rules_rust_prost__bytes-1.4.0//:bytes", + "@rules_rust_prost__fnv-1.0.7//:fnv", + "@rules_rust_prost__futures-core-0.3.28//:futures_core", + "@rules_rust_prost__futures-sink-0.3.28//:futures_sink", + "@rules_rust_prost__futures-util-0.3.28//:futures_util", + "@rules_rust_prost__http-0.2.9//:http", + "@rules_rust_prost__indexmap-1.9.3//:indexmap", + "@rules_rust_prost__slab-0.4.8//:slab", + "@rules_rust_prost__tokio-1.28.2//:tokio", + "@rules_rust_prost__tokio-util-0.7.8//:tokio_util", + "@rules_rust_prost__tracing-0.1.37//:tracing", + ], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.hashbrown-0.12.3.bazel b/proto/prost/private/3rdparty/crates/BUILD.hashbrown-0.12.3.bazel new file mode 100644 index 0000000000..bc2a643d7c --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.hashbrown-0.12.3.bazel @@ -0,0 +1,79 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "hashbrown", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "raw", + ], + crate_root = "src/lib.rs", + edition = "2021", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=hashbrown", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.12.3", +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.heck-0.4.1.bazel b/proto/prost/private/3rdparty/crates/BUILD.heck-0.4.1.bazel new file mode 100644 index 0000000000..884904ffe1 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.heck-0.4.1.bazel @@ -0,0 +1,79 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "heck", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "default", + ], + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=heck", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.4.1", +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.hermit-abi-0.2.6.bazel b/proto/prost/private/3rdparty/crates/BUILD.hermit-abi-0.2.6.bazel new file mode 100644 index 0000000000..a05ccde286 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.hermit-abi-0.2.6.bazel @@ -0,0 +1,79 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "hermit_abi", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2021", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=hermit-abi", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.2.6", + deps = [ + "@rules_rust_prost__libc-0.2.146//:libc", + ], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.hermit-abi-0.3.1.bazel b/proto/prost/private/3rdparty/crates/BUILD.hermit-abi-0.3.1.bazel new file mode 100644 index 0000000000..b46369d361 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.hermit-abi-0.3.1.bazel @@ -0,0 +1,76 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "hermit_abi", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2021", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=hermit-abi", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.3.1", +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.http-0.2.9.bazel b/proto/prost/private/3rdparty/crates/BUILD.http-0.2.9.bazel new file mode 100644 index 0000000000..ea8f8d4558 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.http-0.2.9.bazel @@ -0,0 +1,81 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "http", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=http", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.2.9", + deps = [ + "@rules_rust_prost__bytes-1.4.0//:bytes", + "@rules_rust_prost__fnv-1.0.7//:fnv", + "@rules_rust_prost__itoa-1.0.6//:itoa", + ], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.http-body-0.4.5.bazel b/proto/prost/private/3rdparty/crates/BUILD.http-body-0.4.5.bazel new file mode 100644 index 0000000000..7dd08facfb --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.http-body-0.4.5.bazel @@ -0,0 +1,81 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT +# ]) + +rust_library( + name = "http_body", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=http-body", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.4.5", + deps = [ + "@rules_rust_prost__bytes-1.4.0//:bytes", + "@rules_rust_prost__http-0.2.9//:http", + "@rules_rust_prost__pin-project-lite-0.2.9//:pin_project_lite", + ], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.httparse-1.8.0.bazel b/proto/prost/private/3rdparty/crates/BUILD.httparse-1.8.0.bazel new file mode 100644 index 0000000000..26e1fe8de4 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.httparse-1.8.0.bazel @@ -0,0 +1,125 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//cargo:defs.bzl", "cargo_build_script") +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "httparse", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "default", + "std", + ], + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=httparse", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "1.8.0", + deps = [ + "@rules_rust_prost__httparse-1.8.0//:build_script_build", + ], +) + +cargo_build_script( + name = "httparse_build_script", + srcs = glob(["**/*.rs"]), + crate_features = [ + "default", + "std", + ], + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + edition = "2018", + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-bazel", + "crate-name=httparse", + "manual", + "noclippy", + "norustfmt", + ], + version = "1.8.0", + visibility = ["//visibility:private"], +) + +alias( + name = "build_script_build", + actual = "httparse_build_script", + tags = ["manual"], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.httpdate-1.0.2.bazel b/proto/prost/private/3rdparty/crates/BUILD.httpdate-1.0.2.bazel new file mode 100644 index 0000000000..e6de6af56b --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.httpdate-1.0.2.bazel @@ -0,0 +1,76 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "httpdate", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=httpdate", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "1.0.2", +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.hyper-0.14.26.bazel b/proto/prost/private/3rdparty/crates/BUILD.hyper-0.14.26.bazel new file mode 100644 index 0000000000..f52df86271 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.hyper-0.14.26.bazel @@ -0,0 +1,107 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT +# ]) + +rust_library( + name = "hyper", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "client", + "default", + "full", + "h2", + "http1", + "http2", + "runtime", + "server", + "socket2", + "stream", + "tcp", + ], + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=hyper", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.14.26", + deps = [ + "@rules_rust_prost__bytes-1.4.0//:bytes", + "@rules_rust_prost__futures-channel-0.3.28//:futures_channel", + "@rules_rust_prost__futures-core-0.3.28//:futures_core", + "@rules_rust_prost__futures-util-0.3.28//:futures_util", + "@rules_rust_prost__h2-0.3.19//:h2", + "@rules_rust_prost__http-0.2.9//:http", + "@rules_rust_prost__http-body-0.4.5//:http_body", + "@rules_rust_prost__httparse-1.8.0//:httparse", + "@rules_rust_prost__httpdate-1.0.2//:httpdate", + "@rules_rust_prost__itoa-1.0.6//:itoa", + "@rules_rust_prost__pin-project-lite-0.2.9//:pin_project_lite", + "@rules_rust_prost__socket2-0.4.9//:socket2", + "@rules_rust_prost__tokio-1.28.2//:tokio", + "@rules_rust_prost__tower-service-0.3.2//:tower_service", + "@rules_rust_prost__tracing-0.1.37//:tracing", + "@rules_rust_prost__want-0.3.1//:want", + ], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.hyper-timeout-0.4.1.bazel b/proto/prost/private/3rdparty/crates/BUILD.hyper-timeout-0.4.1.bazel new file mode 100644 index 0000000000..a3f5e823c1 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.hyper-timeout-0.4.1.bazel @@ -0,0 +1,82 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "hyper_timeout", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=hyper-timeout", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.4.1", + deps = [ + "@rules_rust_prost__hyper-0.14.26//:hyper", + "@rules_rust_prost__pin-project-lite-0.2.9//:pin_project_lite", + "@rules_rust_prost__tokio-1.28.2//:tokio", + "@rules_rust_prost__tokio-io-timeout-1.2.0//:tokio_io_timeout", + ], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.indexmap-1.9.3.bazel b/proto/prost/private/3rdparty/crates/BUILD.indexmap-1.9.3.bazel new file mode 100644 index 0000000000..0734ef5704 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.indexmap-1.9.3.bazel @@ -0,0 +1,127 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//cargo:defs.bzl", "cargo_build_script") +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # Apache-2.0 OR MIT +# ]) + +rust_library( + name = "indexmap", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "std", + ], + crate_root = "src/lib.rs", + edition = "2021", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=indexmap", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "1.9.3", + deps = [ + "@rules_rust_prost__hashbrown-0.12.3//:hashbrown", + "@rules_rust_prost__indexmap-1.9.3//:build_script_build", + ], +) + +cargo_build_script( + name = "indexmap_build_script", + srcs = glob(["**/*.rs"]), + crate_features = [ + "std", + ], + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + edition = "2021", + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-bazel", + "crate-name=indexmap", + "manual", + "noclippy", + "norustfmt", + ], + version = "1.9.3", + visibility = ["//visibility:private"], + deps = [ + "@rules_rust_prost__autocfg-1.1.0//:autocfg", + ], +) + +alias( + name = "build_script_build", + actual = "indexmap_build_script", + tags = ["manual"], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.instant-0.1.12.bazel b/proto/prost/private/3rdparty/crates/BUILD.instant-0.1.12.bazel new file mode 100644 index 0000000000..0d8b582daa --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.instant-0.1.12.bazel @@ -0,0 +1,79 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # BSD-3-Clause +# ]) + +rust_library( + name = "instant", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=instant", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.1.12", + deps = [ + "@rules_rust_prost__cfg-if-1.0.0//:cfg_if", + ], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.io-lifetimes-1.0.11.bazel b/proto/prost/private/3rdparty/crates/BUILD.io-lifetimes-1.0.11.bazel new file mode 100644 index 0000000000..62196e2ffc --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.io-lifetimes-1.0.11.bazel @@ -0,0 +1,224 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//cargo:defs.bzl", "cargo_build_script") +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT +# ]) + +rust_library( + name = "io_lifetimes", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "close", + "hermit-abi", + "libc", + "windows-sys", + ], + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=io-lifetimes", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "1.0.11", + deps = [ + "@rules_rust_prost__io-lifetimes-1.0.11//:build_script_build", + ] + select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(not(windows)) + ], + "@rules_rust//rust/platform:aarch64-apple-ios": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(not(windows)) + ], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(not(windows)) + ], + "@rules_rust//rust/platform:aarch64-fuchsia": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(not(windows)) + ], + "@rules_rust//rust/platform:aarch64-linux-android": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(not(windows)) + ], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [ + "@rules_rust_prost__windows-sys-0.48.0//:windows_sys", # cfg(windows) + ], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(not(windows)) + ], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(not(windows)) + ], + "@rules_rust//rust/platform:armv7-linux-androideabi": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(not(windows)) + ], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(not(windows)) + ], + "@rules_rust//rust/platform:i686-apple-darwin": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(not(windows)) + ], + "@rules_rust//rust/platform:i686-linux-android": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(not(windows)) + ], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [ + "@rules_rust_prost__windows-sys-0.48.0//:windows_sys", # cfg(windows) + ], + "@rules_rust//rust/platform:i686-unknown-freebsd": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(not(windows)) + ], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(not(windows)) + ], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(not(windows)) + ], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(not(windows)) + ], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(not(windows)) + ], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(not(windows)) + ], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(not(windows)) + ], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(not(windows)) + ], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(not(windows)) + ], + "@rules_rust//rust/platform:wasm32-wasi": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(not(windows)) + ], + "@rules_rust//rust/platform:x86_64-apple-darwin": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(not(windows)) + ], + "@rules_rust//rust/platform:x86_64-apple-ios": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(not(windows)) + ], + "@rules_rust//rust/platform:x86_64-fuchsia": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(not(windows)) + ], + "@rules_rust//rust/platform:x86_64-linux-android": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(not(windows)) + ], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [ + "@rules_rust_prost__windows-sys-0.48.0//:windows_sys", # cfg(windows) + ], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(not(windows)) + ], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(not(windows)) + ], + "@rules_rust//rust/platform:x86_64-unknown-none": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(not(windows)) + ], + "//conditions:default": [], + }), +) + +cargo_build_script( + name = "io-lifetimes_build_script", + srcs = glob(["**/*.rs"]), + crate_features = [ + "close", + "hermit-abi", + "libc", + "windows-sys", + ], + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + edition = "2018", + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-bazel", + "crate-name=io-lifetimes", + "manual", + "noclippy", + "norustfmt", + ], + version = "1.0.11", + visibility = ["//visibility:private"], +) + +alias( + name = "build_script_build", + actual = "io-lifetimes_build_script", + tags = ["manual"], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.itertools-0.10.5.bazel b/proto/prost/private/3rdparty/crates/BUILD.itertools-0.10.5.bazel new file mode 100644 index 0000000000..edef3f7f2b --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.itertools-0.10.5.bazel @@ -0,0 +1,82 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "itertools", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "use_alloc", + ], + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=itertools", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.10.5", + deps = [ + "@rules_rust_prost__either-1.8.1//:either", + ], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.itoa-1.0.6.bazel b/proto/prost/private/3rdparty/crates/BUILD.itoa-1.0.6.bazel new file mode 100644 index 0000000000..61a4fa1ee4 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.itoa-1.0.6.bazel @@ -0,0 +1,76 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "itoa", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=itoa", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "1.0.6", +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.lazy_static-1.4.0.bazel b/proto/prost/private/3rdparty/crates/BUILD.lazy_static-1.4.0.bazel new file mode 100644 index 0000000000..3a8bd5f586 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.lazy_static-1.4.0.bazel @@ -0,0 +1,76 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "lazy_static", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2015", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=lazy_static", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "1.4.0", +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.libc-0.2.146.bazel b/proto/prost/private/3rdparty/crates/BUILD.libc-0.2.146.bazel new file mode 100644 index 0000000000..7e7800e14f --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.libc-0.2.146.bazel @@ -0,0 +1,127 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//cargo:defs.bzl", "cargo_build_script") +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "libc", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "default", + "extra_traits", + "std", + ], + crate_root = "src/lib.rs", + edition = "2015", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=libc", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.2.146", + deps = [ + "@rules_rust_prost__libc-0.2.146//:build_script_build", + ], +) + +cargo_build_script( + name = "libc_build_script", + srcs = glob(["**/*.rs"]), + crate_features = [ + "default", + "extra_traits", + "std", + ], + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + edition = "2015", + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-bazel", + "crate-name=libc", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.2.146", + visibility = ["//visibility:private"], +) + +alias( + name = "build_script_build", + actual = "libc_build_script", + tags = ["manual"], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.linux-raw-sys-0.3.8.bazel b/proto/prost/private/3rdparty/crates/BUILD.linux-raw-sys-0.3.8.bazel new file mode 100644 index 0000000000..d51da670d5 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.linux-raw-sys-0.3.8.bazel @@ -0,0 +1,82 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT +# ]) + +rust_library( + name = "linux_raw_sys", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "errno", + "general", + "ioctl", + "no_std", + ], + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=linux-raw-sys", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.3.8", +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.lock_api-0.4.10.bazel b/proto/prost/private/3rdparty/crates/BUILD.lock_api-0.4.10.bazel new file mode 100644 index 0000000000..97aaada628 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.lock_api-0.4.10.bazel @@ -0,0 +1,129 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//cargo:defs.bzl", "cargo_build_script") +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "lock_api", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "atomic_usize", + "default", + ], + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=lock_api", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.4.10", + deps = [ + "@rules_rust_prost__lock_api-0.4.10//:build_script_build", + "@rules_rust_prost__scopeguard-1.1.0//:scopeguard", + ], +) + +cargo_build_script( + name = "lock_api_build_script", + srcs = glob(["**/*.rs"]), + crate_features = [ + "atomic_usize", + "default", + ], + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + edition = "2018", + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-bazel", + "crate-name=lock_api", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.4.10", + visibility = ["//visibility:private"], + deps = [ + "@rules_rust_prost__autocfg-1.1.0//:autocfg", + ], +) + +alias( + name = "build_script_build", + actual = "lock_api_build_script", + tags = ["manual"], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.log-0.4.19.bazel b/proto/prost/private/3rdparty/crates/BUILD.log-0.4.19.bazel new file mode 100644 index 0000000000..6dbb9dcc9f --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.log-0.4.19.bazel @@ -0,0 +1,76 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "log", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2015", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=log", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.4.19", +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.matchit-0.7.0.bazel b/proto/prost/private/3rdparty/crates/BUILD.matchit-0.7.0.bazel new file mode 100644 index 0000000000..5b02f02d0a --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.matchit-0.7.0.bazel @@ -0,0 +1,79 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT +# ]) + +rust_library( + name = "matchit", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "default", + ], + crate_root = "src/lib.rs", + edition = "2021", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=matchit", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.7.0", +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.memchr-2.5.0.bazel b/proto/prost/private/3rdparty/crates/BUILD.memchr-2.5.0.bazel new file mode 100644 index 0000000000..0b87521fcd --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.memchr-2.5.0.bazel @@ -0,0 +1,125 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//cargo:defs.bzl", "cargo_build_script") +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # Unlicense/MIT +# ]) + +rust_library( + name = "memchr", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "default", + "std", + ], + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=memchr", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "2.5.0", + deps = [ + "@rules_rust_prost__memchr-2.5.0//:build_script_build", + ], +) + +cargo_build_script( + name = "memchr_build_script", + srcs = glob(["**/*.rs"]), + crate_features = [ + "default", + "std", + ], + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + edition = "2018", + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-bazel", + "crate-name=memchr", + "manual", + "noclippy", + "norustfmt", + ], + version = "2.5.0", + visibility = ["//visibility:private"], +) + +alias( + name = "build_script_build", + actual = "memchr_build_script", + tags = ["manual"], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.mime-0.3.17.bazel b/proto/prost/private/3rdparty/crates/BUILD.mime-0.3.17.bazel new file mode 100644 index 0000000000..885a5d4814 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.mime-0.3.17.bazel @@ -0,0 +1,76 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "mime", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2015", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=mime", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.3.17", +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.mio-0.8.8.bazel b/proto/prost/private/3rdparty/crates/BUILD.mio-0.8.8.bazel new file mode 100644 index 0000000000..889082c624 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.mio-0.8.8.bazel @@ -0,0 +1,160 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT +# ]) + +rust_library( + name = "mio", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "net", + "os-ext", + "os-poll", + ], + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=mio", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.8.8", + deps = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:aarch64-apple-ios": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:aarch64-fuchsia": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:aarch64-linux-android": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [ + "@rules_rust_prost__windows-sys-0.48.0//:windows_sys", # cfg(windows) + ], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:armv7-linux-androideabi": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:i686-apple-darwin": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:i686-linux-android": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [ + "@rules_rust_prost__windows-sys-0.48.0//:windows_sys", # cfg(windows) + ], + "@rules_rust//rust/platform:i686-unknown-freebsd": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:wasm32-wasi": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(target_os = "wasi") + "@rules_rust_prost__wasi-0.11.0-wasi-snapshot-preview1//:wasi", # cfg(target_os = "wasi") + ], + "@rules_rust//rust/platform:x86_64-apple-darwin": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:x86_64-apple-ios": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:x86_64-fuchsia": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:x86_64-linux-android": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [ + "@rules_rust_prost__windows-sys-0.48.0//:windows_sys", # cfg(windows) + ], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "//conditions:default": [], + }), +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.multimap-0.8.3.bazel b/proto/prost/private/3rdparty/crates/BUILD.multimap-0.8.3.bazel new file mode 100644 index 0000000000..c95794b371 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.multimap-0.8.3.bazel @@ -0,0 +1,76 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "multimap", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2015", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=multimap", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.8.3", +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.num_cpus-1.15.0.bazel b/proto/prost/private/3rdparty/crates/BUILD.num_cpus-1.15.0.bazel new file mode 100644 index 0000000000..d40d44d6aa --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.num_cpus-1.15.0.bazel @@ -0,0 +1,163 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "num_cpus", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2015", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=num_cpus", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "1.15.0", + deps = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(not(windows)) + ], + "@rules_rust//rust/platform:aarch64-apple-ios": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(not(windows)) + ], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(not(windows)) + ], + "@rules_rust//rust/platform:aarch64-fuchsia": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(not(windows)) + ], + "@rules_rust//rust/platform:aarch64-linux-android": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(not(windows)) + ], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(not(windows)) + ], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(not(windows)) + ], + "@rules_rust//rust/platform:armv7-linux-androideabi": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(not(windows)) + ], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(not(windows)) + ], + "@rules_rust//rust/platform:i686-apple-darwin": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(not(windows)) + ], + "@rules_rust//rust/platform:i686-linux-android": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(not(windows)) + ], + "@rules_rust//rust/platform:i686-unknown-freebsd": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(not(windows)) + ], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(not(windows)) + ], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(not(windows)) + ], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(not(windows)) + ], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(not(windows)) + ], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(not(windows)) + ], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(not(windows)) + ], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(not(windows)) + ], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(not(windows)) + ], + "@rules_rust//rust/platform:wasm32-wasi": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(not(windows)) + ], + "@rules_rust//rust/platform:x86_64-apple-darwin": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(not(windows)) + ], + "@rules_rust//rust/platform:x86_64-apple-ios": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(not(windows)) + ], + "@rules_rust//rust/platform:x86_64-fuchsia": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(not(windows)) + ], + "@rules_rust//rust/platform:x86_64-linux-android": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(not(windows)) + ], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(not(windows)) + ], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(not(windows)) + ], + "@rules_rust//rust/platform:x86_64-unknown-none": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(not(windows)) + ], + "//conditions:default": [], + }), +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.once_cell-1.18.0.bazel b/proto/prost/private/3rdparty/crates/BUILD.once_cell-1.18.0.bazel new file mode 100644 index 0000000000..601e985b23 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.once_cell-1.18.0.bazel @@ -0,0 +1,82 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "once_cell", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "alloc", + "default", + "race", + "std", + ], + crate_root = "src/lib.rs", + edition = "2021", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=once_cell", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "1.18.0", +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.parking_lot-0.12.1.bazel b/proto/prost/private/3rdparty/crates/BUILD.parking_lot-0.12.1.bazel new file mode 100644 index 0000000000..d0838e3a87 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.parking_lot-0.12.1.bazel @@ -0,0 +1,83 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "parking_lot", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "default", + ], + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=parking_lot", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.12.1", + deps = [ + "@rules_rust_prost__lock_api-0.4.10//:lock_api", + "@rules_rust_prost__parking_lot_core-0.9.8//:parking_lot_core", + ], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.parking_lot_core-0.9.8.bazel b/proto/prost/private/3rdparty/crates/BUILD.parking_lot_core-0.9.8.bazel new file mode 100644 index 0000000000..b739e9eade --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.parking_lot_core-0.9.8.bazel @@ -0,0 +1,193 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//cargo:defs.bzl", "cargo_build_script") +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "parking_lot_core", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=parking_lot_core", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.9.8", + deps = [ + "@rules_rust_prost__cfg-if-1.0.0//:cfg_if", + "@rules_rust_prost__parking_lot_core-0.9.8//:build_script_build", + "@rules_rust_prost__smallvec-1.10.0//:smallvec", + ] + select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:aarch64-apple-ios": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:aarch64-fuchsia": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:aarch64-linux-android": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [ + "@rules_rust_prost__windows-targets-0.48.0//:windows_targets", # cfg(windows) + ], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:armv7-linux-androideabi": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:i686-apple-darwin": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:i686-linux-android": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [ + "@rules_rust_prost__windows-targets-0.48.0//:windows_targets", # cfg(windows) + ], + "@rules_rust//rust/platform:i686-unknown-freebsd": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:x86_64-apple-darwin": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:x86_64-apple-ios": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:x86_64-fuchsia": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:x86_64-linux-android": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [ + "@rules_rust_prost__windows-targets-0.48.0//:windows_targets", # cfg(windows) + ], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "//conditions:default": [], + }), +) + +cargo_build_script( + name = "parking_lot_core_build_script", + srcs = glob(["**/*.rs"]), + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + edition = "2018", + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-bazel", + "crate-name=parking_lot_core", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.9.8", + visibility = ["//visibility:private"], +) + +alias( + name = "build_script_build", + actual = "parking_lot_core_build_script", + tags = ["manual"], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.percent-encoding-2.3.0.bazel b/proto/prost/private/3rdparty/crates/BUILD.percent-encoding-2.3.0.bazel new file mode 100644 index 0000000000..a1208630cc --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.percent-encoding-2.3.0.bazel @@ -0,0 +1,81 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "percent_encoding", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "alloc", + "default", + "std", + ], + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=percent-encoding", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "2.3.0", +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.petgraph-0.6.3.bazel b/proto/prost/private/3rdparty/crates/BUILD.petgraph-0.6.3.bazel new file mode 100644 index 0000000000..5a5a60afb8 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.petgraph-0.6.3.bazel @@ -0,0 +1,80 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "petgraph", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=petgraph", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.6.3", + deps = [ + "@rules_rust_prost__fixedbitset-0.4.2//:fixedbitset", + "@rules_rust_prost__indexmap-1.9.3//:indexmap", + ], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.pin-project-1.1.0.bazel b/proto/prost/private/3rdparty/crates/BUILD.pin-project-1.1.0.bazel new file mode 100644 index 0000000000..08b3571da9 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.pin-project-1.1.0.bazel @@ -0,0 +1,79 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # Apache-2.0 OR MIT +# ]) + +rust_library( + name = "pin_project", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2018", + proc_macro_deps = [ + "@rules_rust_prost__pin-project-internal-1.1.0//:pin_project_internal", + ], + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=pin-project", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "1.1.0", +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.pin-project-internal-1.1.0.bazel b/proto/prost/private/3rdparty/crates/BUILD.pin-project-internal-1.1.0.bazel new file mode 100644 index 0000000000..2f26229919 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.pin-project-internal-1.1.0.bazel @@ -0,0 +1,81 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_proc_macro") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # Apache-2.0 OR MIT +# ]) + +rust_proc_macro( + name = "pin_project_internal", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=pin-project-internal", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "1.1.0", + deps = [ + "@rules_rust_prost__proc-macro2-1.0.60//:proc_macro2", + "@rules_rust_prost__quote-1.0.28//:quote", + "@rules_rust_prost__syn-2.0.18//:syn", + ], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.pin-project-lite-0.2.9.bazel b/proto/prost/private/3rdparty/crates/BUILD.pin-project-lite-0.2.9.bazel new file mode 100644 index 0000000000..4644668ac9 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.pin-project-lite-0.2.9.bazel @@ -0,0 +1,76 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # Apache-2.0 OR MIT +# ]) + +rust_library( + name = "pin_project_lite", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=pin-project-lite", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.2.9", +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.pin-utils-0.1.0.bazel b/proto/prost/private/3rdparty/crates/BUILD.pin-utils-0.1.0.bazel new file mode 100644 index 0000000000..022105740b --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.pin-utils-0.1.0.bazel @@ -0,0 +1,76 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "pin_utils", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=pin-utils", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.1.0", +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.ppv-lite86-0.2.17.bazel b/proto/prost/private/3rdparty/crates/BUILD.ppv-lite86-0.2.17.bazel new file mode 100644 index 0000000000..1ec4b739af --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.ppv-lite86-0.2.17.bazel @@ -0,0 +1,80 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "ppv_lite86", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "simd", + "std", + ], + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=ppv-lite86", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.2.17", +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.prettyplease-0.1.25.bazel b/proto/prost/private/3rdparty/crates/BUILD.prettyplease-0.1.25.bazel new file mode 100644 index 0000000000..4effccf0aa --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.prettyplease-0.1.25.bazel @@ -0,0 +1,120 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//cargo:defs.bzl", "cargo_build_script") +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "prettyplease", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2021", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=prettyplease", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.1.25", + deps = [ + "@rules_rust_prost__prettyplease-0.1.25//:build_script_build", + "@rules_rust_prost__proc-macro2-1.0.60//:proc_macro2", + "@rules_rust_prost__syn-1.0.109//:syn", + ], +) + +cargo_build_script( + name = "prettyplease_build_script", + srcs = glob(["**/*.rs"]), + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + edition = "2021", + links = "prettyplease01", + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-bazel", + "crate-name=prettyplease", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.1.25", + visibility = ["//visibility:private"], +) + +alias( + name = "build_script_build", + actual = "prettyplease_build_script", + tags = ["manual"], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.proc-macro2-1.0.60.bazel b/proto/prost/private/3rdparty/crates/BUILD.proc-macro2-1.0.60.bazel new file mode 100644 index 0000000000..4e1c886c72 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.proc-macro2-1.0.60.bazel @@ -0,0 +1,126 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//cargo:defs.bzl", "cargo_build_script") +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "proc_macro2", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "default", + "proc-macro", + ], + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=proc-macro2", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "1.0.60", + deps = [ + "@rules_rust_prost__proc-macro2-1.0.60//:build_script_build", + "@rules_rust_prost__unicode-ident-1.0.9//:unicode_ident", + ], +) + +cargo_build_script( + name = "proc-macro2_build_script", + srcs = glob(["**/*.rs"]), + crate_features = [ + "default", + "proc-macro", + ], + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + edition = "2018", + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-bazel", + "crate-name=proc-macro2", + "manual", + "noclippy", + "norustfmt", + ], + version = "1.0.60", + visibility = ["//visibility:private"], +) + +alias( + name = "build_script_build", + actual = "proc-macro2_build_script", + tags = ["manual"], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.prost-0.11.9.bazel b/proto/prost/private/3rdparty/crates/BUILD.prost-0.11.9.bazel new file mode 100644 index 0000000000..f97d8d14ce --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.prost-0.11.9.bazel @@ -0,0 +1,87 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # Apache-2.0 +# ]) + +rust_library( + name = "prost", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "default", + "prost-derive", + "std", + ], + crate_root = "src/lib.rs", + edition = "2021", + proc_macro_deps = [ + "@rules_rust_prost__prost-derive-0.11.9//:prost_derive", + ], + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=prost", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.11.9", + deps = [ + "@rules_rust_prost__bytes-1.4.0//:bytes", + ], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.prost-build-0.11.9.bazel b/proto/prost/private/3rdparty/crates/BUILD.prost-build-0.11.9.bazel new file mode 100644 index 0000000000..f6f9e84096 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.prost-build-0.11.9.bazel @@ -0,0 +1,98 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # Apache-2.0 +# ]) + +rust_library( + name = "prost_build", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "default", + "format", + "prettyplease", + "syn", + ], + crate_root = "src/lib.rs", + edition = "2021", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=prost-build", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.11.9", + deps = [ + "@rules_rust_prost__bytes-1.4.0//:bytes", + "@rules_rust_prost__heck-0.4.1//:heck", + "@rules_rust_prost__itertools-0.10.5//:itertools", + "@rules_rust_prost__lazy_static-1.4.0//:lazy_static", + "@rules_rust_prost__log-0.4.19//:log", + "@rules_rust_prost__multimap-0.8.3//:multimap", + "@rules_rust_prost__petgraph-0.6.3//:petgraph", + "@rules_rust_prost__prettyplease-0.1.25//:prettyplease", + "@rules_rust_prost__prost-0.11.9//:prost", + "@rules_rust_prost__prost-types-0.11.9//:prost_types", + "@rules_rust_prost__regex-1.8.4//:regex", + "@rules_rust_prost__syn-1.0.109//:syn", + "@rules_rust_prost__tempfile-3.6.0//:tempfile", + "@rules_rust_prost__which-4.4.0//:which", + ], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.prost-derive-0.11.9.bazel b/proto/prost/private/3rdparty/crates/BUILD.prost-derive-0.11.9.bazel new file mode 100644 index 0000000000..507bd3071b --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.prost-derive-0.11.9.bazel @@ -0,0 +1,83 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_proc_macro") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # Apache-2.0 +# ]) + +rust_proc_macro( + name = "prost_derive", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2021", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=prost-derive", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.11.9", + deps = [ + "@rules_rust_prost__anyhow-1.0.71//:anyhow", + "@rules_rust_prost__itertools-0.10.5//:itertools", + "@rules_rust_prost__proc-macro2-1.0.60//:proc_macro2", + "@rules_rust_prost__quote-1.0.28//:quote", + "@rules_rust_prost__syn-1.0.109//:syn", + ], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.prost-types-0.11.9.bazel b/proto/prost/private/3rdparty/crates/BUILD.prost-types-0.11.9.bazel new file mode 100644 index 0000000000..78e9160b43 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.prost-types-0.11.9.bazel @@ -0,0 +1,83 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # Apache-2.0 +# ]) + +rust_library( + name = "prost_types", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "default", + "std", + ], + crate_root = "src/lib.rs", + edition = "2021", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=prost-types", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.11.9", + deps = [ + "@rules_rust_prost__prost-0.11.9//:prost", + ], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.protoc-gen-prost-0.2.2.bazel b/proto/prost/private/3rdparty/crates/BUILD.protoc-gen-prost-0.2.2.bazel new file mode 100644 index 0000000000..b8b2e2c116 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.protoc-gen-prost-0.2.2.bazel @@ -0,0 +1,156 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load( + "@rules_rust//rust:defs.bzl", + "rust_binary", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # Apache-2.0 +# ]) + +rust_library( + name = "protoc_gen_prost", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2021", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=protoc-gen-prost", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.2.2", + deps = [ + "@rules_rust_prost__once_cell-1.18.0//:once_cell", + "@rules_rust_prost__prost-0.11.9//:prost", + "@rules_rust_prost__prost-build-0.11.9//:prost_build", + "@rules_rust_prost__prost-types-0.11.9//:prost_types", + "@rules_rust_prost__regex-1.8.4//:regex", + ], +) + +rust_binary( + name = "protoc-gen-prost__bin", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/main.rs", + edition = "2021", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=protoc-gen-prost", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.2.2", + deps = [ + ":protoc_gen_prost", + "@rules_rust_prost__once_cell-1.18.0//:once_cell", + "@rules_rust_prost__prost-0.11.9//:prost", + "@rules_rust_prost__prost-build-0.11.9//:prost_build", + "@rules_rust_prost__prost-types-0.11.9//:prost_types", + "@rules_rust_prost__regex-1.8.4//:regex", + ], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.protoc-gen-tonic-0.2.2.bazel b/proto/prost/private/3rdparty/crates/BUILD.protoc-gen-tonic-0.2.2.bazel new file mode 100644 index 0000000000..fd9a149abe --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.protoc-gen-tonic-0.2.2.bazel @@ -0,0 +1,164 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load( + "@rules_rust//rust:defs.bzl", + "rust_binary", + "rust_library", +) + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # Apache-2.0 +# ]) + +rust_library( + name = "protoc_gen_tonic", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2021", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=protoc-gen-tonic", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.2.2", + deps = [ + "@rules_rust_prost__heck-0.4.1//:heck", + "@rules_rust_prost__prettyplease-0.1.25//:prettyplease", + "@rules_rust_prost__prost-0.11.9//:prost", + "@rules_rust_prost__prost-build-0.11.9//:prost_build", + "@rules_rust_prost__prost-types-0.11.9//:prost_types", + "@rules_rust_prost__protoc-gen-prost-0.2.2//:protoc_gen_prost", + "@rules_rust_prost__regex-1.8.4//:regex", + "@rules_rust_prost__syn-1.0.109//:syn", + "@rules_rust_prost__tonic-build-0.8.4//:tonic_build", + ], +) + +rust_binary( + name = "protoc-gen-tonic__bin", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/main.rs", + edition = "2021", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=protoc-gen-tonic", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.2.2", + deps = [ + ":protoc_gen_tonic", + "@rules_rust_prost__heck-0.4.1//:heck", + "@rules_rust_prost__prettyplease-0.1.25//:prettyplease", + "@rules_rust_prost__prost-0.11.9//:prost", + "@rules_rust_prost__prost-build-0.11.9//:prost_build", + "@rules_rust_prost__prost-types-0.11.9//:prost_types", + "@rules_rust_prost__protoc-gen-prost-0.2.2//:protoc_gen_prost", + "@rules_rust_prost__regex-1.8.4//:regex", + "@rules_rust_prost__syn-1.0.109//:syn", + "@rules_rust_prost__tonic-build-0.8.4//:tonic_build", + ], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.quote-1.0.28.bazel b/proto/prost/private/3rdparty/crates/BUILD.quote-1.0.28.bazel new file mode 100644 index 0000000000..7036e66b0f --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.quote-1.0.28.bazel @@ -0,0 +1,126 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//cargo:defs.bzl", "cargo_build_script") +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "quote", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "default", + "proc-macro", + ], + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=quote", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "1.0.28", + deps = [ + "@rules_rust_prost__proc-macro2-1.0.60//:proc_macro2", + "@rules_rust_prost__quote-1.0.28//:build_script_build", + ], +) + +cargo_build_script( + name = "quote_build_script", + srcs = glob(["**/*.rs"]), + crate_features = [ + "default", + "proc-macro", + ], + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + edition = "2018", + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-bazel", + "crate-name=quote", + "manual", + "noclippy", + "norustfmt", + ], + version = "1.0.28", + visibility = ["//visibility:private"], +) + +alias( + name = "build_script_build", + actual = "quote_build_script", + tags = ["manual"], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.rand-0.8.5.bazel b/proto/prost/private/3rdparty/crates/BUILD.rand-0.8.5.bazel new file mode 100644 index 0000000000..84ec27b47b --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.rand-0.8.5.bazel @@ -0,0 +1,155 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "rand", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "alloc", + "default", + "getrandom", + "libc", + "rand_chacha", + "small_rng", + "std", + "std_rng", + ], + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=rand", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.8.5", + deps = [ + "@rules_rust_prost__rand_chacha-0.3.1//:rand_chacha", + "@rules_rust_prost__rand_core-0.6.4//:rand_core", + ] + select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:aarch64-apple-ios": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:aarch64-fuchsia": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:aarch64-linux-android": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:armv7-linux-androideabi": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:i686-apple-darwin": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:i686-linux-android": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:i686-unknown-freebsd": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:x86_64-apple-darwin": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:x86_64-apple-ios": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:x86_64-fuchsia": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:x86_64-linux-android": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "//conditions:default": [], + }), +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.rand_chacha-0.3.1.bazel b/proto/prost/private/3rdparty/crates/BUILD.rand_chacha-0.3.1.bazel new file mode 100644 index 0000000000..434b6e0308 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.rand_chacha-0.3.1.bazel @@ -0,0 +1,83 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "rand_chacha", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "std", + ], + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=rand_chacha", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.3.1", + deps = [ + "@rules_rust_prost__ppv-lite86-0.2.17//:ppv_lite86", + "@rules_rust_prost__rand_core-0.6.4//:rand_core", + ], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.rand_core-0.6.4.bazel b/proto/prost/private/3rdparty/crates/BUILD.rand_core-0.6.4.bazel new file mode 100644 index 0000000000..5b316d42ad --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.rand_core-0.6.4.bazel @@ -0,0 +1,84 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "rand_core", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "alloc", + "getrandom", + "std", + ], + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=rand_core", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.6.4", + deps = [ + "@rules_rust_prost__getrandom-0.2.10//:getrandom", + ], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.redox_syscall-0.3.5.bazel b/proto/prost/private/3rdparty/crates/BUILD.redox_syscall-0.3.5.bazel new file mode 100644 index 0000000000..831f653427 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.redox_syscall-0.3.5.bazel @@ -0,0 +1,79 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT +# ]) + +rust_library( + name = "syscall", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=redox_syscall", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.3.5", + deps = [ + "@rules_rust_prost__bitflags-1.3.2//:bitflags", + ], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.regex-1.8.4.bazel b/proto/prost/private/3rdparty/crates/BUILD.regex-1.8.4.bazel new file mode 100644 index 0000000000..bd6f7e4b99 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.regex-1.8.4.bazel @@ -0,0 +1,83 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "regex", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "std", + "unicode-bool", + ], + crate_root = "src/lib.rs", + edition = "2021", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=regex", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "1.8.4", + deps = [ + "@rules_rust_prost__regex-syntax-0.7.2//:regex_syntax", + ], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.regex-syntax-0.7.2.bazel b/proto/prost/private/3rdparty/crates/BUILD.regex-syntax-0.7.2.bazel new file mode 100644 index 0000000000..9db75a54ea --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.regex-syntax-0.7.2.bazel @@ -0,0 +1,79 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "regex_syntax", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "unicode-bool", + ], + crate_root = "src/lib.rs", + edition = "2021", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=regex-syntax", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.7.2", +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.rustix-0.37.20.bazel b/proto/prost/private/3rdparty/crates/BUILD.rustix-0.37.20.bazel new file mode 100644 index 0000000000..ba9d7f27e9 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.rustix-0.37.20.bazel @@ -0,0 +1,348 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//cargo:defs.bzl", "cargo_build_script") +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT +# ]) + +rust_library( + name = "rustix", + srcs = glob(["**/*.rs"]), + aliases = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": { + "@rules_rust_prost__errno-0.3.1//:errno": "libc_errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + }, + "@rules_rust//rust/platform:aarch64-apple-ios": { + "@rules_rust_prost__errno-0.3.1//:errno": "libc_errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + }, + "@rules_rust//rust/platform:aarch64-apple-ios-sim": { + "@rules_rust_prost__errno-0.3.1//:errno": "libc_errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + }, + "@rules_rust//rust/platform:aarch64-fuchsia": { + "@rules_rust_prost__errno-0.3.1//:errno": "libc_errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + }, + "@rules_rust//rust/platform:aarch64-linux-android": { + "@rules_rust_prost__errno-0.3.1//:errno": "libc_errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + }, + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": { + "@rules_rust_prost__errno-0.3.1//:errno": "libc_errno", # cfg(windows) + }, + "@rules_rust//rust/platform:armv7-linux-androideabi": { + "@rules_rust_prost__errno-0.3.1//:errno": "libc_errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + }, + "@rules_rust//rust/platform:i686-apple-darwin": { + "@rules_rust_prost__errno-0.3.1//:errno": "libc_errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + }, + "@rules_rust//rust/platform:i686-linux-android": { + "@rules_rust_prost__errno-0.3.1//:errno": "libc_errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + }, + "@rules_rust//rust/platform:i686-pc-windows-msvc": { + "@rules_rust_prost__errno-0.3.1//:errno": "libc_errno", # cfg(windows) + }, + "@rules_rust//rust/platform:i686-unknown-freebsd": { + "@rules_rust_prost__errno-0.3.1//:errno": "libc_errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + }, + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": { + "@rules_rust_prost__errno-0.3.1//:errno": "libc_errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + }, + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": { + "@rules_rust_prost__errno-0.3.1//:errno": "libc_errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + }, + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": { + "@rules_rust_prost__errno-0.3.1//:errno": "libc_errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + }, + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": { + "@rules_rust_prost__errno-0.3.1//:errno": "libc_errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + }, + "@rules_rust//rust/platform:thumbv7em-none-eabi": { + "@rules_rust_prost__errno-0.3.1//:errno": "libc_errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + }, + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": { + "@rules_rust_prost__errno-0.3.1//:errno": "libc_errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + }, + "@rules_rust//rust/platform:wasm32-unknown-unknown": { + "@rules_rust_prost__errno-0.3.1//:errno": "libc_errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + }, + "@rules_rust//rust/platform:wasm32-wasi": { + "@rules_rust_prost__errno-0.3.1//:errno": "libc_errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + }, + "@rules_rust//rust/platform:x86_64-apple-darwin": { + "@rules_rust_prost__errno-0.3.1//:errno": "libc_errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + }, + "@rules_rust//rust/platform:x86_64-apple-ios": { + "@rules_rust_prost__errno-0.3.1//:errno": "libc_errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + }, + "@rules_rust//rust/platform:x86_64-fuchsia": { + "@rules_rust_prost__errno-0.3.1//:errno": "libc_errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + }, + "@rules_rust//rust/platform:x86_64-linux-android": { + "@rules_rust_prost__errno-0.3.1//:errno": "libc_errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + }, + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": { + "@rules_rust_prost__errno-0.3.1//:errno": "libc_errno", # cfg(windows) + }, + "@rules_rust//rust/platform:x86_64-unknown-freebsd": { + "@rules_rust_prost__errno-0.3.1//:errno": "libc_errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + }, + "@rules_rust//rust/platform:x86_64-unknown-none": { + "@rules_rust_prost__errno-0.3.1//:errno": "libc_errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + }, + "//conditions:default": {}, + }), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "default", + "fs", + "io-lifetimes", + "libc", + "std", + "use-libc-auxv", + ], + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=rustix", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.37.20", + deps = [ + "@rules_rust_prost__bitflags-1.3.2//:bitflags", + "@rules_rust_prost__io-lifetimes-1.0.11//:io_lifetimes", + "@rules_rust_prost__rustix-0.37.20//:build_script_build", + ] + select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [ + "@rules_rust_prost__errno-0.3.1//:errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + ], + "@rules_rust//rust/platform:aarch64-apple-ios": [ + "@rules_rust_prost__errno-0.3.1//:errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + ], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [ + "@rules_rust_prost__errno-0.3.1//:errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + ], + "@rules_rust//rust/platform:aarch64-fuchsia": [ + "@rules_rust_prost__errno-0.3.1//:errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + ], + "@rules_rust//rust/platform:aarch64-linux-android": [ + "@rules_rust_prost__errno-0.3.1//:errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + "@rules_rust_prost__linux-raw-sys-0.3.8//:linux_raw_sys", # cfg(all(any(target_os = "android", target_os = "linux"), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + ], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [ + "@rules_rust_prost__errno-0.3.1//:errno", # cfg(windows) + "@rules_rust_prost__windows-sys-0.48.0//:windows_sys", # cfg(windows) + ], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(all(not(rustix_use_libc), not(miri), target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64"))))) + "@rules_rust_prost__linux-raw-sys-0.3.8//:linux_raw_sys", # cfg(all(not(rustix_use_libc), not(miri), target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64"))))) + ], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(all(not(rustix_use_libc), not(miri), target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64"))))) + "@rules_rust_prost__linux-raw-sys-0.3.8//:linux_raw_sys", # cfg(all(not(rustix_use_libc), not(miri), target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64"))))) + ], + "@rules_rust//rust/platform:armv7-linux-androideabi": [ + "@rules_rust_prost__errno-0.3.1//:errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + "@rules_rust_prost__linux-raw-sys-0.3.8//:linux_raw_sys", # cfg(all(any(target_os = "android", target_os = "linux"), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + ], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(all(not(rustix_use_libc), not(miri), target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64"))))) + "@rules_rust_prost__linux-raw-sys-0.3.8//:linux_raw_sys", # cfg(all(not(rustix_use_libc), not(miri), target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64"))))) + ], + "@rules_rust//rust/platform:i686-apple-darwin": [ + "@rules_rust_prost__errno-0.3.1//:errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + ], + "@rules_rust//rust/platform:i686-linux-android": [ + "@rules_rust_prost__errno-0.3.1//:errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + "@rules_rust_prost__linux-raw-sys-0.3.8//:linux_raw_sys", # cfg(all(any(target_os = "android", target_os = "linux"), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + ], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [ + "@rules_rust_prost__errno-0.3.1//:errno", # cfg(windows) + "@rules_rust_prost__windows-sys-0.48.0//:windows_sys", # cfg(windows) + ], + "@rules_rust//rust/platform:i686-unknown-freebsd": [ + "@rules_rust_prost__errno-0.3.1//:errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + ], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(all(not(rustix_use_libc), not(miri), target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64"))))) + "@rules_rust_prost__linux-raw-sys-0.3.8//:linux_raw_sys", # cfg(all(not(rustix_use_libc), not(miri), target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64"))))) + ], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [ + "@rules_rust_prost__errno-0.3.1//:errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + "@rules_rust_prost__linux-raw-sys-0.3.8//:linux_raw_sys", # cfg(all(any(target_os = "android", target_os = "linux"), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + ], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [ + "@rules_rust_prost__errno-0.3.1//:errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + ], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [ + "@rules_rust_prost__errno-0.3.1//:errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + ], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [ + "@rules_rust_prost__errno-0.3.1//:errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + "@rules_rust_prost__linux-raw-sys-0.3.8//:linux_raw_sys", # cfg(all(any(target_os = "android", target_os = "linux"), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + ], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [ + "@rules_rust_prost__errno-0.3.1//:errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + ], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [ + "@rules_rust_prost__errno-0.3.1//:errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + ], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [ + "@rules_rust_prost__errno-0.3.1//:errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + ], + "@rules_rust//rust/platform:wasm32-wasi": [ + "@rules_rust_prost__errno-0.3.1//:errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + ], + "@rules_rust//rust/platform:x86_64-apple-darwin": [ + "@rules_rust_prost__errno-0.3.1//:errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + ], + "@rules_rust//rust/platform:x86_64-apple-ios": [ + "@rules_rust_prost__errno-0.3.1//:errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + ], + "@rules_rust//rust/platform:x86_64-fuchsia": [ + "@rules_rust_prost__errno-0.3.1//:errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + ], + "@rules_rust//rust/platform:x86_64-linux-android": [ + "@rules_rust_prost__errno-0.3.1//:errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + "@rules_rust_prost__linux-raw-sys-0.3.8//:linux_raw_sys", # cfg(all(any(target_os = "android", target_os = "linux"), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + ], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [ + "@rules_rust_prost__errno-0.3.1//:errno", # cfg(windows) + "@rules_rust_prost__windows-sys-0.48.0//:windows_sys", # cfg(windows) + ], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [ + "@rules_rust_prost__errno-0.3.1//:errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + ], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(all(not(rustix_use_libc), not(miri), target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64"))))) + "@rules_rust_prost__linux-raw-sys-0.3.8//:linux_raw_sys", # cfg(all(not(rustix_use_libc), not(miri), target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64"))))) + ], + "@rules_rust//rust/platform:x86_64-unknown-none": [ + "@rules_rust_prost__errno-0.3.1//:errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), all(target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "powerpc64", target_arch = "riscv64", target_arch = "mips", target_arch = "mips64")))))))) + ], + "//conditions:default": [], + }), +) + +cargo_build_script( + name = "rustix_build_script", + srcs = glob(["**/*.rs"]), + crate_features = [ + "default", + "fs", + "io-lifetimes", + "libc", + "std", + "use-libc-auxv", + ], + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + edition = "2018", + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-bazel", + "crate-name=rustix", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.37.20", + visibility = ["//visibility:private"], +) + +alias( + name = "build_script_build", + actual = "rustix_build_script", + tags = ["manual"], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.rustversion-1.0.12.bazel b/proto/prost/private/3rdparty/crates/BUILD.rustversion-1.0.12.bazel new file mode 100644 index 0000000000..9599a5db01 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.rustversion-1.0.12.bazel @@ -0,0 +1,117 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//cargo:defs.bzl", "cargo_build_script") +load("@rules_rust//rust:defs.bzl", "rust_proc_macro") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_proc_macro( + name = "rustversion", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=rustversion", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "1.0.12", + deps = [ + "@rules_rust_prost__rustversion-1.0.12//:build_script_build", + ], +) + +cargo_build_script( + name = "rustversion_build_script", + srcs = glob(["**/*.rs"]), + crate_name = "build_script_build", + crate_root = "build/build.rs", + data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + edition = "2018", + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-bazel", + "crate-name=rustversion", + "manual", + "noclippy", + "norustfmt", + ], + version = "1.0.12", + visibility = ["//visibility:private"], +) + +alias( + name = "build_script_build", + actual = "rustversion_build_script", + tags = ["manual"], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.scopeguard-1.1.0.bazel b/proto/prost/private/3rdparty/crates/BUILD.scopeguard-1.1.0.bazel new file mode 100644 index 0000000000..aba41eb9a7 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.scopeguard-1.1.0.bazel @@ -0,0 +1,76 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "scopeguard", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2015", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=scopeguard", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "1.1.0", +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.serde-1.0.164.bazel b/proto/prost/private/3rdparty/crates/BUILD.serde-1.0.164.bazel new file mode 100644 index 0000000000..60105ecac8 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.serde-1.0.164.bazel @@ -0,0 +1,125 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//cargo:defs.bzl", "cargo_build_script") +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "serde", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "default", + "std", + ], + crate_root = "src/lib.rs", + edition = "2015", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=serde", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "1.0.164", + deps = [ + "@rules_rust_prost__serde-1.0.164//:build_script_build", + ], +) + +cargo_build_script( + name = "serde_build_script", + srcs = glob(["**/*.rs"]), + crate_features = [ + "default", + "std", + ], + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + edition = "2015", + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-bazel", + "crate-name=serde", + "manual", + "noclippy", + "norustfmt", + ], + version = "1.0.164", + visibility = ["//visibility:private"], +) + +alias( + name = "build_script_build", + actual = "serde_build_script", + tags = ["manual"], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.signal-hook-registry-1.4.1.bazel b/proto/prost/private/3rdparty/crates/BUILD.signal-hook-registry-1.4.1.bazel new file mode 100644 index 0000000000..cdeb49ce0a --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.signal-hook-registry-1.4.1.bazel @@ -0,0 +1,79 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # Apache-2.0/MIT +# ]) + +rust_library( + name = "signal_hook_registry", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2015", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=signal-hook-registry", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "1.4.1", + deps = [ + "@rules_rust_prost__libc-0.2.146//:libc", + ], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.slab-0.4.8.bazel b/proto/prost/private/3rdparty/crates/BUILD.slab-0.4.8.bazel new file mode 100644 index 0000000000..96754212c3 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.slab-0.4.8.bazel @@ -0,0 +1,128 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//cargo:defs.bzl", "cargo_build_script") +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT +# ]) + +rust_library( + name = "slab", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "default", + "std", + ], + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=slab", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.4.8", + deps = [ + "@rules_rust_prost__slab-0.4.8//:build_script_build", + ], +) + +cargo_build_script( + name = "slab_build_script", + srcs = glob(["**/*.rs"]), + crate_features = [ + "default", + "std", + ], + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + edition = "2018", + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-bazel", + "crate-name=slab", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.4.8", + visibility = ["//visibility:private"], + deps = [ + "@rules_rust_prost__autocfg-1.1.0//:autocfg", + ], +) + +alias( + name = "build_script_build", + actual = "slab_build_script", + tags = ["manual"], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.smallvec-1.10.0.bazel b/proto/prost/private/3rdparty/crates/BUILD.smallvec-1.10.0.bazel new file mode 100644 index 0000000000..ba71fea65f --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.smallvec-1.10.0.bazel @@ -0,0 +1,76 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "smallvec", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=smallvec", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "1.10.0", +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.socket2-0.4.9.bazel b/proto/prost/private/3rdparty/crates/BUILD.socket2-0.4.9.bazel new file mode 100644 index 0000000000..3d80980845 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.socket2-0.4.9.bazel @@ -0,0 +1,154 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "socket2", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "all", + ], + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=socket2", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.4.9", + deps = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:aarch64-apple-ios": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:aarch64-fuchsia": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:aarch64-linux-android": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [ + "@rules_rust_prost__winapi-0.3.9//:winapi", # cfg(windows) + ], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:armv7-linux-androideabi": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:i686-apple-darwin": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:i686-linux-android": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [ + "@rules_rust_prost__winapi-0.3.9//:winapi", # cfg(windows) + ], + "@rules_rust//rust/platform:i686-unknown-freebsd": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:x86_64-apple-darwin": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:x86_64-apple-ios": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:x86_64-fuchsia": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:x86_64-linux-android": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [ + "@rules_rust_prost__winapi-0.3.9//:winapi", # cfg(windows) + ], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + ], + "//conditions:default": [], + }), +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.syn-1.0.109.bazel b/proto/prost/private/3rdparty/crates/BUILD.syn-1.0.109.bazel new file mode 100644 index 0000000000..04933323b4 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.syn-1.0.109.bazel @@ -0,0 +1,142 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//cargo:defs.bzl", "cargo_build_script") +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "syn", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "clone-impls", + "default", + "derive", + "extra-traits", + "full", + "parsing", + "printing", + "proc-macro", + "quote", + ], + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=syn", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "1.0.109", + deps = [ + "@rules_rust_prost__proc-macro2-1.0.60//:proc_macro2", + "@rules_rust_prost__quote-1.0.28//:quote", + "@rules_rust_prost__syn-1.0.109//:build_script_build", + "@rules_rust_prost__unicode-ident-1.0.9//:unicode_ident", + ], +) + +cargo_build_script( + name = "syn_build_script", + srcs = glob(["**/*.rs"]), + crate_features = [ + "clone-impls", + "default", + "derive", + "extra-traits", + "full", + "parsing", + "printing", + "proc-macro", + "quote", + ], + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + edition = "2018", + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-bazel", + "crate-name=syn", + "manual", + "noclippy", + "norustfmt", + ], + version = "1.0.109", + visibility = ["//visibility:private"], +) + +alias( + name = "build_script_build", + actual = "syn_build_script", + tags = ["manual"], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.syn-2.0.18.bazel b/proto/prost/private/3rdparty/crates/BUILD.syn-2.0.18.bazel new file mode 100644 index 0000000000..596aa5e9c1 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.syn-2.0.18.bazel @@ -0,0 +1,93 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "syn", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "clone-impls", + "default", + "derive", + "extra-traits", + "full", + "parsing", + "printing", + "proc-macro", + "quote", + "visit-mut", + ], + crate_root = "src/lib.rs", + edition = "2021", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=syn", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "2.0.18", + deps = [ + "@rules_rust_prost__proc-macro2-1.0.60//:proc_macro2", + "@rules_rust_prost__quote-1.0.28//:quote", + "@rules_rust_prost__unicode-ident-1.0.9//:unicode_ident", + ], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.sync_wrapper-0.1.2.bazel b/proto/prost/private/3rdparty/crates/BUILD.sync_wrapper-0.1.2.bazel new file mode 100644 index 0000000000..11e2aeecda --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.sync_wrapper-0.1.2.bazel @@ -0,0 +1,76 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # Apache-2.0 +# ]) + +rust_library( + name = "sync_wrapper", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=sync_wrapper", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.1.2", +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.tempfile-3.6.0.bazel b/proto/prost/private/3rdparty/crates/BUILD.tempfile-3.6.0.bazel new file mode 100644 index 0000000000..3632e40379 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.tempfile-3.6.0.bazel @@ -0,0 +1,199 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//cargo:defs.bzl", "cargo_build_script") +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "tempfile", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=tempfile", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "3.6.0", + deps = [ + "@rules_rust_prost__cfg-if-1.0.0//:cfg_if", + "@rules_rust_prost__fastrand-1.9.0//:fastrand", + "@rules_rust_prost__tempfile-3.6.0//:build_script_build", + ] + select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [ + "@rules_rust_prost__rustix-0.37.20//:rustix", # cfg(any(unix, target_os = "wasi")) + ], + "@rules_rust//rust/platform:aarch64-apple-ios": [ + "@rules_rust_prost__rustix-0.37.20//:rustix", # cfg(any(unix, target_os = "wasi")) + ], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [ + "@rules_rust_prost__rustix-0.37.20//:rustix", # cfg(any(unix, target_os = "wasi")) + ], + "@rules_rust//rust/platform:aarch64-fuchsia": [ + "@rules_rust_prost__rustix-0.37.20//:rustix", # cfg(any(unix, target_os = "wasi")) + ], + "@rules_rust//rust/platform:aarch64-linux-android": [ + "@rules_rust_prost__rustix-0.37.20//:rustix", # cfg(any(unix, target_os = "wasi")) + ], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [ + "@rules_rust_prost__windows-sys-0.48.0//:windows_sys", # cfg(windows) + ], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [ + "@rules_rust_prost__rustix-0.37.20//:rustix", # cfg(any(unix, target_os = "wasi")) + ], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [ + "@rules_rust_prost__rustix-0.37.20//:rustix", # cfg(any(unix, target_os = "wasi")) + ], + "@rules_rust//rust/platform:armv7-linux-androideabi": [ + "@rules_rust_prost__rustix-0.37.20//:rustix", # cfg(any(unix, target_os = "wasi")) + ], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [ + "@rules_rust_prost__rustix-0.37.20//:rustix", # cfg(any(unix, target_os = "wasi")) + ], + "@rules_rust//rust/platform:i686-apple-darwin": [ + "@rules_rust_prost__rustix-0.37.20//:rustix", # cfg(any(unix, target_os = "wasi")) + ], + "@rules_rust//rust/platform:i686-linux-android": [ + "@rules_rust_prost__rustix-0.37.20//:rustix", # cfg(any(unix, target_os = "wasi")) + ], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [ + "@rules_rust_prost__windows-sys-0.48.0//:windows_sys", # cfg(windows) + ], + "@rules_rust//rust/platform:i686-unknown-freebsd": [ + "@rules_rust_prost__rustix-0.37.20//:rustix", # cfg(any(unix, target_os = "wasi")) + ], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [ + "@rules_rust_prost__rustix-0.37.20//:rustix", # cfg(any(unix, target_os = "wasi")) + ], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [ + "@rules_rust_prost__rustix-0.37.20//:rustix", # cfg(any(unix, target_os = "wasi")) + ], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [ + "@rules_rust_prost__rustix-0.37.20//:rustix", # cfg(any(unix, target_os = "wasi")) + ], + "@rules_rust//rust/platform:wasm32-wasi": [ + "@rules_rust_prost__rustix-0.37.20//:rustix", # cfg(any(unix, target_os = "wasi")) + ], + "@rules_rust//rust/platform:x86_64-apple-darwin": [ + "@rules_rust_prost__rustix-0.37.20//:rustix", # cfg(any(unix, target_os = "wasi")) + ], + "@rules_rust//rust/platform:x86_64-apple-ios": [ + "@rules_rust_prost__rustix-0.37.20//:rustix", # cfg(any(unix, target_os = "wasi")) + ], + "@rules_rust//rust/platform:x86_64-fuchsia": [ + "@rules_rust_prost__rustix-0.37.20//:rustix", # cfg(any(unix, target_os = "wasi")) + ], + "@rules_rust//rust/platform:x86_64-linux-android": [ + "@rules_rust_prost__rustix-0.37.20//:rustix", # cfg(any(unix, target_os = "wasi")) + ], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [ + "@rules_rust_prost__windows-sys-0.48.0//:windows_sys", # cfg(windows) + ], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [ + "@rules_rust_prost__rustix-0.37.20//:rustix", # cfg(any(unix, target_os = "wasi")) + ], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [ + "@rules_rust_prost__rustix-0.37.20//:rustix", # cfg(any(unix, target_os = "wasi")) + ], + "//conditions:default": [], + }), +) + +cargo_build_script( + name = "tempfile_build_script", + srcs = glob(["**/*.rs"]), + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + edition = "2018", + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-bazel", + "crate-name=tempfile", + "manual", + "noclippy", + "norustfmt", + ], + version = "3.6.0", + visibility = ["//visibility:private"], + deps = [ + "@rules_rust_prost__autocfg-1.1.0//:autocfg", + ], +) + +alias( + name = "build_script_build", + actual = "tempfile_build_script", + tags = ["manual"], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.tokio-1.28.2.bazel b/proto/prost/private/3rdparty/crates/BUILD.tokio-1.28.2.bazel new file mode 100644 index 0000000000..719be652e6 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.tokio-1.28.2.bazel @@ -0,0 +1,310 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//cargo:defs.bzl", "cargo_build_script") +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT +# ]) + +rust_library( + name = "tokio", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "bytes", + "default", + "fs", + "full", + "io-std", + "io-util", + "libc", + "macros", + "mio", + "net", + "num_cpus", + "parking_lot", + "process", + "rt", + "rt-multi-thread", + "signal", + "signal-hook-registry", + "socket2", + "sync", + "time", + "tokio-macros", + "windows-sys", + ], + crate_root = "src/lib.rs", + edition = "2021", + proc_macro_deps = [ + "@rules_rust_prost__tokio-macros-2.1.0//:tokio_macros", + ], + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=tokio", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "1.28.2", + deps = [ + "@rules_rust_prost__bytes-1.4.0//:bytes", + "@rules_rust_prost__mio-0.8.8//:mio", + "@rules_rust_prost__num_cpus-1.15.0//:num_cpus", + "@rules_rust_prost__parking_lot-0.12.1//:parking_lot", + "@rules_rust_prost__pin-project-lite-0.2.9//:pin_project_lite", + "@rules_rust_prost__tokio-1.28.2//:build_script_build", + ] + select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + "@rules_rust_prost__signal-hook-registry-1.4.1//:signal_hook_registry", # cfg(unix) + "@rules_rust_prost__socket2-0.4.9//:socket2", # cfg(not(any(target_arch = "wasm32", target_arch = "wasm64"))) + ], + "@rules_rust//rust/platform:aarch64-apple-ios": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + "@rules_rust_prost__signal-hook-registry-1.4.1//:signal_hook_registry", # cfg(unix) + "@rules_rust_prost__socket2-0.4.9//:socket2", # cfg(not(any(target_arch = "wasm32", target_arch = "wasm64"))) + ], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + "@rules_rust_prost__signal-hook-registry-1.4.1//:signal_hook_registry", # cfg(unix) + "@rules_rust_prost__socket2-0.4.9//:socket2", # cfg(not(any(target_arch = "wasm32", target_arch = "wasm64"))) + ], + "@rules_rust//rust/platform:aarch64-fuchsia": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + "@rules_rust_prost__signal-hook-registry-1.4.1//:signal_hook_registry", # cfg(unix) + "@rules_rust_prost__socket2-0.4.9//:socket2", # cfg(not(any(target_arch = "wasm32", target_arch = "wasm64"))) + ], + "@rules_rust//rust/platform:aarch64-linux-android": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + "@rules_rust_prost__signal-hook-registry-1.4.1//:signal_hook_registry", # cfg(unix) + "@rules_rust_prost__socket2-0.4.9//:socket2", # cfg(not(any(target_arch = "wasm32", target_arch = "wasm64"))) + ], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [ + "@rules_rust_prost__socket2-0.4.9//:socket2", # cfg(not(any(target_arch = "wasm32", target_arch = "wasm64"))) + "@rules_rust_prost__windows-sys-0.48.0//:windows_sys", # cfg(windows) + ], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + "@rules_rust_prost__signal-hook-registry-1.4.1//:signal_hook_registry", # cfg(unix) + "@rules_rust_prost__socket2-0.4.9//:socket2", # cfg(not(any(target_arch = "wasm32", target_arch = "wasm64"))) + ], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + "@rules_rust_prost__signal-hook-registry-1.4.1//:signal_hook_registry", # cfg(unix) + "@rules_rust_prost__socket2-0.4.9//:socket2", # cfg(not(any(target_arch = "wasm32", target_arch = "wasm64"))) + ], + "@rules_rust//rust/platform:armv7-linux-androideabi": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + "@rules_rust_prost__signal-hook-registry-1.4.1//:signal_hook_registry", # cfg(unix) + "@rules_rust_prost__socket2-0.4.9//:socket2", # cfg(not(any(target_arch = "wasm32", target_arch = "wasm64"))) + ], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + "@rules_rust_prost__signal-hook-registry-1.4.1//:signal_hook_registry", # cfg(unix) + "@rules_rust_prost__socket2-0.4.9//:socket2", # cfg(not(any(target_arch = "wasm32", target_arch = "wasm64"))) + ], + "@rules_rust//rust/platform:i686-apple-darwin": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + "@rules_rust_prost__signal-hook-registry-1.4.1//:signal_hook_registry", # cfg(unix) + "@rules_rust_prost__socket2-0.4.9//:socket2", # cfg(not(any(target_arch = "wasm32", target_arch = "wasm64"))) + ], + "@rules_rust//rust/platform:i686-linux-android": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + "@rules_rust_prost__signal-hook-registry-1.4.1//:signal_hook_registry", # cfg(unix) + "@rules_rust_prost__socket2-0.4.9//:socket2", # cfg(not(any(target_arch = "wasm32", target_arch = "wasm64"))) + ], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [ + "@rules_rust_prost__socket2-0.4.9//:socket2", # cfg(not(any(target_arch = "wasm32", target_arch = "wasm64"))) + "@rules_rust_prost__windows-sys-0.48.0//:windows_sys", # cfg(windows) + ], + "@rules_rust//rust/platform:i686-unknown-freebsd": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + "@rules_rust_prost__signal-hook-registry-1.4.1//:signal_hook_registry", # cfg(unix) + "@rules_rust_prost__socket2-0.4.9//:socket2", # cfg(not(any(target_arch = "wasm32", target_arch = "wasm64"))) + ], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + "@rules_rust_prost__signal-hook-registry-1.4.1//:signal_hook_registry", # cfg(unix) + "@rules_rust_prost__socket2-0.4.9//:socket2", # cfg(not(any(target_arch = "wasm32", target_arch = "wasm64"))) + ], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + "@rules_rust_prost__signal-hook-registry-1.4.1//:signal_hook_registry", # cfg(unix) + "@rules_rust_prost__socket2-0.4.9//:socket2", # cfg(not(any(target_arch = "wasm32", target_arch = "wasm64"))) + ], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [ + "@rules_rust_prost__socket2-0.4.9//:socket2", # cfg(not(any(target_arch = "wasm32", target_arch = "wasm64"))) + ], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [ + "@rules_rust_prost__socket2-0.4.9//:socket2", # cfg(not(any(target_arch = "wasm32", target_arch = "wasm64"))) + ], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + "@rules_rust_prost__signal-hook-registry-1.4.1//:signal_hook_registry", # cfg(unix) + "@rules_rust_prost__socket2-0.4.9//:socket2", # cfg(not(any(target_arch = "wasm32", target_arch = "wasm64"))) + ], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [ + "@rules_rust_prost__socket2-0.4.9//:socket2", # cfg(not(any(target_arch = "wasm32", target_arch = "wasm64"))) + ], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [ + "@rules_rust_prost__socket2-0.4.9//:socket2", # cfg(not(any(target_arch = "wasm32", target_arch = "wasm64"))) + ], + "@rules_rust//rust/platform:x86_64-apple-darwin": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + "@rules_rust_prost__signal-hook-registry-1.4.1//:signal_hook_registry", # cfg(unix) + "@rules_rust_prost__socket2-0.4.9//:socket2", # cfg(not(any(target_arch = "wasm32", target_arch = "wasm64"))) + ], + "@rules_rust//rust/platform:x86_64-apple-ios": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + "@rules_rust_prost__signal-hook-registry-1.4.1//:signal_hook_registry", # cfg(unix) + "@rules_rust_prost__socket2-0.4.9//:socket2", # cfg(not(any(target_arch = "wasm32", target_arch = "wasm64"))) + ], + "@rules_rust//rust/platform:x86_64-fuchsia": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + "@rules_rust_prost__signal-hook-registry-1.4.1//:signal_hook_registry", # cfg(unix) + "@rules_rust_prost__socket2-0.4.9//:socket2", # cfg(not(any(target_arch = "wasm32", target_arch = "wasm64"))) + ], + "@rules_rust//rust/platform:x86_64-linux-android": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + "@rules_rust_prost__signal-hook-registry-1.4.1//:signal_hook_registry", # cfg(unix) + "@rules_rust_prost__socket2-0.4.9//:socket2", # cfg(not(any(target_arch = "wasm32", target_arch = "wasm64"))) + ], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [ + "@rules_rust_prost__socket2-0.4.9//:socket2", # cfg(not(any(target_arch = "wasm32", target_arch = "wasm64"))) + "@rules_rust_prost__windows-sys-0.48.0//:windows_sys", # cfg(windows) + ], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + "@rules_rust_prost__signal-hook-registry-1.4.1//:signal_hook_registry", # cfg(unix) + "@rules_rust_prost__socket2-0.4.9//:socket2", # cfg(not(any(target_arch = "wasm32", target_arch = "wasm64"))) + ], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [ + "@rules_rust_prost__libc-0.2.146//:libc", # cfg(unix) + "@rules_rust_prost__signal-hook-registry-1.4.1//:signal_hook_registry", # cfg(unix) + "@rules_rust_prost__socket2-0.4.9//:socket2", # cfg(not(any(target_arch = "wasm32", target_arch = "wasm64"))) + ], + "@rules_rust//rust/platform:x86_64-unknown-none": [ + "@rules_rust_prost__socket2-0.4.9//:socket2", # cfg(not(any(target_arch = "wasm32", target_arch = "wasm64"))) + ], + "//conditions:default": [], + }), +) + +cargo_build_script( + name = "tokio_build_script", + srcs = glob(["**/*.rs"]), + crate_features = [ + "bytes", + "default", + "fs", + "full", + "io-std", + "io-util", + "libc", + "macros", + "mio", + "net", + "num_cpus", + "parking_lot", + "process", + "rt", + "rt-multi-thread", + "signal", + "signal-hook-registry", + "socket2", + "sync", + "time", + "tokio-macros", + "windows-sys", + ], + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + edition = "2021", + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-bazel", + "crate-name=tokio", + "manual", + "noclippy", + "norustfmt", + ], + version = "1.28.2", + visibility = ["//visibility:private"], + deps = [ + "@rules_rust_prost__autocfg-1.1.0//:autocfg", + ], +) + +alias( + name = "build_script_build", + actual = "tokio_build_script", + tags = ["manual"], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.tokio-io-timeout-1.2.0.bazel b/proto/prost/private/3rdparty/crates/BUILD.tokio-io-timeout-1.2.0.bazel new file mode 100644 index 0000000000..561346aab4 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.tokio-io-timeout-1.2.0.bazel @@ -0,0 +1,80 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "tokio_io_timeout", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=tokio-io-timeout", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "1.2.0", + deps = [ + "@rules_rust_prost__pin-project-lite-0.2.9//:pin_project_lite", + "@rules_rust_prost__tokio-1.28.2//:tokio", + ], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.tokio-macros-2.1.0.bazel b/proto/prost/private/3rdparty/crates/BUILD.tokio-macros-2.1.0.bazel new file mode 100644 index 0000000000..52f73143c0 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.tokio-macros-2.1.0.bazel @@ -0,0 +1,81 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_proc_macro") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT +# ]) + +rust_proc_macro( + name = "tokio_macros", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=tokio-macros", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "2.1.0", + deps = [ + "@rules_rust_prost__proc-macro2-1.0.60//:proc_macro2", + "@rules_rust_prost__quote-1.0.28//:quote", + "@rules_rust_prost__syn-2.0.18//:syn", + ], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.tokio-stream-0.1.14.bazel b/proto/prost/private/3rdparty/crates/BUILD.tokio-stream-0.1.14.bazel new file mode 100644 index 0000000000..bef1a8878e --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.tokio-stream-0.1.14.bazel @@ -0,0 +1,85 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT +# ]) + +rust_library( + name = "tokio_stream", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "default", + "time", + ], + crate_root = "src/lib.rs", + edition = "2021", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=tokio-stream", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.1.14", + deps = [ + "@rules_rust_prost__futures-core-0.3.28//:futures_core", + "@rules_rust_prost__pin-project-lite-0.2.9//:pin_project_lite", + "@rules_rust_prost__tokio-1.28.2//:tokio", + ], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.tokio-util-0.7.8.bazel b/proto/prost/private/3rdparty/crates/BUILD.tokio-util-0.7.8.bazel new file mode 100644 index 0000000000..d9f12b9ab7 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.tokio-util-0.7.8.bazel @@ -0,0 +1,89 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT +# ]) + +rust_library( + name = "tokio_util", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "codec", + "default", + "tracing", + ], + crate_root = "src/lib.rs", + edition = "2021", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=tokio-util", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.7.8", + deps = [ + "@rules_rust_prost__bytes-1.4.0//:bytes", + "@rules_rust_prost__futures-core-0.3.28//:futures_core", + "@rules_rust_prost__futures-sink-0.3.28//:futures_sink", + "@rules_rust_prost__pin-project-lite-0.2.9//:pin_project_lite", + "@rules_rust_prost__tokio-1.28.2//:tokio", + "@rules_rust_prost__tracing-0.1.37//:tracing", + ], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.tonic-0.9.2.bazel b/proto/prost/private/3rdparty/crates/BUILD.tonic-0.9.2.bazel new file mode 100644 index 0000000000..6fd480f648 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.tonic-0.9.2.bazel @@ -0,0 +1,107 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT +# ]) + +rust_library( + name = "tonic", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "channel", + "codegen", + "default", + "prost", + "transport", + ], + crate_root = "src/lib.rs", + edition = "2021", + proc_macro_deps = [ + "@rules_rust_prost__async-trait-0.1.68//:async_trait", + ], + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=tonic", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.9.2", + deps = [ + "@rules_rust_prost__axum-0.6.18//:axum", + "@rules_rust_prost__base64-0.21.2//:base64", + "@rules_rust_prost__bytes-1.4.0//:bytes", + "@rules_rust_prost__futures-core-0.3.28//:futures_core", + "@rules_rust_prost__futures-util-0.3.28//:futures_util", + "@rules_rust_prost__h2-0.3.19//:h2", + "@rules_rust_prost__http-0.2.9//:http", + "@rules_rust_prost__http-body-0.4.5//:http_body", + "@rules_rust_prost__hyper-0.14.26//:hyper", + "@rules_rust_prost__hyper-timeout-0.4.1//:hyper_timeout", + "@rules_rust_prost__percent-encoding-2.3.0//:percent_encoding", + "@rules_rust_prost__pin-project-1.1.0//:pin_project", + "@rules_rust_prost__prost-0.11.9//:prost", + "@rules_rust_prost__tokio-1.28.2//:tokio", + "@rules_rust_prost__tokio-stream-0.1.14//:tokio_stream", + "@rules_rust_prost__tower-0.4.13//:tower", + "@rules_rust_prost__tower-layer-0.3.2//:tower_layer", + "@rules_rust_prost__tower-service-0.3.2//:tower_service", + "@rules_rust_prost__tracing-0.1.37//:tracing", + ], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.tonic-build-0.8.4.bazel b/proto/prost/private/3rdparty/crates/BUILD.tonic-build-0.8.4.bazel new file mode 100644 index 0000000000..5059f9d6ba --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.tonic-build-0.8.4.bazel @@ -0,0 +1,89 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT +# ]) + +rust_library( + name = "tonic_build", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "default", + "prost", + "prost-build", + "transport", + ], + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=tonic-build", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.8.4", + deps = [ + "@rules_rust_prost__prettyplease-0.1.25//:prettyplease", + "@rules_rust_prost__proc-macro2-1.0.60//:proc_macro2", + "@rules_rust_prost__prost-build-0.11.9//:prost_build", + "@rules_rust_prost__quote-1.0.28//:quote", + "@rules_rust_prost__syn-1.0.109//:syn", + ], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.tower-0.4.13.bazel b/proto/prost/private/3rdparty/crates/BUILD.tower-0.4.13.bazel new file mode 100644 index 0000000000..aed674c04c --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.tower-0.4.13.bazel @@ -0,0 +1,112 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT +# ]) + +rust_library( + name = "tower", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "__common", + "balance", + "buffer", + "discover", + "futures-core", + "futures-util", + "indexmap", + "limit", + "load", + "make", + "pin-project", + "pin-project-lite", + "rand", + "ready-cache", + "slab", + "timeout", + "tokio", + "tokio-util", + "tracing", + "util", + ], + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=tower", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.4.13", + deps = [ + "@rules_rust_prost__futures-core-0.3.28//:futures_core", + "@rules_rust_prost__futures-util-0.3.28//:futures_util", + "@rules_rust_prost__indexmap-1.9.3//:indexmap", + "@rules_rust_prost__pin-project-1.1.0//:pin_project", + "@rules_rust_prost__pin-project-lite-0.2.9//:pin_project_lite", + "@rules_rust_prost__rand-0.8.5//:rand", + "@rules_rust_prost__slab-0.4.8//:slab", + "@rules_rust_prost__tokio-1.28.2//:tokio", + "@rules_rust_prost__tokio-util-0.7.8//:tokio_util", + "@rules_rust_prost__tower-layer-0.3.2//:tower_layer", + "@rules_rust_prost__tower-service-0.3.2//:tower_service", + "@rules_rust_prost__tracing-0.1.37//:tracing", + ], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.tower-layer-0.3.2.bazel b/proto/prost/private/3rdparty/crates/BUILD.tower-layer-0.3.2.bazel new file mode 100644 index 0000000000..adea423d74 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.tower-layer-0.3.2.bazel @@ -0,0 +1,76 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT +# ]) + +rust_library( + name = "tower_layer", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=tower-layer", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.3.2", +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.tower-service-0.3.2.bazel b/proto/prost/private/3rdparty/crates/BUILD.tower-service-0.3.2.bazel new file mode 100644 index 0000000000..68aa5d3692 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.tower-service-0.3.2.bazel @@ -0,0 +1,76 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT +# ]) + +rust_library( + name = "tower_service", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=tower-service", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.3.2", +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.tracing-0.1.37.bazel b/proto/prost/private/3rdparty/crates/BUILD.tracing-0.1.37.bazel new file mode 100644 index 0000000000..e3f1bcc748 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.tracing-0.1.37.bazel @@ -0,0 +1,90 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT +# ]) + +rust_library( + name = "tracing", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "attributes", + "default", + "std", + "tracing-attributes", + ], + crate_root = "src/lib.rs", + edition = "2018", + proc_macro_deps = [ + "@rules_rust_prost__tracing-attributes-0.1.26//:tracing_attributes", + ], + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=tracing", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.1.37", + deps = [ + "@rules_rust_prost__cfg-if-1.0.0//:cfg_if", + "@rules_rust_prost__pin-project-lite-0.2.9//:pin_project_lite", + "@rules_rust_prost__tracing-core-0.1.31//:tracing_core", + ], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.tracing-attributes-0.1.26.bazel b/proto/prost/private/3rdparty/crates/BUILD.tracing-attributes-0.1.26.bazel new file mode 100644 index 0000000000..d9d6dfac68 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.tracing-attributes-0.1.26.bazel @@ -0,0 +1,81 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_proc_macro") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT +# ]) + +rust_proc_macro( + name = "tracing_attributes", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=tracing-attributes", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.1.26", + deps = [ + "@rules_rust_prost__proc-macro2-1.0.60//:proc_macro2", + "@rules_rust_prost__quote-1.0.28//:quote", + "@rules_rust_prost__syn-2.0.18//:syn", + ], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.tracing-core-0.1.31.bazel b/proto/prost/private/3rdparty/crates/BUILD.tracing-core-0.1.31.bazel new file mode 100644 index 0000000000..c471cfefb8 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.tracing-core-0.1.31.bazel @@ -0,0 +1,83 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT +# ]) + +rust_library( + name = "tracing_core", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "once_cell", + "std", + ], + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=tracing-core", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.1.31", + deps = [ + "@rules_rust_prost__once_cell-1.18.0//:once_cell", + ], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.try-lock-0.2.4.bazel b/proto/prost/private/3rdparty/crates/BUILD.try-lock-0.2.4.bazel new file mode 100644 index 0000000000..67e9b77b32 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.try-lock-0.2.4.bazel @@ -0,0 +1,76 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT +# ]) + +rust_library( + name = "try_lock", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2015", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=try-lock", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.2.4", +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.unicode-ident-1.0.9.bazel b/proto/prost/private/3rdparty/crates/BUILD.unicode-ident-1.0.9.bazel new file mode 100644 index 0000000000..171fdcddc0 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.unicode-ident-1.0.9.bazel @@ -0,0 +1,76 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # (MIT OR Apache-2.0) AND Unicode-DFS-2016 +# ]) + +rust_library( + name = "unicode_ident", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=unicode-ident", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "1.0.9", +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.want-0.3.1.bazel b/proto/prost/private/3rdparty/crates/BUILD.want-0.3.1.bazel new file mode 100644 index 0000000000..8a3d34891f --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.want-0.3.1.bazel @@ -0,0 +1,79 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT +# ]) + +rust_library( + name = "want", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=want", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.3.1", + deps = [ + "@rules_rust_prost__try-lock-0.2.4//:try_lock", + ], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.wasi-0.11.0+wasi-snapshot-preview1.bazel b/proto/prost/private/3rdparty/crates/BUILD.wasi-0.11.0+wasi-snapshot-preview1.bazel new file mode 100644 index 0000000000..b64a530196 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.wasi-0.11.0+wasi-snapshot-preview1.bazel @@ -0,0 +1,80 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT +# ]) + +rust_library( + name = "wasi", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "default", + "std", + ], + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=wasi", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.11.0+wasi-snapshot-preview1", +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.which-4.4.0.bazel b/proto/prost/private/3rdparty/crates/BUILD.which-4.4.0.bazel new file mode 100644 index 0000000000..7d8f4b5972 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.which-4.4.0.bazel @@ -0,0 +1,91 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT +# ]) + +rust_library( + name = "which", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=which", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "4.4.0", + deps = [ + "@rules_rust_prost__either-1.8.1//:either", + "@rules_rust_prost__libc-0.2.146//:libc", + ] + select({ + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [ + "@rules_rust_prost__once_cell-1.18.0//:once_cell", # cfg(windows) + ], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [ + "@rules_rust_prost__once_cell-1.18.0//:once_cell", # cfg(windows) + ], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [ + "@rules_rust_prost__once_cell-1.18.0//:once_cell", # cfg(windows) + ], + "//conditions:default": [], + }), +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.winapi-0.3.9.bazel b/proto/prost/private/3rdparty/crates/BUILD.winapi-0.3.9.bazel new file mode 100644 index 0000000000..fc9d24d37f --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.winapi-0.3.9.bazel @@ -0,0 +1,127 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//cargo:defs.bzl", "cargo_build_script") +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "winapi", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "handleapi", + "ws2ipdef", + "ws2tcpip", + ], + crate_root = "src/lib.rs", + edition = "2015", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=winapi", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.3.9", + deps = [ + "@rules_rust_prost__winapi-0.3.9//:build_script_build", + ], +) + +cargo_build_script( + name = "winapi_build_script", + srcs = glob(["**/*.rs"]), + crate_features = [ + "handleapi", + "ws2ipdef", + "ws2tcpip", + ], + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + edition = "2015", + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-bazel", + "crate-name=winapi", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.3.9", + visibility = ["//visibility:private"], +) + +alias( + name = "build_script_build", + actual = "winapi_build_script", + tags = ["manual"], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.winapi-i686-pc-windows-gnu-0.4.0.bazel b/proto/prost/private/3rdparty/crates/BUILD.winapi-i686-pc-windows-gnu-0.4.0.bazel new file mode 100644 index 0000000000..f8bc68d734 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.winapi-i686-pc-windows-gnu-0.4.0.bazel @@ -0,0 +1,117 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//cargo:defs.bzl", "cargo_build_script") +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "winapi_i686_pc_windows_gnu", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2015", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=winapi-i686-pc-windows-gnu", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.4.0", + deps = [ + "@rules_rust_prost__winapi-i686-pc-windows-gnu-0.4.0//:build_script_build", + ], +) + +cargo_build_script( + name = "winapi-i686-pc-windows-gnu_build_script", + srcs = glob(["**/*.rs"]), + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + edition = "2015", + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-bazel", + "crate-name=winapi-i686-pc-windows-gnu", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.4.0", + visibility = ["//visibility:private"], +) + +alias( + name = "build_script_build", + actual = "winapi-i686-pc-windows-gnu_build_script", + tags = ["manual"], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.winapi-x86_64-pc-windows-gnu-0.4.0.bazel b/proto/prost/private/3rdparty/crates/BUILD.winapi-x86_64-pc-windows-gnu-0.4.0.bazel new file mode 100644 index 0000000000..369d56dfa2 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.winapi-x86_64-pc-windows-gnu-0.4.0.bazel @@ -0,0 +1,117 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//cargo:defs.bzl", "cargo_build_script") +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT/Apache-2.0 +# ]) + +rust_library( + name = "winapi_x86_64_pc_windows_gnu", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2015", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=winapi-x86_64-pc-windows-gnu", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.4.0", + deps = [ + "@rules_rust_prost__winapi-x86_64-pc-windows-gnu-0.4.0//:build_script_build", + ], +) + +cargo_build_script( + name = "winapi-x86_64-pc-windows-gnu_build_script", + srcs = glob(["**/*.rs"]), + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + edition = "2015", + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-bazel", + "crate-name=winapi-x86_64-pc-windows-gnu", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.4.0", + visibility = ["//visibility:private"], +) + +alias( + name = "build_script_build", + actual = "winapi-x86_64-pc-windows-gnu_build_script", + tags = ["manual"], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.windows-sys-0.48.0.bazel b/proto/prost/private/3rdparty/crates/BUILD.windows-sys-0.48.0.bazel new file mode 100644 index 0000000000..131397769c --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.windows-sys-0.48.0.bazel @@ -0,0 +1,101 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "windows_sys", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_features = [ + "Win32", + "Win32_Foundation", + "Win32_NetworkManagement", + "Win32_NetworkManagement_IpHelper", + "Win32_Networking", + "Win32_Networking_WinSock", + "Win32_Security", + "Win32_Security_Authorization", + "Win32_Storage", + "Win32_Storage_FileSystem", + "Win32_System", + "Win32_System_Console", + "Win32_System_Diagnostics", + "Win32_System_Diagnostics_Debug", + "Win32_System_IO", + "Win32_System_Pipes", + "Win32_System_SystemServices", + "Win32_System_Threading", + "Win32_System_WindowsProgramming", + "default", + ], + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=windows-sys", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.48.0", + deps = [ + "@rules_rust_prost__windows-targets-0.48.0//:windows_targets", + ], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.windows-targets-0.48.0.bazel b/proto/prost/private/3rdparty/crates/BUILD.windows-targets-0.48.0.bazel new file mode 100644 index 0000000000..4d1babcd37 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.windows-targets-0.48.0.bazel @@ -0,0 +1,94 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "windows_targets", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=windows-targets", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.48.0", + deps = select({ + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [ + "@rules_rust_prost__windows_aarch64_msvc-0.48.0//:windows_aarch64_msvc", # cfg(all(target_arch = "aarch64", target_env = "msvc", not(windows_raw_dylib))) + ], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [ + "@rules_rust_prost__windows_i686_msvc-0.48.0//:windows_i686_msvc", # cfg(all(target_arch = "x86", target_env = "msvc", not(windows_raw_dylib))) + ], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [ + "@rules_rust_prost__windows_i686_gnu-0.48.0//:windows_i686_gnu", # cfg(all(target_arch = "x86", target_env = "gnu", not(windows_raw_dylib))) + ], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [ + "@rules_rust_prost__windows_x86_64_msvc-0.48.0//:windows_x86_64_msvc", # cfg(all(target_arch = "x86_64", target_env = "msvc", not(windows_raw_dylib))) + ], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [ + "@rules_rust_prost__windows_x86_64_gnu-0.48.0//:windows_x86_64_gnu", # cfg(all(target_arch = "x86_64", target_env = "gnu", not(target_abi = "llvm"), not(windows_raw_dylib))) + ], + "//conditions:default": [], + }), +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.windows_aarch64_gnullvm-0.48.0.bazel b/proto/prost/private/3rdparty/crates/BUILD.windows_aarch64_gnullvm-0.48.0.bazel new file mode 100644 index 0000000000..70c6724f5b --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.windows_aarch64_gnullvm-0.48.0.bazel @@ -0,0 +1,117 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//cargo:defs.bzl", "cargo_build_script") +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "windows_aarch64_gnullvm", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=windows_aarch64_gnullvm", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.48.0", + deps = [ + "@rules_rust_prost__windows_aarch64_gnullvm-0.48.0//:build_script_build", + ], +) + +cargo_build_script( + name = "windows_aarch64_gnullvm_build_script", + srcs = glob(["**/*.rs"]), + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + edition = "2018", + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-bazel", + "crate-name=windows_aarch64_gnullvm", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.48.0", + visibility = ["//visibility:private"], +) + +alias( + name = "build_script_build", + actual = "windows_aarch64_gnullvm_build_script", + tags = ["manual"], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.windows_aarch64_msvc-0.48.0.bazel b/proto/prost/private/3rdparty/crates/BUILD.windows_aarch64_msvc-0.48.0.bazel new file mode 100644 index 0000000000..a51ab4ec24 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.windows_aarch64_msvc-0.48.0.bazel @@ -0,0 +1,117 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//cargo:defs.bzl", "cargo_build_script") +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "windows_aarch64_msvc", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=windows_aarch64_msvc", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.48.0", + deps = [ + "@rules_rust_prost__windows_aarch64_msvc-0.48.0//:build_script_build", + ], +) + +cargo_build_script( + name = "windows_aarch64_msvc_build_script", + srcs = glob(["**/*.rs"]), + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + edition = "2018", + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-bazel", + "crate-name=windows_aarch64_msvc", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.48.0", + visibility = ["//visibility:private"], +) + +alias( + name = "build_script_build", + actual = "windows_aarch64_msvc_build_script", + tags = ["manual"], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.windows_i686_gnu-0.48.0.bazel b/proto/prost/private/3rdparty/crates/BUILD.windows_i686_gnu-0.48.0.bazel new file mode 100644 index 0000000000..e814a5f92b --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.windows_i686_gnu-0.48.0.bazel @@ -0,0 +1,117 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//cargo:defs.bzl", "cargo_build_script") +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "windows_i686_gnu", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=windows_i686_gnu", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.48.0", + deps = [ + "@rules_rust_prost__windows_i686_gnu-0.48.0//:build_script_build", + ], +) + +cargo_build_script( + name = "windows_i686_gnu_build_script", + srcs = glob(["**/*.rs"]), + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + edition = "2018", + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-bazel", + "crate-name=windows_i686_gnu", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.48.0", + visibility = ["//visibility:private"], +) + +alias( + name = "build_script_build", + actual = "windows_i686_gnu_build_script", + tags = ["manual"], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.windows_i686_msvc-0.48.0.bazel b/proto/prost/private/3rdparty/crates/BUILD.windows_i686_msvc-0.48.0.bazel new file mode 100644 index 0000000000..511c611fdc --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.windows_i686_msvc-0.48.0.bazel @@ -0,0 +1,117 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//cargo:defs.bzl", "cargo_build_script") +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "windows_i686_msvc", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=windows_i686_msvc", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.48.0", + deps = [ + "@rules_rust_prost__windows_i686_msvc-0.48.0//:build_script_build", + ], +) + +cargo_build_script( + name = "windows_i686_msvc_build_script", + srcs = glob(["**/*.rs"]), + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + edition = "2018", + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-bazel", + "crate-name=windows_i686_msvc", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.48.0", + visibility = ["//visibility:private"], +) + +alias( + name = "build_script_build", + actual = "windows_i686_msvc_build_script", + tags = ["manual"], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.windows_x86_64_gnu-0.48.0.bazel b/proto/prost/private/3rdparty/crates/BUILD.windows_x86_64_gnu-0.48.0.bazel new file mode 100644 index 0000000000..20667f6ddb --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.windows_x86_64_gnu-0.48.0.bazel @@ -0,0 +1,117 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//cargo:defs.bzl", "cargo_build_script") +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "windows_x86_64_gnu", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=windows_x86_64_gnu", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.48.0", + deps = [ + "@rules_rust_prost__windows_x86_64_gnu-0.48.0//:build_script_build", + ], +) + +cargo_build_script( + name = "windows_x86_64_gnu_build_script", + srcs = glob(["**/*.rs"]), + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + edition = "2018", + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-bazel", + "crate-name=windows_x86_64_gnu", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.48.0", + visibility = ["//visibility:private"], +) + +alias( + name = "build_script_build", + actual = "windows_x86_64_gnu_build_script", + tags = ["manual"], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.windows_x86_64_gnullvm-0.48.0.bazel b/proto/prost/private/3rdparty/crates/BUILD.windows_x86_64_gnullvm-0.48.0.bazel new file mode 100644 index 0000000000..10623aabd7 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.windows_x86_64_gnullvm-0.48.0.bazel @@ -0,0 +1,117 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//cargo:defs.bzl", "cargo_build_script") +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "windows_x86_64_gnullvm", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=windows_x86_64_gnullvm", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.48.0", + deps = [ + "@rules_rust_prost__windows_x86_64_gnullvm-0.48.0//:build_script_build", + ], +) + +cargo_build_script( + name = "windows_x86_64_gnullvm_build_script", + srcs = glob(["**/*.rs"]), + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + edition = "2018", + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-bazel", + "crate-name=windows_x86_64_gnullvm", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.48.0", + visibility = ["//visibility:private"], +) + +alias( + name = "build_script_build", + actual = "windows_x86_64_gnullvm_build_script", + tags = ["manual"], +) diff --git a/proto/prost/private/3rdparty/crates/BUILD.windows_x86_64_msvc-0.48.0.bazel b/proto/prost/private/3rdparty/crates/BUILD.windows_x86_64_msvc-0.48.0.bazel new file mode 100644 index 0000000000..b4caa5fd83 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/BUILD.windows_x86_64_msvc-0.48.0.bazel @@ -0,0 +1,117 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### + +load("@rules_rust//cargo:defs.bzl", "cargo_build_script") +load("@rules_rust//rust:defs.bzl", "rust_library") + +package(default_visibility = ["//visibility:public"]) + +# licenses([ +# "TODO", # MIT OR Apache-2.0 +# ]) + +rust_library( + name = "windows_x86_64_msvc", + srcs = glob(["**/*.rs"]), + compile_data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + crate_root = "src/lib.rs", + edition = "2018", + rustc_flags = ["--cap-lints=allow"], + tags = [ + "cargo-bazel", + "crate-name=windows_x86_64_msvc", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-apple-ios": [], + "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], + "@rules_rust//rust/platform:aarch64-fuchsia": [], + "@rules_rust//rust/platform:aarch64-linux-android": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:armv7-linux-androideabi": [], + "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], + "@rules_rust//rust/platform:i686-apple-darwin": [], + "@rules_rust//rust/platform:i686-linux-android": [], + "@rules_rust//rust/platform:i686-pc-windows-msvc": [], + "@rules_rust//rust/platform:i686-unknown-freebsd": [], + "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], + "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], + "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], + "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], + "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], + "@rules_rust//rust/platform:thumbv7em-none-eabi": [], + "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-wasi": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-apple-ios": [], + "@rules_rust//rust/platform:x86_64-fuchsia": [], + "@rules_rust//rust/platform:x86_64-linux-android": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-unknown-none": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.48.0", + deps = [ + "@rules_rust_prost__windows_x86_64_msvc-0.48.0//:build_script_build", + ], +) + +cargo_build_script( + name = "windows_x86_64_msvc_build_script", + srcs = glob(["**/*.rs"]), + crate_name = "build_script_build", + crate_root = "build.rs", + data = glob( + include = ["**"], + exclude = [ + "**/* *", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + edition = "2018", + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-bazel", + "crate-name=windows_x86_64_msvc", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.48.0", + visibility = ["//visibility:private"], +) + +alias( + name = "build_script_build", + actual = "windows_x86_64_msvc_build_script", + tags = ["manual"], +) diff --git a/proto/prost/private/3rdparty/crates/crates.bzl b/proto/prost/private/3rdparty/crates/crates.bzl new file mode 100644 index 0000000000..3fc5b69bac --- /dev/null +++ b/proto/prost/private/3rdparty/crates/crates.bzl @@ -0,0 +1,25 @@ +############################################################################### +# @generated +# This file is auto-generated by the cargo-bazel tool. +# +# DO NOT MODIFY: Local changes may be replaced in future executions. +############################################################################### +"""Rules for defining repositories for remote `crates_vendor` repositories""" + +load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") + +# buildifier: disable=bzl-visibility +load("@rules_rust//crate_universe/private:crates_vendor.bzl", "crates_vendor_remote_repository") + +# buildifier: disable=bzl-visibility +load("@rules_rust//proto/prost/private/3rdparty/crates:defs.bzl", _crate_repositories = "crate_repositories") + +def crate_repositories(): + maybe( + crates_vendor_remote_repository, + name = "rules_rust_prost", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.bazel"), + defs_module = Label("@rules_rust//proto/prost/private/3rdparty/crates:defs.bzl"), + ) + + _crate_repositories() diff --git a/proto/prost/private/3rdparty/crates/defs.bzl b/proto/prost/private/3rdparty/crates/defs.bzl new file mode 100644 index 0000000000..d174de2d64 --- /dev/null +++ b/proto/prost/private/3rdparty/crates/defs.bzl @@ -0,0 +1,1556 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @//proto/prost/private/3rdparty:crates_vendor +############################################################################### +""" +# `crates_repository` API + +- [aliases](#aliases) +- [crate_deps](#crate_deps) +- [all_crate_deps](#all_crate_deps) +- [crate_repositories](#crate_repositories) + +""" + +load("@bazel_skylib//lib:selects.bzl", "selects") +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") +load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") + +############################################################################### +# MACROS API +############################################################################### + +# An identifier that represent common dependencies (unconditional). +_COMMON_CONDITION = "" + +def _flatten_dependency_maps(all_dependency_maps): + """Flatten a list of dependency maps into one dictionary. + + Dependency maps have the following structure: + + ```python + DEPENDENCIES_MAP = { + # The first key in the map is a Bazel package + # name of the workspace this file is defined in. + "workspace_member_package": { + + # Not all dependencies are supported for all platforms. + # the condition key is the condition required to be true + # on the host platform. + "condition": { + + # An alias to a crate target. # The label of the crate target the + # Aliases are only crate names. # package name refers to. + "package_name": "@full//:label", + } + } + } + ``` + + Args: + all_dependency_maps (list): A list of dicts as described above + + Returns: + dict: A dictionary as described above + """ + dependencies = {} + + for workspace_deps_map in all_dependency_maps: + for pkg_name, conditional_deps_map in workspace_deps_map.items(): + if pkg_name not in dependencies: + non_frozen_map = dict() + for key, values in conditional_deps_map.items(): + non_frozen_map.update({key: dict(values.items())}) + dependencies.setdefault(pkg_name, non_frozen_map) + continue + + for condition, deps_map in conditional_deps_map.items(): + # If the condition has not been recorded, do so and continue + if condition not in dependencies[pkg_name]: + dependencies[pkg_name].setdefault(condition, dict(deps_map.items())) + continue + + # Alert on any miss-matched dependencies + inconsistent_entries = [] + for crate_name, crate_label in deps_map.items(): + existing = dependencies[pkg_name][condition].get(crate_name) + if existing and existing != crate_label: + inconsistent_entries.append((crate_name, existing, crate_label)) + dependencies[pkg_name][condition].update({crate_name: crate_label}) + + return dependencies + +def crate_deps(deps, package_name = None): + """Finds the fully qualified label of the requested crates for the package where this macro is called. + + Args: + deps (list): The desired list of crate targets. + package_name (str, optional): The package name of the set of dependencies to look up. + Defaults to `native.package_name()`. + + Returns: + list: A list of labels to generated rust targets (str) + """ + + if not deps: + return [] + + if package_name == None: + package_name = native.package_name() + + # Join both sets of dependencies + dependencies = _flatten_dependency_maps([ + _NORMAL_DEPENDENCIES, + _NORMAL_DEV_DEPENDENCIES, + _PROC_MACRO_DEPENDENCIES, + _PROC_MACRO_DEV_DEPENDENCIES, + _BUILD_DEPENDENCIES, + _BUILD_PROC_MACRO_DEPENDENCIES, + ]).pop(package_name, {}) + + # Combine all conditional packages so we can easily index over a flat list + # TODO: Perhaps this should actually return select statements and maintain + # the conditionals of the dependencies + flat_deps = {} + for deps_set in dependencies.values(): + for crate_name, crate_label in deps_set.items(): + flat_deps.update({crate_name: crate_label}) + + missing_crates = [] + crate_targets = [] + for crate_target in deps: + if crate_target not in flat_deps: + missing_crates.append(crate_target) + else: + crate_targets.append(flat_deps[crate_target]) + + if missing_crates: + fail("Could not find crates `{}` among dependencies of `{}`. Available dependencies were `{}`".format( + missing_crates, + package_name, + dependencies, + )) + + return crate_targets + +def all_crate_deps( + normal = False, + normal_dev = False, + proc_macro = False, + proc_macro_dev = False, + build = False, + build_proc_macro = False, + package_name = None): + """Finds the fully qualified label of all requested direct crate dependencies \ + for the package where this macro is called. + + If no parameters are set, all normal dependencies are returned. Setting any one flag will + otherwise impact the contents of the returned list. + + Args: + normal (bool, optional): If True, normal dependencies are included in the + output list. + normal_dev (bool, optional): If True, normal dev dependencies will be + included in the output list.. + proc_macro (bool, optional): If True, proc_macro dependencies are included + in the output list. + proc_macro_dev (bool, optional): If True, dev proc_macro dependencies are + included in the output list. + build (bool, optional): If True, build dependencies are included + in the output list. + build_proc_macro (bool, optional): If True, build proc_macro dependencies are + included in the output list. + package_name (str, optional): The package name of the set of dependencies to look up. + Defaults to `native.package_name()` when unset. + + Returns: + list: A list of labels to generated rust targets (str) + """ + + if package_name == None: + package_name = native.package_name() + + # Determine the relevant maps to use + all_dependency_maps = [] + if normal: + all_dependency_maps.append(_NORMAL_DEPENDENCIES) + if normal_dev: + all_dependency_maps.append(_NORMAL_DEV_DEPENDENCIES) + if proc_macro: + all_dependency_maps.append(_PROC_MACRO_DEPENDENCIES) + if proc_macro_dev: + all_dependency_maps.append(_PROC_MACRO_DEV_DEPENDENCIES) + if build: + all_dependency_maps.append(_BUILD_DEPENDENCIES) + if build_proc_macro: + all_dependency_maps.append(_BUILD_PROC_MACRO_DEPENDENCIES) + + # Default to always using normal dependencies + if not all_dependency_maps: + all_dependency_maps.append(_NORMAL_DEPENDENCIES) + + dependencies = _flatten_dependency_maps(all_dependency_maps).pop(package_name, None) + + if not dependencies: + if dependencies == None: + fail("Tried to get all_crate_deps for package " + package_name + " but that package had no Cargo.toml file") + else: + return [] + + crate_deps = list(dependencies.pop(_COMMON_CONDITION, {}).values()) + for condition, deps in dependencies.items(): + crate_deps += selects.with_or({ + tuple(_CONDITIONS[condition]): deps.values(), + "//conditions:default": [], + }) + + return crate_deps + +def aliases( + normal = False, + normal_dev = False, + proc_macro = False, + proc_macro_dev = False, + build = False, + build_proc_macro = False, + package_name = None): + """Produces a map of Crate alias names to their original label + + If no dependency kinds are specified, `normal` and `proc_macro` are used by default. + Setting any one flag will otherwise determine the contents of the returned dict. + + Args: + normal (bool, optional): If True, normal dependencies are included in the + output list. + normal_dev (bool, optional): If True, normal dev dependencies will be + included in the output list.. + proc_macro (bool, optional): If True, proc_macro dependencies are included + in the output list. + proc_macro_dev (bool, optional): If True, dev proc_macro dependencies are + included in the output list. + build (bool, optional): If True, build dependencies are included + in the output list. + build_proc_macro (bool, optional): If True, build proc_macro dependencies are + included in the output list. + package_name (str, optional): The package name of the set of dependencies to look up. + Defaults to `native.package_name()` when unset. + + Returns: + dict: The aliases of all associated packages + """ + if package_name == None: + package_name = native.package_name() + + # Determine the relevant maps to use + all_aliases_maps = [] + if normal: + all_aliases_maps.append(_NORMAL_ALIASES) + if normal_dev: + all_aliases_maps.append(_NORMAL_DEV_ALIASES) + if proc_macro: + all_aliases_maps.append(_PROC_MACRO_ALIASES) + if proc_macro_dev: + all_aliases_maps.append(_PROC_MACRO_DEV_ALIASES) + if build: + all_aliases_maps.append(_BUILD_ALIASES) + if build_proc_macro: + all_aliases_maps.append(_BUILD_PROC_MACRO_ALIASES) + + # Default to always using normal aliases + if not all_aliases_maps: + all_aliases_maps.append(_NORMAL_ALIASES) + all_aliases_maps.append(_PROC_MACRO_ALIASES) + + aliases = _flatten_dependency_maps(all_aliases_maps).pop(package_name, None) + + if not aliases: + return dict() + + common_items = aliases.pop(_COMMON_CONDITION, {}).items() + + # If there are only common items in the dictionary, immediately return them + if not len(aliases.keys()) == 1: + return dict(common_items) + + # Build a single select statement where each conditional has accounted for the + # common set of aliases. + crate_aliases = {"//conditions:default": dict(common_items)} + for condition, deps in aliases.items(): + condition_triples = _CONDITIONS[condition] + for triple in condition_triples: + if triple in crate_aliases: + crate_aliases[triple].update(deps) + else: + crate_aliases.update({triple: dict(deps.items() + common_items)}) + + return select(crate_aliases) + +############################################################################### +# WORKSPACE MEMBER DEPS AND ALIASES +############################################################################### + +_NORMAL_DEPENDENCIES = { + "": { + _COMMON_CONDITION: { + "h2": "@rules_rust_prost__h2-0.3.19//:h2", + "prost": "@rules_rust_prost__prost-0.11.9//:prost", + "prost-types": "@rules_rust_prost__prost-types-0.11.9//:prost_types", + "protoc-gen-prost": "@rules_rust_prost__protoc-gen-prost-0.2.2//:protoc_gen_prost", + "protoc-gen-tonic": "@rules_rust_prost__protoc-gen-tonic-0.2.2//:protoc_gen_tonic", + "tokio": "@rules_rust_prost__tokio-1.28.2//:tokio", + "tokio-stream": "@rules_rust_prost__tokio-stream-0.1.14//:tokio_stream", + "tonic": "@rules_rust_prost__tonic-0.9.2//:tonic", + }, + }, +} + +_NORMAL_ALIASES = { + "": { + _COMMON_CONDITION: { + }, + }, +} + +_NORMAL_DEV_DEPENDENCIES = { + "": { + }, +} + +_NORMAL_DEV_ALIASES = { + "": { + }, +} + +_PROC_MACRO_DEPENDENCIES = { + "": { + }, +} + +_PROC_MACRO_ALIASES = { + "": { + }, +} + +_PROC_MACRO_DEV_DEPENDENCIES = { + "": { + }, +} + +_PROC_MACRO_DEV_ALIASES = { + "": { + }, +} + +_BUILD_DEPENDENCIES = { + "": { + }, +} + +_BUILD_ALIASES = { + "": { + }, +} + +_BUILD_PROC_MACRO_DEPENDENCIES = { + "": { + }, +} + +_BUILD_PROC_MACRO_ALIASES = { + "": { + }, +} + +_CONDITIONS = { + "cfg(all(any(target_arch = \"x86_64\", target_arch = \"aarch64\"), target_os = \"hermit\"))": [], + "cfg(all(any(target_os = \"android\", target_os = \"linux\"), any(rustix_use_libc, miri, not(all(target_os = \"linux\", any(target_arch = \"x86\", all(target_arch = \"x86_64\", target_pointer_width = \"64\"), all(target_endian = \"little\", any(target_arch = \"arm\", all(target_arch = \"aarch64\", target_pointer_width = \"64\"), target_arch = \"powerpc64\", target_arch = \"riscv64\", target_arch = \"mips\", target_arch = \"mips64\"))))))))": ["@rules_rust//rust/platform:aarch64-linux-android", "@rules_rust//rust/platform:armv7-linux-androideabi", "@rules_rust//rust/platform:i686-linux-android", "@rules_rust//rust/platform:powerpc-unknown-linux-gnu", "@rules_rust//rust/platform:s390x-unknown-linux-gnu", "@rules_rust//rust/platform:x86_64-linux-android"], + "cfg(all(not(rustix_use_libc), not(miri), target_os = \"linux\", any(target_arch = \"x86\", all(target_arch = \"x86_64\", target_pointer_width = \"64\"), all(target_endian = \"little\", any(target_arch = \"arm\", all(target_arch = \"aarch64\", target_pointer_width = \"64\"), target_arch = \"powerpc64\", target_arch = \"riscv64\", target_arch = \"mips\", target_arch = \"mips64\")))))": ["@rules_rust//rust/platform:aarch64-unknown-linux-gnu", "@rules_rust//rust/platform:arm-unknown-linux-gnueabi", "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi", "@rules_rust//rust/platform:i686-unknown-linux-gnu", "@rules_rust//rust/platform:x86_64-unknown-linux-gnu"], + "cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = \"linux\", any(target_arch = \"x86\", all(target_arch = \"x86_64\", target_pointer_width = \"64\"), all(target_endian = \"little\", any(target_arch = \"arm\", all(target_arch = \"aarch64\", target_pointer_width = \"64\"), target_arch = \"powerpc64\", target_arch = \"riscv64\", target_arch = \"mips\", target_arch = \"mips64\"))))))))": ["@rules_rust//rust/platform:aarch64-apple-darwin", "@rules_rust//rust/platform:aarch64-apple-ios", "@rules_rust//rust/platform:aarch64-apple-ios-sim", "@rules_rust//rust/platform:aarch64-fuchsia", "@rules_rust//rust/platform:aarch64-linux-android", "@rules_rust//rust/platform:armv7-linux-androideabi", "@rules_rust//rust/platform:i686-apple-darwin", "@rules_rust//rust/platform:i686-linux-android", "@rules_rust//rust/platform:i686-unknown-freebsd", "@rules_rust//rust/platform:powerpc-unknown-linux-gnu", "@rules_rust//rust/platform:riscv32imc-unknown-none-elf", "@rules_rust//rust/platform:riscv64gc-unknown-none-elf", "@rules_rust//rust/platform:s390x-unknown-linux-gnu", "@rules_rust//rust/platform:thumbv7em-none-eabi", "@rules_rust//rust/platform:thumbv8m.main-none-eabi", "@rules_rust//rust/platform:wasm32-unknown-unknown", "@rules_rust//rust/platform:wasm32-wasi", "@rules_rust//rust/platform:x86_64-apple-darwin", "@rules_rust//rust/platform:x86_64-apple-ios", "@rules_rust//rust/platform:x86_64-fuchsia", "@rules_rust//rust/platform:x86_64-linux-android", "@rules_rust//rust/platform:x86_64-unknown-freebsd", "@rules_rust//rust/platform:x86_64-unknown-none"], + "cfg(all(target_arch = \"aarch64\", target_env = \"gnu\", target_abi = \"llvm\", not(windows_raw_dylib)))": [], + "cfg(all(target_arch = \"aarch64\", target_env = \"msvc\", not(windows_raw_dylib)))": ["@rules_rust//rust/platform:aarch64-pc-windows-msvc"], + "cfg(all(target_arch = \"wasm32\", not(target_os = \"wasi\")))": ["@rules_rust//rust/platform:wasm32-unknown-unknown"], + "cfg(all(target_arch = \"x86\", target_env = \"gnu\", not(windows_raw_dylib)))": ["@rules_rust//rust/platform:i686-unknown-linux-gnu"], + "cfg(all(target_arch = \"x86\", target_env = \"msvc\", not(windows_raw_dylib)))": ["@rules_rust//rust/platform:i686-pc-windows-msvc"], + "cfg(all(target_arch = \"x86_64\", target_env = \"gnu\", not(target_abi = \"llvm\"), not(windows_raw_dylib)))": ["@rules_rust//rust/platform:x86_64-unknown-linux-gnu"], + "cfg(all(target_arch = \"x86_64\", target_env = \"gnu\", target_abi = \"llvm\", not(windows_raw_dylib)))": [], + "cfg(all(target_arch = \"x86_64\", target_env = \"msvc\", not(windows_raw_dylib)))": ["@rules_rust//rust/platform:x86_64-pc-windows-msvc"], + "cfg(any(unix, target_os = \"wasi\"))": ["@rules_rust//rust/platform:aarch64-apple-darwin", "@rules_rust//rust/platform:aarch64-apple-ios", "@rules_rust//rust/platform:aarch64-apple-ios-sim", "@rules_rust//rust/platform:aarch64-fuchsia", "@rules_rust//rust/platform:aarch64-linux-android", "@rules_rust//rust/platform:aarch64-unknown-linux-gnu", "@rules_rust//rust/platform:arm-unknown-linux-gnueabi", "@rules_rust//rust/platform:armv7-linux-androideabi", "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi", "@rules_rust//rust/platform:i686-apple-darwin", "@rules_rust//rust/platform:i686-linux-android", "@rules_rust//rust/platform:i686-unknown-freebsd", "@rules_rust//rust/platform:i686-unknown-linux-gnu", "@rules_rust//rust/platform:powerpc-unknown-linux-gnu", "@rules_rust//rust/platform:s390x-unknown-linux-gnu", "@rules_rust//rust/platform:wasm32-wasi", "@rules_rust//rust/platform:x86_64-apple-darwin", "@rules_rust//rust/platform:x86_64-apple-ios", "@rules_rust//rust/platform:x86_64-fuchsia", "@rules_rust//rust/platform:x86_64-linux-android", "@rules_rust//rust/platform:x86_64-unknown-freebsd", "@rules_rust//rust/platform:x86_64-unknown-linux-gnu"], + "cfg(docsrs)": [], + "cfg(not(any(target_arch = \"wasm32\", target_arch = \"wasm64\")))": ["@rules_rust//rust/platform:aarch64-apple-darwin", "@rules_rust//rust/platform:aarch64-apple-ios", "@rules_rust//rust/platform:aarch64-apple-ios-sim", "@rules_rust//rust/platform:aarch64-fuchsia", "@rules_rust//rust/platform:aarch64-linux-android", "@rules_rust//rust/platform:aarch64-pc-windows-msvc", "@rules_rust//rust/platform:aarch64-unknown-linux-gnu", "@rules_rust//rust/platform:arm-unknown-linux-gnueabi", "@rules_rust//rust/platform:armv7-linux-androideabi", "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi", "@rules_rust//rust/platform:i686-apple-darwin", "@rules_rust//rust/platform:i686-linux-android", "@rules_rust//rust/platform:i686-pc-windows-msvc", "@rules_rust//rust/platform:i686-unknown-freebsd", "@rules_rust//rust/platform:i686-unknown-linux-gnu", "@rules_rust//rust/platform:powerpc-unknown-linux-gnu", "@rules_rust//rust/platform:riscv32imc-unknown-none-elf", "@rules_rust//rust/platform:riscv64gc-unknown-none-elf", "@rules_rust//rust/platform:s390x-unknown-linux-gnu", "@rules_rust//rust/platform:thumbv7em-none-eabi", "@rules_rust//rust/platform:thumbv8m.main-none-eabi", "@rules_rust//rust/platform:x86_64-apple-darwin", "@rules_rust//rust/platform:x86_64-apple-ios", "@rules_rust//rust/platform:x86_64-fuchsia", "@rules_rust//rust/platform:x86_64-linux-android", "@rules_rust//rust/platform:x86_64-pc-windows-msvc", "@rules_rust//rust/platform:x86_64-unknown-freebsd", "@rules_rust//rust/platform:x86_64-unknown-linux-gnu", "@rules_rust//rust/platform:x86_64-unknown-none"], + "cfg(not(windows))": ["@rules_rust//rust/platform:aarch64-apple-darwin", "@rules_rust//rust/platform:aarch64-apple-ios", "@rules_rust//rust/platform:aarch64-apple-ios-sim", "@rules_rust//rust/platform:aarch64-fuchsia", "@rules_rust//rust/platform:aarch64-linux-android", "@rules_rust//rust/platform:aarch64-unknown-linux-gnu", "@rules_rust//rust/platform:arm-unknown-linux-gnueabi", "@rules_rust//rust/platform:armv7-linux-androideabi", "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi", "@rules_rust//rust/platform:i686-apple-darwin", "@rules_rust//rust/platform:i686-linux-android", "@rules_rust//rust/platform:i686-unknown-freebsd", "@rules_rust//rust/platform:i686-unknown-linux-gnu", "@rules_rust//rust/platform:powerpc-unknown-linux-gnu", "@rules_rust//rust/platform:riscv32imc-unknown-none-elf", "@rules_rust//rust/platform:riscv64gc-unknown-none-elf", "@rules_rust//rust/platform:s390x-unknown-linux-gnu", "@rules_rust//rust/platform:thumbv7em-none-eabi", "@rules_rust//rust/platform:thumbv8m.main-none-eabi", "@rules_rust//rust/platform:wasm32-unknown-unknown", "@rules_rust//rust/platform:wasm32-wasi", "@rules_rust//rust/platform:x86_64-apple-darwin", "@rules_rust//rust/platform:x86_64-apple-ios", "@rules_rust//rust/platform:x86_64-fuchsia", "@rules_rust//rust/platform:x86_64-linux-android", "@rules_rust//rust/platform:x86_64-unknown-freebsd", "@rules_rust//rust/platform:x86_64-unknown-linux-gnu", "@rules_rust//rust/platform:x86_64-unknown-none"], + "cfg(target_os = \"dragonfly\")": [], + "cfg(target_os = \"hermit\")": [], + "cfg(target_os = \"redox\")": [], + "cfg(target_os = \"wasi\")": ["@rules_rust//rust/platform:wasm32-wasi"], + "cfg(unix)": ["@rules_rust//rust/platform:aarch64-apple-darwin", "@rules_rust//rust/platform:aarch64-apple-ios", "@rules_rust//rust/platform:aarch64-apple-ios-sim", "@rules_rust//rust/platform:aarch64-fuchsia", "@rules_rust//rust/platform:aarch64-linux-android", "@rules_rust//rust/platform:aarch64-unknown-linux-gnu", "@rules_rust//rust/platform:arm-unknown-linux-gnueabi", "@rules_rust//rust/platform:armv7-linux-androideabi", "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi", "@rules_rust//rust/platform:i686-apple-darwin", "@rules_rust//rust/platform:i686-linux-android", "@rules_rust//rust/platform:i686-unknown-freebsd", "@rules_rust//rust/platform:i686-unknown-linux-gnu", "@rules_rust//rust/platform:powerpc-unknown-linux-gnu", "@rules_rust//rust/platform:s390x-unknown-linux-gnu", "@rules_rust//rust/platform:x86_64-apple-darwin", "@rules_rust//rust/platform:x86_64-apple-ios", "@rules_rust//rust/platform:x86_64-fuchsia", "@rules_rust//rust/platform:x86_64-linux-android", "@rules_rust//rust/platform:x86_64-unknown-freebsd", "@rules_rust//rust/platform:x86_64-unknown-linux-gnu"], + "cfg(windows)": ["@rules_rust//rust/platform:aarch64-pc-windows-msvc", "@rules_rust//rust/platform:i686-pc-windows-msvc", "@rules_rust//rust/platform:x86_64-pc-windows-msvc"], + "i686-pc-windows-gnu": [], + "x86_64-pc-windows-gnu": [], +} + +############################################################################### + +def crate_repositories(): + """A macro for defining repositories for all generated crates""" + maybe( + http_archive, + name = "rules_rust_prost__anyhow-1.0.71", + sha256 = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/anyhow/1.0.71/download"], + strip_prefix = "anyhow-1.0.71", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.anyhow-1.0.71.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__async-trait-0.1.68", + sha256 = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/async-trait/0.1.68/download"], + strip_prefix = "async-trait-0.1.68", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.async-trait-0.1.68.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__autocfg-1.1.0", + sha256 = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/autocfg/1.1.0/download"], + strip_prefix = "autocfg-1.1.0", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.autocfg-1.1.0.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__axum-0.6.18", + sha256 = "f8175979259124331c1d7bf6586ee7e0da434155e4b2d48ec2c8386281d8df39", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/axum/0.6.18/download"], + strip_prefix = "axum-0.6.18", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.axum-0.6.18.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__axum-core-0.3.4", + sha256 = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/axum-core/0.3.4/download"], + strip_prefix = "axum-core-0.3.4", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.axum-core-0.3.4.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__base64-0.21.2", + sha256 = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/base64/0.21.2/download"], + strip_prefix = "base64-0.21.2", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.base64-0.21.2.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__bitflags-1.3.2", + sha256 = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/bitflags/1.3.2/download"], + strip_prefix = "bitflags-1.3.2", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.bitflags-1.3.2.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__bytes-1.4.0", + sha256 = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/bytes/1.4.0/download"], + strip_prefix = "bytes-1.4.0", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.bytes-1.4.0.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__cc-1.0.79", + sha256 = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/cc/1.0.79/download"], + strip_prefix = "cc-1.0.79", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.cc-1.0.79.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__cfg-if-1.0.0", + sha256 = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/cfg-if/1.0.0/download"], + strip_prefix = "cfg-if-1.0.0", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.cfg-if-1.0.0.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__either-1.8.1", + sha256 = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/either/1.8.1/download"], + strip_prefix = "either-1.8.1", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.either-1.8.1.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__errno-0.3.1", + sha256 = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/errno/0.3.1/download"], + strip_prefix = "errno-0.3.1", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.errno-0.3.1.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__errno-dragonfly-0.1.2", + sha256 = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/errno-dragonfly/0.1.2/download"], + strip_prefix = "errno-dragonfly-0.1.2", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.errno-dragonfly-0.1.2.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__fastrand-1.9.0", + sha256 = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/fastrand/1.9.0/download"], + strip_prefix = "fastrand-1.9.0", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.fastrand-1.9.0.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__fixedbitset-0.4.2", + sha256 = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/fixedbitset/0.4.2/download"], + strip_prefix = "fixedbitset-0.4.2", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.fixedbitset-0.4.2.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__fnv-1.0.7", + sha256 = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/fnv/1.0.7/download"], + strip_prefix = "fnv-1.0.7", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.fnv-1.0.7.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__futures-channel-0.3.28", + sha256 = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/futures-channel/0.3.28/download"], + strip_prefix = "futures-channel-0.3.28", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.futures-channel-0.3.28.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__futures-core-0.3.28", + sha256 = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/futures-core/0.3.28/download"], + strip_prefix = "futures-core-0.3.28", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.futures-core-0.3.28.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__futures-sink-0.3.28", + sha256 = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/futures-sink/0.3.28/download"], + strip_prefix = "futures-sink-0.3.28", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.futures-sink-0.3.28.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__futures-task-0.3.28", + sha256 = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/futures-task/0.3.28/download"], + strip_prefix = "futures-task-0.3.28", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.futures-task-0.3.28.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__futures-util-0.3.28", + sha256 = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/futures-util/0.3.28/download"], + strip_prefix = "futures-util-0.3.28", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.futures-util-0.3.28.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__getrandom-0.2.10", + sha256 = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/getrandom/0.2.10/download"], + strip_prefix = "getrandom-0.2.10", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.getrandom-0.2.10.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__h2-0.3.19", + sha256 = "d357c7ae988e7d2182f7d7871d0b963962420b0678b0997ce7de72001aeab782", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/h2/0.3.19/download"], + strip_prefix = "h2-0.3.19", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.h2-0.3.19.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__hashbrown-0.12.3", + sha256 = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/hashbrown/0.12.3/download"], + strip_prefix = "hashbrown-0.12.3", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.hashbrown-0.12.3.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__heck-0.4.1", + sha256 = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/heck/0.4.1/download"], + strip_prefix = "heck-0.4.1", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.heck-0.4.1.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__hermit-abi-0.2.6", + sha256 = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/hermit-abi/0.2.6/download"], + strip_prefix = "hermit-abi-0.2.6", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.hermit-abi-0.2.6.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__hermit-abi-0.3.1", + sha256 = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/hermit-abi/0.3.1/download"], + strip_prefix = "hermit-abi-0.3.1", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.hermit-abi-0.3.1.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__http-0.2.9", + sha256 = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/http/0.2.9/download"], + strip_prefix = "http-0.2.9", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.http-0.2.9.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__http-body-0.4.5", + sha256 = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/http-body/0.4.5/download"], + strip_prefix = "http-body-0.4.5", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.http-body-0.4.5.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__httparse-1.8.0", + sha256 = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/httparse/1.8.0/download"], + strip_prefix = "httparse-1.8.0", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.httparse-1.8.0.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__httpdate-1.0.2", + sha256 = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/httpdate/1.0.2/download"], + strip_prefix = "httpdate-1.0.2", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.httpdate-1.0.2.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__hyper-0.14.26", + sha256 = "ab302d72a6f11a3b910431ff93aae7e773078c769f0a3ef15fb9ec692ed147d4", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/hyper/0.14.26/download"], + strip_prefix = "hyper-0.14.26", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.hyper-0.14.26.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__hyper-timeout-0.4.1", + sha256 = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/hyper-timeout/0.4.1/download"], + strip_prefix = "hyper-timeout-0.4.1", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.hyper-timeout-0.4.1.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__indexmap-1.9.3", + sha256 = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/indexmap/1.9.3/download"], + strip_prefix = "indexmap-1.9.3", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.indexmap-1.9.3.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__instant-0.1.12", + sha256 = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/instant/0.1.12/download"], + strip_prefix = "instant-0.1.12", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.instant-0.1.12.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__io-lifetimes-1.0.11", + sha256 = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/io-lifetimes/1.0.11/download"], + strip_prefix = "io-lifetimes-1.0.11", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.io-lifetimes-1.0.11.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__itertools-0.10.5", + sha256 = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/itertools/0.10.5/download"], + strip_prefix = "itertools-0.10.5", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.itertools-0.10.5.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__itoa-1.0.6", + sha256 = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/itoa/1.0.6/download"], + strip_prefix = "itoa-1.0.6", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.itoa-1.0.6.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__lazy_static-1.4.0", + sha256 = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/lazy_static/1.4.0/download"], + strip_prefix = "lazy_static-1.4.0", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.lazy_static-1.4.0.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__libc-0.2.146", + sha256 = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/libc/0.2.146/download"], + strip_prefix = "libc-0.2.146", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.libc-0.2.146.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__linux-raw-sys-0.3.8", + sha256 = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/linux-raw-sys/0.3.8/download"], + strip_prefix = "linux-raw-sys-0.3.8", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.linux-raw-sys-0.3.8.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__lock_api-0.4.10", + sha256 = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/lock_api/0.4.10/download"], + strip_prefix = "lock_api-0.4.10", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.lock_api-0.4.10.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__log-0.4.19", + sha256 = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/log/0.4.19/download"], + strip_prefix = "log-0.4.19", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.log-0.4.19.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__matchit-0.7.0", + sha256 = "b87248edafb776e59e6ee64a79086f65890d3510f2c656c000bf2a7e8a0aea40", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/matchit/0.7.0/download"], + strip_prefix = "matchit-0.7.0", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.matchit-0.7.0.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__memchr-2.5.0", + sha256 = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/memchr/2.5.0/download"], + strip_prefix = "memchr-2.5.0", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.memchr-2.5.0.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__mime-0.3.17", + sha256 = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/mime/0.3.17/download"], + strip_prefix = "mime-0.3.17", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.mime-0.3.17.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__mio-0.8.8", + sha256 = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/mio/0.8.8/download"], + strip_prefix = "mio-0.8.8", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.mio-0.8.8.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__multimap-0.8.3", + sha256 = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/multimap/0.8.3/download"], + strip_prefix = "multimap-0.8.3", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.multimap-0.8.3.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__num_cpus-1.15.0", + sha256 = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/num_cpus/1.15.0/download"], + strip_prefix = "num_cpus-1.15.0", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.num_cpus-1.15.0.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__once_cell-1.18.0", + sha256 = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/once_cell/1.18.0/download"], + strip_prefix = "once_cell-1.18.0", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.once_cell-1.18.0.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__parking_lot-0.12.1", + sha256 = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/parking_lot/0.12.1/download"], + strip_prefix = "parking_lot-0.12.1", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.parking_lot-0.12.1.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__parking_lot_core-0.9.8", + sha256 = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/parking_lot_core/0.9.8/download"], + strip_prefix = "parking_lot_core-0.9.8", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.parking_lot_core-0.9.8.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__percent-encoding-2.3.0", + sha256 = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/percent-encoding/2.3.0/download"], + strip_prefix = "percent-encoding-2.3.0", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.percent-encoding-2.3.0.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__petgraph-0.6.3", + sha256 = "4dd7d28ee937e54fe3080c91faa1c3a46c06de6252988a7f4592ba2310ef22a4", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/petgraph/0.6.3/download"], + strip_prefix = "petgraph-0.6.3", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.petgraph-0.6.3.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__pin-project-1.1.0", + sha256 = "c95a7476719eab1e366eaf73d0260af3021184f18177925b07f54b30089ceead", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/pin-project/1.1.0/download"], + strip_prefix = "pin-project-1.1.0", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.pin-project-1.1.0.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__pin-project-internal-1.1.0", + sha256 = "39407670928234ebc5e6e580247dd567ad73a3578460c5990f9503df207e8f07", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/pin-project-internal/1.1.0/download"], + strip_prefix = "pin-project-internal-1.1.0", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.pin-project-internal-1.1.0.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__pin-project-lite-0.2.9", + sha256 = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/pin-project-lite/0.2.9/download"], + strip_prefix = "pin-project-lite-0.2.9", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.pin-project-lite-0.2.9.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__pin-utils-0.1.0", + sha256 = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/pin-utils/0.1.0/download"], + strip_prefix = "pin-utils-0.1.0", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.pin-utils-0.1.0.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__ppv-lite86-0.2.17", + sha256 = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/ppv-lite86/0.2.17/download"], + strip_prefix = "ppv-lite86-0.2.17", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.ppv-lite86-0.2.17.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__prettyplease-0.1.25", + sha256 = "6c8646e95016a7a6c4adea95bafa8a16baab64b583356217f2c85db4a39d9a86", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/prettyplease/0.1.25/download"], + strip_prefix = "prettyplease-0.1.25", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.prettyplease-0.1.25.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__proc-macro2-1.0.60", + sha256 = "dec2b086b7a862cf4de201096214fa870344cf922b2b30c167badb3af3195406", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/proc-macro2/1.0.60/download"], + strip_prefix = "proc-macro2-1.0.60", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.proc-macro2-1.0.60.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__prost-0.11.9", + sha256 = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/prost/0.11.9/download"], + strip_prefix = "prost-0.11.9", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.prost-0.11.9.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__prost-build-0.11.9", + sha256 = "119533552c9a7ffacc21e099c24a0ac8bb19c2a2a3f363de84cd9b844feab270", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/prost-build/0.11.9/download"], + strip_prefix = "prost-build-0.11.9", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.prost-build-0.11.9.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__prost-derive-0.11.9", + sha256 = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/prost-derive/0.11.9/download"], + strip_prefix = "prost-derive-0.11.9", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.prost-derive-0.11.9.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__prost-types-0.11.9", + sha256 = "213622a1460818959ac1181aaeb2dc9c7f63df720db7d788b3e24eacd1983e13", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/prost-types/0.11.9/download"], + strip_prefix = "prost-types-0.11.9", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.prost-types-0.11.9.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__protoc-gen-prost-0.2.2", + sha256 = "a81e3a9bb429fec47008b209896f0b9ab99fbcbc1c3733b385d43fbfd64dd2ca", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/protoc-gen-prost/0.2.2/download"], + strip_prefix = "protoc-gen-prost-0.2.2", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.protoc-gen-prost-0.2.2.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__protoc-gen-tonic-0.2.2", + sha256 = "725a07a704f9cf7a956b302c21d81b5516ed5ee6cfbbf827edb69beeaae6cc30", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/protoc-gen-tonic/0.2.2/download"], + strip_prefix = "protoc-gen-tonic-0.2.2", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.protoc-gen-tonic-0.2.2.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__quote-1.0.28", + sha256 = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/quote/1.0.28/download"], + strip_prefix = "quote-1.0.28", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.quote-1.0.28.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__rand-0.8.5", + sha256 = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/rand/0.8.5/download"], + strip_prefix = "rand-0.8.5", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.rand-0.8.5.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__rand_chacha-0.3.1", + sha256 = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/rand_chacha/0.3.1/download"], + strip_prefix = "rand_chacha-0.3.1", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.rand_chacha-0.3.1.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__rand_core-0.6.4", + sha256 = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/rand_core/0.6.4/download"], + strip_prefix = "rand_core-0.6.4", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.rand_core-0.6.4.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__redox_syscall-0.3.5", + sha256 = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/redox_syscall/0.3.5/download"], + strip_prefix = "redox_syscall-0.3.5", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.redox_syscall-0.3.5.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__regex-1.8.4", + sha256 = "d0ab3ca65655bb1e41f2a8c8cd662eb4fb035e67c3f78da1d61dffe89d07300f", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/regex/1.8.4/download"], + strip_prefix = "regex-1.8.4", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.regex-1.8.4.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__regex-syntax-0.7.2", + sha256 = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/regex-syntax/0.7.2/download"], + strip_prefix = "regex-syntax-0.7.2", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.regex-syntax-0.7.2.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__rustix-0.37.20", + sha256 = "b96e891d04aa506a6d1f318d2771bcb1c7dfda84e126660ace067c9b474bb2c0", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/rustix/0.37.20/download"], + strip_prefix = "rustix-0.37.20", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.rustix-0.37.20.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__rustversion-1.0.12", + sha256 = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/rustversion/1.0.12/download"], + strip_prefix = "rustversion-1.0.12", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.rustversion-1.0.12.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__scopeguard-1.1.0", + sha256 = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/scopeguard/1.1.0/download"], + strip_prefix = "scopeguard-1.1.0", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.scopeguard-1.1.0.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__serde-1.0.164", + sha256 = "9e8c8cf938e98f769bc164923b06dce91cea1751522f46f8466461af04c9027d", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/serde/1.0.164/download"], + strip_prefix = "serde-1.0.164", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.serde-1.0.164.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__signal-hook-registry-1.4.1", + sha256 = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/signal-hook-registry/1.4.1/download"], + strip_prefix = "signal-hook-registry-1.4.1", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.signal-hook-registry-1.4.1.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__slab-0.4.8", + sha256 = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/slab/0.4.8/download"], + strip_prefix = "slab-0.4.8", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.slab-0.4.8.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__smallvec-1.10.0", + sha256 = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/smallvec/1.10.0/download"], + strip_prefix = "smallvec-1.10.0", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.smallvec-1.10.0.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__socket2-0.4.9", + sha256 = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/socket2/0.4.9/download"], + strip_prefix = "socket2-0.4.9", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.socket2-0.4.9.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__syn-1.0.109", + sha256 = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/syn/1.0.109/download"], + strip_prefix = "syn-1.0.109", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.syn-1.0.109.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__syn-2.0.18", + sha256 = "32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/syn/2.0.18/download"], + strip_prefix = "syn-2.0.18", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.syn-2.0.18.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__sync_wrapper-0.1.2", + sha256 = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/sync_wrapper/0.1.2/download"], + strip_prefix = "sync_wrapper-0.1.2", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.sync_wrapper-0.1.2.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__tempfile-3.6.0", + sha256 = "31c0432476357e58790aaa47a8efb0c5138f137343f3b5f23bd36a27e3b0a6d6", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/tempfile/3.6.0/download"], + strip_prefix = "tempfile-3.6.0", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.tempfile-3.6.0.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__tokio-1.28.2", + sha256 = "94d7b1cfd2aa4011f2de74c2c4c63665e27a71006b0a192dcd2710272e73dfa2", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/tokio/1.28.2/download"], + strip_prefix = "tokio-1.28.2", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.tokio-1.28.2.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__tokio-io-timeout-1.2.0", + sha256 = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/tokio-io-timeout/1.2.0/download"], + strip_prefix = "tokio-io-timeout-1.2.0", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.tokio-io-timeout-1.2.0.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__tokio-macros-2.1.0", + sha256 = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/tokio-macros/2.1.0/download"], + strip_prefix = "tokio-macros-2.1.0", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.tokio-macros-2.1.0.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__tokio-stream-0.1.14", + sha256 = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/tokio-stream/0.1.14/download"], + strip_prefix = "tokio-stream-0.1.14", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.tokio-stream-0.1.14.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__tokio-util-0.7.8", + sha256 = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/tokio-util/0.7.8/download"], + strip_prefix = "tokio-util-0.7.8", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.tokio-util-0.7.8.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__tonic-0.9.2", + sha256 = "3082666a3a6433f7f511c7192923fa1fe07c69332d3c6a2e6bb040b569199d5a", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/tonic/0.9.2/download"], + strip_prefix = "tonic-0.9.2", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.tonic-0.9.2.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__tonic-build-0.8.4", + sha256 = "5bf5e9b9c0f7e0a7c027dcfaba7b2c60816c7049171f679d99ee2ff65d0de8c4", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/tonic-build/0.8.4/download"], + strip_prefix = "tonic-build-0.8.4", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.tonic-build-0.8.4.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__tower-0.4.13", + sha256 = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/tower/0.4.13/download"], + strip_prefix = "tower-0.4.13", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.tower-0.4.13.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__tower-layer-0.3.2", + sha256 = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/tower-layer/0.3.2/download"], + strip_prefix = "tower-layer-0.3.2", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.tower-layer-0.3.2.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__tower-service-0.3.2", + sha256 = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/tower-service/0.3.2/download"], + strip_prefix = "tower-service-0.3.2", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.tower-service-0.3.2.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__tracing-0.1.37", + sha256 = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/tracing/0.1.37/download"], + strip_prefix = "tracing-0.1.37", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.tracing-0.1.37.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__tracing-attributes-0.1.26", + sha256 = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/tracing-attributes/0.1.26/download"], + strip_prefix = "tracing-attributes-0.1.26", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.tracing-attributes-0.1.26.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__tracing-core-0.1.31", + sha256 = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/tracing-core/0.1.31/download"], + strip_prefix = "tracing-core-0.1.31", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.tracing-core-0.1.31.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__try-lock-0.2.4", + sha256 = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/try-lock/0.2.4/download"], + strip_prefix = "try-lock-0.2.4", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.try-lock-0.2.4.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__unicode-ident-1.0.9", + sha256 = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/unicode-ident/1.0.9/download"], + strip_prefix = "unicode-ident-1.0.9", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.unicode-ident-1.0.9.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__want-0.3.1", + sha256 = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/want/0.3.1/download"], + strip_prefix = "want-0.3.1", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.want-0.3.1.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__wasi-0.11.0-wasi-snapshot-preview1", + sha256 = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/wasi/0.11.0+wasi-snapshot-preview1/download"], + strip_prefix = "wasi-0.11.0+wasi-snapshot-preview1", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.wasi-0.11.0+wasi-snapshot-preview1.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__which-4.4.0", + sha256 = "2441c784c52b289a054b7201fc93253e288f094e2f4be9058343127c4226a269", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/which/4.4.0/download"], + strip_prefix = "which-4.4.0", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.which-4.4.0.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__winapi-0.3.9", + sha256 = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/winapi/0.3.9/download"], + strip_prefix = "winapi-0.3.9", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.winapi-0.3.9.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__winapi-i686-pc-windows-gnu-0.4.0", + sha256 = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/winapi-i686-pc-windows-gnu/0.4.0/download"], + strip_prefix = "winapi-i686-pc-windows-gnu-0.4.0", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.winapi-i686-pc-windows-gnu-0.4.0.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__winapi-x86_64-pc-windows-gnu-0.4.0", + sha256 = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/winapi-x86_64-pc-windows-gnu/0.4.0/download"], + strip_prefix = "winapi-x86_64-pc-windows-gnu-0.4.0", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.winapi-x86_64-pc-windows-gnu-0.4.0.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__windows-sys-0.48.0", + sha256 = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/windows-sys/0.48.0/download"], + strip_prefix = "windows-sys-0.48.0", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.windows-sys-0.48.0.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__windows-targets-0.48.0", + sha256 = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/windows-targets/0.48.0/download"], + strip_prefix = "windows-targets-0.48.0", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.windows-targets-0.48.0.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__windows_aarch64_gnullvm-0.48.0", + sha256 = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/windows_aarch64_gnullvm/0.48.0/download"], + strip_prefix = "windows_aarch64_gnullvm-0.48.0", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.windows_aarch64_gnullvm-0.48.0.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__windows_aarch64_msvc-0.48.0", + sha256 = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/windows_aarch64_msvc/0.48.0/download"], + strip_prefix = "windows_aarch64_msvc-0.48.0", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.windows_aarch64_msvc-0.48.0.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__windows_i686_gnu-0.48.0", + sha256 = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/windows_i686_gnu/0.48.0/download"], + strip_prefix = "windows_i686_gnu-0.48.0", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.windows_i686_gnu-0.48.0.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__windows_i686_msvc-0.48.0", + sha256 = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/windows_i686_msvc/0.48.0/download"], + strip_prefix = "windows_i686_msvc-0.48.0", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.windows_i686_msvc-0.48.0.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__windows_x86_64_gnu-0.48.0", + sha256 = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/windows_x86_64_gnu/0.48.0/download"], + strip_prefix = "windows_x86_64_gnu-0.48.0", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.windows_x86_64_gnu-0.48.0.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__windows_x86_64_gnullvm-0.48.0", + sha256 = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/windows_x86_64_gnullvm/0.48.0/download"], + strip_prefix = "windows_x86_64_gnullvm-0.48.0", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.windows_x86_64_gnullvm-0.48.0.bazel"), + ) + + maybe( + http_archive, + name = "rules_rust_prost__windows_x86_64_msvc-0.48.0", + sha256 = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a", + type = "tar.gz", + urls = ["https://crates.io/api/v1/crates/windows_x86_64_msvc/0.48.0/download"], + strip_prefix = "windows_x86_64_msvc-0.48.0", + build_file = Label("@rules_rust//proto/prost/private/3rdparty/crates:BUILD.windows_x86_64_msvc-0.48.0.bazel"), + ) diff --git a/proto/prost/private/BUILD.bazel b/proto/prost/private/BUILD.bazel new file mode 100644 index 0000000000..a4923cf35d --- /dev/null +++ b/proto/prost/private/BUILD.bazel @@ -0,0 +1,23 @@ +load("@bazel_skylib//:bzl_library.bzl", "bzl_library") +load("@rules_rust//rust:defs.bzl", "rust_binary") +load(":prost.bzl", "PROST_EXTENSION", "RUST_EDITION", "TONIC_EXTENSION") + +rust_binary( + name = "protoc_wrapper", + srcs = ["protoc_wrapper.rs"], + edition = RUST_EDITION, + rustc_env = { + "PROST_EXTENSION": PROST_EXTENSION, + "TONIC_EXTENSION": TONIC_EXTENSION, + }, + visibility = ["//visibility:public"], +) + +bzl_library( + name = "bzl_lib", + srcs = glob(["**/*.bzl"]), + visibility = ["//proto/prost:__pkg__"], + deps = [ + "//proto/prost/private/3rdparty:bzl_lib", + ], +) diff --git a/proto/prost/private/prost.bzl b/proto/prost/private/prost.bzl new file mode 100644 index 0000000000..2642e3cdf0 --- /dev/null +++ b/proto/prost/private/prost.bzl @@ -0,0 +1,442 @@ +"""Rules for building protos in Rust with Prost and Tonic.""" + +load("@rules_proto//proto:defs.bzl", "ProtoInfo") +load("//rust:defs.bzl", "rust_common") + +# buildifier: disable=bzl-visibility +load("//rust/private:providers.bzl", "DepVariantInfo") + +# buildifier: disable=bzl-visibility +load("//rust/private:rustc.bzl", "rustc_compile_action") +load(":providers.bzl", "ProstProtoInfo", "TonicProtoInfo") + +# This follows the exact same convention as the new upstream protobuf rules. +# https://github.com/protocolbuffers/protobuf/blob/v23.3/rust/aspects.bzl#L15 +# The interface here hasn't changed in quite a while and since there's now +# additional reliance on it there it seems unlikely that it will break and if +# it does there should be a clear migration example for Starlark code there. +proto_common = proto_common_do_not_use + +PROST_EXTENSION = ".rs" +TONIC_EXTENSION = ".tonic.rs" + +RUST_EDITION = "2021" + +def _compile_proto(ctx, crate_name, proto_info, deps, prost_toolchain, is_tonic, rustfmt_toolchain = None): + kind = "tonic" if is_tonic else "prost" + extension = TONIC_EXTENSION if is_tonic else PROST_EXTENSION + provider = TonicProtoInfo if is_tonic else ProstProtoInfo + + deps_info_file = ctx.actions.declare_file(ctx.label.name + ".{}_deps_info".format(kind)) + dep_package_infos = [dep[provider].package_info for dep in deps] + ctx.actions.write( + output = deps_info_file, + content = "\n".join([file.path for file in dep_package_infos]), + ) + + package_info_file = ctx.actions.declare_file(ctx.label.name + ".{}_package_info".format(kind)) + lib_rs = ctx.actions.declare_file("{}.lib{}".format(ctx.label.name, extension)) + + proto_compiler = prost_toolchain.proto_compiler[DefaultInfo].files_to_run + tools = depset([proto_compiler.executable]) + + additional_args = ctx.actions.args() + + # Prost process wrapper specific args + additional_args.add("--protoc={}".format(proto_compiler.executable.path)) + additional_args.add("--out_librs={}".format(lib_rs.path)) + additional_args.add("--package_info_output={}".format("{}={}".format(crate_name, package_info_file.path))) + additional_args.add("--deps_info={}".format(deps_info_file.path)) + additional_args.add("--prost_opt=compile_well_known_types") + additional_args.add_all(prost_toolchain.prost_opts, format_each = "--prost_opt=%s") + + if prost_toolchain.tonic_plugin: + tonic_plugin = prost_toolchain.tonic_plugin[DefaultInfo].files_to_run + additional_args.add(prost_toolchain.tonic_plugin_flag % tonic_plugin.executable.path) + additional_args.add("--tonic_opt=no_include") + additional_args.add_all(prost_toolchain.tonic_opts, format_each = "--tonic_opt=%s") + tools = depset([tonic_plugin.executable], transitive = [tools]) + + if rustfmt_toolchain: + additional_args.add("--rustfmt={}".format(rustfmt_toolchain.rustfmt.path)) + tools = depset(transitive = [tools, rustfmt_toolchain.all_files]) + + additional_inputs = depset([deps_info_file] + [dep[provider].package_info for dep in deps]) + + proto_common.compile( + actions = ctx.actions, + proto_info = proto_info, + additional_tools = tools.to_list(), + additional_inputs = additional_inputs, + additional_args = additional_args, + generated_files = [lib_rs, package_info_file], + proto_lang_toolchain_info = prost_toolchain.proto_lang_toolchain, + plugin_output = ctx.bin_dir.path, + ) + + return lib_rs, package_info_file + +def _get_crate_info(providers): + """Finds the CrateInfo provider in the list of providers.""" + for provider in providers: + if hasattr(provider, "name"): + return provider + fail("Couldn't find a CrateInfo in the list of providers") + +def _get_dep_info(providers): + """Finds the DepInfo provider in the list of providers.""" + for provider in providers: + if hasattr(provider, "direct_crates"): + return provider + fail("Couldn't find a DepInfo in the list of providers") + +def _get_cc_info(providers): + """Finds the CcInfo provider in the list of providers.""" + for provider in providers: + if hasattr(provider, "linking_context"): + return provider + fail("Couldn't find a CcInfo in the list of providers") + +def _compile_rust(ctx, attr, crate_name, src, deps, edition): + """Compiles a Rust source file. + + Args: + ctx (RuleContext): The rule context. + attr (Attrs): The current rule's attributes (`ctx.attr` for rules, `ctx.rule.attr` for aspects) + crate_name (str): The crate module name to use. + src (File): The crate root source file to be compiled. + deps (List of DepVariantInfo): A list of dependencies needed. + edition (str): The Rust edition to use. + + Returns: + A DepVariantInfo provider. + """ + toolchain = ctx.toolchains["@rules_rust//rust:toolchain_type"] + output_hash = repr(hash(src.path)) + + lib_name = "{prefix}{name}-{lib_hash}{extension}".format( + prefix = "lib", + name = crate_name, + lib_hash = output_hash, + extension = ".rlib", + ) + + rmeta_name = "{prefix}{name}-{lib_hash}{extension}".format( + prefix = "lib", + name = crate_name, + lib_hash = output_hash, + extension = ".rmeta", + ) + + lib = ctx.actions.declare_file(lib_name) + rmeta = ctx.actions.declare_file(rmeta_name) + + providers = rustc_compile_action( + ctx = ctx, + attr = attr, + toolchain = toolchain, + crate_info = rust_common.create_crate_info( + name = crate_name, + type = "rlib", + root = src, + srcs = depset([src]), + deps = depset(deps), + proc_macro_deps = depset([]), + aliases = {}, + output = lib, + metadata = rmeta, + edition = edition, + is_test = False, + rustc_env = {}, + compile_data = depset([]), + compile_data_targets = depset([]), + owner = ctx.label, + ), + output_hash = output_hash, + ) + + crate_info = _get_crate_info(providers) + dep_info = _get_dep_info(providers) + cc_info = _get_cc_info(providers) + + return DepVariantInfo( + crate_info = crate_info, + dep_info = dep_info, + cc_info = cc_info, + build_info = None, + ) + +def _rust_prost_aspect_impl(target, ctx): + proto_info_provider = TonicProtoInfo if ctx.attr._is_tonic else ProstProtoInfo + if proto_info_provider in target: + return [] + + runtime_deps = [] + + rustfmt_toolchain = ctx.toolchains["@rules_rust//rust/rustfmt:toolchain_type"] + prost_toolchain = ctx.toolchains["@rules_rust//proto/prost:toolchain_type"] + for prost_runtime in [prost_toolchain.prost_runtime, prost_toolchain.tonic_runtime]: + if not prost_runtime: + continue + if rust_common.crate_group_info in prost_runtime: + crate_group_info = prost_runtime[rust_common.crate_group_info] + runtime_deps.extend(crate_group_info.dep_variant_infos.to_list()) + else: + runtime_deps.append(DepVariantInfo( + crate_info = prost_runtime[rust_common.crate_info] if rust_common.crate_info in prost_runtime else None, + dep_info = prost_runtime[rust_common.dep_info] if rust_common.dep_info in prost_runtime else None, + cc_info = prost_runtime[CcInfo] if CcInfo in prost_runtime else None, + build_info = None, + )) + + proto_deps = getattr(ctx.rule.attr, "deps", []) + + direct_deps = [] + transitive_deps = [] + for proto_dep in proto_deps: + proto_info = proto_dep[proto_info_provider] + + direct_deps.append(proto_info.dep_variant_info) + transitive_deps.append(depset( + [proto_info.dep_variant_info], + transitive = [proto_info.transitive_dep_infos], + )) + + deps = runtime_deps + direct_deps + + crate_name = ctx.label.name.replace("-", "_").replace("/", "_") + + lib_rs, package_info_file = _compile_proto( + ctx = ctx, + crate_name = crate_name, + proto_info = target[ProtoInfo], + deps = proto_deps, + prost_toolchain = prost_toolchain, + is_tonic = ctx.attr._is_tonic, + rustfmt_toolchain = rustfmt_toolchain, + ) + + dep_variant_info = _compile_rust( + ctx = ctx, + attr = ctx.rule.attr, + crate_name = crate_name, + src = lib_rs, + deps = deps, + edition = RUST_EDITION, + ) + + return [ + proto_info_provider( + dep_variant_info = dep_variant_info, + transitive_dep_infos = depset(transitive = transitive_deps), + package_info = package_info_file, + ), + ] + +def _make_rust_prost_aspect(doc, is_tonic): + return aspect( + doc = doc, + implementation = _rust_prost_aspect_impl, + attr_aspects = ["deps"], + attrs = { + "_cc_toolchain": attr.label( + doc = ( + "In order to use find_cc_toolchain, your rule has to depend " + + "on C++ toolchain. See `@rules_cc//cc:find_cc_toolchain.bzl` " + + "docs for details." + ), + default = Label("@bazel_tools//tools/cpp:current_cc_toolchain"), + ), + "_collect_cc_coverage": attr.label( + default = Label("//util:collect_coverage"), + executable = True, + cfg = "exec", + ), + "_error_format": attr.label( + default = Label("//:error_format"), + ), + "_extra_exec_rustc_flag": attr.label( + default = Label("//:extra_exec_rustc_flag"), + ), + "_extra_exec_rustc_flags": attr.label( + default = Label("//:extra_exec_rustc_flags"), + ), + "_extra_rustc_flag": attr.label( + default = Label("//:extra_rustc_flag"), + ), + "_extra_rustc_flags": attr.label( + default = Label("//:extra_rustc_flags"), + ), + "_grep_includes": attr.label( + allow_single_file = True, + default = Label("@bazel_tools//tools/cpp:grep-includes"), + cfg = "exec", + ), + "_is_tonic": attr.bool( + doc = "Indicates whether or not Tonic behavior should be enabled.", + default = is_tonic, + ), + "_process_wrapper": attr.label( + doc = "A process wrapper for running rustc on all platforms.", + default = Label("//util/process_wrapper"), + executable = True, + allow_single_file = True, + cfg = "exec", + ), + }, + fragments = ["cpp"], + host_fragments = ["cpp"], + toolchains = [ + "@bazel_tools//tools/cpp:toolchain_type", + "@rules_rust//proto/prost:toolchain_type", + "@rules_rust//rust:toolchain_type", + "@rules_rust//rust/rustfmt:toolchain_type", + ], + incompatible_use_toolchain_transition = True, + ) + +_rust_prost_aspect = _make_rust_prost_aspect( + doc = "An aspect used to generate and compile proto files with Prost.", + is_tonic = False, +) + +_rust_tonic_aspect = _make_rust_prost_aspect( + doc = "An aspect used to generate and compile proto files with Prost and Tonic.", + is_tonic = True, +) + +def _rust_prost_library_impl(ctx): + proto_info_provider = TonicProtoInfo if ctx.attr._is_tonic else ProstProtoInfo + + proto_dep = ctx.attr.proto + rust_proto_info = proto_dep[proto_info_provider] + dep_variant_info = rust_proto_info.dep_variant_info + + return [ + DefaultInfo(files = depset([dep_variant_info.crate_info.output])), + rust_common.crate_group_info( + dep_variant_infos = depset( + [dep_variant_info], + transitive = [rust_proto_info.transitive_dep_infos], + ), + ), + ] + +def _make_rust_prost_library_rule(doc, is_tonic): + return rule( + doc = doc, + implementation = _rust_prost_library_impl, + attrs = { + "proto": attr.label( + doc = "A `proto_library` target for which to generate Rust gencode.", + providers = [ProtoInfo], + aspects = [_rust_tonic_aspect if is_tonic else _rust_prost_aspect], + mandatory = True, + ), + "_collect_cc_coverage": attr.label( + default = Label("@rules_rust//util:collect_coverage"), + executable = True, + cfg = "exec", + ), + "_is_tonic": attr.bool( + doc = "Indicates whether or not Tonic behavior should be enabled.", + default = is_tonic, + ), + }, + ) + +rust_tonic_library = _make_rust_prost_library_rule( + doc = "A rule for generating a Rust library using Prost and Tonic.", + is_tonic = True, +) + +rust_prost_library = _make_rust_prost_library_rule( + doc = "A rule for generating a Rust library using Prost.", + is_tonic = False, +) + +def _rust_prost_toolchain_impl(ctx): + is_tonic = ctx.attr.tonic_runtime != None + + proto_lang_toolchain = proto_common.ProtoLangToolchainInfo( + out_replacement_format_flag = "--tonic_out=%s" if is_tonic else "--prost_out=%s", + plugin_format_flag = ctx.attr.prost_plugin_flag, + plugin = ctx.attr.prost_plugin[DefaultInfo].files_to_run, + runtime = ctx.attr.prost_runtime, + provided_proto_sources = depset(), + proto_compiler = ctx.attr._prost_process_wrapper[DefaultInfo].files_to_run, + protoc_opts = ctx.fragments.proto.experimental_protoc_opts, + progress_message = "", + mnemonic = "ToncGenProto" if is_tonic else "ProstGenProto", + ) + + tonic_attrs = [ctx.attr.tonic_plugin_flag, ctx.attr.tonic_plugin, ctx.attr.tonic_runtime] + if any(tonic_attrs) and not all(tonic_attrs): + fail("When one tonic attribute is added, all must be added") + + return [platform_common.ToolchainInfo( + prost_opts = ctx.attr.prost_opts, + prost_plugin = ctx.attr.prost_plugin, + prost_plugin_flag = ctx.attr.prost_plugin_flag, + prost_runtime = ctx.attr.prost_runtime, + proto_compiler = ctx.attr.proto_compiler, + proto_lang_toolchain = proto_lang_toolchain, + protoc_opts = ctx.fragments.proto.experimental_protoc_opts, + tonic_opts = ctx.attr.tonic_opts, + tonic_plugin = ctx.attr.tonic_plugin, + tonic_plugin_flag = ctx.attr.tonic_plugin_flag, + tonic_runtime = ctx.attr.tonic_runtime, + )] + +rust_prost_toolchain = rule( + implementation = _rust_prost_toolchain_impl, + doc = "Rust Prost toolchain rule.", + fragments = ["proto"], + attrs = { + "prost_opts": attr.string_list( + doc = "Additional options to add to Prost.", + ), + "prost_plugin": attr.label( + doc = "Additional plugins to add to Prost.", + cfg = "exec", + executable = True, + mandatory = True, + ), + "prost_plugin_flag": attr.string( + doc = "Prost plugin flag format. (e.g. `--plugin=protoc-gen-prost=%s`)", + mandatory = True, + ), + "prost_runtime": attr.label( + doc = "The Prost runtime crates to use.", + providers = [[rust_common.crate_info], [rust_common.crate_group_info]], + mandatory = True, + ), + "proto_compiler": attr.label( + doc = "The protoc compiler to use.", + cfg = "exec", + executable = True, + mandatory = True, + ), + "tonic_opts": attr.string_list( + doc = "Additional options to add to Tonic.", + ), + "tonic_plugin": attr.label( + doc = "Additional plugins to add to Tonic.", + cfg = "exec", + executable = True, + ), + "tonic_plugin_flag": attr.string( + doc = "Tonic plugin flag format. (e.g. `--plugin=protoc-gen-tonic=%s`))", + ), + "tonic_runtime": attr.label( + doc = "The Tonic runtime crates to use.", + providers = [[rust_common.crate_info], [rust_common.crate_group_info]], + ), + "_prost_process_wrapper": attr.label( + doc = "The wrapper script for the Prost protoc plugin.", + cfg = "exec", + executable = True, + default = Label("//proto/prost/private:protoc_wrapper"), + ), + }, +) diff --git a/proto/prost/private/protoc_wrapper.rs b/proto/prost/private/protoc_wrapper.rs new file mode 100644 index 0000000000..280e91078c --- /dev/null +++ b/proto/prost/private/protoc_wrapper.rs @@ -0,0 +1,565 @@ +//! A process wrapper for running a Protobuf compiler configured for Prost or Tonic output in a Bazel rule. + +use std::collections::BTreeMap; +use std::collections::BTreeSet; +use std::env; +use std::fmt::Write; +use std::fs; +use std::path::Path; +use std::path::PathBuf; +use std::process; + +type ProtocResult = Result; + +fn from_error(e: T) -> String { + format!("IO error: {}", e.to_string()) +} + +/// Locate prost outputs in the protoc output directory. +fn find_generated_rust_files(out_dir: &Path) -> ProtocResult> { + let mut all_rs_files: BTreeSet = BTreeSet::new(); + for entry in fs::read_dir(out_dir).map_err(from_error)? { + let entry = entry.expect("Failed to read entry"); + let path = entry.path(); + if path.is_dir() { + for f in find_generated_rust_files(&path)? { + all_rs_files.insert(f); + } + } else { + if let Some(ext) = path.extension() { + if ext == "rs" { + all_rs_files.insert(path); + } + } else if let Some(name) = path.file_name() { + if name == "_" { + let rs_name = path.parent().expect("Failed to get parent").join("_.rs"); + fs::rename(&path, &rs_name).map_err(from_error)?; + all_rs_files.insert(rs_name); + } + } + } + } + + Ok(all_rs_files) +} + +/// Rust module definition. +#[derive(Debug, Default)] +struct Module { + /// The name of the module. + name: String, + + /// The contents of the module. + contents: String, + + /// The names of any other modules which are submodules of this module. + submodules: BTreeSet, +} + +/// Generate a lib.rs file with all prost/tonic outputs embeeded in modules which +/// mirror the proto packages. For the example proto file we would expect to see +/// the Rust output that follows it. +/// +/// ```proto +/// syntax = "proto3"; +/// package examples.prost.helloworld; +/// +/// message HelloRequest { +/// // Request message contains the name to be greeted +/// string name = 1; +/// } +// +/// message HelloReply { +/// // Reply contains the greeting message +/// string message = 1; +/// } +/// ``` +/// +/// This is expected to render out to something like the following. Note that +/// formatting is not applied so indentation may be missing in the actual output. +/// +/// ```ignore +/// pub mod examples { +/// pub mod prost { +/// pub mod helloworld { +/// // @generated +/// #[allow(clippy::derive_partial_eq_without_eq)] +/// #[derive(Clone, PartialEq, ::prost::Message)] +/// pub struct HelloRequest { +/// /// Request message contains the name to be greeted +/// #[prost(string, tag = "1")] +/// pub name: ::prost::alloc::string::String, +/// } +/// #[allow(clippy::derive_partial_eq_without_eq)] +/// #[derive(Clone, PartialEq, ::prost::Message)] +/// pub struct HelloReply { +/// /// Reply contains the greeting message +/// #[prost(string, tag = "1")] +/// pub message: ::prost::alloc::string::String, +/// } +/// // @protoc_insertion_point(module) +/// } +/// } +/// } +/// ``` +fn generate_lib_rs(prost_outputs: &BTreeSet, is_tonic: bool) -> ProtocResult { + let mut module_info = BTreeMap::new(); + + for path in prost_outputs.iter() { + let mut package = path + .file_stem() + .expect("Failed to get file stem") + .to_str() + .expect("Failed to convert to str") + .to_string(); + + if is_tonic { + package = package + .strip_suffix(".tonic") + .expect("Failed to strip suffix") + .to_string() + }; + + let module_name = package.to_lowercase().to_string(); + + if module_name.is_empty() { + continue; + } + + let mut name = module_name.clone(); + if module_name.contains('.') { + name = module_name + .rsplit_once('.') + .expect("Failed to split on '.'") + .1 + .to_string(); + } + + module_info.insert( + module_name.clone(), + Module { + name, + contents: fs::read_to_string(path).map_err(from_error)?, + submodules: BTreeSet::new(), + }, + ); + + let module_parts = module_name.split('.').collect::>(); + for parent_module_index in 0..module_parts.len() { + let child_module_index = parent_module_index + 1; + if child_module_index >= module_parts.len() { + break; + } + let full_parent_module_name = module_parts[0..parent_module_index + 1].join("."); + let parent_module_name = module_parts[parent_module_index]; + let child_module_name = module_parts[child_module_index]; + + module_info + .entry(full_parent_module_name.clone()) + .and_modify(|parent_module| { + parent_module + .submodules + .insert(child_module_name.to_string()); + }) + .or_insert(Module { + name: parent_module_name.to_string(), + contents: "".to_string(), + submodules: [child_module_name.to_string()].iter().cloned().collect(), + }); + } + } + + let mut content = "// @generated\n\n".to_string(); + write_module(&mut content, &module_info, "", 0)?; + Ok(content) +} + +fn write_module( + content: &mut String, + module_info: &BTreeMap, + module_name: &str, + depth: usize, +) -> ProtocResult<()> { + if module_name.is_empty() { + for submodule_name in module_info.keys() { + write_module(content, module_info, submodule_name, depth + 1)?; + } + return Ok(()); + } + let module = module_info.get(module_name).expect("Failed to get module"); + let indent = " ".repeat(depth); + let is_rust_module = module.name != "_"; + + if is_rust_module { + content + .write_str(&format!("{}pub mod {} {{\n", indent, module.name)) + .map_err(from_error)?; + } + + content.write_str(&module.contents).map_err(from_error)?; + + for submodule_name in module.submodules.iter() { + write_module( + content, + module_info, + [module_name, submodule_name].join(".").as_str(), + depth + 1, + )?; + } + + if is_rust_module { + content + .write_str(&format!("{}}}\n", indent)) + .map_err(from_error)?; + } + + Ok(()) +} + +/// Compute the `--extern_path` flags for a list of proto files. This is +/// expected to convert proto files into a list of +/// `.example.prost.helloworld=crate_name::example::prost::helloworld` +fn compute_proto_package_info( + proto_files: &BTreeSet, + crate_name: &str, + protoc: &Path, + includes: &BTreeSet, + proto_paths: &Vec, +) -> ProtocResult> { + let mut extern_paths = BTreeSet::new(); + for proto_file in proto_files.iter() { + let output = process::Command::new(&protoc) + .args(includes.iter().map(|include| format!("-I{}", include))) + .arg("--print_free_field_numbers") + .args( + proto_paths + .iter() + .map(|proto_path| format!("--proto_path={}", proto_path)), + ) + .arg(proto_file) + .stdout(process::Stdio::piped()) + .spawn() + .expect("Failed to spawn protoc") + .wait_with_output() + .expect("Faild to wait on protoc"); + + // check success + if !output.status.success() { + return Err(format!( + "Failed to run protoc: {}", + String::from_utf8_lossy(&output.stderr) + )); + } + + let stdout = std::str::from_utf8(&output.stdout).expect("Failed to parse stdout"); + for line in stdout.lines() { + let text = line.trim(); + if text.is_empty() { + continue; + } + + let (absolute, _) = text + .split_once(" ") + .ok_or_else(|| format!("Failed to split line: {}", text))?; + + let mut package = ""; + let mut symbol_name = absolute; + if let Some((package_, symbol_name_)) = absolute.rsplit_once(".") { + package = package_; + symbol_name = symbol_name_; + } + let symbol = format!("{}::{}", package.replace(".", "::"), symbol_name); + let extern_path = format!(".{}={}::{}", absolute, crate_name, symbol.trim_matches(':')); + if !extern_paths.insert(extern_path.clone()) { + panic!("Duplicate extern: {}", extern_path); + } + } + } + + Ok(extern_paths) +} + +/// The parsed command-line arguments. +struct Args { + /// The path to the protoc binary. + protoc: PathBuf, + + /// The path to the output directory. + out_dir: PathBuf, + + /// The name of the crate. + crate_name: String, + + /// The path to the package info file. + package_info_file: PathBuf, + + /// The proto files to compile. + proto_files: BTreeSet, + + /// The include directories. + includes: BTreeSet, + + /// The path to the generated lib.rs file. + out_librs: PathBuf, + + /// The proto include paths. + proto_paths: Vec, + + /// The path to the rustfmt binary. + rustfmt: Option, + + /// Whether to generate tonic code. + is_tonic: bool, + + /// Extra arguments to pass to protoc. + extra_args: Vec, +} + +impl Args { + /// Parse the command-line arguments. + fn parse() -> ProtocResult { + let mut protoc: Option = None; + let mut out_dir: Option = None; + let mut crate_name: Option = None; + let mut package_info_file: Option = None; + let mut proto_files: BTreeSet = BTreeSet::new(); + let mut includes: BTreeSet = BTreeSet::new(); + let mut out_librs: Option = None; + let mut rustfmt: Option = None; + let mut proto_paths = Vec::new(); + let mut is_tonic = false; + + let mut extra_args = Vec::new(); + + // Iterate over the given command line arguments parsing out arguments + // for the process runner and arguments for protoc and potentially spawn + // additional arguments needed by prost. + for arg in env::args().skip(1) { + if !arg.starts_with("-") { + proto_files.insert(PathBuf::from(arg)); + continue; + } + + if arg.starts_with("-I") { + includes.insert(arg[2..].to_string()); + continue; + } + + if !arg.contains("=") { + extra_args.push(arg); + continue; + } + + let part = arg + .split_once("=") + .ok_or_else(|| format!("Failed to parse argument `{arg}`",))?; + match part { + ("--protoc", value) => { + protoc = Some(PathBuf::from(value)); + } + ("--prost_out", value) => { + out_dir = Some(PathBuf::from(value)); + } + ("--tonic_out", value) => { + out_dir = Some(PathBuf::from(value)); + is_tonic = true; + } + ("--crate_name", value) => { + crate_name = Some(value.to_string()); + } + ("--package_info_output", value) => { + let (key, value) = value + .split_once("=") + .map(|(a, b)| (a.to_string(), PathBuf::from(b))) + .expect("Failed to parse package info output"); + crate_name = Some(key); + package_info_file = Some(value); + } + ("--deps_info", value) => { + for line in fs::read_to_string(value).map_err(from_error)?.lines() { + let path = PathBuf::from(line.trim()); + for flag in fs::read_to_string(path).map_err(from_error)?.lines() { + extra_args.push(format!("--prost_opt=extern_path={}", flag.trim())); + } + } + } + ("--out_librs", value) => { + out_librs = Some(PathBuf::from(value)); + } + ("--rustfmt", value) => { + rustfmt = Some(PathBuf::from(value)); + } + ("--proto_path", value) => { + proto_paths.push(value.to_string()); + } + (arg, value) => { + extra_args.push(format!("{}={}", arg, value)); + } + } + } + + if protoc.is_none() { + return Err( + "No `--protoc` value was found. Unable to parse path to proto compiler." + .to_string(), + ); + } + if out_dir.is_none() { + return Err( + "No `--prost_out` value was found. Unable to parse output directory.".to_string(), + ); + } + if crate_name.is_none() { + return Err( + "No `--package_info_output` value was found. Unable to parse target crate name." + .to_string(), + ); + } + if package_info_file.is_none() { + return Err("No `--package_info_output` value was found. Unable to parse package info output file.".to_string()); + } + if out_librs.is_none() { + return Err("No `--out_librs` value was found. Unable to parse the output location for all combined prost outputs.".to_string()); + } + + Ok(Args { + protoc: protoc.unwrap(), + out_dir: out_dir.unwrap(), + crate_name: crate_name.unwrap(), + package_info_file: package_info_file.unwrap(), + proto_files, + includes, + out_librs: out_librs.unwrap(), + rustfmt, + proto_paths, + is_tonic, + extra_args, + }) + } +} + +fn main() -> ProtocResult<()> { + let Args { + protoc, + out_dir, + crate_name, + package_info_file, + proto_files, + includes, + out_librs, + rustfmt, + proto_paths, + is_tonic, + extra_args, + } = Args::parse()?; + + let mut cmd = process::Command::new(&protoc); + cmd.arg(format!("--prost_out={}", out_dir.display())); + if is_tonic { + cmd.arg(format!("--tonic_out={}", out_dir.display())); + } + cmd.args(includes.iter().map(|include| format!("-I{}", include))); + cmd.args( + proto_paths + .iter() + .map(|proto_path| format!("--proto_path={}", proto_path)), + ); + cmd.args(extra_args); + cmd.args(&proto_files); + + let status = cmd.status().map_err(from_error)?; + if !status.success() { + return Err(format!( + "protoc failed with status: {}", + status.code().expect("failed to get exit code") + )); + } + + // Not all proto files will consistently produce `.rs` or `.tonic.rs` files. This is + // caused by the proto file being transpiled not having an RPC service or other protos + // defined (a natural and expected situation). To guarantee consistent outputs, all + // `.rs` files are either renamed to `.tonic.rs` if there is no `.tonic.rs` or prepended + // to the existing `.tonic.rs`. + if is_tonic { + let tonic_files: BTreeSet = find_generated_rust_files(&out_dir)?; + + for tonic_file in tonic_files.iter() { + if !tonic_file + .file_name() + .map(|os_name| { + os_name + .to_str() + .map(|name| name.ends_with(".tonic.rs")) + .unwrap_or(false) + }) + .unwrap_or(false) + { + let real_tonic_file = PathBuf::from(format!( + "{}.tonic.rs", + tonic_file + .to_str() + .expect("Failed to convert to str") + .strip_suffix(".rs") + .expect("Failed to strip suffix.") + )); + if real_tonic_file.exists() { + continue; + } + fs::rename(tonic_file, real_tonic_file).map_err(from_error)?; + } else { + let rs_file = PathBuf::from(format!( + "{}.rs", + tonic_file + .to_str() + .expect("Failed to convert to str") + .strip_suffix(".tonic.rs") + .expect("Failed to strip suffix.") + )); + + if rs_file.exists() { + let rs_content = fs::read_to_string(&rs_file).map_err(from_error)?; + let tonic_content = fs::read_to_string(tonic_file).map_err(from_error)?; + fs::write(tonic_file, format!("{}\n{}", rs_content, tonic_content)) + .map_err(from_error)?; + fs::remove_file(&rs_file).map_err(from_error)?; + } + } + } + } + + // Locate all prost-generated outputs. + let rust_files: BTreeSet = find_generated_rust_files(&out_dir)?; + if rust_files.is_empty() { + return Err("Failed to find any outputs".to_string()); + } + + let package_info: BTreeSet = + compute_proto_package_info(&proto_files, &crate_name, &protoc, &includes, &proto_paths)?; + + // Write outputs + fs::write(&out_librs, generate_lib_rs(&rust_files, is_tonic)?).map_err(from_error)?; + fs::write( + &package_info_file, + package_info.into_iter().collect::>().join("\n"), + ) + .map_err(from_error)?; + + // Finally run rustfmt on the output lib.rs file + if let Some(rustfmt) = rustfmt { + let fmt_status = process::Command::new(rustfmt) + .arg("--edition") + .arg("2021") + .arg("--quiet") + .arg(&out_librs) + .status() + .map_err(from_error)?; + if !fmt_status.success() { + Err(format!( + "rustfmt failed with exit code: {}", + fmt_status.code().expect("Failed to get exit code") + ))?; + } + } + + Ok(()) +} diff --git a/proto/prost/private/providers.bzl b/proto/prost/private/providers.bzl new file mode 100644 index 0000000000..3405060e84 --- /dev/null +++ b/proto/prost/private/providers.bzl @@ -0,0 +1,21 @@ +"""Prost and Tonic providers.""" + +ProstProtoInfo = provider( + doc = "Rust Prost provider info", + fields = { + "dep_variant_info": "DepVariantInfo: For the compiled Rust gencode (also covers its " + + "transitive dependencies)", + "package_info": "File: A newline delimited file of `--extern_path` values for protoc.", + "transitive_dep_infos": "depset[DepVariantInfo]: Transitive dependencies of the compiled crate.", + }, +) + +TonicProtoInfo = provider( + doc = "Rust Tonic provider info", + fields = { + "dep_variant_info": "DepVariantInfo for the compiled Rust gencode (also covers its " + + "transitive dependencies)", + "package_info": "File: A newline delimited file of `--extern_path` values for protoc.", + "transitive_dep_infos": "depset[DepVariantInfo]: Transitive dependencies of the compiled crate.", + }, +) diff --git a/proto/prost/private/tests/proto/BUILD.bazel b/proto/prost/private/tests/proto/BUILD.bazel new file mode 100644 index 0000000000..e69de29bb2 diff --git a/proto/prost/private/tests/proto/a/BUILD.bazel b/proto/prost/private/tests/proto/a/BUILD.bazel new file mode 100644 index 0000000000..67df1e1d51 --- /dev/null +++ b/proto/prost/private/tests/proto/a/BUILD.bazel @@ -0,0 +1,31 @@ +load("@rules_proto//proto:defs.bzl", "proto_library") +load("//proto/prost:defs.bzl", "rust_tonic_library") +load("//rust:defs.bzl", "rust_test") + +package(default_visibility = ["//proto/prost/private/tests:__subpackages__"]) + +proto_library( + name = "a_proto", + srcs = [ + "a.proto", + ], + deps = [ + "//proto/prost/private/tests/proto/a/b:b_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:timestamp_proto", + ], +) + +rust_tonic_library( + name = "a_rs_proto", + proto = ":a_proto", +) + +rust_test( + name = "a_test", + srcs = ["a_test.rs"], + edition = "2021", + deps = [ + ":a_rs_proto", + ], +) diff --git a/proto/prost/private/tests/proto/a/a.proto b/proto/prost/private/tests/proto/a/a.proto new file mode 100644 index 0000000000..507d3827cd --- /dev/null +++ b/proto/prost/private/tests/proto/a/a.proto @@ -0,0 +1,17 @@ +syntax = "proto3"; + +import "google/protobuf/timestamp.proto"; +import "google/protobuf/duration.proto"; +import "proto/prost/private/tests/proto/a/b/b.proto"; + +package a; + +message A { + string name = 1; + + a.b.B b = 2; + + google.protobuf.Timestamp timestamp = 3; + + google.protobuf.Duration duration = 4; +} diff --git a/proto/prost/private/tests/proto/a/a_test.rs b/proto/prost/private/tests/proto/a/a_test.rs new file mode 100644 index 0000000000..e500a31517 --- /dev/null +++ b/proto/prost/private/tests/proto/a/a_test.rs @@ -0,0 +1,39 @@ +use a_proto::a::A; +use b_proto::a::b::B; +use c_proto::a::b::c::C; +use duration_proto::google::protobuf::Duration; +use timestamp_proto::google::protobuf::Timestamp; + +#[test] +fn test_b() { + let duration = Duration { + seconds: 1, + nanos: 2, + }; + + let a = A { + name: "a".to_string(), + b: Some(B { + name: "b".to_string(), + c: Some(C { + name: "c".to_string(), + duration: Some(duration.clone()), + ..Default::default() + }), + ..Default::default() + }), + timestamp: Some(Timestamp { + seconds: 1, + nanos: 2, + }), + duration: Some(duration), + }; + + let b_ref = a.b.as_ref().unwrap(); + let c_ref = b_ref.c.as_ref().unwrap(); + + assert_eq!(a.name, "a"); + assert_eq!(b_ref.name, "b"); + assert_eq!(c_ref.name, "c"); + assert_eq!(a.duration, c_ref.duration); +} diff --git a/proto/prost/private/tests/proto/a/b/BUILD.bazel b/proto/prost/private/tests/proto/a/b/BUILD.bazel new file mode 100644 index 0000000000..1fcf31bb9b --- /dev/null +++ b/proto/prost/private/tests/proto/a/b/BUILD.bazel @@ -0,0 +1,30 @@ +load("@rules_proto//proto:defs.bzl", "proto_library") +load("//proto/prost:defs.bzl", "rust_tonic_library") +load("//rust:defs.bzl", "rust_test") + +package(default_visibility = ["//proto/prost/private/tests:__subpackages__"]) + +proto_library( + name = "b_proto", + srcs = [ + "b.proto", + ], + deps = [ + "//proto/prost/private/tests/proto/a/b/c:c_proto", + "@com_google_protobuf//:empty_proto", + ], +) + +rust_tonic_library( + name = "b_rs_proto", + proto = ":b_proto", +) + +rust_test( + name = "b_test", + srcs = ["b_test.rs"], + edition = "2021", + deps = [ + ":b_rs_proto", + ], +) diff --git a/proto/prost/private/tests/proto/a/b/b.proto b/proto/prost/private/tests/proto/a/b/b.proto new file mode 100644 index 0000000000..dd299f3730 --- /dev/null +++ b/proto/prost/private/tests/proto/a/b/b.proto @@ -0,0 +1,14 @@ +syntax = "proto3"; + +import "google/protobuf/empty.proto"; +import "a/b/c/c.proto"; + +package a.b; + +message B { + string name = 1; + + google.protobuf.Empty empty = 2; + + a.b.c.C c = 3; +} diff --git a/proto/prost/private/tests/proto/a/b/b_test.rs b/proto/prost/private/tests/proto/a/b/b_test.rs new file mode 100644 index 0000000000..fd96915c03 --- /dev/null +++ b/proto/prost/private/tests/proto/a/b/b_test.rs @@ -0,0 +1,17 @@ +use b_proto::a::b::B; +use c_proto::a::b::c::C; + +#[test] +fn test_b() { + let b = B { + name: "b".to_string(), + c: Some(C { + name: "c".to_string(), + ..Default::default() + }), + ..Default::default() + }; + + assert_eq!(b.name, "b"); + assert_eq!(b.c.unwrap().name, "c"); +} diff --git a/proto/prost/private/tests/proto/a/b/c/BUILD.bazel b/proto/prost/private/tests/proto/a/b/c/BUILD.bazel new file mode 100644 index 0000000000..29b8e3ae1e --- /dev/null +++ b/proto/prost/private/tests/proto/a/b/c/BUILD.bazel @@ -0,0 +1,31 @@ +load("@rules_proto//proto:defs.bzl", "proto_library") +load("//proto/prost:defs.bzl", "rust_prost_library") +load("//rust:defs.bzl", "rust_test") + +package(default_visibility = ["//proto/prost/private/tests:__subpackages__"]) + +proto_library( + name = "c_proto", + srcs = [ + "c.proto", + ], + strip_import_prefix = "/proto/prost/private/tests/proto", + deps = [ + "@com_google_protobuf//:any_proto", + "@com_google_protobuf//:duration_proto", + ], +) + +rust_prost_library( + name = "c_rs_proto", + proto = ":c_proto", +) + +rust_test( + name = "c_test", + srcs = ["c_test.rs"], + edition = "2021", + deps = [ + ":c_rs_proto", + ], +) diff --git a/proto/prost/private/tests/proto/a/b/c/c.proto b/proto/prost/private/tests/proto/a/b/c/c.proto new file mode 100644 index 0000000000..ea0794198d --- /dev/null +++ b/proto/prost/private/tests/proto/a/b/c/c.proto @@ -0,0 +1,14 @@ +syntax = "proto3"; + +import "google/protobuf/any.proto"; +import "google/protobuf/duration.proto"; + +package a.b.c; + +message C { + string name = 1; + + google.protobuf.Any any = 3; + + google.protobuf.Duration duration = 4; +} diff --git a/proto/prost/private/tests/proto/a/b/c/c_test.rs b/proto/prost/private/tests/proto/a/b/c/c_test.rs new file mode 100644 index 0000000000..cad7c3ae36 --- /dev/null +++ b/proto/prost/private/tests/proto/a/b/c/c_test.rs @@ -0,0 +1,18 @@ +use any_proto::google::protobuf::Any; +use c_proto::a::b::c::C; +use duration_proto::google::protobuf::Duration; + +#[test] +fn test_c() { + let c = C { + name: "c".to_string(), + any: Some(Any::default()), + duration: Some(Duration { + seconds: 1, + nanos: 0, + }), + }; + + assert_eq!(c.name, "c"); + assert_eq!(c.duration.unwrap().seconds, 1); +} diff --git a/proto/prost/private/tests/proto/packages/BUILD.bazel b/proto/prost/private/tests/proto/packages/BUILD.bazel new file mode 100644 index 0000000000..526d2077c3 --- /dev/null +++ b/proto/prost/private/tests/proto/packages/BUILD.bazel @@ -0,0 +1,65 @@ +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@rules_rust//rust:defs.bzl", "rust_test") +load("//proto/prost:defs.bzl", "rust_tonic_library") + +package(default_visibility = ["//proto/prost/private/tests:__subpackages__"]) + +proto_library( + name = "pkg_empty_proto", + srcs = [ + "pkg.empty.proto", + ], +) + +rust_tonic_library( + name = "pkg_empty_rs_proto", + proto = ":pkg_empty_proto", +) + +proto_library( + name = "pkg_proto", + srcs = [ + "pkg.proto", + ], +) + +rust_tonic_library( + name = "pkg_rs_proto", + proto = ":pkg_proto", +) + +proto_library( + name = "pkg_a_proto", + srcs = [ + "pkg.a.proto", + ], +) + +rust_tonic_library( + name = "pkg_a_rs_proto", + proto = ":pkg_a_proto", +) + +proto_library( + name = "pkg_a_b_proto", + srcs = [ + "pkg.a.b.proto", + ], +) + +rust_tonic_library( + name = "pkg_a_b_rs_proto", + proto = ":pkg_a_b_proto", +) + +rust_test( + name = "package_test", + srcs = ["package_test.rs"], + edition = "2021", + deps = [ + ":pkg_a_b_rs_proto", + ":pkg_a_rs_proto", + ":pkg_empty_rs_proto", + ":pkg_rs_proto", + ], +) diff --git a/proto/prost/private/tests/proto/packages/package_test.rs b/proto/prost/private/tests/proto/packages/package_test.rs new file mode 100644 index 0000000000..a56d0f3ade --- /dev/null +++ b/proto/prost/private/tests/proto/packages/package_test.rs @@ -0,0 +1,25 @@ +use pkg_a_b_proto::pkg::a::b::Message as PkgABMessage; +use pkg_a_proto::pkg::a::Message as PkgAMessage; +use pkg_empty_proto::Message as PkgEmptyMessage; +use pkg_proto::pkg::Message as PkgMessage; + +#[test] +fn test_packages() { + let pkg = PkgMessage { + name: "pkg".to_string(), + }; + let pkg_a = PkgAMessage { + name: "pkg_a".to_string(), + }; + let pkg_a_b = PkgABMessage { + name: "pkg_a_b".to_string(), + }; + let pkg_empty = PkgEmptyMessage { + name: "pkg_empty".to_string(), + }; + + assert_eq!(pkg.name, "pkg"); + assert_eq!(pkg_a.name, "pkg_a"); + assert_eq!(pkg_a_b.name, "pkg_a_b"); + assert_eq!(pkg_empty.name, "pkg_empty"); +} diff --git a/proto/prost/private/tests/proto/packages/pkg.a.b.proto b/proto/prost/private/tests/proto/packages/pkg.a.b.proto new file mode 100644 index 0000000000..547518821a --- /dev/null +++ b/proto/prost/private/tests/proto/packages/pkg.a.b.proto @@ -0,0 +1,6 @@ +syntax = "proto3"; +package pkg.a.b; + +message Message { + string name = 1; +} diff --git a/proto/prost/private/tests/proto/packages/pkg.a.proto b/proto/prost/private/tests/proto/packages/pkg.a.proto new file mode 100644 index 0000000000..7859f4d314 --- /dev/null +++ b/proto/prost/private/tests/proto/packages/pkg.a.proto @@ -0,0 +1,6 @@ +syntax = "proto3"; +package pkg.a; + +message Message { + string name = 1; +} diff --git a/proto/prost/private/tests/proto/packages/pkg.empty.proto b/proto/prost/private/tests/proto/packages/pkg.empty.proto new file mode 100644 index 0000000000..afe0d14792 --- /dev/null +++ b/proto/prost/private/tests/proto/packages/pkg.empty.proto @@ -0,0 +1,5 @@ +syntax = "proto3"; + +message Message { + string name = 1; +} diff --git a/proto/prost/private/tests/proto/packages/pkg.proto b/proto/prost/private/tests/proto/packages/pkg.proto new file mode 100644 index 0000000000..451ce1086b --- /dev/null +++ b/proto/prost/private/tests/proto/packages/pkg.proto @@ -0,0 +1,6 @@ +syntax = "proto3"; +package pkg; + +message Message { + string name = 1; +} diff --git a/proto/prost/private/tests/proto/services/BUILD.bazel b/proto/prost/private/tests/proto/services/BUILD.bazel new file mode 100644 index 0000000000..e69de29bb2 diff --git a/proto/prost/private/tests/proto/services/echo/BUILD.bazel b/proto/prost/private/tests/proto/services/echo/BUILD.bazel new file mode 100644 index 0000000000..9a1d3d106d --- /dev/null +++ b/proto/prost/private/tests/proto/services/echo/BUILD.bazel @@ -0,0 +1,45 @@ +load("@rules_proto//proto:defs.bzl", "proto_library") +load("//proto/prost:defs.bzl", "rust_tonic_library") +load("//rust:defs.bzl", "rust_binary") + +package(default_visibility = ["//proto/prost/private/tests:__subpackages__"]) + +proto_library( + name = "echo_proto", + srcs = [ + "echo.proto", + ], +) + +rust_tonic_library( + name = "echo_rs_proto", + proto = ":echo_proto", +) + +rust_binary( + name = "client", + srcs = ["client.rs"], + edition = "2021", + deps = [ + ":echo_rs_proto", + "//proto/prost/private/3rdparty/crates:h2", + "//proto/prost/private/3rdparty/crates:prost", + "//proto/prost/private/3rdparty/crates:tokio", + "//proto/prost/private/3rdparty/crates:tokio-stream", + "//proto/prost/private/3rdparty/crates:tonic", + ], +) + +rust_binary( + name = "server", + srcs = ["server.rs"], + edition = "2021", + deps = [ + ":echo_rs_proto", + "//proto/prost/private/3rdparty/crates:h2", + "//proto/prost/private/3rdparty/crates:prost", + "//proto/prost/private/3rdparty/crates:tokio", + "//proto/prost/private/3rdparty/crates:tokio-stream", + "//proto/prost/private/3rdparty/crates:tonic", + ], +) diff --git a/proto/prost/private/tests/proto/services/echo/client.rs b/proto/prost/private/tests/proto/services/echo/client.rs new file mode 100644 index 0000000000..72637487ad --- /dev/null +++ b/proto/prost/private/tests/proto/services/echo/client.rs @@ -0,0 +1,81 @@ +use std::time::Duration; +use tokio_stream::{Stream, StreamExt}; +use tonic::transport::Channel; + +use echo_proto::echo::{echo_client::EchoClient, EchoRequest}; + +fn echo_requests_iter() -> impl Stream { + tokio_stream::iter(1..usize::MAX).map(|i| EchoRequest { + message: format!("msg {:02}", i), + }) +} + +async fn streaming_echo(client: &mut EchoClient, num: usize) { + let stream = client + .server_streaming_echo(EchoRequest { + message: "foo".into(), + }) + .await + .unwrap() + .into_inner(); + + // stream is infinite - take just 5 elements and then disconnect + let mut stream = stream.take(num); + while let Some(item) = stream.next().await { + println!("\treceived: {}", item.unwrap().message); + } + // stream is droped here and the disconnect info is send to server +} + +async fn bidirectional_streaming_echo(client: &mut EchoClient, num: usize) { + let in_stream = echo_requests_iter().take(num); + + let response = client + .bidirectional_streaming_echo(in_stream) + .await + .unwrap(); + + let mut resp_stream = response.into_inner(); + + while let Some(received) = resp_stream.next().await { + let received = received.unwrap(); + println!("\treceived message: `{}`", received.message); + } +} + +async fn bidirectional_streaming_echo_throttle(client: &mut EchoClient, dur: Duration) { + let in_stream = echo_requests_iter().throttle(dur); + + let response = client + .bidirectional_streaming_echo(in_stream) + .await + .unwrap(); + + let mut resp_stream = response.into_inner(); + + while let Some(received) = resp_stream.next().await { + let received = received.unwrap(); + println!("\treceived message: `{}`", received.message); + } +} + +#[tokio::main] +async fn main() -> Result<(), Box> { + let mut client = EchoClient::connect("http://[::1]:50051").await.unwrap(); + + println!("Streaming echo:"); + streaming_echo(&mut client, 5).await; + tokio::time::sleep(Duration::from_secs(1)).await; //do not mess server println functions + + // Echo stream that sends 17 requests then graceful end that connection + println!("\r\nBidirectional stream echo:"); + bidirectional_streaming_echo(&mut client, 17).await; + + // Echo stream that sends up to `usize::MAX` requests. One request each 2s. + // Exiting client with CTRL+C demonstrate how to distinguish broken pipe from + // graceful client disconnection (above example) on the server side. + println!("\r\nBidirectional stream echo (kill client with CTLR+C):"); + bidirectional_streaming_echo_throttle(&mut client, Duration::from_secs(2)).await; + + Ok(()) +} diff --git a/proto/prost/private/tests/proto/services/echo/echo.proto b/proto/prost/private/tests/proto/services/echo/echo.proto new file mode 100644 index 0000000000..4093b3c3fc --- /dev/null +++ b/proto/prost/private/tests/proto/services/echo/echo.proto @@ -0,0 +1,29 @@ +syntax = "proto3"; + +package echo; + +// EchoRequest is the request for echo. +message EchoRequest { + string message = 1; +} + +// EchoResponse is the response for echo. +message EchoResponse { + string message = 1; +} + +// Echo is the echo service. +service Echo { + // UnaryEcho is unary echo. + rpc UnaryEcho(EchoRequest) returns (EchoResponse) {} + + // ServerStreamingEcho is server side streaming. + rpc ServerStreamingEcho(EchoRequest) returns (stream EchoResponse) {} + + // ClientStreamingEcho is client side streaming. + rpc ClientStreamingEcho(stream EchoRequest) returns (EchoResponse) {} + + // BidirectionalStreamingEcho is bidi streaming. + rpc BidirectionalStreamingEcho(stream EchoRequest) + returns (stream EchoResponse) {} +} diff --git a/proto/prost/private/tests/proto/services/echo/server.rs b/proto/prost/private/tests/proto/services/echo/server.rs new file mode 100644 index 0000000000..541117dac8 --- /dev/null +++ b/proto/prost/private/tests/proto/services/echo/server.rs @@ -0,0 +1,150 @@ +use std::{error::Error, io::ErrorKind, net::ToSocketAddrs, pin::Pin, time::Duration}; +use tokio::sync::mpsc; +use tokio_stream::{wrappers::ReceiverStream, Stream, StreamExt}; +use tonic::{transport::Server, Request, Response, Status, Streaming}; + +use echo_proto::echo::{echo_server, EchoRequest, EchoResponse}; + +type EchoResult = Result, Status>; +type ResponseStream = Pin> + Send>>; + +fn match_for_io_error(err_status: &Status) -> Option<&std::io::Error> { + let mut err: &(dyn Error + 'static) = err_status; + + loop { + if let Some(io_err) = err.downcast_ref::() { + return Some(io_err); + } + + // h2::Error do not expose std::io::Error with `source()` + // https://github.com/hyperium/h2/pull/462 + if let Some(h2_err) = err.downcast_ref::() { + if let Some(io_err) = h2_err.get_io() { + return Some(io_err); + } + } + + err = match err.source() { + Some(err) => err, + None => return None, + }; + } +} + +#[derive(Debug)] +pub struct EchoServer {} + +#[tonic::async_trait] +impl echo_server::Echo for EchoServer { + async fn unary_echo(&self, _: Request) -> EchoResult { + Err(Status::unimplemented("not implemented")) + } + + type ServerStreamingEchoStream = ResponseStream; + + async fn server_streaming_echo( + &self, + req: Request, + ) -> EchoResult { + println!("EchoServer::server_streaming_echo"); + println!("\tclient connected from: {:?}", req.remote_addr()); + + // creating infinite stream with requested message + let repeat = std::iter::repeat(EchoResponse { + message: req.into_inner().message, + }); + let mut stream = Box::pin(tokio_stream::iter(repeat).throttle(Duration::from_millis(200))); + + // spawn and channel are required if you want handle "disconnect" functionality + // the `out_stream` will not be polled after client disconnect + let (tx, rx) = mpsc::channel(128); + tokio::spawn(async move { + while let Some(item) = stream.next().await { + match tx.send(Result::<_, Status>::Ok(item)).await { + Ok(_) => { + // item (server response) was queued to be send to client + } + Err(_item) => { + // output_stream was build from rx and both are dropped + break; + } + } + } + println!("\tclient disconnected"); + }); + + let output_stream = ReceiverStream::new(rx); + Ok(Response::new( + Box::pin(output_stream) as Self::ServerStreamingEchoStream + )) + } + + async fn client_streaming_echo( + &self, + _: Request>, + ) -> EchoResult { + Err(Status::unimplemented("not implemented")) + } + + type BidirectionalStreamingEchoStream = ResponseStream; + + async fn bidirectional_streaming_echo( + &self, + req: Request>, + ) -> EchoResult { + println!("EchoServer::bidirectional_streaming_echo"); + + let mut in_stream = req.into_inner(); + let (tx, rx) = mpsc::channel(128); + + // this spawn here is required if you want to handle connection error. + // If we just map `in_stream` and write it back as `out_stream` the `out_stream` + // will be drooped when connection error occurs and error will never be propagated + // to mapped version of `in_stream`. + tokio::spawn(async move { + while let Some(result) = in_stream.next().await { + match result { + Ok(v) => tx + .send(Ok(EchoResponse { message: v.message })) + .await + .expect("working rx"), + Err(err) => { + if let Some(io_err) = match_for_io_error(&err) { + if io_err.kind() == ErrorKind::BrokenPipe { + // here you can handle special case when client + // disconnected in unexpected way + eprintln!("\tclient disconnected: broken pipe"); + break; + } + } + + match tx.send(Err(err)).await { + Ok(_) => (), + Err(_err) => break, // response was droped + } + } + } + } + println!("\tstream ended"); + }); + + // echo just write the same data that was received + let out_stream = ReceiverStream::new(rx); + + Ok(Response::new( + Box::pin(out_stream) as Self::BidirectionalStreamingEchoStream + )) + } +} + +#[tokio::main] +async fn main() -> Result<(), Box> { + let server = EchoServer {}; + Server::builder() + .add_service(echo_server::EchoServer::new(server)) + .serve("[::1]:50051".to_socket_addrs().unwrap().next().unwrap()) + .await + .unwrap(); + + Ok(()) +} diff --git a/proto/prost/private/tests/proto/services/helloworld/BUILD.bazel b/proto/prost/private/tests/proto/services/helloworld/BUILD.bazel new file mode 100644 index 0000000000..56b4d774b4 --- /dev/null +++ b/proto/prost/private/tests/proto/services/helloworld/BUILD.bazel @@ -0,0 +1,41 @@ +load("@rules_proto//proto:defs.bzl", "proto_library") +load("//proto/prost:defs.bzl", "rust_tonic_library") +load("//rust:defs.bzl", "rust_binary") + +package(default_visibility = ["//proto/prost/private/tests:__subpackages__"]) + +proto_library( + name = "helloworld_proto", + srcs = [ + "helloworld.proto", + ], +) + +rust_tonic_library( + name = "helloworld_rs_proto", + proto = ":helloworld_proto", +) + +rust_binary( + name = "client", + srcs = ["client.rs"], + edition = "2021", + deps = [ + ":helloworld_rs_proto", + "//proto/prost/private/3rdparty/crates:prost", + "//proto/prost/private/3rdparty/crates:tokio", + "//proto/prost/private/3rdparty/crates:tonic", + ], +) + +rust_binary( + name = "server", + srcs = ["server.rs"], + edition = "2021", + deps = [ + ":helloworld_rs_proto", + "//proto/prost/private/3rdparty/crates:prost", + "//proto/prost/private/3rdparty/crates:tokio", + "//proto/prost/private/3rdparty/crates:tonic", + ], +) diff --git a/proto/prost/private/tests/proto/services/helloworld/client.rs b/proto/prost/private/tests/proto/services/helloworld/client.rs new file mode 100644 index 0000000000..0f51cf061e --- /dev/null +++ b/proto/prost/private/tests/proto/services/helloworld/client.rs @@ -0,0 +1,17 @@ +use helloworld_proto::helloworld::greeter_client::GreeterClient; +use helloworld_proto::helloworld::HelloRequest; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let mut client = GreeterClient::connect("http://[::1]:50051").await?; + + let request = tonic::Request::new(HelloRequest { + name: "Tonic".into(), + }); + + let response = client.say_hello(request).await?; + + println!("RESPONSE={:?}", response); + + Ok(()) +} diff --git a/proto/prost/private/tests/proto/services/helloworld/helloworld.proto b/proto/prost/private/tests/proto/services/helloworld/helloworld.proto new file mode 100644 index 0000000000..e8e3ff5a41 --- /dev/null +++ b/proto/prost/private/tests/proto/services/helloworld/helloworld.proto @@ -0,0 +1,19 @@ +syntax = "proto3"; + +package helloworld; + +// The greeting service definition. +service Greeter { + // Sends a greeting + rpc SayHello (HelloRequest) returns (HelloReply) {} +} + +// The request message containing the user's name. +message HelloRequest { + string name = 1; +} + +// The response message containing the greetings. +message HelloReply { + string message = 1; +} diff --git a/proto/prost/private/tests/proto/services/helloworld/server.rs b/proto/prost/private/tests/proto/services/helloworld/server.rs new file mode 100644 index 0000000000..8d4abbd364 --- /dev/null +++ b/proto/prost/private/tests/proto/services/helloworld/server.rs @@ -0,0 +1,37 @@ +use tonic::{transport::Server, Request, Response, Status}; + +use helloworld_proto::helloworld::greeter_server::{Greeter, GreeterServer}; +use helloworld_proto::helloworld::{HelloReply, HelloRequest}; + +#[derive(Default)] +pub struct MyGreeter {} + +#[tonic::async_trait] +impl Greeter for MyGreeter { + async fn say_hello( + &self, + request: Request, + ) -> Result, Status> { + println!("Got a request from {:?}", request.remote_addr()); + + let reply = HelloReply { + message: format!("Hello {}!", request.into_inner().name), + }; + Ok(Response::new(reply)) + } +} + +#[tokio::main] +async fn main() -> Result<(), Box> { + let addr = "[::1]:50051".parse().unwrap(); + let greeter = MyGreeter::default(); + + println!("GreeterServer listening on {}", addr); + + Server::builder() + .add_service(GreeterServer::new(greeter)) + .serve(addr) + .await?; + + Ok(()) +} diff --git a/proto/prost/repositories.bzl b/proto/prost/repositories.bzl new file mode 100644 index 0000000000..2b4036d087 --- /dev/null +++ b/proto/prost/repositories.bzl @@ -0,0 +1,16 @@ +"""Dependencies for Rust Prost rules""" + +load("//proto/prost/private/3rdparty/crates:crates.bzl", "crate_repositories") + +def rust_prost_dependencies(): + crate_repositories() + +# buildifier: disable=unnamed-macro +def rust_prost_register_toolchains(register_toolchains = True): + """_summary_ + + Args: + register_toolchains (bool, optional): _description_. Defaults to True. + """ + if register_toolchains: + native.register_toolchains(str(Label("//proto/prost:default_prost_toolchain"))) diff --git a/proto/repositories.bzl b/proto/repositories.bzl index 4f7e63b552..42137ea166 100644 --- a/proto/repositories.bzl +++ b/proto/repositories.bzl @@ -17,16 +17,9 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") load("//proto/3rdparty/crates:defs.bzl", "crate_repositories") +load("//proto/prost:repositories.bzl", "rust_prost_dependencies", "rust_prost_register_toolchains") -# buildifier: disable=unnamed-macro -def rust_proto_repositories(register_default_toolchain = True): - """Declare dependencies needed for proto compilation. - - Args: - register_default_toolchain (bool, optional): If True, the default [rust_proto_toolchain](#rust_proto_toolchain) - (`@rules_rust//proto:default-proto-toolchain`) is registered. This toolchain requires a set of dependencies - that were generated using [crate_universe](https://github.com/bazelbuild/rules_rust/tree/main/crate_universe). These will also be loaded. - """ +def rust_proto_dependencies(): maybe( http_archive, name = "rules_proto", @@ -55,6 +48,26 @@ def rust_proto_repositories(register_default_toolchain = True): crate_repositories() - # Register toolchains - if register_default_toolchain: + rust_prost_dependencies() + +# buildifier: disable=unnamed-macro +def rust_proto_register_toolchains(register_proto_toolchains = True, register_prost_toolchains = True): + """Register toolchains for proto compilation.""" + + rust_prost_register_toolchains(register_prost_toolchains) + + if register_proto_toolchains: native.register_toolchains(str(Label("//proto:default-proto-toolchain"))) + +# buildifier: disable=unnamed-macro +def rust_proto_repositories(register_default_toolchain = True): + """Declare dependencies needed for proto compilation. + + Args: + register_default_toolchain (bool, optional): If True, the default [rust_proto_toolchain](#rust_proto_toolchain) + (`@rules_rust//proto:default-proto-toolchain`) is registered. This toolchain requires a set of dependencies + that were generated using [crate_universe](https://github.com/bazelbuild/rules_rust/tree/main/crate_universe). These will also be loaded. + """ + + rust_proto_dependencies() + rust_proto_register_toolchains(register_proto_toolchains = register_default_toolchain, register_prost_toolchains = False) From 2c6d472857c61fcbc37c5e8192c17b0d2fa2e03a Mon Sep 17 00:00:00 2001 From: Stu Schwartz Date: Sun, 25 Jun 2023 00:45:37 -0700 Subject: [PATCH 02/31] Regenerate documentation --- docs/crate_universe.md | 2 +- docs/symbols.bzl | 6 +++- proto/BUILD.bazel | 1 + proto/prost/private/prost.bzl | 9 +----- proto/prost/private/protoc_wrapper.rs | 46 ++++++++++++++------------- proto/repositories.bzl | 8 ++--- 6 files changed, 36 insertions(+), 36 deletions(-) diff --git a/docs/crate_universe.md b/docs/crate_universe.md index 62be0919ad..5d6f8bb76d 100644 --- a/docs/crate_universe.md +++ b/docs/crate_universe.md @@ -462,7 +462,7 @@ bazel run //3rdparty:crates_vendor -- --repin ``` Under the hood, `--repin` will trigger a [cargo update](https://doc.rust-lang.org/cargo/commands/cargo-update.html) -call against the generated workspace. The following table describes how to controll particular values passed to the +call against the generated workspace. The following table describes how to control particular values passed to the `cargo update` command. | Value | Cargo command | diff --git a/docs/symbols.bzl b/docs/symbols.bzl index 9a7e76176f..d1a8d65662 100644 --- a/docs/symbols.bzl +++ b/docs/symbols.bzl @@ -28,9 +28,11 @@ load( _crates_vendor = "crates_vendor", ) load( - "@rules_rust//proto:proto.bzl", + "@rules_rust//proto:defs.bzl", _rust_grpc_library = "rust_grpc_library", + _rust_prost_library = "rust_prost_library", _rust_proto_library = "rust_proto_library", + _rust_tonic_library = "rust_tonic_library", ) load( "@rules_rust//proto:repositories.bzl", @@ -124,6 +126,8 @@ rust_doc_test = _rust_doc_test rust_proto_library = _rust_proto_library rust_grpc_library = _rust_grpc_library +rust_prost_library = _rust_prost_library +rust_tonic_library = _rust_tonic_library rust_bindgen = _rust_bindgen rust_bindgen_dependencies = _rust_bindgen_dependencies diff --git a/proto/BUILD.bazel b/proto/BUILD.bazel index 298c61511b..293e4d88df 100644 --- a/proto/BUILD.bazel +++ b/proto/BUILD.bazel @@ -48,5 +48,6 @@ bzl_library( srcs = glob(["**/*.bzl"]), deps = [ "//proto/3rdparty:bzl_lib", + "//proto/prost:bzl_lib", ], ) diff --git a/proto/prost/private/prost.bzl b/proto/prost/private/prost.bzl index 2642e3cdf0..4a128a27e7 100644 --- a/proto/prost/private/prost.bzl +++ b/proto/prost/private/prost.bzl @@ -1,6 +1,6 @@ """Rules for building protos in Rust with Prost and Tonic.""" -load("@rules_proto//proto:defs.bzl", "ProtoInfo") +load("@rules_proto//proto:defs.bzl", "ProtoInfo", "proto_common") load("//rust:defs.bzl", "rust_common") # buildifier: disable=bzl-visibility @@ -10,13 +10,6 @@ load("//rust/private:providers.bzl", "DepVariantInfo") load("//rust/private:rustc.bzl", "rustc_compile_action") load(":providers.bzl", "ProstProtoInfo", "TonicProtoInfo") -# This follows the exact same convention as the new upstream protobuf rules. -# https://github.com/protocolbuffers/protobuf/blob/v23.3/rust/aspects.bzl#L15 -# The interface here hasn't changed in quite a while and since there's now -# additional reliance on it there it seems unlikely that it will break and if -# it does there should be a clear migration example for Starlark code there. -proto_common = proto_common_do_not_use - PROST_EXTENSION = ".rs" TONIC_EXTENSION = ".tonic.rs" diff --git a/proto/prost/private/protoc_wrapper.rs b/proto/prost/private/protoc_wrapper.rs index 280e91078c..b75de79838 100644 --- a/proto/prost/private/protoc_wrapper.rs +++ b/proto/prost/private/protoc_wrapper.rs @@ -25,17 +25,15 @@ fn find_generated_rust_files(out_dir: &Path) -> ProtocResult> for f in find_generated_rust_files(&path)? { all_rs_files.insert(f); } - } else { - if let Some(ext) = path.extension() { - if ext == "rs" { - all_rs_files.insert(path); - } - } else if let Some(name) = path.file_name() { - if name == "_" { - let rs_name = path.parent().expect("Failed to get parent").join("_.rs"); - fs::rename(&path, &rs_name).map_err(from_error)?; - all_rs_files.insert(rs_name); - } + } else if let Some(ext) = path.extension() { + if ext == "rs" { + all_rs_files.insert(path); + } + } else if let Some(name) = path.file_name() { + if name == "_" { + let rs_name = path.parent().expect("Failed to get parent").join("_.rs"); + fs::rename(&path, &rs_name).map_err(from_error)?; + all_rs_files.insert(rs_name); } } } @@ -224,11 +222,11 @@ fn compute_proto_package_info( crate_name: &str, protoc: &Path, includes: &BTreeSet, - proto_paths: &Vec, + proto_paths: &[String], ) -> ProtocResult> { let mut extern_paths = BTreeSet::new(); for proto_file in proto_files.iter() { - let output = process::Command::new(&protoc) + let output = process::Command::new(protoc) .args(includes.iter().map(|include| format!("-I{}", include))) .arg("--print_free_field_numbers") .args( @@ -259,16 +257,16 @@ fn compute_proto_package_info( } let (absolute, _) = text - .split_once(" ") + .split_once(' ') .ok_or_else(|| format!("Failed to split line: {}", text))?; let mut package = ""; let mut symbol_name = absolute; - if let Some((package_, symbol_name_)) = absolute.rsplit_once(".") { + if let Some((package_, symbol_name_)) = absolute.rsplit_once('.') { package = package_; symbol_name = symbol_name_; } - let symbol = format!("{}::{}", package.replace(".", "::"), symbol_name); + let symbol = format!("{}::{}", package.replace('.', "::"), symbol_name); let extern_path = format!(".{}={}::{}", absolute, crate_name, symbol.trim_matches(':')); if !extern_paths.insert(extern_path.clone()) { panic!("Duplicate extern: {}", extern_path); @@ -335,23 +333,27 @@ impl Args { // for the process runner and arguments for protoc and potentially spawn // additional arguments needed by prost. for arg in env::args().skip(1) { - if !arg.starts_with("-") { + if !arg.starts_with('-') { proto_files.insert(PathBuf::from(arg)); continue; } if arg.starts_with("-I") { - includes.insert(arg[2..].to_string()); + includes.insert( + arg.strip_prefix("-I") + .expect("Failed to strip -I") + .to_string(), + ); continue; } - if !arg.contains("=") { + if !arg.contains('=') { extra_args.push(arg); continue; } let part = arg - .split_once("=") + .split_once('=') .ok_or_else(|| format!("Failed to parse argument `{arg}`",))?; match part { ("--protoc", value) => { @@ -369,7 +371,7 @@ impl Args { } ("--package_info_output", value) => { let (key, value) = value - .split_once("=") + .split_once('=') .map(|(a, b)| (a.to_string(), PathBuf::from(b))) .expect("Failed to parse package info output"); crate_name = Some(key); @@ -539,7 +541,7 @@ fn main() -> ProtocResult<()> { // Write outputs fs::write(&out_librs, generate_lib_rs(&rust_files, is_tonic)?).map_err(from_error)?; fs::write( - &package_info_file, + package_info_file, package_info.into_iter().collect::>().join("\n"), ) .map_err(from_error)?; diff --git a/proto/repositories.bzl b/proto/repositories.bzl index 42137ea166..92e38a3ed6 100644 --- a/proto/repositories.bzl +++ b/proto/repositories.bzl @@ -23,11 +23,11 @@ def rust_proto_dependencies(): maybe( http_archive, name = "rules_proto", - sha256 = "66bfdf8782796239d3875d37e7de19b1d94301e8972b3cbd2446b332429b4df1", - strip_prefix = "rules_proto-4.0.0", + sha256 = "dc3fb206a2cb3441b485eb1e423165b231235a1ea9b031b4433cf7bc1fa460dd", + strip_prefix = "rules_proto-5.3.0-21.7", urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/refs/tags/4.0.0.tar.gz", - "https://github.com/bazelbuild/rules_proto/archive/refs/tags/4.0.0.tar.gz", + "https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/refs/tags/5.3.0-21.7.tar.gz", + "https://github.com/bazelbuild/rules_proto/archive/refs/tags/5.3.0-21.7.tar.gz", ], ) From fced3e73892e15eeba6b53cee8fa3902da55e28f Mon Sep 17 00:00:00 2001 From: Stu Schwartz Date: Mon, 26 Jun 2023 17:06:17 -0700 Subject: [PATCH 03/31] Add more tests. --- proto/prost/private/BUILD.bazel | 8 ++- proto/prost/private/prost.bzl | 10 ++- proto/prost/private/protoc_wrapper.rs | 18 +++-- .../private/tests/{proto => }/BUILD.bazel | 0 proto/prost/private/tests/nesting/BUILD.bazel | 40 +++++++++++ .../tests/nesting/nested_messages.proto | 19 ++++++ .../tests/nesting/nested_messages_test.rs | 6 ++ .../packages => package_names}/BUILD.bazel | 0 .../package_test.rs | 0 .../packages => package_names}/pkg.a.b.proto | 0 .../packages => package_names}/pkg.a.proto | 0 .../pkg.empty.proto | 0 .../packages => package_names}/pkg.proto | 0 .../tests/{proto => }/services/BUILD.bazel | 0 .../{proto => }/services/echo/BUILD.bazel | 0 .../tests/{proto => }/services/echo/client.rs | 0 .../{proto => }/services/echo/echo.proto | 0 .../tests/{proto => }/services/echo/server.rs | 0 .../services/helloworld/BUILD.bazel | 0 .../{proto => }/services/helloworld/client.rs | 0 .../services/helloworld/helloworld.proto | 0 .../{proto => }/services/helloworld/server.rs | 0 .../a => transitive_dependencies}/BUILD.bazel | 3 +- .../a => transitive_dependencies}/a.proto | 2 +- .../a => transitive_dependencies}/a_test.rs | 0 .../b/BUILD.bazel | 3 +- .../a => transitive_dependencies}/b/b.proto | 2 +- .../a => transitive_dependencies}/b/b_test.rs | 0 .../b/c/BUILD.bazel | 2 +- .../a => transitive_dependencies}/b/c/c.proto | 0 .../b/c/c_test.rs | 0 .../tests/well_known_types/BUILD.bazel | 40 +++++++++++ .../well_known_types/well_known_types.proto | 67 +++++++++++++++++++ .../well_known_types/well_known_types_test.rs | 6 ++ proto/prost/repositories.bzl | 6 +- 35 files changed, 213 insertions(+), 19 deletions(-) rename proto/prost/private/tests/{proto => }/BUILD.bazel (100%) create mode 100644 proto/prost/private/tests/nesting/BUILD.bazel create mode 100644 proto/prost/private/tests/nesting/nested_messages.proto create mode 100644 proto/prost/private/tests/nesting/nested_messages_test.rs rename proto/prost/private/tests/{proto/packages => package_names}/BUILD.bazel (100%) rename proto/prost/private/tests/{proto/packages => package_names}/package_test.rs (100%) rename proto/prost/private/tests/{proto/packages => package_names}/pkg.a.b.proto (100%) rename proto/prost/private/tests/{proto/packages => package_names}/pkg.a.proto (100%) rename proto/prost/private/tests/{proto/packages => package_names}/pkg.empty.proto (100%) rename proto/prost/private/tests/{proto/packages => package_names}/pkg.proto (100%) rename proto/prost/private/tests/{proto => }/services/BUILD.bazel (100%) rename proto/prost/private/tests/{proto => }/services/echo/BUILD.bazel (100%) rename proto/prost/private/tests/{proto => }/services/echo/client.rs (100%) rename proto/prost/private/tests/{proto => }/services/echo/echo.proto (100%) rename proto/prost/private/tests/{proto => }/services/echo/server.rs (100%) rename proto/prost/private/tests/{proto => }/services/helloworld/BUILD.bazel (100%) rename proto/prost/private/tests/{proto => }/services/helloworld/client.rs (100%) rename proto/prost/private/tests/{proto => }/services/helloworld/helloworld.proto (100%) rename proto/prost/private/tests/{proto => }/services/helloworld/server.rs (100%) rename proto/prost/private/tests/{proto/a => transitive_dependencies}/BUILD.bazel (80%) rename proto/prost/private/tests/{proto/a => transitive_dependencies}/a.proto (82%) rename proto/prost/private/tests/{proto/a => transitive_dependencies}/a_test.rs (100%) rename proto/prost/private/tests/{proto/a => transitive_dependencies}/b/BUILD.bazel (78%) rename proto/prost/private/tests/{proto/a => transitive_dependencies}/b/b.proto (86%) rename proto/prost/private/tests/{proto/a => transitive_dependencies}/b/b_test.rs (100%) rename proto/prost/private/tests/{proto/a => transitive_dependencies}/b/c/BUILD.bazel (88%) rename proto/prost/private/tests/{proto/a => transitive_dependencies}/b/c/c.proto (100%) rename proto/prost/private/tests/{proto/a => transitive_dependencies}/b/c/c_test.rs (100%) create mode 100644 proto/prost/private/tests/well_known_types/BUILD.bazel create mode 100644 proto/prost/private/tests/well_known_types/well_known_types.proto create mode 100644 proto/prost/private/tests/well_known_types/well_known_types_test.rs diff --git a/proto/prost/private/BUILD.bazel b/proto/prost/private/BUILD.bazel index a4923cf35d..852212d755 100644 --- a/proto/prost/private/BUILD.bazel +++ b/proto/prost/private/BUILD.bazel @@ -1,5 +1,5 @@ load("@bazel_skylib//:bzl_library.bzl", "bzl_library") -load("@rules_rust//rust:defs.bzl", "rust_binary") +load("@rules_rust//rust:defs.bzl", "rust_binary", "rust_test") load(":prost.bzl", "PROST_EXTENSION", "RUST_EDITION", "TONIC_EXTENSION") rust_binary( @@ -13,6 +13,12 @@ rust_binary( visibility = ["//visibility:public"], ) +rust_test( + name = "protoc_wrapper_test", + crate = ":protoc_wrapper", + edition = RUST_EDITION, +) + bzl_library( name = "bzl_lib", srcs = glob(["**/*.bzl"]), diff --git a/proto/prost/private/prost.bzl b/proto/prost/private/prost.bzl index 4a128a27e7..f28ec2e92d 100644 --- a/proto/prost/private/prost.bzl +++ b/proto/prost/private/prost.bzl @@ -43,10 +43,14 @@ def _compile_proto(ctx, crate_name, proto_info, deps, prost_toolchain, is_tonic, additional_args.add("--prost_opt=compile_well_known_types") additional_args.add_all(prost_toolchain.prost_opts, format_each = "--prost_opt=%s") - if prost_toolchain.tonic_plugin: + if is_tonic: + if not prost_toolchain.tonic_plugin: + fail("Tonic plugin not configured for this toolchain") + tonic_plugin = prost_toolchain.tonic_plugin[DefaultInfo].files_to_run additional_args.add(prost_toolchain.tonic_plugin_flag % tonic_plugin.executable.path) additional_args.add("--tonic_opt=no_include") + additional_args.add("--is_tonic") additional_args.add_all(prost_toolchain.tonic_opts, format_each = "--tonic_opt=%s") tools = depset([tonic_plugin.executable], transitive = [tools]) @@ -352,7 +356,7 @@ def _rust_prost_toolchain_impl(ctx): is_tonic = ctx.attr.tonic_runtime != None proto_lang_toolchain = proto_common.ProtoLangToolchainInfo( - out_replacement_format_flag = "--tonic_out=%s" if is_tonic else "--prost_out=%s", + out_replacement_format_flag = "--prost_out=%s", plugin_format_flag = ctx.attr.prost_plugin_flag, plugin = ctx.attr.prost_plugin[DefaultInfo].files_to_run, runtime = ctx.attr.prost_runtime, @@ -360,7 +364,7 @@ def _rust_prost_toolchain_impl(ctx): proto_compiler = ctx.attr._prost_process_wrapper[DefaultInfo].files_to_run, protoc_opts = ctx.fragments.proto.experimental_protoc_opts, progress_message = "", - mnemonic = "ToncGenProto" if is_tonic else "ProstGenProto", + mnemonic = "TonicGenProto" if is_tonic else "ProstGenProto", ) tonic_attrs = [ctx.attr.tonic_plugin_flag, ctx.attr.tonic_plugin, ctx.attr.tonic_runtime] diff --git a/proto/prost/private/protoc_wrapper.rs b/proto/prost/private/protoc_wrapper.rs index b75de79838..1136805291 100644 --- a/proto/prost/private/protoc_wrapper.rs +++ b/proto/prost/private/protoc_wrapper.rs @@ -11,6 +11,7 @@ use std::process; type ProtocResult = Result; +/// Convert a `std::io::Error` to a `String`. fn from_error(e: T) -> String { format!("IO error: {}", e.to_string()) } @@ -239,7 +240,7 @@ fn compute_proto_package_info( .spawn() .expect("Failed to spawn protoc") .wait_with_output() - .expect("Faild to wait on protoc"); + .expect("Failed to wait on protoc"); // check success if !output.status.success() { @@ -347,6 +348,12 @@ impl Args { continue; } + if arg == "--is_tonic" { + is_tonic = true; + println!("IS TONIC"); + continue; + } + if !arg.contains('=') { extra_args.push(arg); continue; @@ -354,7 +361,7 @@ impl Args { let part = arg .split_once('=') - .ok_or_else(|| format!("Failed to parse argument `{arg}`",))?; + .ok_or_else(|| format!("Failed to parse argument `{arg}`"))?; match part { ("--protoc", value) => { protoc = Some(PathBuf::from(value)); @@ -364,7 +371,6 @@ impl Args { } ("--tonic_out", value) => { out_dir = Some(PathBuf::from(value)); - is_tonic = true; } ("--crate_name", value) => { crate_name = Some(value.to_string()); @@ -469,11 +475,11 @@ fn main() -> ProtocResult<()> { cmd.args(extra_args); cmd.args(&proto_files); - let status = cmd.status().map_err(from_error)?; - if !status.success() { + let output = cmd.output().map_err(from_error)?; + if !output.status.success() { return Err(format!( "protoc failed with status: {}", - status.code().expect("failed to get exit code") + String::from_utf8_lossy(&output.stderr) )); } diff --git a/proto/prost/private/tests/proto/BUILD.bazel b/proto/prost/private/tests/BUILD.bazel similarity index 100% rename from proto/prost/private/tests/proto/BUILD.bazel rename to proto/prost/private/tests/BUILD.bazel diff --git a/proto/prost/private/tests/nesting/BUILD.bazel b/proto/prost/private/tests/nesting/BUILD.bazel new file mode 100644 index 0000000000..640b4b3065 --- /dev/null +++ b/proto/prost/private/tests/nesting/BUILD.bazel @@ -0,0 +1,40 @@ +load("@rules_proto//proto:defs.bzl", "proto_library") +load("//proto/prost:defs.bzl", "rust_tonic_library") +load("//rust:defs.bzl", "rust_test") + +package(default_visibility = ["//proto/prost/private/tests:__subpackages__"]) + +proto_library( + name = "nested_messages_proto", + srcs = [ + "nested_messages.proto", + ], + deps = [ + "@com_google_protobuf//:any_proto", + "@com_google_protobuf//:api_proto", + "@com_google_protobuf//:compiler_plugin_proto", + "@com_google_protobuf//:descriptor_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:source_context_proto", + "@com_google_protobuf//:struct_proto", + "@com_google_protobuf//:timestamp_proto", + "@com_google_protobuf//:type_proto", + "@com_google_protobuf//:wrappers_proto", + ], +) + +rust_tonic_library( + name = "nested_messages_rs_proto", + proto = ":nested_messages_proto", +) + +rust_test( + name = "nested_messages_test", + srcs = ["nested_messages_test.rs"], + edition = "2021", + deps = [ + ":nested_messages_rs_proto", + ], +) diff --git a/proto/prost/private/tests/nesting/nested_messages.proto b/proto/prost/private/tests/nesting/nested_messages.proto new file mode 100644 index 0000000000..ec8351d47b --- /dev/null +++ b/proto/prost/private/tests/nesting/nested_messages.proto @@ -0,0 +1,19 @@ +syntax = "proto3"; + +package nested_messages; + +message A { + string name = 1; + + message B { + string name = 1; + + message C { + string name = 1; + } + + C c = 2; + } + + B b = 2; +} diff --git a/proto/prost/private/tests/nesting/nested_messages_test.rs b/proto/prost/private/tests/nesting/nested_messages_test.rs new file mode 100644 index 0000000000..fab7241630 --- /dev/null +++ b/proto/prost/private/tests/nesting/nested_messages_test.rs @@ -0,0 +1,6 @@ +use nested_messages_proto::nested_messages::A; + +#[test] +fn test_nested_messages() { + todo!("Implement this test"); +} diff --git a/proto/prost/private/tests/proto/packages/BUILD.bazel b/proto/prost/private/tests/package_names/BUILD.bazel similarity index 100% rename from proto/prost/private/tests/proto/packages/BUILD.bazel rename to proto/prost/private/tests/package_names/BUILD.bazel diff --git a/proto/prost/private/tests/proto/packages/package_test.rs b/proto/prost/private/tests/package_names/package_test.rs similarity index 100% rename from proto/prost/private/tests/proto/packages/package_test.rs rename to proto/prost/private/tests/package_names/package_test.rs diff --git a/proto/prost/private/tests/proto/packages/pkg.a.b.proto b/proto/prost/private/tests/package_names/pkg.a.b.proto similarity index 100% rename from proto/prost/private/tests/proto/packages/pkg.a.b.proto rename to proto/prost/private/tests/package_names/pkg.a.b.proto diff --git a/proto/prost/private/tests/proto/packages/pkg.a.proto b/proto/prost/private/tests/package_names/pkg.a.proto similarity index 100% rename from proto/prost/private/tests/proto/packages/pkg.a.proto rename to proto/prost/private/tests/package_names/pkg.a.proto diff --git a/proto/prost/private/tests/proto/packages/pkg.empty.proto b/proto/prost/private/tests/package_names/pkg.empty.proto similarity index 100% rename from proto/prost/private/tests/proto/packages/pkg.empty.proto rename to proto/prost/private/tests/package_names/pkg.empty.proto diff --git a/proto/prost/private/tests/proto/packages/pkg.proto b/proto/prost/private/tests/package_names/pkg.proto similarity index 100% rename from proto/prost/private/tests/proto/packages/pkg.proto rename to proto/prost/private/tests/package_names/pkg.proto diff --git a/proto/prost/private/tests/proto/services/BUILD.bazel b/proto/prost/private/tests/services/BUILD.bazel similarity index 100% rename from proto/prost/private/tests/proto/services/BUILD.bazel rename to proto/prost/private/tests/services/BUILD.bazel diff --git a/proto/prost/private/tests/proto/services/echo/BUILD.bazel b/proto/prost/private/tests/services/echo/BUILD.bazel similarity index 100% rename from proto/prost/private/tests/proto/services/echo/BUILD.bazel rename to proto/prost/private/tests/services/echo/BUILD.bazel diff --git a/proto/prost/private/tests/proto/services/echo/client.rs b/proto/prost/private/tests/services/echo/client.rs similarity index 100% rename from proto/prost/private/tests/proto/services/echo/client.rs rename to proto/prost/private/tests/services/echo/client.rs diff --git a/proto/prost/private/tests/proto/services/echo/echo.proto b/proto/prost/private/tests/services/echo/echo.proto similarity index 100% rename from proto/prost/private/tests/proto/services/echo/echo.proto rename to proto/prost/private/tests/services/echo/echo.proto diff --git a/proto/prost/private/tests/proto/services/echo/server.rs b/proto/prost/private/tests/services/echo/server.rs similarity index 100% rename from proto/prost/private/tests/proto/services/echo/server.rs rename to proto/prost/private/tests/services/echo/server.rs diff --git a/proto/prost/private/tests/proto/services/helloworld/BUILD.bazel b/proto/prost/private/tests/services/helloworld/BUILD.bazel similarity index 100% rename from proto/prost/private/tests/proto/services/helloworld/BUILD.bazel rename to proto/prost/private/tests/services/helloworld/BUILD.bazel diff --git a/proto/prost/private/tests/proto/services/helloworld/client.rs b/proto/prost/private/tests/services/helloworld/client.rs similarity index 100% rename from proto/prost/private/tests/proto/services/helloworld/client.rs rename to proto/prost/private/tests/services/helloworld/client.rs diff --git a/proto/prost/private/tests/proto/services/helloworld/helloworld.proto b/proto/prost/private/tests/services/helloworld/helloworld.proto similarity index 100% rename from proto/prost/private/tests/proto/services/helloworld/helloworld.proto rename to proto/prost/private/tests/services/helloworld/helloworld.proto diff --git a/proto/prost/private/tests/proto/services/helloworld/server.rs b/proto/prost/private/tests/services/helloworld/server.rs similarity index 100% rename from proto/prost/private/tests/proto/services/helloworld/server.rs rename to proto/prost/private/tests/services/helloworld/server.rs diff --git a/proto/prost/private/tests/proto/a/BUILD.bazel b/proto/prost/private/tests/transitive_dependencies/BUILD.bazel similarity index 80% rename from proto/prost/private/tests/proto/a/BUILD.bazel rename to proto/prost/private/tests/transitive_dependencies/BUILD.bazel index 67df1e1d51..c3462a77e4 100644 --- a/proto/prost/private/tests/proto/a/BUILD.bazel +++ b/proto/prost/private/tests/transitive_dependencies/BUILD.bazel @@ -9,8 +9,9 @@ proto_library( srcs = [ "a.proto", ], + strip_import_prefix = "/proto/prost/private/tests/transitive_dependencies", deps = [ - "//proto/prost/private/tests/proto/a/b:b_proto", + "//proto/prost/private/tests/transitive_dependencies/b:b_proto", "@com_google_protobuf//:duration_proto", "@com_google_protobuf//:timestamp_proto", ], diff --git a/proto/prost/private/tests/proto/a/a.proto b/proto/prost/private/tests/transitive_dependencies/a.proto similarity index 82% rename from proto/prost/private/tests/proto/a/a.proto rename to proto/prost/private/tests/transitive_dependencies/a.proto index 507d3827cd..3e83e2e18a 100644 --- a/proto/prost/private/tests/proto/a/a.proto +++ b/proto/prost/private/tests/transitive_dependencies/a.proto @@ -2,7 +2,7 @@ syntax = "proto3"; import "google/protobuf/timestamp.proto"; import "google/protobuf/duration.proto"; -import "proto/prost/private/tests/proto/a/b/b.proto"; +import "b/b.proto"; package a; diff --git a/proto/prost/private/tests/proto/a/a_test.rs b/proto/prost/private/tests/transitive_dependencies/a_test.rs similarity index 100% rename from proto/prost/private/tests/proto/a/a_test.rs rename to proto/prost/private/tests/transitive_dependencies/a_test.rs diff --git a/proto/prost/private/tests/proto/a/b/BUILD.bazel b/proto/prost/private/tests/transitive_dependencies/b/BUILD.bazel similarity index 78% rename from proto/prost/private/tests/proto/a/b/BUILD.bazel rename to proto/prost/private/tests/transitive_dependencies/b/BUILD.bazel index 1fcf31bb9b..51efd1227c 100644 --- a/proto/prost/private/tests/proto/a/b/BUILD.bazel +++ b/proto/prost/private/tests/transitive_dependencies/b/BUILD.bazel @@ -9,8 +9,9 @@ proto_library( srcs = [ "b.proto", ], + strip_import_prefix = "/proto/prost/private/tests/transitive_dependencies", deps = [ - "//proto/prost/private/tests/proto/a/b/c:c_proto", + "//proto/prost/private/tests/transitive_dependencies/b/c:c_proto", "@com_google_protobuf//:empty_proto", ], ) diff --git a/proto/prost/private/tests/proto/a/b/b.proto b/proto/prost/private/tests/transitive_dependencies/b/b.proto similarity index 86% rename from proto/prost/private/tests/proto/a/b/b.proto rename to proto/prost/private/tests/transitive_dependencies/b/b.proto index dd299f3730..8ab42ab694 100644 --- a/proto/prost/private/tests/proto/a/b/b.proto +++ b/proto/prost/private/tests/transitive_dependencies/b/b.proto @@ -1,7 +1,7 @@ syntax = "proto3"; import "google/protobuf/empty.proto"; -import "a/b/c/c.proto"; +import "b/c/c.proto"; package a.b; diff --git a/proto/prost/private/tests/proto/a/b/b_test.rs b/proto/prost/private/tests/transitive_dependencies/b/b_test.rs similarity index 100% rename from proto/prost/private/tests/proto/a/b/b_test.rs rename to proto/prost/private/tests/transitive_dependencies/b/b_test.rs diff --git a/proto/prost/private/tests/proto/a/b/c/BUILD.bazel b/proto/prost/private/tests/transitive_dependencies/b/c/BUILD.bazel similarity index 88% rename from proto/prost/private/tests/proto/a/b/c/BUILD.bazel rename to proto/prost/private/tests/transitive_dependencies/b/c/BUILD.bazel index 29b8e3ae1e..b9c3d0f895 100644 --- a/proto/prost/private/tests/proto/a/b/c/BUILD.bazel +++ b/proto/prost/private/tests/transitive_dependencies/b/c/BUILD.bazel @@ -9,7 +9,7 @@ proto_library( srcs = [ "c.proto", ], - strip_import_prefix = "/proto/prost/private/tests/proto", + strip_import_prefix = "/proto/prost/private/tests/transitive_dependencies", deps = [ "@com_google_protobuf//:any_proto", "@com_google_protobuf//:duration_proto", diff --git a/proto/prost/private/tests/proto/a/b/c/c.proto b/proto/prost/private/tests/transitive_dependencies/b/c/c.proto similarity index 100% rename from proto/prost/private/tests/proto/a/b/c/c.proto rename to proto/prost/private/tests/transitive_dependencies/b/c/c.proto diff --git a/proto/prost/private/tests/proto/a/b/c/c_test.rs b/proto/prost/private/tests/transitive_dependencies/b/c/c_test.rs similarity index 100% rename from proto/prost/private/tests/proto/a/b/c/c_test.rs rename to proto/prost/private/tests/transitive_dependencies/b/c/c_test.rs diff --git a/proto/prost/private/tests/well_known_types/BUILD.bazel b/proto/prost/private/tests/well_known_types/BUILD.bazel new file mode 100644 index 0000000000..f7bc1b8752 --- /dev/null +++ b/proto/prost/private/tests/well_known_types/BUILD.bazel @@ -0,0 +1,40 @@ +load("@rules_proto//proto:defs.bzl", "proto_library") +load("//proto/prost:defs.bzl", "rust_tonic_library", "rust_prost_library") +load("//rust:defs.bzl", "rust_test") + +package(default_visibility = ["//proto/prost/private/tests:__subpackages__"]) + +proto_library( + name = "well_known_types_proto", + srcs = [ + "well_known_types.proto", + ], + deps = [ + "@com_google_protobuf//:any_proto", + "@com_google_protobuf//:api_proto", + "@com_google_protobuf//:compiler_plugin_proto", + "@com_google_protobuf//:descriptor_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:empty_proto", + "@com_google_protobuf//:field_mask_proto", + "@com_google_protobuf//:source_context_proto", + "@com_google_protobuf//:struct_proto", + "@com_google_protobuf//:timestamp_proto", + "@com_google_protobuf//:type_proto", + "@com_google_protobuf//:wrappers_proto", + ], +) + +rust_tonic_library( + name = "well_known_types_rs_proto", + proto = ":well_known_types_proto", +) + +rust_test( + name = "well_known_types_test", + srcs = ["well_known_types_test.rs"], + edition = "2021", + deps = [ + ":well_known_types_rs_proto", + ], +) diff --git a/proto/prost/private/tests/well_known_types/well_known_types.proto b/proto/prost/private/tests/well_known_types/well_known_types.proto new file mode 100644 index 0000000000..d5ea185c90 --- /dev/null +++ b/proto/prost/private/tests/well_known_types/well_known_types.proto @@ -0,0 +1,67 @@ +syntax = "proto3"; + +import "google/protobuf/any.proto"; +import "google/protobuf/api.proto"; +import "google/protobuf/compiler/plugin.proto"; +import "google/protobuf/descriptor.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/source_context.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/type.proto"; +import "google/protobuf/wrappers.proto"; + +package wkt; + +message WellKnownTypes { + + string name = 50; + + // Any + google.protobuf.Any any = 1; + + // Api + google.protobuf.Api api = 2; + google.protobuf.Method method = 3; + google.protobuf.Mixin mixin = 4; + + // Compiler Plugin + google.protobuf.compiler.Version compiler_version = 5; + + // Descriptor + google.protobuf.DescriptorProto descriptor_proto = 6; + + // Duration + google.protobuf.Duration duration = 7; + + // Empty + google.protobuf.Empty empty = 8; + + // Field Mask + google.protobuf.FieldMask field_mask = 9; + + // Source Context + google.protobuf.SourceContext source_context = 10; + + // Struct + google.protobuf.Struct struct = 11; + + // Timestamp + google.protobuf.Timestamp timestamp = 12; + + // Type + google.protobuf.Type type = 13; + + // Wrappers + google.protobuf.BoolValue bool_value = 14; + google.protobuf.BytesValue bytes_value = 15; + google.protobuf.DoubleValue double_value = 16; + google.protobuf.FloatValue float_value = 17; + google.protobuf.Int32Value int32_value = 18; + google.protobuf.Int64Value int64_value = 19; + google.protobuf.StringValue string_value = 20; + google.protobuf.UInt32Value uint32_value = 21; + google.protobuf.UInt64Value uint64_value = 22; +} diff --git a/proto/prost/private/tests/well_known_types/well_known_types_test.rs b/proto/prost/private/tests/well_known_types/well_known_types_test.rs new file mode 100644 index 0000000000..0004e1bcb4 --- /dev/null +++ b/proto/prost/private/tests/well_known_types/well_known_types_test.rs @@ -0,0 +1,6 @@ +use well_known_types_proto::wkt::WellKnownTypes; + +#[test] +fn test_well_known_types() { + todo!("Implement this test"); +} diff --git a/proto/prost/repositories.bzl b/proto/prost/repositories.bzl index 2b4036d087..50f9d54d68 100644 --- a/proto/prost/repositories.bzl +++ b/proto/prost/repositories.bzl @@ -3,14 +3,12 @@ load("//proto/prost/private/3rdparty/crates:crates.bzl", "crate_repositories") def rust_prost_dependencies(): + """Prost repository dependencies.""" crate_repositories() # buildifier: disable=unnamed-macro def rust_prost_register_toolchains(register_toolchains = True): - """_summary_ + """Register toolchains for Rust Prost rules.""" - Args: - register_toolchains (bool, optional): _description_. Defaults to True. - """ if register_toolchains: native.register_toolchains(str(Label("//proto/prost:default_prost_toolchain"))) From 09d81425c66ae678fa33473340e13ccc9c1c4d17 Mon Sep 17 00:00:00 2001 From: Stu Schwartz Date: Tue, 27 Jun 2023 10:03:43 -0700 Subject: [PATCH 04/31] Add more tests and address feedback. --- proto/prost/private/3rdparty/BUILD.bazel | 6 + proto/prost/private/3rdparty/crates/defs.bzl | 6 + .../private/3rdparty/patches/BUILD.bazel | 3 + .../3rdparty/patches/protoc-gen-prost.patch | 69 +++++ proto/prost/private/protoc_wrapper.rs | 247 +++++++++++------- proto/prost/private/tests/nesting/BUILD.bazel | 18 +- .../tests/nesting/nested_messages.proto | 7 + .../tests/nesting/nested_messages_test.rs | 17 +- .../private/tests/package_imports/BUILD.bazel | 44 ++++ .../package_imports/package_import.proto | 7 + .../package_imports/package_importer.proto | 9 + .../package_imports/package_importer_test.rs | 15 ++ .../tests/package_names/package_test.rs | 2 + .../tests/transitive_dependencies/a_test.rs | 2 + .../tests/transitive_dependencies/b/b_test.rs | 2 + .../transitive_dependencies/b/c/c_test.rs | 2 + proto/prost/private/tests/types/BUILD.bazel | 26 ++ proto/prost/private/tests/types/types.proto | 105 ++++++++ proto/prost/private/tests/types/types_test.rs | 97 +++++++ .../tests/well_known_types/BUILD.bazel | 4 +- .../well_known_types/well_known_types.proto | 2 - .../well_known_types/well_known_types_test.rs | 103 +++++++- 22 files changed, 678 insertions(+), 115 deletions(-) create mode 100644 proto/prost/private/3rdparty/patches/BUILD.bazel create mode 100644 proto/prost/private/3rdparty/patches/protoc-gen-prost.patch create mode 100644 proto/prost/private/tests/package_imports/BUILD.bazel create mode 100644 proto/prost/private/tests/package_imports/package_import.proto create mode 100644 proto/prost/private/tests/package_imports/package_importer.proto create mode 100644 proto/prost/private/tests/package_imports/package_importer_test.rs create mode 100644 proto/prost/private/tests/types/BUILD.bazel create mode 100644 proto/prost/private/tests/types/types.proto create mode 100644 proto/prost/private/tests/types/types_test.rs diff --git a/proto/prost/private/3rdparty/BUILD.bazel b/proto/prost/private/3rdparty/BUILD.bazel index 00ff5804fe..1c6e5d00f5 100644 --- a/proto/prost/private/3rdparty/BUILD.bazel +++ b/proto/prost/private/3rdparty/BUILD.bazel @@ -6,6 +6,12 @@ crates_vendor( annotations = { "protoc-gen-prost": [crate.annotation( gen_binaries = ["protoc-gen-prost"], + patch_args = [ + "-p1", + ], + patches = [ + "@rules_rust//proto/prost/private/3rdparty/patches:protoc-gen-prost.patch", + ], )], "protoc-gen-tonic": [crate.annotation( gen_binaries = ["protoc-gen-tonic"], diff --git a/proto/prost/private/3rdparty/crates/defs.bzl b/proto/prost/private/3rdparty/crates/defs.bzl index d174de2d64..e39d781387 100644 --- a/proto/prost/private/3rdparty/crates/defs.bzl +++ b/proto/prost/private/3rdparty/crates/defs.bzl @@ -1048,6 +1048,12 @@ def crate_repositories(): maybe( http_archive, name = "rules_rust_prost__protoc-gen-prost-0.2.2", + patch_args = [ + "-p1", + ], + patches = [ + "@rules_rust//proto/prost/private/3rdparty/patches:protoc-gen-prost.patch", + ], sha256 = "a81e3a9bb429fec47008b209896f0b9ab99fbcbc1c3733b385d43fbfd64dd2ca", type = "tar.gz", urls = ["https://crates.io/api/v1/crates/protoc-gen-prost/0.2.2/download"], diff --git a/proto/prost/private/3rdparty/patches/BUILD.bazel b/proto/prost/private/3rdparty/patches/BUILD.bazel new file mode 100644 index 0000000000..700d415ca2 --- /dev/null +++ b/proto/prost/private/3rdparty/patches/BUILD.bazel @@ -0,0 +1,3 @@ +exports_files([ + "protoc-gen-prost.patch", +]) diff --git a/proto/prost/private/3rdparty/patches/protoc-gen-prost.patch b/proto/prost/private/3rdparty/patches/protoc-gen-prost.patch new file mode 100644 index 0000000000..7a0d804bb5 --- /dev/null +++ b/proto/prost/private/3rdparty/patches/protoc-gen-prost.patch @@ -0,0 +1,69 @@ +diff --git a/src/lib.rs b/src/lib.rs +index 43fc5ba..94b8f7e 100644 +--- a/src/lib.rs ++++ b/src/lib.rs +@@ -62,12 +62,12 @@ impl ModuleRequestSet { + { + let raw_protos = RawProtos::decode(raw_request)?; + +- Ok(Self::new_decoded( ++ Self::new_decoded( + input_protos, + proto_file, + raw_protos, + default_package_filename.unwrap_or("_"), +- )) ++ ) + } + + fn new_decoded( +@@ -75,7 +75,7 @@ impl ModuleRequestSet { + proto_file: Vec, + raw_protos: RawProtos, + default_package_filename: &str, +- ) -> Self ++ ) -> std::result::Result + where + I: IntoIterator, + { +@@ -86,24 +86,29 @@ impl ModuleRequestSet { + |mut acc, (proto, raw)| { + let module = Module::from_protobuf_package_name(proto.package()); + let proto_filename = proto.name(); +- let entry = acc.entry(module).or_insert_with(|| { +- let mut request = ModuleRequest::new(proto.package().to_owned()); +- if input_protos.contains(proto_filename) { +- let filename = match proto.package() { +- "" => default_package_filename.to_owned(), +- package => format!("{package}.rs"), +- }; +- request.with_output_filename(filename); ++ let entry = acc ++ .entry(module) ++ .or_insert_with(|| ModuleRequest::new(proto.package().to_owned())); ++ ++ if input_protos.contains(proto_filename) { ++ if entry.output_filename().is_some() { ++ // TODO: Make a result ++ panic!("duplicate files detected"); + } +- request +- }); ++ ++ let filename = match proto.package() { ++ "" => default_package_filename.to_owned(), ++ package => format!("{package}.rs"), ++ }; ++ entry.with_output_filename(filename); ++ } + + entry.push_file_descriptor_proto(proto, raw); + acc + }, + ); + +- Self { requests } ++ Ok(Self { requests }) + } + + /// An ordered iterator of all requests diff --git a/proto/prost/private/protoc_wrapper.rs b/proto/prost/private/protoc_wrapper.rs index 1136805291..deb02eb0cd 100644 --- a/proto/prost/private/protoc_wrapper.rs +++ b/proto/prost/private/protoc_wrapper.rs @@ -9,21 +9,14 @@ use std::path::Path; use std::path::PathBuf; use std::process; -type ProtocResult = Result; - -/// Convert a `std::io::Error` to a `String`. -fn from_error(e: T) -> String { - format!("IO error: {}", e.to_string()) -} - /// Locate prost outputs in the protoc output directory. -fn find_generated_rust_files(out_dir: &Path) -> ProtocResult> { +fn find_generated_rust_files(out_dir: &Path) -> BTreeSet { let mut all_rs_files: BTreeSet = BTreeSet::new(); - for entry in fs::read_dir(out_dir).map_err(from_error)? { + for entry in fs::read_dir(out_dir).expect("Failed to read directory") { let entry = entry.expect("Failed to read entry"); let path = entry.path(); if path.is_dir() { - for f in find_generated_rust_files(&path)? { + for f in find_generated_rust_files(&path) { all_rs_files.insert(f); } } else if let Some(ext) = path.extension() { @@ -33,13 +26,13 @@ fn find_generated_rust_files(out_dir: &Path) -> ProtocResult> } else if let Some(name) = path.file_name() { if name == "_" { let rs_name = path.parent().expect("Failed to get parent").join("_.rs"); - fs::rename(&path, &rs_name).map_err(from_error)?; + fs::rename(&path, &rs_name).expect("Failed to rename file"); all_rs_files.insert(rs_name); } } } - Ok(all_rs_files) + all_rs_files } /// Rust module definition. @@ -101,7 +94,7 @@ struct Module { /// } /// } /// ``` -fn generate_lib_rs(prost_outputs: &BTreeSet, is_tonic: bool) -> ProtocResult { +fn generate_lib_rs(prost_outputs: &BTreeSet, is_tonic: bool) -> String { let mut module_info = BTreeMap::new(); for path in prost_outputs.iter() { @@ -138,7 +131,7 @@ fn generate_lib_rs(prost_outputs: &BTreeSet, is_tonic: bool) -> ProtocR module_name.clone(), Module { name, - contents: fs::read_to_string(path).map_err(from_error)?, + contents: fs::read_to_string(path).expect("Failed to read file"), submodules: BTreeSet::new(), }, ); @@ -169,21 +162,22 @@ fn generate_lib_rs(prost_outputs: &BTreeSet, is_tonic: bool) -> ProtocR } let mut content = "// @generated\n\n".to_string(); - write_module(&mut content, &module_info, "", 0)?; - Ok(content) + write_module(&mut content, &module_info, "", 0); + content } +/// Write out a rust module and all of its submodules. fn write_module( content: &mut String, module_info: &BTreeMap, module_name: &str, depth: usize, -) -> ProtocResult<()> { +) { if module_name.is_empty() { for submodule_name in module_info.keys() { - write_module(content, module_info, submodule_name, depth + 1)?; + write_module(content, module_info, submodule_name, depth + 1); } - return Ok(()); + return; } let module = module_info.get(module_name).expect("Failed to get module"); let indent = " ".repeat(depth); @@ -192,10 +186,12 @@ fn write_module( if is_rust_module { content .write_str(&format!("{}pub mod {} {{\n", indent, module.name)) - .map_err(from_error)?; + .expect("Failed to write string"); } - content.write_str(&module.contents).map_err(from_error)?; + content + .write_str(&module.contents) + .expect("Failed to write string"); for submodule_name in module.submodules.iter() { write_module( @@ -203,54 +199,67 @@ fn write_module( module_info, [module_name, submodule_name].join(".").as_str(), depth + 1, - )?; + ); } if is_rust_module { content .write_str(&format!("{}}}\n", indent)) - .map_err(from_error)?; + .expect("Failed to write string"); } +} - Ok(()) +/// Create a map of proto files to their free field number strings. +/// +/// We use the free field numbers api as a convenient way to get a list of all message types in a +/// proto file. +fn create_free_field_numbers_map( + proto_files: BTreeSet, + protoc: &Path, + includes: &[String], + proto_paths: &[String], +) -> BTreeMap { + proto_files + .into_iter() + .map(|proto_file| { + let output = process::Command::new(protoc) + .args(includes.iter().map(|include| format!("-I{}", include))) + .arg("--print_free_field_numbers") + .args( + proto_paths + .iter() + .map(|proto_path| format!("--proto_path={}", proto_path)), + ) + .arg(&proto_file) + .stdout(process::Stdio::piped()) + .spawn() + .expect("Failed to spawn protoc") + .wait_with_output() + .expect("Failed to wait on protoc"); + + // check success + if !output.status.success() { + panic!( + "Failed to run protoc: {}", + std::str::from_utf8(&output.stderr).expect("Failed to parse stderr") + ); + } + + let stdout = std::str::from_utf8(&output.stdout).expect("Failed to parse stdout"); + (proto_file, stdout.to_owned()) + }) + .collect() } /// Compute the `--extern_path` flags for a list of proto files. This is /// expected to convert proto files into a list of /// `.example.prost.helloworld=crate_name::example::prost::helloworld` fn compute_proto_package_info( - proto_files: &BTreeSet, + proto_free_field_numbers: &BTreeMap, crate_name: &str, - protoc: &Path, - includes: &BTreeSet, - proto_paths: &[String], -) -> ProtocResult> { +) -> Result, String> { let mut extern_paths = BTreeSet::new(); - for proto_file in proto_files.iter() { - let output = process::Command::new(protoc) - .args(includes.iter().map(|include| format!("-I{}", include))) - .arg("--print_free_field_numbers") - .args( - proto_paths - .iter() - .map(|proto_path| format!("--proto_path={}", proto_path)), - ) - .arg(proto_file) - .stdout(process::Stdio::piped()) - .spawn() - .expect("Failed to spawn protoc") - .wait_with_output() - .expect("Failed to wait on protoc"); - - // check success - if !output.status.success() { - return Err(format!( - "Failed to run protoc: {}", - String::from_utf8_lossy(&output.stderr) - )); - } - - let stdout = std::str::from_utf8(&output.stdout).expect("Failed to parse stdout"); + for stdout in proto_free_field_numbers.values() { for line in stdout.lines() { let text = line.trim(); if text.is_empty() { @@ -259,7 +268,7 @@ fn compute_proto_package_info( let (absolute, _) = text .split_once(' ') - .ok_or_else(|| format!("Failed to split line: {}", text))?; + .expect("Failed to split free field number line"); let mut package = ""; let mut symbol_name = absolute; @@ -270,7 +279,7 @@ fn compute_proto_package_info( let symbol = format!("{}::{}", package.replace('.', "::"), symbol_name); let extern_path = format!(".{}={}::{}", absolute, crate_name, symbol.trim_matches(':')); if !extern_paths.insert(extern_path.clone()) { - panic!("Duplicate extern: {}", extern_path); + return Err(format!("Duplicate extern: {}", extern_path)); } } } @@ -293,10 +302,10 @@ struct Args { package_info_file: PathBuf, /// The proto files to compile. - proto_files: BTreeSet, + proto_files: Vec, /// The include directories. - includes: BTreeSet, + includes: Vec, /// The path to the generated lib.rs file. out_librs: PathBuf, @@ -316,13 +325,13 @@ struct Args { impl Args { /// Parse the command-line arguments. - fn parse() -> ProtocResult { + fn parse() -> Result { let mut protoc: Option = None; let mut out_dir: Option = None; let mut crate_name: Option = None; let mut package_info_file: Option = None; - let mut proto_files: BTreeSet = BTreeSet::new(); - let mut includes: BTreeSet = BTreeSet::new(); + let mut proto_files: Vec = Vec::new(); + let mut includes = Vec::new(); let mut out_librs: Option = None; let mut rustfmt: Option = None; let mut proto_paths = Vec::new(); @@ -335,12 +344,12 @@ impl Args { // additional arguments needed by prost. for arg in env::args().skip(1) { if !arg.starts_with('-') { - proto_files.insert(PathBuf::from(arg)); + proto_files.push(PathBuf::from(arg)); continue; } if arg.starts_with("-I") { - includes.insert( + includes.push( arg.strip_prefix("-I") .expect("Failed to strip -I") .to_string(), @@ -350,7 +359,6 @@ impl Args { if arg == "--is_tonic" { is_tonic = true; - println!("IS TONIC"); continue; } @@ -359,9 +367,7 @@ impl Args { continue; } - let part = arg - .split_once('=') - .ok_or_else(|| format!("Failed to parse argument `{arg}`"))?; + let part = arg.split_once('=').expect("Failed to split argument on ="); match part { ("--protoc", value) => { protoc = Some(PathBuf::from(value)); @@ -384,9 +390,15 @@ impl Args { package_info_file = Some(value); } ("--deps_info", value) => { - for line in fs::read_to_string(value).map_err(from_error)?.lines() { + for line in fs::read_to_string(value) + .expect("Failed to read file") + .lines() + { let path = PathBuf::from(line.trim()); - for flag in fs::read_to_string(path).map_err(from_error)?.lines() { + for flag in fs::read_to_string(path) + .expect("Failed to read file") + .lines() + { extra_args.push(format!("--prost_opt=extern_path={}", flag.trim())); } } @@ -398,6 +410,9 @@ impl Args { rustfmt = Some(PathBuf::from(value)); } ("--proto_path", value) => { + // if value.ends_with("import_proto") { + // continue; + // } proto_paths.push(value.to_string()); } (arg, value) => { @@ -446,7 +461,7 @@ impl Args { } } -fn main() -> ProtocResult<()> { +fn main() { let Args { protoc, out_dir, @@ -459,28 +474,28 @@ fn main() -> ProtocResult<()> { proto_paths, is_tonic, extra_args, - } = Args::parse()?; + } = Args::parse().expect("Failed to parse args"); let mut cmd = process::Command::new(&protoc); cmd.arg(format!("--prost_out={}", out_dir.display())); if is_tonic { cmd.arg(format!("--tonic_out={}", out_dir.display())); } - cmd.args(includes.iter().map(|include| format!("-I{}", include))); + cmd.args(extra_args); cmd.args( proto_paths .iter() .map(|proto_path| format!("--proto_path={}", proto_path)), ); - cmd.args(extra_args); + cmd.args(includes.iter().map(|include| format!("-I{}", include))); cmd.args(&proto_files); - let output = cmd.output().map_err(from_error)?; - if !output.status.success() { - return Err(format!( + let status = cmd.status().expect("Failed to spawn protoc process"); + if !status.success() { + panic!( "protoc failed with status: {}", - String::from_utf8_lossy(&output.stderr) - )); + status.code().expect("failed to get exit code") + ); } // Not all proto files will consistently produce `.rs` or `.tonic.rs` files. This is @@ -489,7 +504,7 @@ fn main() -> ProtocResult<()> { // `.rs` files are either renamed to `.tonic.rs` if there is no `.tonic.rs` or prepended // to the existing `.tonic.rs`. if is_tonic { - let tonic_files: BTreeSet = find_generated_rust_files(&out_dir)?; + let tonic_files: BTreeSet = find_generated_rust_files(&out_dir); for tonic_file in tonic_files.iter() { if !tonic_file @@ -513,7 +528,7 @@ fn main() -> ProtocResult<()> { if real_tonic_file.exists() { continue; } - fs::rename(tonic_file, real_tonic_file).map_err(from_error)?; + fs::rename(tonic_file, real_tonic_file).expect("Failed to rename file."); } else { let rs_file = PathBuf::from(format!( "{}.rs", @@ -525,32 +540,41 @@ fn main() -> ProtocResult<()> { )); if rs_file.exists() { - let rs_content = fs::read_to_string(&rs_file).map_err(from_error)?; - let tonic_content = fs::read_to_string(tonic_file).map_err(from_error)?; + let rs_content = fs::read_to_string(&rs_file).expect("Failed to read file."); + let tonic_content = + fs::read_to_string(tonic_file).expect("Failed to read file."); fs::write(tonic_file, format!("{}\n{}", rs_content, tonic_content)) - .map_err(from_error)?; - fs::remove_file(&rs_file).map_err(from_error)?; + .expect("Failed to write file."); + fs::remove_file(&rs_file).expect("Failed to remove file."); } } } } // Locate all prost-generated outputs. - let rust_files: BTreeSet = find_generated_rust_files(&out_dir)?; + let rust_files: BTreeSet = find_generated_rust_files(&out_dir); if rust_files.is_empty() { - return Err("Failed to find any outputs".to_string()); + panic!("No .rs files were generated by prost."); } + let free_field_numbers = create_free_field_numbers_map( + proto_files.into_iter().collect::>(), + &protoc, + &includes, + &proto_paths, + ); + let package_info: BTreeSet = - compute_proto_package_info(&proto_files, &crate_name, &protoc, &includes, &proto_paths)?; + compute_proto_package_info(&free_field_numbers, &crate_name) + .expect("Failed to compute proto package info"); // Write outputs - fs::write(&out_librs, generate_lib_rs(&rust_files, is_tonic)?).map_err(from_error)?; + fs::write(&out_librs, generate_lib_rs(&rust_files, is_tonic)).expect("Failed to write file."); fs::write( package_info_file, package_info.into_iter().collect::>().join("\n"), ) - .map_err(from_error)?; + .expect("Failed to write file."); // Finally run rustfmt on the output lib.rs file if let Some(rustfmt) = rustfmt { @@ -560,14 +584,51 @@ fn main() -> ProtocResult<()> { .arg("--quiet") .arg(&out_librs) .status() - .map_err(from_error)?; + .expect("Failed to spawn rustfmt process"); if !fmt_status.success() { - Err(format!( + panic!( "rustfmt failed with exit code: {}", fmt_status.code().expect("Failed to get exit code") - ))?; + ); } } +} - Ok(()) +#[cfg(test)] +mod test { + + use super::*; + + use std::collections::{BTreeMap, BTreeSet}; + + #[test] + fn compute_proto_package_info_test() { + // Example output from running `protoc --print_free_field_numbers` on + // https://github.com/protocolbuffers/protobuf/blob/v23.3/src/google/protobuf/descriptor.proto + let free_field_numbers_output = r" +google.protobuf.FileDescriptorSet free: 2-INF +google.protobuf.FileDescriptorProto free: 13-INF +google.protobuf.DescriptorProto.ExtensionRange free: 4-INF +google.protobuf.DescriptorProto.ReservedRange free: 3-INF +google.protobuf.DescriptorProto free: 11-INF +" + .to_owned(); + let package_infos = compute_proto_package_info( + &BTreeMap::from([( + PathBuf::from("/tmp/google/protobuf/descriptor.proto"), + free_field_numbers_output, + )]), + "crate_name", + ) + .unwrap(); + + assert_eq!(package_infos, [ + ".google.protobuf.DescriptorProto.ExtensionRange=crate_name::google::protobuf::DescriptorProto::ExtensionRange", + ".google.protobuf.DescriptorProto.ReservedRange=crate_name::google::protobuf::DescriptorProto::ReservedRange", + ".google.protobuf.DescriptorProto=crate_name::google::protobuf::DescriptorProto", + ".google.protobuf.FileDescriptorProto=crate_name::google::protobuf::FileDescriptorProto", + ".google.protobuf.FileDescriptorSet=crate_name::google::protobuf::FileDescriptorSet" + ].into_iter().map(String::from).collect::>() + ); + } } diff --git a/proto/prost/private/tests/nesting/BUILD.bazel b/proto/prost/private/tests/nesting/BUILD.bazel index 640b4b3065..d8642efe59 100644 --- a/proto/prost/private/tests/nesting/BUILD.bazel +++ b/proto/prost/private/tests/nesting/BUILD.bazel @@ -1,5 +1,5 @@ load("@rules_proto//proto:defs.bzl", "proto_library") -load("//proto/prost:defs.bzl", "rust_tonic_library") +load("//proto/prost:defs.bzl", "rust_prost_library") load("//rust:defs.bzl", "rust_test") package(default_visibility = ["//proto/prost/private/tests:__subpackages__"]) @@ -9,23 +9,9 @@ proto_library( srcs = [ "nested_messages.proto", ], - deps = [ - "@com_google_protobuf//:any_proto", - "@com_google_protobuf//:api_proto", - "@com_google_protobuf//:compiler_plugin_proto", - "@com_google_protobuf//:descriptor_proto", - "@com_google_protobuf//:duration_proto", - "@com_google_protobuf//:empty_proto", - "@com_google_protobuf//:field_mask_proto", - "@com_google_protobuf//:source_context_proto", - "@com_google_protobuf//:struct_proto", - "@com_google_protobuf//:timestamp_proto", - "@com_google_protobuf//:type_proto", - "@com_google_protobuf//:wrappers_proto", - ], ) -rust_tonic_library( +rust_prost_library( name = "nested_messages_rs_proto", proto = ":nested_messages_proto", ) diff --git a/proto/prost/private/tests/nesting/nested_messages.proto b/proto/prost/private/tests/nesting/nested_messages.proto index ec8351d47b..2f9a20fd91 100644 --- a/proto/prost/private/tests/nesting/nested_messages.proto +++ b/proto/prost/private/tests/nesting/nested_messages.proto @@ -12,7 +12,14 @@ message A { string name = 1; } + enum D { + E = 0; + F = 1; + } + C c = 2; + + D d = 3; } B b = 2; diff --git a/proto/prost/private/tests/nesting/nested_messages_test.rs b/proto/prost/private/tests/nesting/nested_messages_test.rs index fab7241630..627ebafeaf 100644 --- a/proto/prost/private/tests/nesting/nested_messages_test.rs +++ b/proto/prost/private/tests/nesting/nested_messages_test.rs @@ -1,6 +1,21 @@ +//! Tests the usage of nested messages. + +use nested_messages_proto::nested_messages::a::b::{C, D}; +use nested_messages_proto::nested_messages::a::B; use nested_messages_proto::nested_messages::A; #[test] fn test_nested_messages() { - todo!("Implement this test"); + let a = A { + name: "a".to_string(), + b: Some(B { + name: "b".to_string(), + c: Some(C { + name: "c".to_string(), + }), + d: D::E.into(), + }), + }; + + assert_eq!(a.name, "a"); } diff --git a/proto/prost/private/tests/package_imports/BUILD.bazel b/proto/prost/private/tests/package_imports/BUILD.bazel new file mode 100644 index 0000000000..1f37842c47 --- /dev/null +++ b/proto/prost/private/tests/package_imports/BUILD.bazel @@ -0,0 +1,44 @@ +load("@rules_proto//proto:defs.bzl", "proto_library") +load("//proto/prost:defs.bzl", "rust_prost_library") +load("//rust:defs.bzl", "rust_test") + +package(default_visibility = ["//proto/prost/private/tests:__subpackages__"]) + +proto_library( + name = "package_import_proto", + srcs = [ + "package_import.proto", + ], + strip_import_prefix = "/proto/prost/private/tests/package_imports", +) + +rust_prost_library( + name = "package_import_rs_proto", + proto = ":package_import_proto", +) + + +proto_library( + name = "package_importer_proto", + srcs = [ + "package_importer.proto", + ], + deps = [ + ":package_import_proto", + ], + strip_import_prefix = "/proto/prost/private/tests/package_imports", +) + +rust_prost_library( + name = "package_importer_rs_proto", + proto = ":package_importer_proto", +) + +rust_test( + name = "package_importer_test", + srcs = ["package_importer_test.rs"], + edition = "2021", + deps = [ + ":package_importer_rs_proto", + ], +) diff --git a/proto/prost/private/tests/package_imports/package_import.proto b/proto/prost/private/tests/package_imports/package_import.proto new file mode 100644 index 0000000000..164719ae40 --- /dev/null +++ b/proto/prost/private/tests/package_imports/package_import.proto @@ -0,0 +1,7 @@ +syntax = "proto3"; + +package package.import; + +message A { + string name = 1; +} diff --git a/proto/prost/private/tests/package_imports/package_importer.proto b/proto/prost/private/tests/package_imports/package_importer.proto new file mode 100644 index 0000000000..dd584aaf4a --- /dev/null +++ b/proto/prost/private/tests/package_imports/package_importer.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + +package package.import; + +import "package_import.proto"; + +message B { + A a = 1; +} diff --git a/proto/prost/private/tests/package_imports/package_importer_test.rs b/proto/prost/private/tests/package_imports/package_importer_test.rs new file mode 100644 index 0000000000..9c89c9807f --- /dev/null +++ b/proto/prost/private/tests/package_imports/package_importer_test.rs @@ -0,0 +1,15 @@ +//! Tests package importing with the same package name. + +use package_import_proto::package::import::A; +use package_importer_proto::package::import::B; + +#[test] +fn test_package_importer() { + let b = B { + a: Some(A { + name: "a".to_string(), + }), + }; + + assert_eq!(b.a.as_ref().unwrap().name, "a"); +} diff --git a/proto/prost/private/tests/package_names/package_test.rs b/proto/prost/private/tests/package_names/package_test.rs index a56d0f3ade..df9520d6dc 100644 --- a/proto/prost/private/tests/package_names/package_test.rs +++ b/proto/prost/private/tests/package_names/package_test.rs @@ -1,3 +1,5 @@ +//! Tests variations of the package name, including empty package names. + use pkg_a_b_proto::pkg::a::b::Message as PkgABMessage; use pkg_a_proto::pkg::a::Message as PkgAMessage; use pkg_empty_proto::Message as PkgEmptyMessage; diff --git a/proto/prost/private/tests/transitive_dependencies/a_test.rs b/proto/prost/private/tests/transitive_dependencies/a_test.rs index e500a31517..7c3f70fd77 100644 --- a/proto/prost/private/tests/transitive_dependencies/a_test.rs +++ b/proto/prost/private/tests/transitive_dependencies/a_test.rs @@ -1,3 +1,5 @@ +//! Tests transitive dependencies. + use a_proto::a::A; use b_proto::a::b::B; use c_proto::a::b::c::C; diff --git a/proto/prost/private/tests/transitive_dependencies/b/b_test.rs b/proto/prost/private/tests/transitive_dependencies/b/b_test.rs index fd96915c03..0b0fb99d37 100644 --- a/proto/prost/private/tests/transitive_dependencies/b/b_test.rs +++ b/proto/prost/private/tests/transitive_dependencies/b/b_test.rs @@ -1,3 +1,5 @@ +//! Tests transitive dependencies. + use b_proto::a::b::B; use c_proto::a::b::c::C; diff --git a/proto/prost/private/tests/transitive_dependencies/b/c/c_test.rs b/proto/prost/private/tests/transitive_dependencies/b/c/c_test.rs index cad7c3ae36..c3e1bf3da9 100644 --- a/proto/prost/private/tests/transitive_dependencies/b/c/c_test.rs +++ b/proto/prost/private/tests/transitive_dependencies/b/c/c_test.rs @@ -1,3 +1,5 @@ +//! Tests transitive dependencies. + use any_proto::google::protobuf::Any; use c_proto::a::b::c::C; use duration_proto::google::protobuf::Duration; diff --git a/proto/prost/private/tests/types/BUILD.bazel b/proto/prost/private/tests/types/BUILD.bazel new file mode 100644 index 0000000000..f85368e8af --- /dev/null +++ b/proto/prost/private/tests/types/BUILD.bazel @@ -0,0 +1,26 @@ +load("@rules_proto//proto:defs.bzl", "proto_library") +load("//proto/prost:defs.bzl", "rust_prost_library") +load("//rust:defs.bzl", "rust_test") + +package(default_visibility = ["//proto/prost/private/tests:__subpackages__"]) + +proto_library( + name = "types_proto", + srcs = [ + "types.proto", + ], +) + +rust_prost_library( + name = "types_rs_proto", + proto = ":types_proto", +) + +rust_test( + name = "types_test", + srcs = ["types_test.rs"], + edition = "2021", + deps = [ + ":types_rs_proto", + ], +) diff --git a/proto/prost/private/tests/types/types.proto b/proto/prost/private/tests/types/types.proto new file mode 100644 index 0000000000..5173122dbf --- /dev/null +++ b/proto/prost/private/tests/types/types.proto @@ -0,0 +1,105 @@ +syntax = "proto3"; + +enum Enum { + A = 0; + B = 1; + C = 2; +} + +message Types { + Enum a_enum = 1; + + double a_double = 2; + + float a_float = 3; + + int32 a_int32 = 4; + + int64 a_int64 = 5; + + uint32 a_uint32 = 6; + + uint64 a_uint64 = 7; + + sint32 a_sint32 = 8; + + sint64 a_sint64 = 9; + + fixed32 a_fixed32 = 10; + + fixed64 a_fixed64 = 11; + + sfixed32 a_sfixed32 = 12; + + sfixed64 a_sfixed64 = 13; + + bool a_bool = 14; + + string a_string = 15; + + bytes a_bytes = 16; + + repeated Enum repeated_enum = 17; + + repeated double repeated_double = 18; + + repeated float repeated_float = 19; + + repeated int32 repeated_int32 = 20; + + repeated int64 repeated_int64 = 21; + + repeated uint32 repeated_uint32 = 22; + + repeated uint64 repeated_uint64 = 23; + + repeated sint32 repeated_sint32 = 24; + + repeated sint64 repeated_sint64 = 25; + + repeated fixed32 repeated_fixed32 = 26; + + repeated fixed64 repeated_fixed64 = 27; + + repeated sfixed32 repeated_sfixed32 = 28; + + repeated sfixed64 repeated_sfixed64 = 29; + + repeated bool repeated_bool = 30; + + repeated string repeated_string = 31; + + repeated bytes repeated_bytes = 32; + + map map_string_enum = 33; + + map map_string_double = 34; + + map map_string_float = 35; + + map map_string_int32 = 36; + + map map_string_int64 = 37; + + map map_string_uint32 = 38; + + map map_string_uint64 = 39; + + map map_string_sint32 = 40; + + map map_string_sint64 = 41; + + map map_string_fixed32 = 42; + + map map_string_fixed64 = 43; + + map map_string_sfixed32 = 44; + + map map_string_sfixed64 = 45; + + map map_string_bool = 46; + + map map_string_string = 47; + + map map_string_bytes = 48; +} diff --git a/proto/prost/private/tests/types/types_test.rs b/proto/prost/private/tests/types/types_test.rs new file mode 100644 index 0000000000..8428a3de3b --- /dev/null +++ b/proto/prost/private/tests/types/types_test.rs @@ -0,0 +1,97 @@ +use types_proto::Enum; +use types_proto::Types; + +#[test] +fn test_types() { + Types { + a_enum: Enum::C.into(), + a_double: 2.0, + a_float: 3.0, + a_int32: 4, + a_int64: 5, + a_uint32: 6, + a_uint64: 7, + a_sint32: 8, + a_sint64: 9, + a_fixed32: 10, + a_fixed64: 11, + a_sfixed32: 12, + a_sfixed64: 13, + a_bool: true, + a_string: "a".to_string(), + a_bytes: vec![1, 2, 3], + repeated_enum: vec![Enum::A.into(), Enum::B.into()], + repeated_double: vec![2.0, 3.0], + repeated_float: vec![3.0, 4.0], + repeated_int32: vec![4, 5], + repeated_int64: vec![5, 6], + repeated_uint32: vec![6, 7], + repeated_uint64: vec![7, 8], + repeated_sint32: vec![8, 9], + repeated_sint64: vec![9, 10], + repeated_fixed32: vec![10, 11], + repeated_fixed64: vec![11, 12], + repeated_sfixed32: vec![12, 13], + repeated_sfixed64: vec![13, 14], + repeated_bool: vec![true, false], + repeated_string: vec!["a".to_string(), "b".to_string()], + repeated_bytes: vec![vec![1, 2, 3], vec![4, 5, 6]], + map_string_enum: vec![ + ("a".to_string(), Enum::A.into()), + ("b".to_string(), Enum::B.into()), + ] + .into_iter() + .collect(), + map_string_double: vec![("a".to_string(), 2.0), ("b".to_string(), 3.0)] + .into_iter() + .collect(), + map_string_float: vec![("a".to_string(), 3.0), ("b".to_string(), 4.0)] + .into_iter() + .collect(), + map_string_int32: vec![("a".to_string(), 4), ("b".to_string(), 5)] + .into_iter() + .collect(), + map_string_int64: vec![("a".to_string(), 5), ("b".to_string(), 6)] + .into_iter() + .collect(), + map_string_uint32: vec![("a".to_string(), 6), ("b".to_string(), 7)] + .into_iter() + .collect(), + map_string_uint64: vec![("a".to_string(), 7), ("b".to_string(), 8)] + .into_iter() + .collect(), + map_string_sint32: vec![("a".to_string(), 8), ("b".to_string(), 9)] + .into_iter() + .collect(), + map_string_sint64: vec![("a".to_string(), 9), ("b".to_string(), 10)] + .into_iter() + .collect(), + map_string_fixed32: vec![("a".to_string(), 10), ("b".to_string(), 11)] + .into_iter() + .collect(), + map_string_fixed64: vec![("a".to_string(), 11), ("b".to_string(), 12)] + .into_iter() + .collect(), + map_string_sfixed32: vec![("a".to_string(), 12), ("b".to_string(), 13)] + .into_iter() + .collect(), + map_string_sfixed64: vec![("a".to_string(), 13), ("b".to_string(), 14)] + .into_iter() + .collect(), + map_string_bool: vec![("a".to_string(), true), ("b".to_string(), false)] + .into_iter() + .collect(), + map_string_string: vec![ + ("a".to_string(), "a".to_string()), + ("b".to_string(), "b".to_string()), + ] + .into_iter() + .collect(), + map_string_bytes: vec![ + ("a".to_string(), vec![1, 2, 3]), + ("b".to_string(), vec![4, 5, 6]), + ] + .into_iter() + .collect(), + }; +} diff --git a/proto/prost/private/tests/well_known_types/BUILD.bazel b/proto/prost/private/tests/well_known_types/BUILD.bazel index f7bc1b8752..1ca0eff7ed 100644 --- a/proto/prost/private/tests/well_known_types/BUILD.bazel +++ b/proto/prost/private/tests/well_known_types/BUILD.bazel @@ -1,5 +1,5 @@ load("@rules_proto//proto:defs.bzl", "proto_library") -load("//proto/prost:defs.bzl", "rust_tonic_library", "rust_prost_library") +load("//proto/prost:defs.bzl", "rust_prost_library") load("//rust:defs.bzl", "rust_test") package(default_visibility = ["//proto/prost/private/tests:__subpackages__"]) @@ -25,7 +25,7 @@ proto_library( ], ) -rust_tonic_library( +rust_prost_library( name = "well_known_types_rs_proto", proto = ":well_known_types_proto", ) diff --git a/proto/prost/private/tests/well_known_types/well_known_types.proto b/proto/prost/private/tests/well_known_types/well_known_types.proto index d5ea185c90..e952053b90 100644 --- a/proto/prost/private/tests/well_known_types/well_known_types.proto +++ b/proto/prost/private/tests/well_known_types/well_known_types.proto @@ -17,8 +17,6 @@ package wkt; message WellKnownTypes { - string name = 50; - // Any google.protobuf.Any any = 1; diff --git a/proto/prost/private/tests/well_known_types/well_known_types_test.rs b/proto/prost/private/tests/well_known_types/well_known_types_test.rs index 0004e1bcb4..3e6fbd872f 100644 --- a/proto/prost/private/tests/well_known_types/well_known_types_test.rs +++ b/proto/prost/private/tests/well_known_types/well_known_types_test.rs @@ -1,6 +1,107 @@ +//! Tests the Google well-known types. + +use any_proto::google::protobuf::Any; +use api_proto::google::protobuf::{Api, Method, Mixin}; +use compiler_plugin_proto::google::protobuf::compiler::Version; +use descriptor_proto::google::protobuf::DescriptorProto; +use duration_proto::google::protobuf::Duration; +use empty_proto::google::protobuf::Empty; +use field_mask_proto::google::protobuf::FieldMask; +use source_context_proto::google::protobuf::SourceContext; +use struct_proto::google::protobuf::Struct; +use struct_proto::google::protobuf::Value; +use timestamp_proto::google::protobuf::Timestamp; +use type_proto::google::protobuf::field::{Cardinality, Kind}; +use type_proto::google::protobuf::{Field, Option, Syntax, Type}; use well_known_types_proto::wkt::WellKnownTypes; +use wrappers_proto::google::protobuf::{ + BoolValue, BytesValue, DoubleValue, FloatValue, Int32Value, Int64Value, StringValue, + UInt32Value, UInt64Value, +}; #[test] fn test_well_known_types() { - todo!("Implement this test"); + let wkt = WellKnownTypes { + any: Some(Any { + type_url: "type.googleapis.com/google.protobuf.Any".to_string(), + value: vec![], + }), + api: Some(Api { + name: "api".to_string(), + methods: vec![Method { + name: "method".to_string(), + ..Method::default() + }], + options: vec![Option { + name: "option".to_string(), + ..Option::default() + }], + version: "1.2.3".to_string(), + source_context: Some(SourceContext { + file_name: "file_name".to_string(), + }), + mixins: vec![Mixin { + name: "mixin".to_string(), + ..Mixin::default() + }], + syntax: Syntax::Proto3.into(), + }), + method: Some(Method { + name: "method".to_string(), + ..Method::default() + }), + mixin: Some(Mixin { + name: "mixin".to_string(), + ..Mixin::default() + }), + compiler_version: Some(Version { + major: Some(1), + minor: Some(2), + patch: Some(3), + suffix: Some("suffix".to_string()), + }), + descriptor_proto: Some(DescriptorProto::default()), + empty: Some(Empty::default()), + duration: Some(Duration { + seconds: 1, + nanos: 2, + }), + field_mask: Some(FieldMask { + paths: vec!["path".to_string()], + }), + source_context: Some(SourceContext { + file_name: "file_name".to_string(), + }), + r#struct: Some(Struct { + fields: vec![("field".to_string(), Value::default())] + .into_iter() + .collect(), + }), + timestamp: Some(Timestamp { + seconds: 1, + nanos: 2, + }), + r#type: Some(Type { + name: "type".to_string(), + fields: vec![Field { + kind: Kind::TypeDouble.into(), + cardinality: Cardinality::Required.into(), + ..Field::default() + }], + ..Type::default() + }), + bool_value: Some(BoolValue { value: true }), + bytes_value: Some(BytesValue { value: vec![] }), + double_value: Some(DoubleValue { value: 1.0 }), + float_value: Some(FloatValue { value: 1.1 }), + int32_value: Some(Int32Value { value: 2 }), + int64_value: Some(Int64Value { value: 3 }), + string_value: Some(StringValue { + value: "value".to_string(), + }), + uint32_value: Some(UInt32Value { value: 4 }), + uint64_value: Some(UInt64Value { value: 5 }), + }; + + assert!(wkt.any.is_some()); } From c1f3d99b44c2699b7e6a042084465724b6a5e6ad Mon Sep 17 00:00:00 2001 From: Stu Schwartz Date: Tue, 27 Jun 2023 10:09:31 -0700 Subject: [PATCH 05/31] Regenerate documentation --- docs/flatten.md | 40 ++++++++++++++++++++++++++++++++++++++++ docs/rust_proto.md | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+) diff --git a/docs/flatten.md b/docs/flatten.md index 10bc280b44..9997b809d5 100644 --- a/docs/flatten.md +++ b/docs/flatten.md @@ -31,6 +31,7 @@ * [rust_library](#rust_library) * [rust_library_group](#rust_library_group) * [rust_proc_macro](#rust_proc_macro) +* [rust_prost_library](#rust_prost_library) * [rust_proto_library](#rust_proto_library) * [rust_proto_repositories](#rust_proto_repositories) * [rust_proto_toolchain](#rust_proto_toolchain) @@ -43,6 +44,7 @@ * [rust_stdlib_filegroup](#rust_stdlib_filegroup) * [rust_test](#rust_test) * [rust_test_suite](#rust_test_suite) +* [rust_tonic_library](#rust_tonic_library) * [rust_toolchain](#rust_toolchain) * [rust_toolchain_repository](#rust_toolchain_repository) * [rust_toolchain_repository_proxy](#rust_toolchain_repository_proxy) @@ -1792,6 +1794,25 @@ Registers the default toolchains for the `rules_rust` [bindgen][bg] rules. | register_toolchains | Whether or not to register toolchains. | `True` | + + +## rust_prost_library + +
+rust_prost_library(name, kwargs)
+
+ +A rule for generating a Rust library using Prost. + +**PARAMETERS** + + +| Name | Description | Default Value | +| :------------- | :------------- | :------------- | +| name | The name of the target. | none | +| kwargs | Additional keyword arguments for the underlying rust_prost_library rule. | none | + + ## rust_proto_repositories @@ -1996,6 +2017,25 @@ rust_test_suite( | kwargs | Additional keyword arguments for the underyling [rust_test](#rust_test) targets. The tags argument is also passed to the generated test_suite target. | none | + + +## rust_tonic_library + +
+rust_tonic_library(name, kwargs)
+
+ +A rule for generating a Rust library using Prost and Tonic. + +**PARAMETERS** + + +| Name | Description | Default Value | +| :------------- | :------------- | :------------- | +| name | The name of the target. | none | +| kwargs | Additional keyword arguments for the underlying rust_tonic_library rule. | none | + + ## rust_toolchain_repository diff --git a/docs/rust_proto.md b/docs/rust_proto.md index e76c8bae37..051cf87bce 100644 --- a/docs/rust_proto.md +++ b/docs/rust_proto.md @@ -6,6 +6,8 @@ * [rust_proto_repositories](#rust_proto_repositories) * [rust_proto_transitive_repositories](#rust_proto_transitive_repositories) * [rust_proto_toolchain](#rust_proto_toolchain) +* [rust_prost_library](#rust_prost_library) +* [rust_tonic_library](#rust_tonic_library) ## Overview @@ -260,6 +262,25 @@ See @rules_rust//proto:BUILD for examples of defining the toolchain. | protoc | The location of the protoc binary. It should be an executable target. | Label | optional | @com_google_protobuf//:protoc | + + +## rust_prost_library + +
+rust_prost_library(name, kwargs)
+
+ +A rule for generating a Rust library using Prost. + +**PARAMETERS** + + +| Name | Description | Default Value | +| :------------- | :------------- | :------------- | +| name | The name of the target. | none | +| kwargs | Additional keyword arguments for the underlying rust_prost_library rule. | none | + + ## rust_proto_repositories @@ -292,3 +313,22 @@ This macro should be called immediately after the `rust_proto_repositories` macr + + +## rust_tonic_library + +
+rust_tonic_library(name, kwargs)
+
+ +A rule for generating a Rust library using Prost and Tonic. + +**PARAMETERS** + + +| Name | Description | Default Value | +| :------------- | :------------- | :------------- | +| name | The name of the target. | none | +| kwargs | Additional keyword arguments for the underlying rust_tonic_library rule. | none | + + From a603dc2af534d20950528b2d80b1d11e98b045eb Mon Sep 17 00:00:00 2001 From: Stu Schwartz Date: Tue, 27 Jun 2023 10:11:56 -0700 Subject: [PATCH 06/31] Add to proto docs page. --- docs/BUILD.bazel | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/BUILD.bazel b/docs/BUILD.bazel index 2a37518536..f97a034a36 100644 --- a/docs/BUILD.bazel +++ b/docs/BUILD.bazel @@ -121,6 +121,8 @@ PAGES = dict([ "rust_proto_repositories", "rust_proto_transitive_repositories", "rust_proto_toolchain", + "rust_prost_library", + "rust_tonic_library", ], ), page( From cb0ab09592300718c3c4b340e57bd2ea895d1c9b Mon Sep 17 00:00:00 2001 From: Stu Schwartz Date: Tue, 27 Jun 2023 10:17:43 -0700 Subject: [PATCH 07/31] Bump min supported bazel version. --- .bazelci/presubmit.yml | 4 ++-- docs/index.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 1980565327..41235f38d8 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -205,7 +205,7 @@ tasks: ubuntu1804: name: "Min Bazel Version" # If updating the minimum bazel version, please also update /docs/index.md - bazel: "5.2.0" + bazel: "6.0.0" platform: ubuntu1804 build_targets: *default_linux_targets test_targets: *default_linux_targets @@ -213,7 +213,7 @@ tasks: post_shell_commands: *coverage_validation_post_shell_commands ubuntu1804_with_aspects: name: "Min Bazel Version With Aspects" - bazel: "5.2.0" + bazel: "6.0.0" platform: ubuntu1804 build_targets: *default_linux_targets test_targets: *default_linux_targets diff --git a/docs/index.md b/docs/index.md index 78ed9a77cb..ab982657e1 100644 --- a/docs/index.md +++ b/docs/index.md @@ -93,7 +93,7 @@ Failure to do so will result in rules attempting to match a `stable` toolchain w ## Supported bazel versions -The oldest version of Bazel the `main` branch is tested against is `5.2.0`. Previous versions may still be functional in certain environments, but this is the minimum version we strive to fully support. +The oldest version of Bazel the `main` branch is tested against is `6.0.0`. Previous versions may still be functional in certain environments, but this is the minimum version we strive to fully support. We test these rules against the latest rolling releases of Bazel, and aim for compatibility with them, but prioritise stable releases over rolling releases where necessary. From a1714e13cf6203a5f58b340ab9cfbf8c07595201 Mon Sep 17 00:00:00 2001 From: Stu Schwartz Date: Tue, 27 Jun 2023 10:18:44 -0700 Subject: [PATCH 08/31] buildifier --- proto/prost/private/tests/package_imports/BUILD.bazel | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/proto/prost/private/tests/package_imports/BUILD.bazel b/proto/prost/private/tests/package_imports/BUILD.bazel index 1f37842c47..20e313e216 100644 --- a/proto/prost/private/tests/package_imports/BUILD.bazel +++ b/proto/prost/private/tests/package_imports/BUILD.bazel @@ -17,16 +17,15 @@ rust_prost_library( proto = ":package_import_proto", ) - proto_library( name = "package_importer_proto", srcs = [ "package_importer.proto", ], + strip_import_prefix = "/proto/prost/private/tests/package_imports", deps = [ ":package_import_proto", ], - strip_import_prefix = "/proto/prost/private/tests/package_imports", ) rust_prost_library( From f3ccc016b51f79e24dbace650201ff1285a2baa7 Mon Sep 17 00:00:00 2001 From: Stu Schwartz Date: Tue, 27 Jun 2023 10:28:12 -0700 Subject: [PATCH 09/31] Always enable backtracing. --- proto/prost/private/protoc_wrapper.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/proto/prost/private/protoc_wrapper.rs b/proto/prost/private/protoc_wrapper.rs index deb02eb0cd..2c1f0743a5 100644 --- a/proto/prost/private/protoc_wrapper.rs +++ b/proto/prost/private/protoc_wrapper.rs @@ -462,6 +462,9 @@ impl Args { } fn main() { + // Always enable backtraces for the protoc wrapper. + env::set_var("RUST_BACKTRACE", "1"); + let Args { protoc, out_dir, From a58749cf7c97e63e8695d2ce9deef31f4787cfdf Mon Sep 17 00:00:00 2001 From: Stu Schwartz Date: Tue, 27 Jun 2023 11:15:55 -0700 Subject: [PATCH 10/31] Add more info to failing rename. --- proto/prost/private/protoc_wrapper.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/proto/prost/private/protoc_wrapper.rs b/proto/prost/private/protoc_wrapper.rs index 2c1f0743a5..5371bc7c82 100644 --- a/proto/prost/private/protoc_wrapper.rs +++ b/proto/prost/private/protoc_wrapper.rs @@ -26,7 +26,9 @@ fn find_generated_rust_files(out_dir: &Path) -> BTreeSet { } else if let Some(name) = path.file_name() { if name == "_" { let rs_name = path.parent().expect("Failed to get parent").join("_.rs"); - fs::rename(&path, &rs_name).expect("Failed to rename file"); + fs::rename(&path, &rs_name).unwrap_or_else(|err| { + panic!("Failed to rename file: {err:?}: {path:?} -> {rs_name:?}") + }); all_rs_files.insert(rs_name); } } @@ -531,7 +533,9 @@ fn main() { if real_tonic_file.exists() { continue; } - fs::rename(tonic_file, real_tonic_file).expect("Failed to rename file."); + fs::rename(tonic_file, &real_tonic_file).unwrap_or_else(|err| { + panic!("Failed to rename file: {err:?}: {tonic_file:?} -> {real_tonic_file:?}") + }); } else { let rs_file = PathBuf::from(format!( "{}.rs", From d7e73122b5fde390a0ef158ef33d7e1d1247635d Mon Sep 17 00:00:00 2001 From: Stu Schwartz Date: Tue, 27 Jun 2023 12:13:02 -0700 Subject: [PATCH 11/31] Set min rust version to 1.62.0 --- .bazelci/presubmit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 41235f38d8..670afed4b4 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -3,7 +3,7 @@ aspects_flags: &aspects_flags - "--config=rustfmt" - "--config=clippy" min_rust_version_shell_commands: &min_rust_version_shell_commands - - sed -i 's|^rust_register_toolchains(|rust_register_toolchains(versions = ["1.59.0"],\n|' WORKSPACE.bazel + - sed -i 's|^rust_register_toolchains(|rust_register_toolchains(versions = ["1.62.0"],\n|' WORKSPACE.bazel nightly_flags: &nightly_flags - "--//rust/toolchain/channel=nightly" nightly_aspects_flags: &nightly_aspects_flags From d67c839945ff373a701a9317ba9dae3f6d1b9055 Mon Sep 17 00:00:00 2001 From: Stu Schwartz Date: Tue, 27 Jun 2023 12:46:43 -0700 Subject: [PATCH 12/31] Handle rust keywords as package names. --- proto/prost/private/protoc_wrapper.rs | 62 ++++++++++++++++++- .../prost/private/tests/keywords/BUILD.bazel | 26 ++++++++ .../tests/keywords/mod_named_mod.proto | 7 +++ .../tests/keywords/mod_named_mod_test.rs | 12 ++++ 4 files changed, 106 insertions(+), 1 deletion(-) create mode 100644 proto/prost/private/tests/keywords/BUILD.bazel create mode 100644 proto/prost/private/tests/keywords/mod_named_mod.proto create mode 100644 proto/prost/private/tests/keywords/mod_named_mod_test.rs diff --git a/proto/prost/private/protoc_wrapper.rs b/proto/prost/private/protoc_wrapper.rs index 5371bc7c82..fbffb301db 100644 --- a/proto/prost/private/protoc_wrapper.rs +++ b/proto/prost/private/protoc_wrapper.rs @@ -186,8 +186,10 @@ fn write_module( let is_rust_module = module.name != "_"; if is_rust_module { + println!("Writing module: {}", module.name); + let rust_module_name = escape_keyword(module.name.clone()); content - .write_str(&format!("{}pub mod {} {{\n", indent, module.name)) + .write_str(&format!("{}pub mod {} {{\n", indent, rust_module_name)) .expect("Failed to write string"); } @@ -601,6 +603,28 @@ fn main() { } } +/// Rust built-in keywords and reserved keywords. +const RUST_KEYWORDS: [&'static str; 51] = [ + "abstract", "as", "async", "await", "become", "box", "break", "const", "continue", "crate", + "do", "dyn", "else", "enum", "extern", "false", "final", "fn", "for", "if", "impl", "in", + "let", "loop", "macro", "match", "mod", "move", "mut", "override", "priv", "pub", "ref", + "return", "self", "Self", "static", "struct", "super", "trait", "true", "try", "type", + "typeof", "unsafe", "unsized", "use", "virtual", "where", "while", "yield", +]; + +/// Returns true if the given string is a Rust keyword. +fn is_keyword(s: &str) -> bool { + RUST_KEYWORDS.contains(&s) +} + +/// Escapes a Rust keyword by prefixing it with `r#`. +fn escape_keyword(s: String) -> String { + if is_keyword(&s) { + return format!("r#{s}"); + } + s +} + #[cfg(test)] mod test { @@ -638,4 +662,40 @@ google.protobuf.DescriptorProto free: 11-INF ].into_iter().map(String::from).collect::>() ); } + + #[test] + fn is_keyword_test() { + let non_keywords = [ + "foo", "bar", "baz", "qux", "quux", "corge", "grault", "garply", "waldo", "fred", + "plugh", "xyzzy", "thud", + ]; + for non_keyword in &non_keywords { + assert!(!is_keyword(non_keyword)); + } + + for keyword in &RUST_KEYWORDS { + assert!(is_keyword(keyword)); + } + } + + #[test] + fn escape_keyword_test() { + let non_keywords = [ + "foo", "bar", "baz", "qux", "quux", "corge", "grault", "garply", "waldo", "fred", + "plugh", "xyzzy", "thud", + ]; + for non_keyword in &non_keywords { + assert_eq!( + escape_keyword(non_keyword.to_string()), + non_keyword.to_owned() + ); + } + + for keyword in &RUST_KEYWORDS { + assert_eq!( + escape_keyword(keyword.to_string()), + format!("r#{}", keyword) + ); + } + } } diff --git a/proto/prost/private/tests/keywords/BUILD.bazel b/proto/prost/private/tests/keywords/BUILD.bazel new file mode 100644 index 0000000000..415301e214 --- /dev/null +++ b/proto/prost/private/tests/keywords/BUILD.bazel @@ -0,0 +1,26 @@ +load("@rules_proto//proto:defs.bzl", "proto_library") +load("//proto/prost:defs.bzl", "rust_prost_library") +load("//rust:defs.bzl", "rust_test") + +package(default_visibility = ["//proto/prost/private/tests:__subpackages__"]) + +proto_library( + name = "mod_named_mod_proto", + srcs = [ + "mod_named_mod.proto", + ], +) + +rust_prost_library( + name = "mod_named_mod_rs_proto", + proto = ":mod_named_mod_proto", +) + +rust_test( + name = "mod_named_mod_test", + srcs = ["mod_named_mod_test.rs"], + edition = "2021", + deps = [ + ":mod_named_mod_rs_proto", + ], +) diff --git a/proto/prost/private/tests/keywords/mod_named_mod.proto b/proto/prost/private/tests/keywords/mod_named_mod.proto new file mode 100644 index 0000000000..8e6c611565 --- /dev/null +++ b/proto/prost/private/tests/keywords/mod_named_mod.proto @@ -0,0 +1,7 @@ +syntax = "proto3"; + +package mod; + +message A { + string name = 1; +} diff --git a/proto/prost/private/tests/keywords/mod_named_mod_test.rs b/proto/prost/private/tests/keywords/mod_named_mod_test.rs new file mode 100644 index 0000000000..4b326a63ec --- /dev/null +++ b/proto/prost/private/tests/keywords/mod_named_mod_test.rs @@ -0,0 +1,12 @@ +//! Tests module names that are keywords. + +use mod_named_mod_proto::r#mod::A; + +#[test] +fn test_nested_messages() { + let a = A { + name: "a".to_string(), + }; + + assert_eq!(a.name, "a"); +} From e03d107ab9c96544f75b2cf82a2897d5ffd278da Mon Sep 17 00:00:00 2001 From: Stu Schwartz Date: Tue, 27 Jun 2023 13:36:13 -0700 Subject: [PATCH 13/31] exclude windows from prost toolchain support. --- proto/prost/BUILD.bazel | 14 +++++++- proto/prost/private/prost.bzl | 32 +++++++++++++++++-- proto/prost/private/protoc_wrapper.rs | 19 ++++++----- .../tests/transitive_dependencies/b/c/c.proto | 2 +- proto/prost/repositories.bzl | 2 +- 5 files changed, 56 insertions(+), 13 deletions(-) diff --git a/proto/prost/BUILD.bazel b/proto/prost/BUILD.bazel index 13a18a1ced..dbfcf8469f 100644 --- a/proto/prost/BUILD.bazel +++ b/proto/prost/BUILD.bazel @@ -35,9 +35,21 @@ rust_prost_toolchain( ) toolchain( - name = "default_prost_toolchain", + name = "default_prost_toolchain_linux", toolchain = "default_prost_toolchain_impl", toolchain_type = "//proto/prost:toolchain_type", + target_compatible_with = [ + "@platforms//os:linux", + ], +) + +toolchain( + name = "default_prost_toolchain_osx", + toolchain = "default_prost_toolchain_impl", + toolchain_type = "//proto/prost:toolchain_type", + target_compatible_with = [ + "@platforms//os:osx", + ], ) bzl_library( diff --git a/proto/prost/private/prost.bzl b/proto/prost/private/prost.bzl index f28ec2e92d..7a7a980f46 100644 --- a/proto/prost/private/prost.bzl +++ b/proto/prost/private/prost.bzl @@ -342,16 +342,44 @@ def _make_rust_prost_library_rule(doc, is_tonic): }, ) -rust_tonic_library = _make_rust_prost_library_rule( +rust_tonic_library_rule = _make_rust_prost_library_rule( doc = "A rule for generating a Rust library using Prost and Tonic.", is_tonic = True, ) -rust_prost_library = _make_rust_prost_library_rule( +rust_prost_library_rule = _make_rust_prost_library_rule( doc = "A rule for generating a Rust library using Prost.", is_tonic = False, ) +def rust_tonic_library(name, **kwargs): + """A rule for generating a Rust library using Prost and Tonic. + + See `rust_tonic_library` for more details. + """ + rust_tonic_library_rule( + name = name, + target_compatible_with = kwargs.pop("target_compatible_with", select({ + "@platforms//os:windows": ["@platforms//:incompatible"], + "//conditions:default": [], + })), + **kwargs + ) + +def rust_prost_library(name, **kwargs): + """A rule for generating a Rust library using Prost and Tonic. + + See `rust_prost_library` for more details. + """ + rust_prost_library_rule( + name = name, + target_compatible_with = kwargs.pop("target_compatible_with", select({ + "@platforms//os:windows": ["@platforms//:incompatible"], + "//conditions:default": [], + })), + **kwargs + ) + def _rust_prost_toolchain_impl(ctx): is_tonic = ctx.attr.tonic_runtime != None diff --git a/proto/prost/private/protoc_wrapper.rs b/proto/prost/private/protoc_wrapper.rs index fbffb301db..9f7c84b6df 100644 --- a/proto/prost/private/protoc_wrapper.rs +++ b/proto/prost/private/protoc_wrapper.rs @@ -186,7 +186,6 @@ fn write_module( let is_rust_module = module.name != "_"; if is_rust_module { - println!("Writing module: {}", module.name); let rust_module_name = escape_keyword(module.name.clone()); content .write_str(&format!("{}pub mod {} {{\n", indent, rust_module_name)) @@ -414,9 +413,6 @@ impl Args { rustfmt = Some(PathBuf::from(value)); } ("--proto_path", value) => { - // if value.ends_with("import_proto") { - // continue; - // } proto_paths.push(value.to_string()); } (arg, value) => { @@ -536,17 +532,22 @@ fn main() { continue; } fs::rename(tonic_file, &real_tonic_file).unwrap_or_else(|err| { - panic!("Failed to rename file: {err:?}: {tonic_file:?} -> {real_tonic_file:?}") + panic!("Failed to rename file: {err:?}: {tonic_file:?} -> {real_tonic_file:?}"); }); } else { - let rs_file = PathBuf::from(format!( + let rs_file_str = format!( "{}.rs", tonic_file .to_str() .expect("Failed to convert to str") .strip_suffix(".tonic.rs") .expect("Failed to strip suffix.") - )); + ); + let rs_file = PathBuf::from(&rs_file_str) + .canonicalize() + .unwrap_or_else(|err| { + panic!("Failed to canonicalize path: {err:?}: {rs_file_str:?}") + }); if rs_file.exists() { let rs_content = fs::read_to_string(&rs_file).expect("Failed to read file."); @@ -554,7 +555,9 @@ fn main() { fs::read_to_string(tonic_file).expect("Failed to read file."); fs::write(tonic_file, format!("{}\n{}", rs_content, tonic_content)) .expect("Failed to write file."); - fs::remove_file(&rs_file).expect("Failed to remove file."); + fs::remove_file(&rs_file).unwrap_or_else(|err| { + panic!("Failed to remove file: {err:?}: {rs_file:?}") + }); } } } diff --git a/proto/prost/private/tests/transitive_dependencies/b/c/c.proto b/proto/prost/private/tests/transitive_dependencies/b/c/c.proto index ea0794198d..b1b92b1824 100644 --- a/proto/prost/private/tests/transitive_dependencies/b/c/c.proto +++ b/proto/prost/private/tests/transitive_dependencies/b/c/c.proto @@ -10,5 +10,5 @@ message C { google.protobuf.Any any = 3; - google.protobuf.Duration duration = 4; + google.protobuf.Duration duration = 4; } diff --git a/proto/prost/repositories.bzl b/proto/prost/repositories.bzl index 50f9d54d68..a44e9a4d84 100644 --- a/proto/prost/repositories.bzl +++ b/proto/prost/repositories.bzl @@ -11,4 +11,4 @@ def rust_prost_register_toolchains(register_toolchains = True): """Register toolchains for Rust Prost rules.""" if register_toolchains: - native.register_toolchains(str(Label("//proto/prost:default_prost_toolchain"))) + native.register_toolchains("@rules_rust//proto/prost/...") From e901991a7d88d1e6506ea514fddd69504c9cabf8 Mon Sep 17 00:00:00 2001 From: Stu Schwartz Date: Tue, 27 Jun 2023 13:39:52 -0700 Subject: [PATCH 14/31] buildifier --- proto/prost/BUILD.bazel | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/proto/prost/BUILD.bazel b/proto/prost/BUILD.bazel index dbfcf8469f..ecccc1ff2f 100644 --- a/proto/prost/BUILD.bazel +++ b/proto/prost/BUILD.bazel @@ -36,20 +36,20 @@ rust_prost_toolchain( toolchain( name = "default_prost_toolchain_linux", - toolchain = "default_prost_toolchain_impl", - toolchain_type = "//proto/prost:toolchain_type", target_compatible_with = [ "@platforms//os:linux", ], + toolchain = "default_prost_toolchain_impl", + toolchain_type = "//proto/prost:toolchain_type", ) toolchain( name = "default_prost_toolchain_osx", - toolchain = "default_prost_toolchain_impl", - toolchain_type = "//proto/prost:toolchain_type", target_compatible_with = [ "@platforms//os:osx", ], + toolchain = "default_prost_toolchain_impl", + toolchain_type = "//proto/prost:toolchain_type", ) bzl_library( From c4fe6aafdf33f3ebab953b8dcca6b7ffd737bc8d Mon Sep 17 00:00:00 2001 From: Stu Schwartz Date: Tue, 27 Jun 2023 14:19:13 -0700 Subject: [PATCH 15/31] redundant --- proto/prost/private/protoc_wrapper.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proto/prost/private/protoc_wrapper.rs b/proto/prost/private/protoc_wrapper.rs index 9f7c84b6df..517d8450c0 100644 --- a/proto/prost/private/protoc_wrapper.rs +++ b/proto/prost/private/protoc_wrapper.rs @@ -607,7 +607,7 @@ fn main() { } /// Rust built-in keywords and reserved keywords. -const RUST_KEYWORDS: [&'static str; 51] = [ +const RUST_KEYWORDS: [&str; 51] = [ "abstract", "as", "async", "await", "become", "box", "break", "const", "continue", "crate", "do", "dyn", "else", "enum", "extern", "false", "final", "fn", "for", "if", "impl", "in", "let", "loop", "macro", "match", "mod", "move", "mut", "override", "priv", "pub", "ref", From 0f806155d5c14319be393cdc23d41b3983a02432 Mon Sep 17 00:00:00 2001 From: Stu Schwartz Date: Tue, 27 Jun 2023 22:34:20 -0700 Subject: [PATCH 16/31] Use prost-types to parse the file descriptor set. --- proto/prost/private/BUILD.bazel | 4 + proto/prost/private/prost.bzl | 7 +- proto/prost/private/protoc_wrapper.rs | 379 +++++++++++++++++++------- 3 files changed, 283 insertions(+), 107 deletions(-) diff --git a/proto/prost/private/BUILD.bazel b/proto/prost/private/BUILD.bazel index 852212d755..0bccf17ffc 100644 --- a/proto/prost/private/BUILD.bazel +++ b/proto/prost/private/BUILD.bazel @@ -11,6 +11,10 @@ rust_binary( "TONIC_EXTENSION": TONIC_EXTENSION, }, visibility = ["//visibility:public"], + deps = [ + "//proto/prost/private/3rdparty/crates:prost", + "//proto/prost/private/3rdparty/crates:prost-types", + ], ) rust_test( diff --git a/proto/prost/private/prost.bzl b/proto/prost/private/prost.bzl index 7a7a980f46..1fb51adbe3 100644 --- a/proto/prost/private/prost.bzl +++ b/proto/prost/private/prost.bzl @@ -41,6 +41,7 @@ def _compile_proto(ctx, crate_name, proto_info, deps, prost_toolchain, is_tonic, additional_args.add("--package_info_output={}".format("{}={}".format(crate_name, package_info_file.path))) additional_args.add("--deps_info={}".format(deps_info_file.path)) additional_args.add("--prost_opt=compile_well_known_types") + additional_args.add("--descriptor_set={}".format(proto_info.direct_descriptor_set.path)) additional_args.add_all(prost_toolchain.prost_opts, format_each = "--prost_opt=%s") if is_tonic: @@ -58,7 +59,7 @@ def _compile_proto(ctx, crate_name, proto_info, deps, prost_toolchain, is_tonic, additional_args.add("--rustfmt={}".format(rustfmt_toolchain.rustfmt.path)) tools = depset(transitive = [tools, rustfmt_toolchain.all_files]) - additional_inputs = depset([deps_info_file] + [dep[provider].package_info for dep in deps]) + additional_inputs = depset([deps_info_file, proto_info.direct_descriptor_set] + [dep[provider].package_info for dep in deps]) proto_common.compile( actions = ctx.actions, @@ -203,10 +204,12 @@ def _rust_prost_aspect_impl(target, ctx): crate_name = ctx.label.name.replace("-", "_").replace("/", "_") + proto_info = target[ProtoInfo] + lib_rs, package_info_file = _compile_proto( ctx = ctx, crate_name = crate_name, - proto_info = target[ProtoInfo], + proto_info = proto_info, deps = proto_deps, prost_toolchain = prost_toolchain, is_tonic = ctx.attr._is_tonic, diff --git a/proto/prost/private/protoc_wrapper.rs b/proto/prost/private/protoc_wrapper.rs index 517d8450c0..0ec43d38db 100644 --- a/proto/prost/private/protoc_wrapper.rs +++ b/proto/prost/private/protoc_wrapper.rs @@ -9,6 +9,9 @@ use std::path::Path; use std::path::PathBuf; use std::process; +use prost::Message; +use prost_types::{DescriptorProto, EnumDescriptorProto, FileDescriptorProto, FileDescriptorSet}; + /// Locate prost outputs in the protoc output directory. fn find_generated_rust_files(out_dir: &Path) -> BTreeSet { let mut all_rs_files: BTreeSet = BTreeSet::new(); @@ -212,84 +215,144 @@ fn write_module( } } -/// Create a map of proto files to their free field number strings. -/// -/// We use the free field numbers api as a convenient way to get a list of all message types in a -/// proto file. -fn create_free_field_numbers_map( - proto_files: BTreeSet, - protoc: &Path, - includes: &[String], - proto_paths: &[String], -) -> BTreeMap { - proto_files - .into_iter() - .map(|proto_file| { - let output = process::Command::new(protoc) - .args(includes.iter().map(|include| format!("-I{}", include))) - .arg("--print_free_field_numbers") - .args( - proto_paths - .iter() - .map(|proto_path| format!("--proto_path={}", proto_path)), - ) - .arg(&proto_file) - .stdout(process::Stdio::piped()) - .spawn() - .expect("Failed to spawn protoc") - .wait_with_output() - .expect("Failed to wait on protoc"); - - // check success - if !output.status.success() { - panic!( - "Failed to run protoc: {}", - std::str::from_utf8(&output.stderr).expect("Failed to parse stderr") - ); - } +#[derive(Debug, Ord, PartialOrd, Eq, PartialEq)] +struct ProtoPath(String); - let stdout = std::str::from_utf8(&output.stdout).expect("Failed to parse stdout"); - (proto_file, stdout.to_owned()) - }) - .collect() +impl ProtoPath { + fn join(&self, path: &str) -> ProtoPath { + if self.0.is_empty() { + return ProtoPath(path.to_string()); + } + + ProtoPath(format!("{}.{}", self.0, path)) + } +} + +impl ToString for ProtoPath { + fn to_string(&self) -> String { + self.0.clone() + } +} + +impl From<&str> for ProtoPath { + fn from(path: &str) -> Self { + ProtoPath(path.to_string()) + } +} + +#[derive(Debug, Ord, PartialOrd, Eq, PartialEq)] +struct RustModulePath(String); + +impl RustModulePath { + fn join(&self, path: &str) -> RustModulePath { + if self.0.is_empty() { + return RustModulePath(path.to_string()); + } + + RustModulePath(format!("{}::{}", self.0, path)) + } +} + +impl ToString for RustModulePath { + fn to_string(&self) -> String { + self.0.clone() + } +} + +impl From<&str> for RustModulePath { + fn from(path: &str) -> Self { + RustModulePath(path.to_string()) + } } /// Compute the `--extern_path` flags for a list of proto files. This is /// expected to convert proto files into a list of /// `.example.prost.helloworld=crate_name::example::prost::helloworld` -fn compute_proto_package_info( - proto_free_field_numbers: &BTreeMap, +fn get_extern_paths( + descriptor_set_path: &PathBuf, crate_name: &str, -) -> Result, String> { - let mut extern_paths = BTreeSet::new(); - for stdout in proto_free_field_numbers.values() { - for line in stdout.lines() { - let text = line.trim(); - if text.is_empty() { - continue; - } +) -> Result, String> { + let mut extern_paths = BTreeMap::new(); + let rust_path = RustModulePath(crate_name.to_string()); - let (absolute, _) = text - .split_once(' ') - .expect("Failed to split free field number line"); + let descriptor_set_bytes = + fs::read(descriptor_set_path).expect("Failed to read descriptor set"); + let descriptor_set = FileDescriptorSet::decode(descriptor_set_bytes.as_slice()) + .expect("Failed to decode descriptor set"); - let mut package = ""; - let mut symbol_name = absolute; - if let Some((package_, symbol_name_)) = absolute.rsplit_once('.') { - package = package_; - symbol_name = symbol_name_; - } - let symbol = format!("{}::{}", package.replace('.', "::"), symbol_name); - let extern_path = format!(".{}={}::{}", absolute, crate_name, symbol.trim_matches(':')); - if !extern_paths.insert(extern_path.clone()) { - return Err(format!("Duplicate extern: {}", extern_path)); - } - } + for file in descriptor_set.file.iter() { + descriptor_set_file_to_extern_paths(&mut extern_paths, &rust_path, file); } Ok(extern_paths) } +/// +fn descriptor_set_file_to_extern_paths( + extern_paths: &mut BTreeMap, + rust_path: &RustModulePath, + file: &FileDescriptorProto, +) { + let package = file.package.clone().unwrap_or_default(); + let rust_path = rust_path.join(&package.replace('.', "::")); + let proto_path = ProtoPath(package); + + for message_type in file.message_type.iter() { + message_type_to_extern_paths(extern_paths, &proto_path, &rust_path, message_type); + } + + for enum_type in file.enum_type.iter() { + enum_type_to_extern_paths(extern_paths, &proto_path, &rust_path, enum_type); + } +} + +/// Add the extern_path pairs for a message descriptor type. +fn message_type_to_extern_paths( + extern_paths: &mut BTreeMap, + proto_path: &ProtoPath, + rust_path: &RustModulePath, + message_type: &DescriptorProto, +) { + let message_type_name = message_type + .name + .as_ref() + .expect("Failed to get message type name"); + + extern_paths.insert( + proto_path.join(message_type_name), + rust_path.join(message_type_name), + ); + + let name_lower = message_type_name.to_lowercase(); + let proto_path = proto_path.join(&name_lower); + let rust_path = rust_path.join(&name_lower); + + for nested_type in message_type.nested_type.iter() { + message_type_to_extern_paths(extern_paths, &proto_path, &rust_path, nested_type) + } + + for enum_type in message_type.enum_type.iter() { + enum_type_to_extern_paths(extern_paths, &proto_path, &rust_path, enum_type); + } +} + +/// Add the extern_path pairs for an enum type. +fn enum_type_to_extern_paths( + extern_paths: &mut BTreeMap, + proto_path: &ProtoPath, + rust_path: &RustModulePath, + enum_type: &EnumDescriptorProto, +) { + let enum_type_name = enum_type + .name + .as_ref() + .expect("Failed to get enum type name"); + extern_paths.insert( + proto_path.join(enum_type_name), + rust_path.join(enum_type_name), + ); +} + /// The parsed command-line arguments. struct Args { /// The path to the protoc binary. @@ -310,6 +373,9 @@ struct Args { /// The include directories. includes: Vec, + /// Dependency descriptor sets. + descriptor_set: PathBuf, + /// The path to the generated lib.rs file. out_librs: PathBuf, @@ -335,6 +401,7 @@ impl Args { let mut package_info_file: Option = None; let mut proto_files: Vec = Vec::new(); let mut includes = Vec::new(); + let mut descriptor_set = None; let mut out_librs: Option = None; let mut rustfmt: Option = None; let mut proto_paths = Vec::new(); @@ -406,6 +473,9 @@ impl Args { } } } + ("--descriptor_set", value) => { + descriptor_set = Some(PathBuf::from(value)); + } ("--out_librs", value) => { out_librs = Some(PathBuf::from(value)); } @@ -444,6 +514,12 @@ impl Args { if out_librs.is_none() { return Err("No `--out_librs` value was found. Unable to parse the output location for all combined prost outputs.".to_string()); } + if descriptor_set.is_none() { + return Err( + "No `--descriptor_set` value was found. Unable to parse descriptor set path." + .to_string(), + ); + } Ok(Args { protoc: protoc.unwrap(), @@ -452,6 +528,7 @@ impl Args { package_info_file: package_info_file.unwrap(), proto_files, includes, + descriptor_set: descriptor_set.unwrap(), out_librs: out_librs.unwrap(), rustfmt, proto_paths, @@ -472,6 +549,7 @@ fn main() { package_info_file, proto_files, includes, + descriptor_set, out_librs, rustfmt, proto_paths, @@ -564,27 +642,25 @@ fn main() { } // Locate all prost-generated outputs. - let rust_files: BTreeSet = find_generated_rust_files(&out_dir); + let rust_files = find_generated_rust_files(&out_dir); if rust_files.is_empty() { panic!("No .rs files were generated by prost."); } - let free_field_numbers = create_free_field_numbers_map( - proto_files.into_iter().collect::>(), - &protoc, - &includes, - &proto_paths, - ); - - let package_info: BTreeSet = - compute_proto_package_info(&free_field_numbers, &crate_name) - .expect("Failed to compute proto package info"); + let extern_paths = get_extern_paths(&descriptor_set, &crate_name) + .expect("Failed to compute proto package info"); // Write outputs fs::write(&out_librs, generate_lib_rs(&rust_files, is_tonic)).expect("Failed to write file."); fs::write( package_info_file, - package_info.into_iter().collect::>().join("\n"), + extern_paths + .into_iter() + .map(|(proto_path, rust_path)| { + format!(".{}={}", proto_path.to_string(), rust_path.to_string()) + }) + .collect::>() + .join("\n"), ) .expect("Failed to write file."); @@ -633,37 +709,130 @@ mod test { use super::*; - use std::collections::{BTreeMap, BTreeSet}; + use std::collections::BTreeMap; #[test] - fn compute_proto_package_info_test() { - // Example output from running `protoc --print_free_field_numbers` on - // https://github.com/protocolbuffers/protobuf/blob/v23.3/src/google/protobuf/descriptor.proto - let free_field_numbers_output = r" -google.protobuf.FileDescriptorSet free: 2-INF -google.protobuf.FileDescriptorProto free: 13-INF -google.protobuf.DescriptorProto.ExtensionRange free: 4-INF -google.protobuf.DescriptorProto.ReservedRange free: 3-INF -google.protobuf.DescriptorProto free: 11-INF -" - .to_owned(); - let package_infos = compute_proto_package_info( - &BTreeMap::from([( - PathBuf::from("/tmp/google/protobuf/descriptor.proto"), - free_field_numbers_output, - )]), - "crate_name", - ) - .unwrap(); - - assert_eq!(package_infos, [ - ".google.protobuf.DescriptorProto.ExtensionRange=crate_name::google::protobuf::DescriptorProto::ExtensionRange", - ".google.protobuf.DescriptorProto.ReservedRange=crate_name::google::protobuf::DescriptorProto::ReservedRange", - ".google.protobuf.DescriptorProto=crate_name::google::protobuf::DescriptorProto", - ".google.protobuf.FileDescriptorProto=crate_name::google::protobuf::FileDescriptorProto", - ".google.protobuf.FileDescriptorSet=crate_name::google::protobuf::FileDescriptorSet" - ].into_iter().map(String::from).collect::>() - ); + fn enum_type_to_extern_paths_test() { + let enum_descriptor = EnumDescriptorProto { + name: Some("Foo".to_string()), + ..EnumDescriptorProto::default() + }; + + { + let mut extern_paths = BTreeMap::new(); + enum_type_to_extern_paths( + &mut extern_paths, + &ProtoPath::from("bar"), + &RustModulePath::from("bar"), + &enum_descriptor, + ); + + assert_eq!(extern_paths.len(), 1); + assert_eq!( + extern_paths.get(&ProtoPath::from("bar.Foo")), + Some(&RustModulePath::from("bar::Foo")) + ); + } + + { + let mut extern_paths = BTreeMap::new(); + enum_type_to_extern_paths( + &mut extern_paths, + &ProtoPath::from("bar.baz"), + &RustModulePath::from("bar::baz"), + &enum_descriptor, + ); + + assert_eq!(extern_paths.len(), 1); + assert_eq!( + extern_paths.get(&ProtoPath::from("bar.baz.Foo")), + Some(&RustModulePath::from("bar::baz::Foo")) + ); + } + } + + #[test] + fn message_type_to_extern_paths_test() { + let message_descriptor = DescriptorProto { + name: Some("Foo".to_string()), + nested_type: vec![ + DescriptorProto { + name: Some("Bar".to_string()), + ..DescriptorProto::default() + }, + DescriptorProto { + name: Some("Nested".to_string()), + nested_type: vec![DescriptorProto { + name: Some("Baz".to_string()), + enum_type: vec![EnumDescriptorProto { + name: Some("Chuck".to_string()), + ..EnumDescriptorProto::default() + }], + ..DescriptorProto::default() + }], + ..DescriptorProto::default() + }, + ], + enum_type: vec![EnumDescriptorProto { + name: Some("Qux".to_string()), + ..EnumDescriptorProto::default() + }], + ..DescriptorProto::default() + }; + + { + let mut extern_paths = BTreeMap::new(); + message_type_to_extern_paths( + &mut extern_paths, + &ProtoPath::from("bar"), + &RustModulePath::from("bar"), + &message_descriptor, + ); + assert_eq!(extern_paths.len(), 6); + assert_eq!( + extern_paths.get(&ProtoPath::from("bar.Foo")), + Some(&RustModulePath::from("bar::Foo")) + ); + assert_eq!( + extern_paths.get(&ProtoPath::from("bar.foo.Bar")), + Some(&RustModulePath::from("bar::foo::Bar")) + ); + assert_eq!( + extern_paths.get(&ProtoPath::from("bar.foo.Nested")), + Some(&RustModulePath::from("bar::foo::Nested")) + ); + assert_eq!( + extern_paths.get(&ProtoPath::from("bar.foo.nested.Baz")), + Some(&RustModulePath::from("bar::foo::nested::Baz")) + ); + } + + { + let mut extern_paths = BTreeMap::new(); + message_type_to_extern_paths( + &mut extern_paths, + &ProtoPath::from("bar.bob"), + &RustModulePath::from("bar::bob"), + &message_descriptor, + ); + assert_eq!(extern_paths.len(), 6); + assert_eq!( + extern_paths.get(&ProtoPath::from("bar.bob.Foo")), + Some(&RustModulePath::from("bar::bob::Foo")) + ); + assert_eq!( + extern_paths.get(&ProtoPath::from("bar.bob.foo.Bar")), + Some(&RustModulePath::from("bar::bob::foo::Bar")) + ); + assert_eq!( + extern_paths.get(&ProtoPath::from("bar.bob.foo.Nested")), + Some(&RustModulePath::from("bar::bob::foo::Nested")) + ); + assert_eq!( + extern_paths.get(&ProtoPath::from("bar.bob.foo.nested.Baz")), + Some(&RustModulePath::from("bar::bob::foo::nested::Baz")) + ); + } } #[test] From 2870e434d556cb42118129536bd1256146e9621d Mon Sep 17 00:00:00 2001 From: Stu Schwartz Date: Tue, 27 Jun 2023 23:11:44 -0700 Subject: [PATCH 17/31] Cleanup and more tests. --- proto/prost/private/protoc_wrapper.rs | 149 ++++++++++++++++-- .../tests/transitive_dependencies/BUILD.bazel | 1 + .../tests/transitive_dependencies/a.proto | 3 + .../tests/transitive_dependencies/a_test.rs | 2 + proto/prost/private/tests/types/BUILD.bazel | 1 + proto/prost/private/tests/types/types.proto | 64 +++----- proto/prost/private/tests/types/types_test.rs | 3 +- 7 files changed, 168 insertions(+), 55 deletions(-) diff --git a/proto/prost/private/protoc_wrapper.rs b/proto/prost/private/protoc_wrapper.rs index 0ec43d38db..4efd1e6539 100644 --- a/proto/prost/private/protoc_wrapper.rs +++ b/proto/prost/private/protoc_wrapper.rs @@ -10,7 +10,10 @@ use std::path::PathBuf; use std::process; use prost::Message; -use prost_types::{DescriptorProto, EnumDescriptorProto, FileDescriptorProto, FileDescriptorSet}; +use prost_types::{ + DescriptorProto, EnumDescriptorProto, FileDescriptorProto, FileDescriptorSet, + OneofDescriptorProto, +}; /// Locate prost outputs in the protoc output directory. fn find_generated_rust_files(out_dir: &Path) -> BTreeSet { @@ -215,16 +218,23 @@ fn write_module( } } -#[derive(Debug, Ord, PartialOrd, Eq, PartialEq)] +/// ProtoPath is a path to a proto message, enum, or oneof. +/// +/// Example: `helloworld.Greeter.HelloRequest` +#[derive(Debug, Clone, Ord, PartialOrd, Eq, PartialEq)] struct ProtoPath(String); impl ProtoPath { - fn join(&self, path: &str) -> ProtoPath { + /// Join a component to the end of the path. + fn join(&self, component: &str) -> ProtoPath { if self.0.is_empty() { - return ProtoPath(path.to_string()); + return ProtoPath(component.to_string()); + } + if component.is_empty() { + return self.clone(); } - ProtoPath(format!("{}.{}", self.0, path)) + ProtoPath(format!("{}.{}", self.0, component)) } } @@ -240,14 +250,21 @@ impl From<&str> for ProtoPath { } } -#[derive(Debug, Ord, PartialOrd, Eq, PartialEq)] +/// RustModulePath is a path to a rust module. +/// +/// Example: `helloworld::greeter::HelloRequest` +#[derive(Debug, Clone, Ord, PartialOrd, Eq, PartialEq)] struct RustModulePath(String); impl RustModulePath { + /// Join a path to the end of the module path. fn join(&self, path: &str) -> RustModulePath { if self.0.is_empty() { return RustModulePath(path.to_string()); } + if path.is_empty() { + return self.clone(); + } RustModulePath(format!("{}::{}", self.0, path)) } @@ -266,8 +283,8 @@ impl From<&str> for RustModulePath { } /// Compute the `--extern_path` flags for a list of proto files. This is -/// expected to convert proto files into a list of -/// `.example.prost.helloworld=crate_name::example::prost::helloworld` +/// expected to convert proto files into a BTreeMap of +/// `example.prost.helloworld`: `crate_name::example::prost::helloworld`. fn get_extern_paths( descriptor_set_path: &PathBuf, crate_name: &str, @@ -287,7 +304,7 @@ fn get_extern_paths( Ok(extern_paths) } -/// +/// Add the extern_path pairs for a file descriptor type. fn descriptor_set_file_to_extern_paths( extern_paths: &mut BTreeMap, rust_path: &RustModulePath, @@ -334,6 +351,10 @@ fn message_type_to_extern_paths( for enum_type in message_type.enum_type.iter() { enum_type_to_extern_paths(extern_paths, &proto_path, &rust_path, enum_type); } + + for oneof_type in message_type.oneof_decl.iter() { + oneof_type_to_extern_paths(extern_paths, &proto_path, &rust_path, oneof_type); + } } /// Add the extern_path pairs for an enum type. @@ -353,6 +374,22 @@ fn enum_type_to_extern_paths( ); } +fn oneof_type_to_extern_paths( + extern_paths: &mut BTreeMap, + proto_path: &ProtoPath, + rust_path: &RustModulePath, + oneof_type: &OneofDescriptorProto, +) { + let oneof_type_name = oneof_type + .name + .as_ref() + .expect("Failed to get oneof type name"); + extern_paths.insert( + proto_path.join(oneof_type_name), + rust_path.join(oneof_type_name), + ); +} + /// The parsed command-line arguments. struct Args { /// The path to the protoc binary. @@ -711,6 +748,46 @@ mod test { use std::collections::BTreeMap; + #[test] + fn oneof_type_to_extern_paths_test() { + let oneof_descriptor = OneofDescriptorProto { + name: Some("Foo".to_string()), + ..OneofDescriptorProto::default() + }; + + { + let mut extern_paths = BTreeMap::new(); + oneof_type_to_extern_paths( + &mut extern_paths, + &ProtoPath::from("bar"), + &RustModulePath::from("bar"), + &oneof_descriptor, + ); + + assert_eq!(extern_paths.len(), 1); + assert_eq!( + extern_paths.get(&ProtoPath::from("bar.Foo")), + Some(&RustModulePath::from("bar::Foo")) + ); + } + + { + let mut extern_paths = BTreeMap::new(); + oneof_type_to_extern_paths( + &mut extern_paths, + &ProtoPath::from("bar.baz"), + &RustModulePath::from("bar::baz"), + &oneof_descriptor, + ); + + assert_eq!(extern_paths.len(), 1); + assert_eq!( + extern_paths.get(&ProtoPath::from("bar.baz.Foo")), + Some(&RustModulePath::from("bar::baz::Foo")) + ); + } + } + #[test] fn enum_type_to_extern_paths_test() { let enum_descriptor = EnumDescriptorProto { @@ -835,6 +912,60 @@ mod test { } } + #[test] + fn proto_path_test() { + { + let proto_path = ProtoPath::from(""); + assert_eq!(proto_path.to_string(), ""); + assert_eq!(proto_path.join("foo"), ProtoPath::from("foo")); + } + { + let proto_path = ProtoPath::from("foo"); + assert_eq!(proto_path.to_string(), "foo"); + assert_eq!(proto_path.join(""), ProtoPath::from("foo")); + } + { + let proto_path = ProtoPath::from("foo"); + assert_eq!(proto_path.to_string(), "foo"); + assert_eq!(proto_path.join("bar"), ProtoPath::from("foo.bar")); + } + { + let proto_path = ProtoPath::from("foo.bar"); + assert_eq!(proto_path.to_string(), "foo.bar"); + assert_eq!(proto_path.join("baz"), ProtoPath::from("foo.bar.baz")); + } + } + + #[test] + fn rust_module_path_test() { + { + let rust_module_path = RustModulePath::from(""); + assert_eq!(rust_module_path.to_string(), ""); + assert_eq!(rust_module_path.join("foo"), RustModulePath::from("foo")); + } + { + let rust_module_path = RustModulePath::from("foo"); + assert_eq!(rust_module_path.to_string(), "foo"); + assert_eq!(rust_module_path.join(""), RustModulePath::from("foo")); + } + { + let rust_module_path = RustModulePath::from("foo"); + assert_eq!(rust_module_path.to_string(), "foo"); + assert_eq!( + rust_module_path.join("bar"), + RustModulePath::from("foo::bar") + ); + } + { + let rust_module_path = RustModulePath::from("foo::bar"); + assert_eq!(rust_module_path.to_string(), "foo::bar"); + assert_eq!( + rust_module_path.join("baz"), + RustModulePath::from("foo::bar::baz") + ); + } + } + #[test] fn is_keyword_test() { let non_keywords = [ diff --git a/proto/prost/private/tests/transitive_dependencies/BUILD.bazel b/proto/prost/private/tests/transitive_dependencies/BUILD.bazel index c3462a77e4..6605b1c8d1 100644 --- a/proto/prost/private/tests/transitive_dependencies/BUILD.bazel +++ b/proto/prost/private/tests/transitive_dependencies/BUILD.bazel @@ -12,6 +12,7 @@ proto_library( strip_import_prefix = "/proto/prost/private/tests/transitive_dependencies", deps = [ "//proto/prost/private/tests/transitive_dependencies/b:b_proto", + "//proto/prost/private/tests/types:types_proto", "@com_google_protobuf//:duration_proto", "@com_google_protobuf//:timestamp_proto", ], diff --git a/proto/prost/private/tests/transitive_dependencies/a.proto b/proto/prost/private/tests/transitive_dependencies/a.proto index 3e83e2e18a..bea2efd2e8 100644 --- a/proto/prost/private/tests/transitive_dependencies/a.proto +++ b/proto/prost/private/tests/transitive_dependencies/a.proto @@ -3,6 +3,7 @@ syntax = "proto3"; import "google/protobuf/timestamp.proto"; import "google/protobuf/duration.proto"; import "b/b.proto"; +import "types/types.proto"; package a; @@ -14,4 +15,6 @@ message A { google.protobuf.Timestamp timestamp = 3; google.protobuf.Duration duration = 4; + + Types types = 5; } diff --git a/proto/prost/private/tests/transitive_dependencies/a_test.rs b/proto/prost/private/tests/transitive_dependencies/a_test.rs index 7c3f70fd77..36b484a278 100644 --- a/proto/prost/private/tests/transitive_dependencies/a_test.rs +++ b/proto/prost/private/tests/transitive_dependencies/a_test.rs @@ -5,6 +5,7 @@ use b_proto::a::b::B; use c_proto::a::b::c::C; use duration_proto::google::protobuf::Duration; use timestamp_proto::google::protobuf::Timestamp; +use types_proto::Types; #[test] fn test_b() { @@ -29,6 +30,7 @@ fn test_b() { nanos: 2, }), duration: Some(duration), + types: Some(Types::default()), }; let b_ref = a.b.as_ref().unwrap(); diff --git a/proto/prost/private/tests/types/BUILD.bazel b/proto/prost/private/tests/types/BUILD.bazel index f85368e8af..431bd144e8 100644 --- a/proto/prost/private/tests/types/BUILD.bazel +++ b/proto/prost/private/tests/types/BUILD.bazel @@ -9,6 +9,7 @@ proto_library( srcs = [ "types.proto", ], + strip_import_prefix = "/proto/prost/private/tests", ) rust_prost_library( diff --git a/proto/prost/private/tests/types/types.proto b/proto/prost/private/tests/types/types.proto index 5173122dbf..0f04fed6c2 100644 --- a/proto/prost/private/tests/types/types.proto +++ b/proto/prost/private/tests/types/types.proto @@ -8,98 +8,72 @@ enum Enum { message Types { Enum a_enum = 1; - double a_double = 2; - float a_float = 3; - int32 a_int32 = 4; - int64 a_int64 = 5; - uint32 a_uint32 = 6; - uint64 a_uint64 = 7; - sint32 a_sint32 = 8; - sint64 a_sint64 = 9; - fixed32 a_fixed32 = 10; - fixed64 a_fixed64 = 11; - sfixed32 a_sfixed32 = 12; - sfixed64 a_sfixed64 = 13; - bool a_bool = 14; - string a_string = 15; - bytes a_bytes = 16; repeated Enum repeated_enum = 17; - repeated double repeated_double = 18; - repeated float repeated_float = 19; - repeated int32 repeated_int32 = 20; - repeated int64 repeated_int64 = 21; - repeated uint32 repeated_uint32 = 22; - repeated uint64 repeated_uint64 = 23; - repeated sint32 repeated_sint32 = 24; - repeated sint64 repeated_sint64 = 25; - repeated fixed32 repeated_fixed32 = 26; - repeated fixed64 repeated_fixed64 = 27; - repeated sfixed32 repeated_sfixed32 = 28; - repeated sfixed64 repeated_sfixed64 = 29; - repeated bool repeated_bool = 30; - repeated string repeated_string = 31; - repeated bytes repeated_bytes = 32; map map_string_enum = 33; - map map_string_double = 34; - map map_string_float = 35; - map map_string_int32 = 36; - map map_string_int64 = 37; - map map_string_uint32 = 38; - map map_string_uint64 = 39; - map map_string_sint32 = 40; - map map_string_sint64 = 41; - map map_string_fixed32 = 42; - map map_string_fixed64 = 43; - map map_string_sfixed32 = 44; - map map_string_sfixed64 = 45; - map map_string_bool = 46; - map map_string_string = 47; - map map_string_bytes = 48; + + oneof OneOf { + Enum oneof_enum = 49; + double oneof_double = 50; + float oneof_float = 51; + int32 oneof_int32 = 52; + int64 oneof_int64 = 53; + uint32 oneof_uint32 = 54; + uint64 oneof_uint64 = 55; + sint32 oneof_sint32 = 56; + sint64 oneof_sint64 = 57; + fixed32 oneof_fixed32 = 58; + fixed64 oneof_fixed64 = 59; + sfixed32 oneof_sfixed32 = 60; + sfixed64 oneof_sfixed64 = 61; + bool oneof_bool = 62; + string oneof_string = 63; + bytes oneof_bytes = 64; + } } diff --git a/proto/prost/private/tests/types/types_test.rs b/proto/prost/private/tests/types/types_test.rs index 8428a3de3b..2253ef7726 100644 --- a/proto/prost/private/tests/types/types_test.rs +++ b/proto/prost/private/tests/types/types_test.rs @@ -1,5 +1,5 @@ use types_proto::Enum; -use types_proto::Types; +use types_proto::{types, Types}; #[test] fn test_types() { @@ -93,5 +93,6 @@ fn test_types() { ] .into_iter() .collect(), + one_of: Some(types::OneOf::OneofFloat(1.0)), }; } From 655477865e3575c09dccb923a2f6137590a949c1 Mon Sep 17 00:00:00 2001 From: Stu Schwartz Date: Wed, 28 Jun 2023 08:30:12 -0700 Subject: [PATCH 18/31] Move prost-types to toolchain definition. --- proto/prost/BUILD.bazel | 15 +--- proto/prost/private/BUILD.bazel | 15 ++-- proto/prost/private/prost.bzl | 122 ++++++++++++++------------ proto/prost/private/protoc_wrapper.rs | 43 +++++++++ 4 files changed, 116 insertions(+), 79 deletions(-) diff --git a/proto/prost/BUILD.bazel b/proto/prost/BUILD.bazel index ecccc1ff2f..de9c342e97 100644 --- a/proto/prost/BUILD.bazel +++ b/proto/prost/BUILD.bazel @@ -28,6 +28,7 @@ rust_prost_toolchain( prost_plugin = "//proto/prost/private/3rdparty/crates:protoc-gen-prost__protoc-gen-prost", prost_plugin_flag = "--plugin=protoc-gen-prost=%s", prost_runtime = ":prost_runtime", + prost_types = "//proto/prost/private/3rdparty/crates:prost-types", proto_compiler = "@com_google_protobuf//:protoc", tonic_plugin = "//proto/prost/private/3rdparty/crates:protoc-gen-tonic__protoc-gen-tonic", tonic_plugin_flag = "--plugin=protoc-gen-tonic=%s", @@ -35,19 +36,7 @@ rust_prost_toolchain( ) toolchain( - name = "default_prost_toolchain_linux", - target_compatible_with = [ - "@platforms//os:linux", - ], - toolchain = "default_prost_toolchain_impl", - toolchain_type = "//proto/prost:toolchain_type", -) - -toolchain( - name = "default_prost_toolchain_osx", - target_compatible_with = [ - "@platforms//os:osx", - ], + name = "default_prost_toolchain", toolchain = "default_prost_toolchain_impl", toolchain_type = "//proto/prost:toolchain_type", ) diff --git a/proto/prost/private/BUILD.bazel b/proto/prost/private/BUILD.bazel index 0bccf17ffc..b667cd2da3 100644 --- a/proto/prost/private/BUILD.bazel +++ b/proto/prost/private/BUILD.bazel @@ -1,20 +1,17 @@ load("@bazel_skylib//:bzl_library.bzl", "bzl_library") load("@rules_rust//rust:defs.bzl", "rust_binary", "rust_test") -load(":prost.bzl", "PROST_EXTENSION", "RUST_EDITION", "TONIC_EXTENSION") +load(":prost.bzl", "RUST_EDITION", "current_prost_runtime") + +current_prost_runtime( + name = "current_prost_runtime", +) rust_binary( name = "protoc_wrapper", srcs = ["protoc_wrapper.rs"], edition = RUST_EDITION, - rustc_env = { - "PROST_EXTENSION": PROST_EXTENSION, - "TONIC_EXTENSION": TONIC_EXTENSION, - }, visibility = ["//visibility:public"], - deps = [ - "//proto/prost/private/3rdparty/crates:prost", - "//proto/prost/private/3rdparty/crates:prost-types", - ], + deps = [":current_prost_runtime"], ) rust_test( diff --git a/proto/prost/private/prost.bzl b/proto/prost/private/prost.bzl index 1fb51adbe3..f0546f5f0f 100644 --- a/proto/prost/private/prost.bzl +++ b/proto/prost/private/prost.bzl @@ -10,14 +10,30 @@ load("//rust/private:providers.bzl", "DepVariantInfo") load("//rust/private:rustc.bzl", "rustc_compile_action") load(":providers.bzl", "ProstProtoInfo", "TonicProtoInfo") -PROST_EXTENSION = ".rs" -TONIC_EXTENSION = ".tonic.rs" - RUST_EDITION = "2021" +TOOLCHAIN_TYPE = "@rules_rust//proto/prost:toolchain_type" + +def _create_proto_lang_toolchain(ctx, prost_toolchain): + is_tonic = prost_toolchain.tonic_runtime != None + + proto_lang_toolchain = proto_common.ProtoLangToolchainInfo( + out_replacement_format_flag = "--prost_out=%s", + plugin_format_flag = prost_toolchain.prost_plugin_flag, + plugin = prost_toolchain.prost_plugin[DefaultInfo].files_to_run, + runtime = prost_toolchain.prost_runtime, + provided_proto_sources = depset(), + proto_compiler = ctx.attr._prost_process_wrapper[DefaultInfo].files_to_run, + protoc_opts = prost_toolchain.protoc_opts, + progress_message = "", + mnemonic = "TonicGenProto" if is_tonic else "ProstGenProto", + ) + + return proto_lang_toolchain + def _compile_proto(ctx, crate_name, proto_info, deps, prost_toolchain, is_tonic, rustfmt_toolchain = None): kind = "tonic" if is_tonic else "prost" - extension = TONIC_EXTENSION if is_tonic else PROST_EXTENSION + extension = ".tonic.rs" if is_tonic else ".rs" provider = TonicProtoInfo if is_tonic else ProstProtoInfo deps_info_file = ctx.actions.declare_file(ctx.label.name + ".{}_deps_info".format(kind)) @@ -37,6 +53,7 @@ def _compile_proto(ctx, crate_name, proto_info, deps, prost_toolchain, is_tonic, # Prost process wrapper specific args additional_args.add("--protoc={}".format(proto_compiler.executable.path)) + additional_args.add("--label={}".format(ctx.label)) additional_args.add("--out_librs={}".format(lib_rs.path)) additional_args.add("--package_info_output={}".format("{}={}".format(crate_name, package_info_file.path))) additional_args.add("--deps_info={}".format(deps_info_file.path)) @@ -68,7 +85,7 @@ def _compile_proto(ctx, crate_name, proto_info, deps, prost_toolchain, is_tonic, additional_inputs = additional_inputs, additional_args = additional_args, generated_files = [lib_rs, package_info_file], - proto_lang_toolchain_info = prost_toolchain.proto_lang_toolchain, + proto_lang_toolchain_info = _create_proto_lang_toolchain(ctx, prost_toolchain), plugin_output = ctx.bin_dir.path, ) @@ -283,12 +300,18 @@ def _make_rust_prost_aspect(doc, is_tonic): allow_single_file = True, cfg = "exec", ), + "_prost_process_wrapper": attr.label( + doc = "The wrapper script for the Prost protoc plugin.", + cfg = "exec", + executable = True, + default = Label("//proto/prost/private:protoc_wrapper"), + ), }, fragments = ["cpp"], host_fragments = ["cpp"], toolchains = [ + TOOLCHAIN_TYPE, "@bazel_tools//tools/cpp:toolchain_type", - "@rules_rust//proto/prost:toolchain_type", "@rules_rust//rust:toolchain_type", "@rules_rust//rust/rustfmt:toolchain_type", ], @@ -345,59 +368,17 @@ def _make_rust_prost_library_rule(doc, is_tonic): }, ) -rust_tonic_library_rule = _make_rust_prost_library_rule( +rust_tonic_library = _make_rust_prost_library_rule( doc = "A rule for generating a Rust library using Prost and Tonic.", is_tonic = True, ) -rust_prost_library_rule = _make_rust_prost_library_rule( +rust_prost_library = _make_rust_prost_library_rule( doc = "A rule for generating a Rust library using Prost.", is_tonic = False, ) -def rust_tonic_library(name, **kwargs): - """A rule for generating a Rust library using Prost and Tonic. - - See `rust_tonic_library` for more details. - """ - rust_tonic_library_rule( - name = name, - target_compatible_with = kwargs.pop("target_compatible_with", select({ - "@platforms//os:windows": ["@platforms//:incompatible"], - "//conditions:default": [], - })), - **kwargs - ) - -def rust_prost_library(name, **kwargs): - """A rule for generating a Rust library using Prost and Tonic. - - See `rust_prost_library` for more details. - """ - rust_prost_library_rule( - name = name, - target_compatible_with = kwargs.pop("target_compatible_with", select({ - "@platforms//os:windows": ["@platforms//:incompatible"], - "//conditions:default": [], - })), - **kwargs - ) - def _rust_prost_toolchain_impl(ctx): - is_tonic = ctx.attr.tonic_runtime != None - - proto_lang_toolchain = proto_common.ProtoLangToolchainInfo( - out_replacement_format_flag = "--prost_out=%s", - plugin_format_flag = ctx.attr.prost_plugin_flag, - plugin = ctx.attr.prost_plugin[DefaultInfo].files_to_run, - runtime = ctx.attr.prost_runtime, - provided_proto_sources = depset(), - proto_compiler = ctx.attr._prost_process_wrapper[DefaultInfo].files_to_run, - protoc_opts = ctx.fragments.proto.experimental_protoc_opts, - progress_message = "", - mnemonic = "TonicGenProto" if is_tonic else "ProstGenProto", - ) - tonic_attrs = [ctx.attr.tonic_plugin_flag, ctx.attr.tonic_plugin, ctx.attr.tonic_runtime] if any(tonic_attrs) and not all(tonic_attrs): fail("When one tonic attribute is added, all must be added") @@ -407,8 +388,8 @@ def _rust_prost_toolchain_impl(ctx): prost_plugin = ctx.attr.prost_plugin, prost_plugin_flag = ctx.attr.prost_plugin_flag, prost_runtime = ctx.attr.prost_runtime, + prost_types = ctx.attr.prost_types, proto_compiler = ctx.attr.proto_compiler, - proto_lang_toolchain = proto_lang_toolchain, protoc_opts = ctx.fragments.proto.experimental_protoc_opts, tonic_opts = ctx.attr.tonic_opts, tonic_plugin = ctx.attr.tonic_plugin, @@ -439,6 +420,11 @@ rust_prost_toolchain = rule( providers = [[rust_common.crate_info], [rust_common.crate_group_info]], mandatory = True, ), + "prost_types": attr.label( + doc = "The Prost types crates to use.", + providers = [[rust_common.crate_info], [rust_common.crate_group_info]], + mandatory = True, + ), "proto_compiler": attr.label( doc = "The protoc compiler to use.", cfg = "exec", @@ -460,11 +446,33 @@ rust_prost_toolchain = rule( doc = "The Tonic runtime crates to use.", providers = [[rust_common.crate_info], [rust_common.crate_group_info]], ), - "_prost_process_wrapper": attr.label( - doc = "The wrapper script for the Prost protoc plugin.", - cfg = "exec", - executable = True, - default = Label("//proto/prost/private:protoc_wrapper"), - ), }, ) + +def _current_prost_runtime_impl(ctx): + toolchain = ctx.toolchains[TOOLCHAIN_TYPE] + + runtime_deps = [] + + for target in [toolchain.prost_runtime, toolchain.prost_types]: + if rust_common.crate_group_info in target: + crate_group_info = target[rust_common.crate_group_info] + runtime_deps.extend(crate_group_info.dep_variant_infos.to_list()) + else: + runtime_deps.append(DepVariantInfo( + crate_info = target[rust_common.crate_info] if rust_common.crate_info in target else None, + dep_info = target[rust_common.dep_info] if rust_common.dep_info in target else None, + cc_info = target[CcInfo] if CcInfo in target else None, + build_info = None, + )) + + return [rust_common.crate_group_info( + dep_variant_infos = depset(runtime_deps), + )] + +current_prost_runtime = rule( + doc = "A rule for accessing the current Prost toolchain components needed by the process wrapper", + provides = [rust_common.crate_group_info], + implementation = _current_prost_runtime_impl, + toolchains = [TOOLCHAIN_TYPE], +) diff --git a/proto/prost/private/protoc_wrapper.rs b/proto/prost/private/protoc_wrapper.rs index 4efd1e6539..60d5612043 100644 --- a/proto/prost/private/protoc_wrapper.rs +++ b/proto/prost/private/protoc_wrapper.rs @@ -401,6 +401,9 @@ struct Args { /// The name of the crate. crate_name: String, + /// The bazel label. + label: String, + /// The path to the package info file. package_info_file: PathBuf, @@ -442,6 +445,7 @@ impl Args { let mut out_librs: Option = None; let mut rustfmt: Option = None; let mut proto_paths = Vec::new(); + let mut label: Option = None; let mut is_tonic = false; let mut extra_args = Vec::new(); @@ -522,6 +526,9 @@ impl Args { ("--proto_path", value) => { proto_paths.push(value.to_string()); } + ("--label", value) => { + label = Some(value.to_string()); + } (arg, value) => { extra_args.push(format!("{}={}", arg, value)); } @@ -557,6 +564,12 @@ impl Args { .to_string(), ); } + if label.is_none() { + return Err( + "No `--label` value was found. Unable to parse the label of the target crate." + .to_string(), + ); + } Ok(Args { protoc: protoc.unwrap(), @@ -570,11 +583,38 @@ impl Args { rustfmt, proto_paths, is_tonic, + label: label.unwrap(), extra_args, }) } } +/// Get the output directory with the label suffixed. +fn get_output_dir(out_dir: &Path, label: &str) -> PathBuf { + let label_as_path = label + .replace('@', "") + .replace("//", "_") + .replace("/", "_") + .replace(":", "_"); + PathBuf::from(format!( + "{}/prost-build-{}", + out_dir.display(), + label_as_path + )) +} + +/// Get the output directory with the label suffixed, and create it if it doesn't exist. +/// +/// This will remove the directory first if it already exists. +fn get_and_create_output_dir(out_dir: &Path, label: &str) -> PathBuf { + let out_dir = get_output_dir(&out_dir, &label); + if out_dir.exists() { + fs::remove_dir_all(&out_dir).expect("Failed to remove old output directory"); + } + fs::create_dir_all(&out_dir).expect("Failed to create output directory"); + out_dir +} + fn main() { // Always enable backtraces for the protoc wrapper. env::set_var("RUST_BACKTRACE", "1"); @@ -583,6 +623,7 @@ fn main() { protoc, out_dir, crate_name, + label, package_info_file, proto_files, includes, @@ -594,6 +635,8 @@ fn main() { extra_args, } = Args::parse().expect("Failed to parse args"); + let out_dir = get_and_create_output_dir(&out_dir, &label); + let mut cmd = process::Command::new(&protoc); cmd.arg(format!("--prost_out={}", out_dir.display())); if is_tonic { From 7e821219ea1a5f764f8b35e69819078f1a3ba181 Mon Sep 17 00:00:00 2001 From: Stu Schwartz Date: Wed, 28 Jun 2023 09:06:25 -0700 Subject: [PATCH 19/31] fix rustfmt --- proto/prost/private/protoc_wrapper.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/proto/prost/private/protoc_wrapper.rs b/proto/prost/private/protoc_wrapper.rs index 60d5612043..33cfe7a75c 100644 --- a/proto/prost/private/protoc_wrapper.rs +++ b/proto/prost/private/protoc_wrapper.rs @@ -594,8 +594,7 @@ fn get_output_dir(out_dir: &Path, label: &str) -> PathBuf { let label_as_path = label .replace('@', "") .replace("//", "_") - .replace("/", "_") - .replace(":", "_"); + .replace(['/', ':'], "_"); PathBuf::from(format!( "{}/prost-build-{}", out_dir.display(), @@ -607,7 +606,7 @@ fn get_output_dir(out_dir: &Path, label: &str) -> PathBuf { /// /// This will remove the directory first if it already exists. fn get_and_create_output_dir(out_dir: &Path, label: &str) -> PathBuf { - let out_dir = get_output_dir(&out_dir, &label); + let out_dir = get_output_dir(out_dir, label); if out_dir.exists() { fs::remove_dir_all(&out_dir).expect("Failed to remove old output directory"); } From 00682b3d004b6fd0d640b150b152a9ff8838d0f1 Mon Sep 17 00:00:00 2001 From: Daniel Wagner-Hall Date: Wed, 28 Jun 2023 11:06:53 +0100 Subject: [PATCH 20/31] Add example of building protos with complex imports --- .../googleapis/google/api/BUILD.bazel | 16 + .../googleapis/google/api/annotations.proto | 31 + .../googleapis/google/api/client.proto | 99 + .../google/api/field_behavior.proto | 90 + .../googleapis/google/api/http.proto | 375 ++++ .../googleapis/google/bytestream/BUILD.bazel | 11 + .../google/bytestream/bytestream.proto | 181 ++ .../googleapis/google/longrunning/BUILD.bazel | 16 + .../google/longrunning/operations.proto | 247 +++ .../googleapis/google/rpc/BUILD.bazel | 34 + .../googleapis/google/rpc/code.proto | 186 ++ .../googleapis/google/rpc/error_details.proto | 249 +++ .../googleapis/google/rpc/status.proto | 47 + .../bazel/remote/execution/v2/BUILD.bazel | 25 + .../execution/v2/remote_execution.proto | 1795 +++++++++++++++++ .../build/bazel/semver/BUILD.bazel | 15 + .../build/bazel/semver/semver.proto | 41 + 17 files changed, 3458 insertions(+) create mode 100644 proto/prost/private/tests/complex_imports/googleapis/google/api/BUILD.bazel create mode 100644 proto/prost/private/tests/complex_imports/googleapis/google/api/annotations.proto create mode 100644 proto/prost/private/tests/complex_imports/googleapis/google/api/client.proto create mode 100644 proto/prost/private/tests/complex_imports/googleapis/google/api/field_behavior.proto create mode 100644 proto/prost/private/tests/complex_imports/googleapis/google/api/http.proto create mode 100644 proto/prost/private/tests/complex_imports/googleapis/google/bytestream/BUILD.bazel create mode 100644 proto/prost/private/tests/complex_imports/googleapis/google/bytestream/bytestream.proto create mode 100644 proto/prost/private/tests/complex_imports/googleapis/google/longrunning/BUILD.bazel create mode 100644 proto/prost/private/tests/complex_imports/googleapis/google/longrunning/operations.proto create mode 100644 proto/prost/private/tests/complex_imports/googleapis/google/rpc/BUILD.bazel create mode 100644 proto/prost/private/tests/complex_imports/googleapis/google/rpc/code.proto create mode 100644 proto/prost/private/tests/complex_imports/googleapis/google/rpc/error_details.proto create mode 100644 proto/prost/private/tests/complex_imports/googleapis/google/rpc/status.proto create mode 100644 proto/prost/private/tests/complex_imports/remote-apis/build/bazel/remote/execution/v2/BUILD.bazel create mode 100644 proto/prost/private/tests/complex_imports/remote-apis/build/bazel/remote/execution/v2/remote_execution.proto create mode 100644 proto/prost/private/tests/complex_imports/remote-apis/build/bazel/semver/BUILD.bazel create mode 100644 proto/prost/private/tests/complex_imports/remote-apis/build/bazel/semver/semver.proto diff --git a/proto/prost/private/tests/complex_imports/googleapis/google/api/BUILD.bazel b/proto/prost/private/tests/complex_imports/googleapis/google/api/BUILD.bazel new file mode 100644 index 0000000000..e612f21b46 --- /dev/null +++ b/proto/prost/private/tests/complex_imports/googleapis/google/api/BUILD.bazel @@ -0,0 +1,16 @@ +load("@rules_proto//proto:defs.bzl", "proto_library") + +proto_library( + name = "annotations_proto", + srcs = [ + "annotations.proto", + "client.proto", + "field_behavior.proto", + "http.proto", + ], + strip_import_prefix = "/proto/prost/private/tests/complex_imports/googleapis", + visibility = ["//visibility:public"], + deps = [ + "@com_google_protobuf//:descriptor_proto", + ], +) diff --git a/proto/prost/private/tests/complex_imports/googleapis/google/api/annotations.proto b/proto/prost/private/tests/complex_imports/googleapis/google/api/annotations.proto new file mode 100644 index 0000000000..efdab3db6c --- /dev/null +++ b/proto/prost/private/tests/complex_imports/googleapis/google/api/annotations.proto @@ -0,0 +1,31 @@ +// Copyright 2015 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.api; + +import "google/api/http.proto"; +import "google/protobuf/descriptor.proto"; + +option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; +option java_multiple_files = true; +option java_outer_classname = "AnnotationsProto"; +option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; + +extend google.protobuf.MethodOptions { + // See `HttpRule`. + HttpRule http = 72295728; +} diff --git a/proto/prost/private/tests/complex_imports/googleapis/google/api/client.proto b/proto/prost/private/tests/complex_imports/googleapis/google/api/client.proto new file mode 100644 index 0000000000..3b3fd0c401 --- /dev/null +++ b/proto/prost/private/tests/complex_imports/googleapis/google/api/client.proto @@ -0,0 +1,99 @@ +// Copyright 2018 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.api; + +import "google/protobuf/descriptor.proto"; + +option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; +option java_multiple_files = true; +option java_outer_classname = "ClientProto"; +option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; + +extend google.protobuf.MethodOptions { + // A definition of a client library method signature. + // + // In client libraries, each proto RPC corresponds to one or more methods + // which the end user is able to call, and calls the underlying RPC. + // Normally, this method receives a single argument (a struct or instance + // corresponding to the RPC request object). Defining this field will + // add one or more overloads providing flattened or simpler method signatures + // in some languages. + // + // The fields on the method signature are provided as a comma-separated + // string. + // + // For example, the proto RPC and annotation: + // + // rpc CreateSubscription(CreateSubscriptionRequest) + // returns (Subscription) { + // option (google.api.method_signature) = "name,topic"; + // } + // + // Would add the following Java overload (in addition to the method accepting + // the request object): + // + // public final Subscription createSubscription(String name, String topic) + // + // The following backwards-compatibility guidelines apply: + // + // * Adding this annotation to an unannotated method is backwards + // compatible. + // * Adding this annotation to a method which already has existing + // method signature annotations is backwards compatible if and only if + // the new method signature annotation is last in the sequence. + // * Modifying or removing an existing method signature annotation is + // a breaking change. + // * Re-ordering existing method signature annotations is a breaking + // change. + repeated string method_signature = 1051; +} + +extend google.protobuf.ServiceOptions { + // The hostname for this service. + // This should be specified with no prefix or protocol. + // + // Example: + // + // service Foo { + // option (google.api.default_host) = "foo.googleapi.com"; + // ... + // } + string default_host = 1049; + + // OAuth scopes needed for the client. + // + // Example: + // + // service Foo { + // option (google.api.oauth_scopes) = \ + // "https://www.googleapis.com/auth/cloud-platform"; + // ... + // } + // + // If there is more than one scope, use a comma-separated string: + // + // Example: + // + // service Foo { + // option (google.api.oauth_scopes) = \ + // "https://www.googleapis.com/auth/cloud-platform," + // "https://www.googleapis.com/auth/monitoring"; + // ... + // } + string oauth_scopes = 1050; +} diff --git a/proto/prost/private/tests/complex_imports/googleapis/google/api/field_behavior.proto b/proto/prost/private/tests/complex_imports/googleapis/google/api/field_behavior.proto new file mode 100644 index 0000000000..c4abe3b670 --- /dev/null +++ b/proto/prost/private/tests/complex_imports/googleapis/google/api/field_behavior.proto @@ -0,0 +1,90 @@ +// Copyright 2018 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.api; + +import "google/protobuf/descriptor.proto"; + +option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; +option java_multiple_files = true; +option java_outer_classname = "FieldBehaviorProto"; +option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; + +extend google.protobuf.FieldOptions { + // A designation of a specific field behavior (required, output only, etc.) + // in protobuf messages. + // + // Examples: + // + // string name = 1 [(google.api.field_behavior) = REQUIRED]; + // State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + // google.protobuf.Duration ttl = 1 + // [(google.api.field_behavior) = INPUT_ONLY]; + // google.protobuf.Timestamp expire_time = 1 + // [(google.api.field_behavior) = OUTPUT_ONLY, + // (google.api.field_behavior) = IMMUTABLE]; + repeated google.api.FieldBehavior field_behavior = 1052; +} + +// An indicator of the behavior of a given field (for example, that a field +// is required in requests, or given as output but ignored as input). +// This **does not** change the behavior in protocol buffers itself; it only +// denotes the behavior and may affect how API tooling handles the field. +// +// Note: This enum **may** receive new values in the future. +enum FieldBehavior { + // Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0; + + // Specifically denotes a field as optional. + // While all fields in protocol buffers are optional, this may be specified + // for emphasis if appropriate. + OPTIONAL = 1; + + // Denotes a field as required. + // This indicates that the field **must** be provided as part of the request, + // and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2; + + // Denotes a field as output only. + // This indicates that the field is provided in responses, but including the + // field in a request does nothing (the server *must* ignore it and + // *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3; + + // Denotes a field as input only. + // This indicates that the field is provided in requests, and the + // corresponding field is not included in output. + INPUT_ONLY = 4; + + // Denotes a field as immutable. + // This indicates that the field may be set once in a request to create a + // resource, but may not be changed thereafter. + IMMUTABLE = 5; + + // Denotes that a (repeated) field is an unordered list. + // This indicates that the service may provide the elements of the list + // in any arbitrary order, rather than the order the user originally + // provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6; + + // Denotes that this field returns a non-empty default value if not set. + // This indicates that if the user provides the empty value in a request, + // a non-empty value will be returned. The user will not be aware of what + // non-empty value to expect. + NON_EMPTY_DEFAULT = 7; +} diff --git a/proto/prost/private/tests/complex_imports/googleapis/google/api/http.proto b/proto/prost/private/tests/complex_imports/googleapis/google/api/http.proto new file mode 100644 index 0000000000..113fa936a0 --- /dev/null +++ b/proto/prost/private/tests/complex_imports/googleapis/google/api/http.proto @@ -0,0 +1,375 @@ +// Copyright 2015 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.api; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; +option java_multiple_files = true; +option java_outer_classname = "HttpProto"; +option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; + +// Defines the HTTP configuration for an API service. It contains a list of +// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method +// to one or more HTTP REST API methods. +message Http { + // A list of HTTP configuration rules that apply to individual API methods. + // + // **NOTE:** All service configuration rules follow "last one wins" order. + repeated HttpRule rules = 1; + + // When set to true, URL path parameters will be fully URI-decoded except in + // cases of single segment matches in reserved expansion, where "%2F" will be + // left encoded. + // + // The default behavior is to not decode RFC 6570 reserved characters in multi + // segment matches. + bool fully_decode_reserved_expansion = 2; +} + +// # gRPC Transcoding +// +// gRPC Transcoding is a feature for mapping between a gRPC method and one or +// more HTTP REST endpoints. It allows developers to build a single API service +// that supports both gRPC APIs and REST APIs. Many systems, including [Google +// APIs](https://github.com/googleapis/googleapis), +// [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC +// Gateway](https://github.com/grpc-ecosystem/grpc-gateway), +// and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature +// and use it for large scale production services. +// +// `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies +// how different portions of the gRPC request message are mapped to the URL +// path, URL query parameters, and HTTP request body. It also controls how the +// gRPC response message is mapped to the HTTP response body. `HttpRule` is +// typically specified as an `google.api.http` annotation on the gRPC method. +// +// Each mapping specifies a URL path template and an HTTP method. The path +// template may refer to one or more fields in the gRPC request message, as long +// as each field is a non-repeated field with a primitive (non-message) type. +// The path template controls how fields of the request message are mapped to +// the URL path. +// +// Example: +// +// service Messaging { +// rpc GetMessage(GetMessageRequest) returns (Message) { +// option (google.api.http) = { +// get: "/v1/{name=messages/*}" +// }; +// } +// } +// message GetMessageRequest { +// string name = 1; // Mapped to URL path. +// } +// message Message { +// string text = 1; // The resource content. +// } +// +// This enables an HTTP REST to gRPC mapping as below: +// +// HTTP | gRPC +// -----|----- +// `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")` +// +// Any fields in the request message which are not bound by the path template +// automatically become HTTP query parameters if there is no HTTP request body. +// For example: +// +// service Messaging { +// rpc GetMessage(GetMessageRequest) returns (Message) { +// option (google.api.http) = { +// get:"/v1/messages/{message_id}" +// }; +// } +// } +// message GetMessageRequest { +// message SubMessage { +// string subfield = 1; +// } +// string message_id = 1; // Mapped to URL path. +// int64 revision = 2; // Mapped to URL query parameter `revision`. +// SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. +// } +// +// This enables a HTTP JSON to RPC mapping as below: +// +// HTTP | gRPC +// -----|----- +// `GET /v1/messages/123456?revision=2&sub.subfield=foo` | +// `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: +// "foo"))` +// +// Note that fields which are mapped to URL query parameters must have a +// primitive type or a repeated primitive type or a non-repeated message type. +// In the case of a repeated type, the parameter can be repeated in the URL +// as `...?param=A¶m=B`. In the case of a message type, each field of the +// message is mapped to a separate parameter, such as +// `...?foo.a=A&foo.b=B&foo.c=C`. +// +// For HTTP methods that allow a request body, the `body` field +// specifies the mapping. Consider a REST update method on the +// message resource collection: +// +// service Messaging { +// rpc UpdateMessage(UpdateMessageRequest) returns (Message) { +// option (google.api.http) = { +// patch: "/v1/messages/{message_id}" +// body: "message" +// }; +// } +// } +// message UpdateMessageRequest { +// string message_id = 1; // mapped to the URL +// Message message = 2; // mapped to the body +// } +// +// The following HTTP JSON to RPC mapping is enabled, where the +// representation of the JSON in the request body is determined by +// protos JSON encoding: +// +// HTTP | gRPC +// -----|----- +// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: +// "123456" message { text: "Hi!" })` +// +// The special name `*` can be used in the body mapping to define that +// every field not bound by the path template should be mapped to the +// request body. This enables the following alternative definition of +// the update method: +// +// service Messaging { +// rpc UpdateMessage(Message) returns (Message) { +// option (google.api.http) = { +// patch: "/v1/messages/{message_id}" +// body: "*" +// }; +// } +// } +// message Message { +// string message_id = 1; +// string text = 2; +// } +// +// +// The following HTTP JSON to RPC mapping is enabled: +// +// HTTP | gRPC +// -----|----- +// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: +// "123456" text: "Hi!")` +// +// Note that when using `*` in the body mapping, it is not possible to +// have HTTP parameters, as all fields not bound by the path end in +// the body. This makes this option more rarely used in practice when +// defining REST APIs. The common usage of `*` is in custom methods +// which don't use the URL at all for transferring data. +// +// It is possible to define multiple HTTP methods for one RPC by using +// the `additional_bindings` option. Example: +// +// service Messaging { +// rpc GetMessage(GetMessageRequest) returns (Message) { +// option (google.api.http) = { +// get: "/v1/messages/{message_id}" +// additional_bindings { +// get: "/v1/users/{user_id}/messages/{message_id}" +// } +// }; +// } +// } +// message GetMessageRequest { +// string message_id = 1; +// string user_id = 2; +// } +// +// This enables the following two alternative HTTP JSON to RPC mappings: +// +// HTTP | gRPC +// -----|----- +// `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` +// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: +// "123456")` +// +// ## Rules for HTTP mapping +// +// 1. Leaf request fields (recursive expansion nested messages in the request +// message) are classified into three categories: +// - Fields referred by the path template. They are passed via the URL path. +// - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They are passed via the HTTP +// request body. +// - All other fields are passed via the URL query parameters, and the +// parameter name is the field path in the request message. A repeated +// field can be represented as multiple query parameters under the same +// name. +// 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL query parameter, all fields +// are passed via URL path and HTTP request body. +// 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP request body, all +// fields are passed via URL path and URL query parameters. +// +// ### Path template syntax +// +// Template = "/" Segments [ Verb ] ; +// Segments = Segment { "/" Segment } ; +// Segment = "*" | "**" | LITERAL | Variable ; +// Variable = "{" FieldPath [ "=" Segments ] "}" ; +// FieldPath = IDENT { "." IDENT } ; +// Verb = ":" LITERAL ; +// +// The syntax `*` matches a single URL path segment. The syntax `**` matches +// zero or more URL path segments, which must be the last part of the URL path +// except the `Verb`. +// +// The syntax `Variable` matches part of the URL path as specified by its +// template. A variable template must not contain other variables. If a variable +// matches a single path segment, its template may be omitted, e.g. `{var}` +// is equivalent to `{var=*}`. +// +// The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` +// contains any reserved character, such characters should be percent-encoded +// before the matching. +// +// If a variable contains exactly one path segment, such as `"{var}"` or +// `"{var=*}"`, when such a variable is expanded into a URL path on the client +// side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The +// server side does the reverse decoding. Such variables show up in the +// [Discovery +// Document](https://developers.google.com/discovery/v1/reference/apis) as +// `{var}`. +// +// If a variable contains multiple path segments, such as `"{var=foo/*}"` +// or `"{var=**}"`, when such a variable is expanded into a URL path on the +// client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. +// The server side does the reverse decoding, except "%2F" and "%2f" are left +// unchanged. Such variables show up in the +// [Discovery +// Document](https://developers.google.com/discovery/v1/reference/apis) as +// `{+var}`. +// +// ## Using gRPC API Service Configuration +// +// gRPC API Service Configuration (service config) is a configuration language +// for configuring a gRPC service to become a user-facing product. The +// service config is simply the YAML representation of the `google.api.Service` +// proto message. +// +// As an alternative to annotating your proto file, you can configure gRPC +// transcoding in your service config YAML files. You do this by specifying a +// `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same +// effect as the proto annotation. This can be particularly useful if you +// have a proto that is reused in multiple services. Note that any transcoding +// specified in the service config will override any matching transcoding +// configuration in the proto. +// +// Example: +// +// http: +// rules: +// # Selects a gRPC method and applies HttpRule to it. +// - selector: example.v1.Messaging.GetMessage +// get: /v1/messages/{message_id}/{sub.subfield} +// +// ## Special notes +// +// When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the +// proto to JSON conversion must follow the [proto3 +// specification](https://developers.google.com/protocol-buffers/docs/proto3#json). +// +// While the single segment variable follows the semantics of +// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String +// Expansion, the multi segment variable **does not** follow RFC 6570 Section +// 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion +// does not expand special characters like `?` and `#`, which would lead +// to invalid URLs. As the result, gRPC Transcoding uses a custom encoding +// for multi segment variables. +// +// The path variables **must not** refer to any repeated or mapped field, +// because client libraries are not capable of handling such variable expansion. +// +// The path variables **must not** capture the leading "/" character. The reason +// is that the most common use case "{var}" does not capture the leading "/" +// character. For consistency, all path variables must share the same behavior. +// +// Repeated message fields must not be mapped to URL query parameters, because +// no client library can support such complicated mapping. +// +// If an API needs to use a JSON array for request or response body, it can map +// the request or response body to a repeated field. However, some gRPC +// Transcoding implementations may not support this feature. +message HttpRule { + // Selects a method to which this rule applies. + // + // Refer to [selector][google.api.DocumentationRule.selector] for syntax details. + string selector = 1; + + // Determines the URL pattern is matched by this rules. This pattern can be + // used with any of the {get|put|post|delete|patch} methods. A custom method + // can be defined using the 'custom' field. + oneof pattern { + // Maps to HTTP GET. Used for listing and getting information about + // resources. + string get = 2; + + // Maps to HTTP PUT. Used for replacing a resource. + string put = 3; + + // Maps to HTTP POST. Used for creating a resource or performing an action. + string post = 4; + + // Maps to HTTP DELETE. Used for deleting a resource. + string delete = 5; + + // Maps to HTTP PATCH. Used for updating a resource. + string patch = 6; + + // The custom pattern is used for specifying an HTTP method that is not + // included in the `pattern` field, such as HEAD, or "*" to leave the + // HTTP method unspecified for this rule. The wild-card rule is useful + // for services that provide content to Web (HTML) clients. + CustomHttpPattern custom = 8; + } + + // The name of the request field whose value is mapped to the HTTP request + // body, or `*` for mapping all request fields not captured by the path + // pattern to the HTTP body, or omitted for not having any HTTP request body. + // + // NOTE: the referred field must be present at the top-level of the request + // message type. + string body = 7; + + // Optional. The name of the response field whose value is mapped to the HTTP + // response body. When omitted, the entire response message will be used + // as the HTTP response body. + // + // NOTE: The referred field must be present at the top-level of the response + // message type. + string response_body = 12; + + // Additional HTTP bindings for the selector. Nested bindings must + // not contain an `additional_bindings` field themselves (that is, + // the nesting may only be one level deep). + repeated HttpRule additional_bindings = 11; +} + +// A custom pattern is used for defining custom HTTP verb. +message CustomHttpPattern { + // The name of this custom HTTP verb. + string kind = 1; + + // The path matched by this custom verb. + string path = 2; +} diff --git a/proto/prost/private/tests/complex_imports/googleapis/google/bytestream/BUILD.bazel b/proto/prost/private/tests/complex_imports/googleapis/google/bytestream/BUILD.bazel new file mode 100644 index 0000000000..4d3c3ced75 --- /dev/null +++ b/proto/prost/private/tests/complex_imports/googleapis/google/bytestream/BUILD.bazel @@ -0,0 +1,11 @@ +load("@rules_proto//proto:defs.bzl", "proto_library") + +proto_library( + name = "bytestream_proto", + srcs = ["bytestream.proto"], + visibility = ["//visibility:public"], + deps = [ + "//proto/prost/private/tests/complex_imports/googleapis/google/api:annotations_proto", + "@com_google_protobuf//:wrappers_proto", + ], +) diff --git a/proto/prost/private/tests/complex_imports/googleapis/google/bytestream/bytestream.proto b/proto/prost/private/tests/complex_imports/googleapis/google/bytestream/bytestream.proto new file mode 100644 index 0000000000..baf95deee7 --- /dev/null +++ b/proto/prost/private/tests/complex_imports/googleapis/google/bytestream/bytestream.proto @@ -0,0 +1,181 @@ +// Copyright 2016 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.bytestream; + +import "google/api/annotations.proto"; +import "google/protobuf/wrappers.proto"; + +option go_package = "google.golang.org/genproto/googleapis/bytestream;bytestream"; +option java_outer_classname = "ByteStreamProto"; +option java_package = "com.google.bytestream"; + +// #### Introduction +// +// The Byte Stream API enables a client to read and write a stream of bytes to +// and from a resource. Resources have names, and these names are supplied in +// the API calls below to identify the resource that is being read from or +// written to. +// +// All implementations of the Byte Stream API export the interface defined here: +// +// * `Read()`: Reads the contents of a resource. +// +// * `Write()`: Writes the contents of a resource. The client can call `Write()` +// multiple times with the same resource and can check the status of the write +// by calling `QueryWriteStatus()`. +// +// #### Service parameters and metadata +// +// The ByteStream API provides no direct way to access/modify any metadata +// associated with the resource. +// +// #### Errors +// +// The errors returned by the service are in the Google canonical error space. +service ByteStream { + // `Read()` is used to retrieve the contents of a resource as a sequence + // of bytes. The bytes are returned in a sequence of responses, and the + // responses are delivered as the results of a server-side streaming RPC. + rpc Read(ReadRequest) returns (stream ReadResponse); + + // `Write()` is used to send the contents of a resource as a sequence of + // bytes. The bytes are sent in a sequence of request protos of a client-side + // streaming RPC. + // + // A `Write()` action is resumable. If there is an error or the connection is + // broken during the `Write()`, the client should check the status of the + // `Write()` by calling `QueryWriteStatus()` and continue writing from the + // returned `committed_size`. This may be less than the amount of data the + // client previously sent. + // + // Calling `Write()` on a resource name that was previously written and + // finalized could cause an error, depending on whether the underlying service + // allows over-writing of previously written resources. + // + // When the client closes the request channel, the service will respond with + // a `WriteResponse`. The service will not view the resource as `complete` + // until the client has sent a `WriteRequest` with `finish_write` set to + // `true`. Sending any requests on a stream after sending a request with + // `finish_write` set to `true` will cause an error. The client **should** + // check the `WriteResponse` it receives to determine how much data the + // service was able to commit and whether the service views the resource as + // `complete` or not. + rpc Write(stream WriteRequest) returns (WriteResponse); + + // `QueryWriteStatus()` is used to find the `committed_size` for a resource + // that is being written, which can then be used as the `write_offset` for + // the next `Write()` call. + // + // If the resource does not exist (i.e., the resource has been deleted, or the + // first `Write()` has not yet reached the service), this method returns the + // error `NOT_FOUND`. + // + // The client **may** call `QueryWriteStatus()` at any time to determine how + // much data has been processed for this resource. This is useful if the + // client is buffering data and needs to know which data can be safely + // evicted. For any sequence of `QueryWriteStatus()` calls for a given + // resource name, the sequence of returned `committed_size` values will be + // non-decreasing. + rpc QueryWriteStatus(QueryWriteStatusRequest) + returns (QueryWriteStatusResponse); +} + +// Request object for ByteStream.Read. +message ReadRequest { + // The name of the resource to read. + string resource_name = 1; + + // The offset for the first byte to return in the read, relative to the start + // of the resource. + // + // A `read_offset` that is negative or greater than the size of the resource + // will cause an `OUT_OF_RANGE` error. + int64 read_offset = 2; + + // The maximum number of `data` bytes the server is allowed to return in the + // sum of all `ReadResponse` messages. A `read_limit` of zero indicates that + // there is no limit, and a negative `read_limit` will cause an error. + // + // If the stream returns fewer bytes than allowed by the `read_limit` and no + // error occurred, the stream includes all data from the `read_offset` to the + // end of the resource. + int64 read_limit = 3; +} + +// Response object for ByteStream.Read. +message ReadResponse { + // A portion of the data for the resource. The service **may** leave `data` + // empty for any given `ReadResponse`. This enables the service to inform the + // client that the request is still live while it is running an operation to + // generate more data. + bytes data = 10; +} + +// Request object for ByteStream.Write. +message WriteRequest { + // The name of the resource to write. This **must** be set on the first + // `WriteRequest` of each `Write()` action. If it is set on subsequent calls, + // it **must** match the value of the first request. + string resource_name = 1; + + // The offset from the beginning of the resource at which the data should be + // written. It is required on all `WriteRequest`s. + // + // In the first `WriteRequest` of a `Write()` action, it indicates + // the initial offset for the `Write()` call. The value **must** be equal to + // the `committed_size` that a call to `QueryWriteStatus()` would return. + // + // On subsequent calls, this value **must** be set and **must** be equal to + // the sum of the first `write_offset` and the sizes of all `data` bundles + // sent previously on this stream. + // + // An incorrect value will cause an error. + int64 write_offset = 2; + + // If `true`, this indicates that the write is complete. Sending any + // `WriteRequest`s subsequent to one in which `finish_write` is `true` will + // cause an error. + bool finish_write = 3; + + // A portion of the data for the resource. The client **may** leave `data` + // empty for any given `WriteRequest`. This enables the client to inform the + // service that the request is still live while it is running an operation to + // generate more data. + bytes data = 10; +} + +// Response object for ByteStream.Write. +message WriteResponse { + // The number of bytes that have been processed for the given resource. + int64 committed_size = 1; +} + +// Request object for ByteStream.QueryWriteStatus. +message QueryWriteStatusRequest { + // The name of the resource whose write status is being requested. + string resource_name = 1; +} + +// Response object for ByteStream.QueryWriteStatus. +message QueryWriteStatusResponse { + // The number of bytes that have been processed for the given resource. + int64 committed_size = 1; + + // `complete` is `true` only if the client has sent a `WriteRequest` with + // `finish_write` set to true, and the server has processed that request. + bool complete = 2; +} diff --git a/proto/prost/private/tests/complex_imports/googleapis/google/longrunning/BUILD.bazel b/proto/prost/private/tests/complex_imports/googleapis/google/longrunning/BUILD.bazel new file mode 100644 index 0000000000..d55b3ce877 --- /dev/null +++ b/proto/prost/private/tests/complex_imports/googleapis/google/longrunning/BUILD.bazel @@ -0,0 +1,16 @@ +load("@rules_proto//proto:defs.bzl", "proto_library") + +proto_library( + name = "longrunning_proto", + srcs = ["operations.proto"], + strip_import_prefix = "/proto/prost/private/tests/complex_imports/googleapis", + visibility = ["//visibility:public"], + deps = [ + "//proto/prost/private/tests/complex_imports/googleapis/google/api:annotations_proto", + "//proto/prost/private/tests/complex_imports/googleapis/google/rpc:status_proto", + "@com_google_protobuf//:any_proto", + "@com_google_protobuf//:descriptor_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:empty_proto", + ], +) diff --git a/proto/prost/private/tests/complex_imports/googleapis/google/longrunning/operations.proto b/proto/prost/private/tests/complex_imports/googleapis/google/longrunning/operations.proto new file mode 100644 index 0000000000..c1fdc6f529 --- /dev/null +++ b/proto/prost/private/tests/complex_imports/googleapis/google/longrunning/operations.proto @@ -0,0 +1,247 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.longrunning; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/protobuf/any.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/empty.proto"; +import "google/rpc/status.proto"; +import "google/protobuf/descriptor.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.LongRunning"; +option go_package = "google.golang.org/genproto/googleapis/longrunning;longrunning"; +option java_multiple_files = true; +option java_outer_classname = "OperationsProto"; +option java_package = "com.google.longrunning"; +option php_namespace = "Google\\LongRunning"; + +extend google.protobuf.MethodOptions { + // Additional information regarding long-running operations. + // In particular, this specifies the types that are returned from + // long-running operations. + // + // Required for methods that return `google.longrunning.Operation`; invalid + // otherwise. + google.longrunning.OperationInfo operation_info = 1049; +} + +// Manages long-running operations with an API service. +// +// When an API method normally takes long time to complete, it can be designed +// to return [Operation][google.longrunning.Operation] to the client, and the client can use this +// interface to receive the real response asynchronously by polling the +// operation resource, or pass the operation resource to another API (such as +// Google Cloud Pub/Sub API) to receive the response. Any API service that +// returns long-running operations should implement the `Operations` interface +// so developers can have a consistent client experience. +service Operations { + option (google.api.default_host) = "longrunning.googleapis.com"; + + // Lists operations that match the specified filter in the request. If the + // server doesn't support this method, it returns `UNIMPLEMENTED`. + // + // NOTE: the `name` binding allows API services to override the binding + // to use different resource name schemes, such as `users/*/operations`. To + // override the binding, API services can add a binding such as + // `"/v1/{name=users/*}/operations"` to their service configuration. + // For backwards compatibility, the default name includes the operations + // collection id, however overriding users must ensure the name binding + // is the parent resource, without the operations collection id. + rpc ListOperations(ListOperationsRequest) returns (ListOperationsResponse) { + option (google.api.http) = { + get: "/v1/{name=operations}" + }; + option (google.api.method_signature) = "name,filter"; + } + + // Gets the latest state of a long-running operation. Clients can use this + // method to poll the operation result at intervals as recommended by the API + // service. + rpc GetOperation(GetOperationRequest) returns (Operation) { + option (google.api.http) = { + get: "/v1/{name=operations/**}" + }; + option (google.api.method_signature) = "name"; + } + + // Deletes a long-running operation. This method indicates that the client is + // no longer interested in the operation result. It does not cancel the + // operation. If the server doesn't support this method, it returns + // `google.rpc.Code.UNIMPLEMENTED`. + rpc DeleteOperation(DeleteOperationRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=operations/**}" + }; + option (google.api.method_signature) = "name"; + } + + // Starts asynchronous cancellation on a long-running operation. The server + // makes a best effort to cancel the operation, but success is not + // guaranteed. If the server doesn't support this method, it returns + // `google.rpc.Code.UNIMPLEMENTED`. Clients can use + // [Operations.GetOperation][google.longrunning.Operations.GetOperation] or + // other methods to check whether the cancellation succeeded or whether the + // operation completed despite cancellation. On successful cancellation, + // the operation is not deleted; instead, it becomes an operation with + // an [Operation.error][google.longrunning.Operation.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + // corresponding to `Code.CANCELLED`. + rpc CancelOperation(CancelOperationRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1/{name=operations/**}:cancel" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Waits until the specified long-running operation is done or reaches at most + // a specified timeout, returning the latest state. If the operation is + // already done, the latest state is immediately returned. If the timeout + // specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + // timeout is used. If the server does not support this method, it returns + // `google.rpc.Code.UNIMPLEMENTED`. + // Note that this method is on a best-effort basis. It may return the latest + // state before the specified timeout (including immediately), meaning even an + // immediate response is no guarantee that the operation is done. + rpc WaitOperation(WaitOperationRequest) returns (Operation) { + } +} + +// This resource represents a long-running operation that is the result of a +// network API call. +message Operation { + // The server-assigned name, which is only unique within the same service that + // originally returns it. If you use the default HTTP mapping, the + // `name` should be a resource name ending with `operations/{unique_id}`. + string name = 1; + + // Service-specific metadata associated with the operation. It typically + // contains progress information and common metadata such as create time. + // Some services might not provide such metadata. Any method that returns a + // long-running operation should document the metadata type, if any. + google.protobuf.Any metadata = 2; + + // If the value is `false`, it means the operation is still in progress. + // If `true`, the operation is completed, and either `error` or `response` is + // available. + bool done = 3; + + // The operation result, which can be either an `error` or a valid `response`. + // If `done` == `false`, neither `error` nor `response` is set. + // If `done` == `true`, exactly one of `error` or `response` is set. + oneof result { + // The error result of the operation in case of failure or cancellation. + google.rpc.Status error = 4; + + // The normal response of the operation in case of success. If the original + // method returns no data on success, such as `Delete`, the response is + // `google.protobuf.Empty`. If the original method is standard + // `Get`/`Create`/`Update`, the response should be the resource. For other + // methods, the response should have the type `XxxResponse`, where `Xxx` + // is the original method name. For example, if the original method name + // is `TakeSnapshot()`, the inferred response type is + // `TakeSnapshotResponse`. + google.protobuf.Any response = 5; + } +} + +// The request message for [Operations.GetOperation][google.longrunning.Operations.GetOperation]. +message GetOperationRequest { + // The name of the operation resource. + string name = 1; +} + +// The request message for [Operations.ListOperations][google.longrunning.Operations.ListOperations]. +message ListOperationsRequest { + // The name of the operation's parent resource. + string name = 4; + + // The standard list filter. + string filter = 1; + + // The standard list page size. + int32 page_size = 2; + + // The standard list page token. + string page_token = 3; +} + +// The response message for [Operations.ListOperations][google.longrunning.Operations.ListOperations]. +message ListOperationsResponse { + // A list of operations that matches the specified filter in the request. + repeated Operation operations = 1; + + // The standard List next-page token. + string next_page_token = 2; +} + +// The request message for [Operations.CancelOperation][google.longrunning.Operations.CancelOperation]. +message CancelOperationRequest { + // The name of the operation resource to be cancelled. + string name = 1; +} + +// The request message for [Operations.DeleteOperation][google.longrunning.Operations.DeleteOperation]. +message DeleteOperationRequest { + // The name of the operation resource to be deleted. + string name = 1; +} + +// The request message for [Operations.WaitOperation][google.longrunning.Operations.WaitOperation]. +message WaitOperationRequest { + // The name of the operation resource to wait on. + string name = 1; + + // The maximum duration to wait before timing out. If left blank, the wait + // will be at most the time permitted by the underlying HTTP/RPC protocol. + // If RPC context deadline is also specified, the shorter one will be used. + google.protobuf.Duration timeout = 2; +} + +// A message representing the message types used by a long-running operation. +// +// Example: +// +// rpc LongRunningRecognize(LongRunningRecognizeRequest) +// returns (google.longrunning.Operation) { +// option (google.longrunning.operation_info) = { +// response_type: "LongRunningRecognizeResponse" +// metadata_type: "LongRunningRecognizeMetadata" +// }; +// } +message OperationInfo { + // Required. The message name of the primary return type for this + // long-running operation. + // This type will be used to deserialize the LRO's response. + // + // If the response is in a different package from the rpc, a fully-qualified + // message name must be used (e.g. `google.protobuf.Struct`). + // + // Note: Altering this value constitutes a breaking change. + string response_type = 1; + + // Required. The message name of the metadata type for this long-running + // operation. + // + // If the response is in a different package from the rpc, a fully-qualified + // message name must be used (e.g. `google.protobuf.Struct`). + // + // Note: Altering this value constitutes a breaking change. + string metadata_type = 2; +} diff --git a/proto/prost/private/tests/complex_imports/googleapis/google/rpc/BUILD.bazel b/proto/prost/private/tests/complex_imports/googleapis/google/rpc/BUILD.bazel new file mode 100644 index 0000000000..3e912d8faf --- /dev/null +++ b/proto/prost/private/tests/complex_imports/googleapis/google/rpc/BUILD.bazel @@ -0,0 +1,34 @@ +load("@rules_proto//proto:defs.bzl", "proto_library") + +proto_library( + name = "code_proto", + srcs = [ + "code.proto", + ], + strip_import_prefix = "/proto/prost/private/tests/complex_imports/googleapis", + visibility = ["//visibility:public"], +) + +proto_library( + name = "error_details_proto", + srcs = [ + "error_details.proto", + ], + strip_import_prefix = "/proto/prost/private/tests/complex_imports/googleapis", + visibility = ["//visibility:public"], + deps = [ + "@com_google_protobuf//:duration_proto", + ], +) + +proto_library( + name = "status_proto", + srcs = [ + "status.proto", + ], + strip_import_prefix = "/proto/prost/private/tests/complex_imports/googleapis", + visibility = ["//visibility:public"], + deps = [ + "@com_google_protobuf//:any_proto", + ], +) diff --git a/proto/prost/private/tests/complex_imports/googleapis/google/rpc/code.proto b/proto/prost/private/tests/complex_imports/googleapis/google/rpc/code.proto new file mode 100644 index 0000000000..98ae0ac18f --- /dev/null +++ b/proto/prost/private/tests/complex_imports/googleapis/google/rpc/code.proto @@ -0,0 +1,186 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.rpc; + +option go_package = "google.golang.org/genproto/googleapis/rpc/code;code"; +option java_multiple_files = true; +option java_outer_classname = "CodeProto"; +option java_package = "com.google.rpc"; +option objc_class_prefix = "RPC"; + +// The canonical error codes for gRPC APIs. +// +// +// Sometimes multiple error codes may apply. Services should return +// the most specific error code that applies. For example, prefer +// `OUT_OF_RANGE` over `FAILED_PRECONDITION` if both codes apply. +// Similarly prefer `NOT_FOUND` or `ALREADY_EXISTS` over `FAILED_PRECONDITION`. +enum Code { + // Not an error; returned on success + // + // HTTP Mapping: 200 OK + OK = 0; + + // The operation was cancelled, typically by the caller. + // + // HTTP Mapping: 499 Client Closed Request + CANCELLED = 1; + + // Unknown error. For example, this error may be returned when + // a `Status` value received from another address space belongs to + // an error space that is not known in this address space. Also + // errors raised by APIs that do not return enough error information + // may be converted to this error. + // + // HTTP Mapping: 500 Internal Server Error + UNKNOWN = 2; + + // The client specified an invalid argument. Note that this differs + // from `FAILED_PRECONDITION`. `INVALID_ARGUMENT` indicates arguments + // that are problematic regardless of the state of the system + // (e.g., a malformed file name). + // + // HTTP Mapping: 400 Bad Request + INVALID_ARGUMENT = 3; + + // The deadline expired before the operation could complete. For operations + // that change the state of the system, this error may be returned + // even if the operation has completed successfully. For example, a + // successful response from a server could have been delayed long + // enough for the deadline to expire. + // + // HTTP Mapping: 504 Gateway Timeout + DEADLINE_EXCEEDED = 4; + + // Some requested entity (e.g., file or directory) was not found. + // + // Note to server developers: if a request is denied for an entire class + // of users, such as gradual feature rollout or undocumented whitelist, + // `NOT_FOUND` may be used. If a request is denied for some users within + // a class of users, such as user-based access control, `PERMISSION_DENIED` + // must be used. + // + // HTTP Mapping: 404 Not Found + NOT_FOUND = 5; + + // The entity that a client attempted to create (e.g., file or directory) + // already exists. + // + // HTTP Mapping: 409 Conflict + ALREADY_EXISTS = 6; + + // The caller does not have permission to execute the specified + // operation. `PERMISSION_DENIED` must not be used for rejections + // caused by exhausting some resource (use `RESOURCE_EXHAUSTED` + // instead for those errors). `PERMISSION_DENIED` must not be + // used if the caller can not be identified (use `UNAUTHENTICATED` + // instead for those errors). This error code does not imply the + // request is valid or the requested entity exists or satisfies + // other pre-conditions. + // + // HTTP Mapping: 403 Forbidden + PERMISSION_DENIED = 7; + + // The request does not have valid authentication credentials for the + // operation. + // + // HTTP Mapping: 401 Unauthorized + UNAUTHENTICATED = 16; + + // Some resource has been exhausted, perhaps a per-user quota, or + // perhaps the entire file system is out of space. + // + // HTTP Mapping: 429 Too Many Requests + RESOURCE_EXHAUSTED = 8; + + // The operation was rejected because the system is not in a state + // required for the operation's execution. For example, the directory + // to be deleted is non-empty, an rmdir operation is applied to + // a non-directory, etc. + // + // Service implementors can use the following guidelines to decide + // between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`: + // (a) Use `UNAVAILABLE` if the client can retry just the failing call. + // (b) Use `ABORTED` if the client should retry at a higher level + // (e.g., when a client-specified test-and-set fails, indicating the + // client should restart a read-modify-write sequence). + // (c) Use `FAILED_PRECONDITION` if the client should not retry until + // the system state has been explicitly fixed. E.g., if an "rmdir" + // fails because the directory is non-empty, `FAILED_PRECONDITION` + // should be returned since the client should not retry unless + // the files are deleted from the directory. + // + // HTTP Mapping: 400 Bad Request + FAILED_PRECONDITION = 9; + + // The operation was aborted, typically due to a concurrency issue such as + // a sequencer check failure or transaction abort. + // + // See the guidelines above for deciding between `FAILED_PRECONDITION`, + // `ABORTED`, and `UNAVAILABLE`. + // + // HTTP Mapping: 409 Conflict + ABORTED = 10; + + // The operation was attempted past the valid range. E.g., seeking or + // reading past end-of-file. + // + // Unlike `INVALID_ARGUMENT`, this error indicates a problem that may + // be fixed if the system state changes. For example, a 32-bit file + // system will generate `INVALID_ARGUMENT` if asked to read at an + // offset that is not in the range [0,2^32-1], but it will generate + // `OUT_OF_RANGE` if asked to read from an offset past the current + // file size. + // + // There is a fair bit of overlap between `FAILED_PRECONDITION` and + // `OUT_OF_RANGE`. We recommend using `OUT_OF_RANGE` (the more specific + // error) when it applies so that callers who are iterating through + // a space can easily look for an `OUT_OF_RANGE` error to detect when + // they are done. + // + // HTTP Mapping: 400 Bad Request + OUT_OF_RANGE = 11; + + // The operation is not implemented or is not supported/enabled in this + // service. + // + // HTTP Mapping: 501 Not Implemented + UNIMPLEMENTED = 12; + + // Internal errors. This means that some invariants expected by the + // underlying system have been broken. This error code is reserved + // for serious errors. + // + // HTTP Mapping: 500 Internal Server Error + INTERNAL = 13; + + // The service is currently unavailable. This is most likely a + // transient condition, which can be corrected by retrying with + // a backoff. Note that it is not always safe to retry + // non-idempotent operations. + // + // See the guidelines above for deciding between `FAILED_PRECONDITION`, + // `ABORTED`, and `UNAVAILABLE`. + // + // HTTP Mapping: 503 Service Unavailable + UNAVAILABLE = 14; + + // Unrecoverable data loss or corruption. + // + // HTTP Mapping: 500 Internal Server Error + DATA_LOSS = 15; +} diff --git a/proto/prost/private/tests/complex_imports/googleapis/google/rpc/error_details.proto b/proto/prost/private/tests/complex_imports/googleapis/google/rpc/error_details.proto new file mode 100644 index 0000000000..c4d6c4b78c --- /dev/null +++ b/proto/prost/private/tests/complex_imports/googleapis/google/rpc/error_details.proto @@ -0,0 +1,249 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.rpc; + +import "google/protobuf/duration.proto"; + +option go_package = "google.golang.org/genproto/googleapis/rpc/errdetails;errdetails"; +option java_multiple_files = true; +option java_outer_classname = "ErrorDetailsProto"; +option java_package = "com.google.rpc"; +option objc_class_prefix = "RPC"; + +// Describes when the clients can retry a failed request. Clients could ignore +// the recommendation here or retry when this information is missing from error +// responses. +// +// It's always recommended that clients should use exponential backoff when +// retrying. +// +// Clients should wait until `retry_delay` amount of time has passed since +// receiving the error response before retrying. If retrying requests also +// fail, clients should use an exponential backoff scheme to gradually increase +// the delay between retries based on `retry_delay`, until either a maximum +// number of retries have been reached or a maximum retry delay cap has been +// reached. +message RetryInfo { + // Clients should wait at least this long between retrying the same request. + google.protobuf.Duration retry_delay = 1; +} + +// Describes additional debugging info. +message DebugInfo { + // The stack trace entries indicating where the error occurred. + repeated string stack_entries = 1; + + // Additional debugging information provided by the server. + string detail = 2; +} + +// Describes how a quota check failed. +// +// For example if a daily limit was exceeded for the calling project, +// a service could respond with a QuotaFailure detail containing the project +// id and the description of the quota limit that was exceeded. If the +// calling project hasn't enabled the service in the developer console, then +// a service could respond with the project id and set `service_disabled` +// to true. +// +// Also see RetryInfo and Help types for other details about handling a +// quota failure. +message QuotaFailure { + // A message type used to describe a single quota violation. For example, a + // daily quota or a custom quota that was exceeded. + message Violation { + // The subject on which the quota check failed. + // For example, "clientip:" or "project:". + string subject = 1; + + // A description of how the quota check failed. Clients can use this + // description to find more about the quota configuration in the service's + // public documentation, or find the relevant quota limit to adjust through + // developer console. + // + // For example: "Service disabled" or "Daily Limit for read operations + // exceeded". + string description = 2; + } + + // Describes all quota violations. + repeated Violation violations = 1; +} + +// Describes the cause of the error with structured details. +// +// Example of an error when contacting the "pubsub.googleapis.com" API when it +// is not enabled: +// +// { "reason": "API_DISABLED" +// "domain": "googleapis.com" +// "metadata": { +// "resource": "projects/123", +// "service": "pubsub.googleapis.com" +// } +// } +// +// This response indicates that the pubsub.googleapis.com API is not enabled. +// +// Example of an error that is returned when attempting to create a Spanner +// instance in a region that is out of stock: +// +// { "reason": "STOCKOUT" +// "domain": "spanner.googleapis.com", +// "metadata": { +// "availableRegions": "us-central1,us-east2" +// } +// } +message ErrorInfo { + // The reason of the error. This is a constant value that identifies the + // proximate cause of the error. Error reasons are unique within a particular + // domain of errors. This should be at most 63 characters and match + // /[A-Z0-9_]+/. + string reason = 1; + + // The logical grouping to which the "reason" belongs. The error domain + // is typically the registered service name of the tool or product that + // generates the error. Example: "pubsub.googleapis.com". If the error is + // generated by some common infrastructure, the error domain must be a + // globally unique value that identifies the infrastructure. For Google API + // infrastructure, the error domain is "googleapis.com". + string domain = 2; + + // Additional structured details about this error. + // + // Keys should match /[a-zA-Z0-9-_]/ and be limited to 64 characters in + // length. When identifying the current value of an exceeded limit, the units + // should be contained in the key, not the value. For example, rather than + // {"instanceLimit": "100/request"}, should be returned as, + // {"instanceLimitPerRequest": "100"}, if the client exceeds the number of + // instances that can be created in a single (batch) request. + map metadata = 3; +} + +// Describes what preconditions have failed. +// +// For example, if an RPC failed because it required the Terms of Service to be +// acknowledged, it could list the terms of service violation in the +// PreconditionFailure message. +message PreconditionFailure { + // A message type used to describe a single precondition failure. + message Violation { + // The type of PreconditionFailure. We recommend using a service-specific + // enum type to define the supported precondition violation subjects. For + // example, "TOS" for "Terms of Service violation". + string type = 1; + + // The subject, relative to the type, that failed. + // For example, "google.com/cloud" relative to the "TOS" type would indicate + // which terms of service is being referenced. + string subject = 2; + + // A description of how the precondition failed. Developers can use this + // description to understand how to fix the failure. + // + // For example: "Terms of service not accepted". + string description = 3; + } + + // Describes all precondition violations. + repeated Violation violations = 1; +} + +// Describes violations in a client request. This error type focuses on the +// syntactic aspects of the request. +message BadRequest { + // A message type used to describe a single bad request field. + message FieldViolation { + // A path leading to a field in the request body. The value will be a + // sequence of dot-separated identifiers that identify a protocol buffer + // field. E.g., "field_violations.field" would identify this field. + string field = 1; + + // A description of why the request element is bad. + string description = 2; + } + + // Describes all violations in a client request. + repeated FieldViolation field_violations = 1; +} + +// Contains metadata about the request that clients can attach when filing a bug +// or providing other forms of feedback. +message RequestInfo { + // An opaque string that should only be interpreted by the service generating + // it. For example, it can be used to identify requests in the service's logs. + string request_id = 1; + + // Any data that was used to serve this request. For example, an encrypted + // stack trace that can be sent back to the service provider for debugging. + string serving_data = 2; +} + +// Describes the resource that is being accessed. +message ResourceInfo { + // A name for the type of resource being accessed, e.g. "sql table", + // "cloud storage bucket", "file", "Google calendar"; or the type URL + // of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic". + string resource_type = 1; + + // The name of the resource being accessed. For example, a shared calendar + // name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current + // error is [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED]. + string resource_name = 2; + + // The owner of the resource (optional). + // For example, "user:" or "project:". + string owner = 3; + + // Describes what error is encountered when accessing this resource. + // For example, updating a cloud project may require the `writer` permission + // on the developer console project. + string description = 4; +} + +// Provides links to documentation or for performing an out of band action. +// +// For example, if a quota check failed with an error indicating the calling +// project hasn't enabled the accessed service, this can contain a URL pointing +// directly to the right place in the developer console to flip the bit. +message Help { + // Describes a URL link. + message Link { + // Describes what the link offers. + string description = 1; + + // The URL of the link. + string url = 2; + } + + // URL(s) pointing to additional information on handling the current error. + repeated Link links = 1; +} + +// Provides a localized error message that is safe to return to the user +// which can be attached to an RPC error. +message LocalizedMessage { + // The locale used following the specification defined at + // http://www.rfc-editor.org/rfc/bcp/bcp47.txt. + // Examples are: "en-US", "fr-CH", "es-MX" + string locale = 1; + + // The localized error message in the above locale. + string message = 2; +} diff --git a/proto/prost/private/tests/complex_imports/googleapis/google/rpc/status.proto b/proto/prost/private/tests/complex_imports/googleapis/google/rpc/status.proto new file mode 100644 index 0000000000..3b1f7a932f --- /dev/null +++ b/proto/prost/private/tests/complex_imports/googleapis/google/rpc/status.proto @@ -0,0 +1,47 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.rpc; + +import "google/protobuf/any.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/rpc/status;status"; +option java_multiple_files = true; +option java_outer_classname = "StatusProto"; +option java_package = "com.google.rpc"; +option objc_class_prefix = "RPC"; + +// The `Status` type defines a logical error model that is suitable for +// different programming environments, including REST APIs and RPC APIs. It is +// used by [gRPC](https://github.com/grpc). Each `Status` message contains +// three pieces of data: error code, error message, and error details. +// +// You can find out more about this error model and how to work with it in the +// [API Design Guide](https://cloud.google.com/apis/design/errors). +message Status { + // The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + int32 code = 1; + + // A developer-facing error message, which should be in English. Any + // user-facing error message should be localized and sent in the + // [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. + string message = 2; + + // A list of messages that carry the error details. There is a common set of + // message types for APIs to use. + repeated google.protobuf.Any details = 3; +} diff --git a/proto/prost/private/tests/complex_imports/remote-apis/build/bazel/remote/execution/v2/BUILD.bazel b/proto/prost/private/tests/complex_imports/remote-apis/build/bazel/remote/execution/v2/BUILD.bazel new file mode 100644 index 0000000000..90fa0b116f --- /dev/null +++ b/proto/prost/private/tests/complex_imports/remote-apis/build/bazel/remote/execution/v2/BUILD.bazel @@ -0,0 +1,25 @@ +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@rules_rust//proto/prost:defs.bzl", "rust_tonic_library") + +proto_library( + name = "remoteexecution_proto", + srcs = ["remote_execution.proto"], + strip_import_prefix = "/proto/prost/private/tests/complex_imports/remote-apis", + visibility = ["//visibility:public"], + deps = [ + "//proto/prost/private/tests/complex_imports/googleapis/google/api:annotations_proto", + "//proto/prost/private/tests/complex_imports/googleapis/google/longrunning:longrunning_proto", + "//proto/prost/private/tests/complex_imports/googleapis/google/rpc:status_proto", + "//proto/prost/private/tests/complex_imports/remote-apis/build/bazel/semver:semver_proto", + "@com_google_protobuf//:any_proto", + "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:timestamp_proto", + "@com_google_protobuf//:wrappers_proto", + ], +) + +rust_tonic_library( + name = "remoteexecution_tonic_proto", + proto = ":remoteexecution_proto", + visibility = ["//visibility:public"], +) diff --git a/proto/prost/private/tests/complex_imports/remote-apis/build/bazel/remote/execution/v2/remote_execution.proto b/proto/prost/private/tests/complex_imports/remote-apis/build/bazel/remote/execution/v2/remote_execution.proto new file mode 100644 index 0000000000..6f7cdde25a --- /dev/null +++ b/proto/prost/private/tests/complex_imports/remote-apis/build/bazel/remote/execution/v2/remote_execution.proto @@ -0,0 +1,1795 @@ +// Copyright 2018 The Bazel Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package build.bazel.remote.execution.v2; + +import "build/bazel/semver/semver.proto"; +import "google/api/annotations.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/any.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Build.Bazel.Remote.Execution.V2"; +option go_package = "remoteexecution"; +option java_multiple_files = true; +option java_outer_classname = "RemoteExecutionProto"; +option java_package = "build.bazel.remote.execution.v2"; +option objc_class_prefix = "REX"; + + +// The Remote Execution API is used to execute an +// [Action][build.bazel.remote.execution.v2.Action] on the remote +// workers. +// +// As with other services in the Remote Execution API, any call may return an +// error with a [RetryInfo][google.rpc.RetryInfo] error detail providing +// information about when the client should retry the request; clients SHOULD +// respect the information provided. +service Execution { + // Execute an action remotely. + // + // In order to execute an action, the client must first upload all of the + // inputs, the + // [Command][build.bazel.remote.execution.v2.Command] to run, and the + // [Action][build.bazel.remote.execution.v2.Action] into the + // [ContentAddressableStorage][build.bazel.remote.execution.v2.ContentAddressableStorage]. + // It then calls `Execute` with an `action_digest` referring to them. The + // server will run the action and eventually return the result. + // + // The input `Action`'s fields MUST meet the various canonicalization + // requirements specified in the documentation for their types so that it has + // the same digest as other logically equivalent `Action`s. The server MAY + // enforce the requirements and return errors if a non-canonical input is + // received. It MAY also proceed without verifying some or all of the + // requirements, such as for performance reasons. If the server does not + // verify the requirement, then it will treat the `Action` as distinct from + // another logically equivalent action if they hash differently. + // + // Returns a stream of + // [google.longrunning.Operation][google.longrunning.Operation] messages + // describing the resulting execution, with eventual `response` + // [ExecuteResponse][build.bazel.remote.execution.v2.ExecuteResponse]. The + // `metadata` on the operation is of type + // [ExecuteOperationMetadata][build.bazel.remote.execution.v2.ExecuteOperationMetadata]. + // + // If the client remains connected after the first response is returned after + // the server, then updates are streamed as if the client had called + // [WaitExecution][build.bazel.remote.execution.v2.Execution.WaitExecution] + // until the execution completes or the request reaches an error. The + // operation can also be queried using [Operations + // API][google.longrunning.Operations.GetOperation]. + // + // The server NEED NOT implement other methods or functionality of the + // Operations API. + // + // Errors discovered during creation of the `Operation` will be reported + // as gRPC Status errors, while errors that occurred while running the + // action will be reported in the `status` field of the `ExecuteResponse`. The + // server MUST NOT set the `error` field of the `Operation` proto. + // The possible errors include: + // + // * `INVALID_ARGUMENT`: One or more arguments are invalid. + // * `FAILED_PRECONDITION`: One or more errors occurred in setting up the + // action requested, such as a missing input or command or no worker being + // available. The client may be able to fix the errors and retry. + // * `RESOURCE_EXHAUSTED`: There is insufficient quota of some resource to run + // the action. + // * `UNAVAILABLE`: Due to a transient condition, such as all workers being + // occupied (and the server does not support a queue), the action could not + // be started. The client should retry. + // * `INTERNAL`: An internal error occurred in the execution engine or the + // worker. + // * `DEADLINE_EXCEEDED`: The execution timed out. + // * `CANCELLED`: The operation was cancelled by the client. This status is + // only possible if the server implements the Operations API CancelOperation + // method, and it was called for the current execution. + // + // In the case of a missing input or command, the server SHOULD additionally + // send a [PreconditionFailure][google.rpc.PreconditionFailure] error detail + // where, for each requested blob not present in the CAS, there is a + // `Violation` with a `type` of `MISSING` and a `subject` of + // `"blobs/{hash}/{size}"` indicating the digest of the missing blob. + // + // The server does not need to guarantee that a call to this method leads to + // at most one execution of the action. The server MAY execute the action + // multiple times, potentially in parallel. These redundant executions MAY + // continue to run, even if the operation is completed. + rpc Execute(ExecuteRequest) returns (stream google.longrunning.Operation) { + option (google.api.http) = { post: "/v2/{instance_name=**}/actions:execute" body: "*" }; + } + + // Wait for an execution operation to complete. When the client initially + // makes the request, the server immediately responds with the current status + // of the execution. The server will leave the request stream open until the + // operation completes, and then respond with the completed operation. The + // server MAY choose to stream additional updates as execution progresses, + // such as to provide an update as to the state of the execution. + rpc WaitExecution(WaitExecutionRequest) returns (stream google.longrunning.Operation) { + option (google.api.http) = { post: "/v2/{name=operations/**}:waitExecution" body: "*" }; + } +} + +// The action cache API is used to query whether a given action has already been +// performed and, if so, retrieve its result. Unlike the +// [ContentAddressableStorage][build.bazel.remote.execution.v2.ContentAddressableStorage], +// which addresses blobs by their own content, the action cache addresses the +// [ActionResult][build.bazel.remote.execution.v2.ActionResult] by a +// digest of the encoded [Action][build.bazel.remote.execution.v2.Action] +// which produced them. +// +// The lifetime of entries in the action cache is implementation-specific, but +// the server SHOULD assume that more recently used entries are more likely to +// be used again. +// +// As with other services in the Remote Execution API, any call may return an +// error with a [RetryInfo][google.rpc.RetryInfo] error detail providing +// information about when the client should retry the request; clients SHOULD +// respect the information provided. +service ActionCache { + // Retrieve a cached execution result. + // + // Implementations SHOULD ensure that any blobs referenced from the + // [ContentAddressableStorage][build.bazel.remote.execution.v2.ContentAddressableStorage] + // are available at the time of returning the + // [ActionResult][build.bazel.remote.execution.v2.ActionResult] and will be + // for some period of time afterwards. The lifetimes of the referenced blobs SHOULD be increased + // if necessary and applicable. + // + // Errors: + // + // * `NOT_FOUND`: The requested `ActionResult` is not in the cache. + rpc GetActionResult(GetActionResultRequest) returns (ActionResult) { + option (google.api.http) = { get: "/v2/{instance_name=**}/actionResults/{action_digest.hash}/{action_digest.size_bytes}" }; + } + + // Upload a new execution result. + // + // In order to allow the server to perform access control based on the type of + // action, and to assist with client debugging, the client MUST first upload + // the [Action][build.bazel.remote.execution.v2.Execution] that produced the + // result, along with its + // [Command][build.bazel.remote.execution.v2.Command], into the + // `ContentAddressableStorage`. + // + // Server implementations MAY modify the + // `UpdateActionResultRequest.action_result` and return an equivalent value. + // + // Errors: + // + // * `INVALID_ARGUMENT`: One or more arguments are invalid. + // * `FAILED_PRECONDITION`: One or more errors occurred in updating the + // action result, such as a missing command or action. + // * `RESOURCE_EXHAUSTED`: There is insufficient storage space to add the + // entry to the cache. + rpc UpdateActionResult(UpdateActionResultRequest) returns (ActionResult) { + option (google.api.http) = { put: "/v2/{instance_name=**}/actionResults/{action_digest.hash}/{action_digest.size_bytes}" body: "action_result" }; + } +} + +// The CAS (content-addressable storage) is used to store the inputs to and +// outputs from the execution service. Each piece of content is addressed by the +// digest of its binary data. +// +// Most of the binary data stored in the CAS is opaque to the execution engine, +// and is only used as a communication medium. In order to build an +// [Action][build.bazel.remote.execution.v2.Action], +// however, the client will need to also upload the +// [Command][build.bazel.remote.execution.v2.Command] and input root +// [Directory][build.bazel.remote.execution.v2.Directory] for the Action. +// The Command and Directory messages must be marshalled to wire format and then +// uploaded under the hash as with any other piece of content. In practice, the +// input root directory is likely to refer to other Directories in its +// hierarchy, which must also each be uploaded on their own. +// +// For small file uploads the client should group them together and call +// [BatchUpdateBlobs][build.bazel.remote.execution.v2.ContentAddressableStorage.BatchUpdateBlobs]. +// +// For large uploads, the client must use the +// [Write method][google.bytestream.ByteStream.Write] of the ByteStream API. +// +// For uncompressed data, The `WriteRequest.resource_name` is of the following form: +// `{instance_name}/uploads/{uuid}/blobs/{hash}/{size}{/optional_metadata}` +// +// Where: +// * `instance_name` is an identifier, possibly containing multiple path +// segments, used to distinguish between the various instances on the server, +// in a manner defined by the server. If it is the empty path, the leading +// slash is omitted, so that the `resource_name` becomes +// `uploads/{uuid}/blobs/{hash}/{size}{/optional_metadata}`. +// To simplify parsing, a path segment cannot equal any of the following +// keywords: `blobs`, `uploads`, `actions`, `actionResults`, `operations`, +// `capabilities` or `compressed-blobs`. +// * `uuid` is a version 4 UUID generated by the client, used to avoid +// collisions between concurrent uploads of the same data. Clients MAY +// reuse the same `uuid` for uploading different blobs. +// * `hash` and `size` refer to the [Digest][build.bazel.remote.execution.v2.Digest] +// of the data being uploaded. +// * `optional_metadata` is implementation specific data, which clients MAY omit. +// Servers MAY ignore this metadata. +// +// Data can alternatively be uploaded in compressed form, with the following +// `WriteRequest.resource_name` form: +// `{instance_name}/uploads/{uuid}/compressed-blobs/{compressor}/{uncompressed_hash}/{uncompressed_size}{/optional_metadata}` +// +// Where: +// * `instance_name`, `uuid` and `optional_metadata` are defined as above. +// * `compressor` is a lowercase string form of a `Compressor.Value` enum +// other than `identity`, which is supported by the server and advertised in +// [CacheCapabilities.supported_compressor][build.bazel.remote.execution.v2.CacheCapabilities.supported_compressor]. +// * `uncompressed_hash` and `uncompressed_size` refer to the +// [Digest][build.bazel.remote.execution.v2.Digest] of the data being +// uploaded, once uncompressed. Servers MUST verify that these match +// the uploaded data once uncompressed, and MUST return an +// `INVALID_ARGUMENT` error in the case of mismatch. +// +// Note that when writing compressed blobs, the `WriteRequest.write_offset` in +// the initial request in a stream refers to the offset in the uncompressed form +// of the blob. In subsequent requests, `WriteRequest.write_offset` MUST be the +// sum of the first request's 'WriteRequest.write_offset' and the total size of +// all the compressed data bundles in the previous requests. +// Note that this mixes an uncompressed offset with a compressed byte length, +// which is nonsensical, but it is done to fit the semantics of the existing +// ByteStream protocol. +// +// Uploads of the same data MAY occur concurrently in any form, compressed or +// uncompressed. +// +// Clients SHOULD NOT use gRPC-level compression for ByteStream API `Write` +// calls of compressed blobs, since this would compress already-compressed data. +// +// When attempting an upload, if another client has already completed the upload +// (which may occur in the middle of a single upload if another client uploads +// the same blob concurrently), the request will terminate immediately with +// a response whose `committed_size` is the full size of the uploaded file +// (regardless of how much data was transmitted by the client). If the client +// completes the upload but the +// [Digest][build.bazel.remote.execution.v2.Digest] does not match, an +// `INVALID_ARGUMENT` error will be returned. In either case, the client should +// not attempt to retry the upload. +// +// Small downloads can be grouped and requested in a batch via +// [BatchReadBlobs][build.bazel.remote.execution.v2.ContentAddressableStorage.BatchReadBlobs]. +// +// For large downloads, the client must use the +// [Read method][google.bytestream.ByteStream.Read] of the ByteStream API. +// +// For uncompressed data, The `ReadRequest.resource_name` is of the following form: +// `{instance_name}/blobs/{hash}/{size}` +// Where `instance_name`, `hash` and `size` are defined as for uploads. +// +// Data can alternatively be downloaded in compressed form, with the following +// `ReadRequest.resource_name` form: +// `{instance_name}/compressed-blobs/{compressor}/{uncompressed_hash}/{uncompressed_size}` +// +// Where: +// * `instance_name` and `compressor` are defined as for uploads. +// * `uncompressed_hash` and `uncompressed_size` refer to the +// [Digest][build.bazel.remote.execution.v2.Digest] of the data being +// downloaded, once uncompressed. Clients MUST verify that these match +// the downloaded data once uncompressed, and take appropriate steps in +// the case of failure such as retrying a limited number of times or +// surfacing an error to the user. +// +// When downloading compressed blobs: +// * `ReadRequest.read_offset` refers to the offset in the uncompressed form +// of the blob. +// * Servers MUST return `INVALID_ARGUMENT` if `ReadRequest.read_limit` is +// non-zero. +// * Servers MAY use any compression level they choose, including different +// levels for different blobs (e.g. choosing a level designed for maximum +// speed for data known to be incompressible). +// * Clients SHOULD NOT use gRPC-level compression, since this would compress +// already-compressed data. +// +// Servers MUST be able to provide data for all recently advertised blobs in +// each of the compression formats that the server supports, as well as in +// uncompressed form. +// +// The lifetime of entries in the CAS is implementation specific, but it SHOULD +// be long enough to allow for newly-added and recently looked-up entries to be +// used in subsequent calls (e.g. to +// [Execute][build.bazel.remote.execution.v2.Execution.Execute]). +// +// Servers MUST behave as though empty blobs are always available, even if they +// have not been uploaded. Clients MAY optimize away the uploading or +// downloading of empty blobs. +// +// As with other services in the Remote Execution API, any call may return an +// error with a [RetryInfo][google.rpc.RetryInfo] error detail providing +// information about when the client should retry the request; clients SHOULD +// respect the information provided. +service ContentAddressableStorage { + // Determine if blobs are present in the CAS. + // + // Clients can use this API before uploading blobs to determine which ones are + // already present in the CAS and do not need to be uploaded again. + // + // Servers SHOULD increase the lifetimes of the referenced blobs if necessary and + // applicable. + // + // There are no method-specific errors. + rpc FindMissingBlobs(FindMissingBlobsRequest) returns (FindMissingBlobsResponse) { + option (google.api.http) = { post: "/v2/{instance_name=**}/blobs:findMissing" body: "*" }; + } + + // Upload many blobs at once. + // + // The server may enforce a limit of the combined total size of blobs + // to be uploaded using this API. This limit may be obtained using the + // [Capabilities][build.bazel.remote.execution.v2.Capabilities] API. + // Requests exceeding the limit should either be split into smaller + // chunks or uploaded using the + // [ByteStream API][google.bytestream.ByteStream], as appropriate. + // + // This request is equivalent to calling a Bytestream `Write` request + // on each individual blob, in parallel. The requests may succeed or fail + // independently. + // + // Errors: + // + // * `INVALID_ARGUMENT`: The client attempted to upload more than the + // server supported limit. + // + // Individual requests may return the following errors, additionally: + // + // * `RESOURCE_EXHAUSTED`: There is insufficient disk quota to store the blob. + // * `INVALID_ARGUMENT`: The + // [Digest][build.bazel.remote.execution.v2.Digest] does not match the + // provided data. + rpc BatchUpdateBlobs(BatchUpdateBlobsRequest) returns (BatchUpdateBlobsResponse) { + option (google.api.http) = { post: "/v2/{instance_name=**}/blobs:batchUpdate" body: "*" }; + } + + // Download many blobs at once. + // + // The server may enforce a limit of the combined total size of blobs + // to be downloaded using this API. This limit may be obtained using the + // [Capabilities][build.bazel.remote.execution.v2.Capabilities] API. + // Requests exceeding the limit should either be split into smaller + // chunks or downloaded using the + // [ByteStream API][google.bytestream.ByteStream], as appropriate. + // + // This request is equivalent to calling a Bytestream `Read` request + // on each individual blob, in parallel. The requests may succeed or fail + // independently. + // + // Errors: + // + // * `INVALID_ARGUMENT`: The client attempted to read more than the + // server supported limit. + // + // Every error on individual read will be returned in the corresponding digest + // status. + rpc BatchReadBlobs(BatchReadBlobsRequest) returns (BatchReadBlobsResponse) { + option (google.api.http) = { post: "/v2/{instance_name=**}/blobs:batchRead" body: "*" }; + } + + // Fetch the entire directory tree rooted at a node. + // + // This request must be targeted at a + // [Directory][build.bazel.remote.execution.v2.Directory] stored in the + // [ContentAddressableStorage][build.bazel.remote.execution.v2.ContentAddressableStorage] + // (CAS). The server will enumerate the `Directory` tree recursively and + // return every node descended from the root. + // + // The GetTreeRequest.page_token parameter can be used to skip ahead in + // the stream (e.g. when retrying a partially completed and aborted request), + // by setting it to a value taken from GetTreeResponse.next_page_token of the + // last successfully processed GetTreeResponse). + // + // The exact traversal order is unspecified and, unless retrieving subsequent + // pages from an earlier request, is not guaranteed to be stable across + // multiple invocations of `GetTree`. + // + // If part of the tree is missing from the CAS, the server will return the + // portion present and omit the rest. + // + // Errors: + // + // * `NOT_FOUND`: The requested tree root is not present in the CAS. + rpc GetTree(GetTreeRequest) returns (stream GetTreeResponse) { + option (google.api.http) = { get: "/v2/{instance_name=**}/blobs/{root_digest.hash}/{root_digest.size_bytes}:getTree" }; + } +} + +// The Capabilities service may be used by remote execution clients to query +// various server properties, in order to self-configure or return meaningful +// error messages. +// +// The query may include a particular `instance_name`, in which case the values +// returned will pertain to that instance. +service Capabilities { + // GetCapabilities returns the server capabilities configuration of the + // remote endpoint. + // Only the capabilities of the services supported by the endpoint will + // be returned: + // * Execution + CAS + Action Cache endpoints should return both + // CacheCapabilities and ExecutionCapabilities. + // * Execution only endpoints should return ExecutionCapabilities. + // * CAS + Action Cache only endpoints should return CacheCapabilities. + rpc GetCapabilities(GetCapabilitiesRequest) returns (ServerCapabilities) { + option (google.api.http) = { + get: "/v2/{instance_name=**}/capabilities" + }; + } +} + +// An `Action` captures all the information about an execution which is required +// to reproduce it. +// +// `Action`s are the core component of the [Execution] service. A single +// `Action` represents a repeatable action that can be performed by the +// execution service. `Action`s can be succinctly identified by the digest of +// their wire format encoding and, once an `Action` has been executed, will be +// cached in the action cache. Future requests can then use the cached result +// rather than needing to run afresh. +// +// When a server completes execution of an +// [Action][build.bazel.remote.execution.v2.Action], it MAY choose to +// cache the [result][build.bazel.remote.execution.v2.ActionResult] in +// the [ActionCache][build.bazel.remote.execution.v2.ActionCache] unless +// `do_not_cache` is `true`. Clients SHOULD expect the server to do so. By +// default, future calls to +// [Execute][build.bazel.remote.execution.v2.Execution.Execute] the same +// `Action` will also serve their results from the cache. Clients must take care +// to understand the caching behaviour. Ideally, all `Action`s will be +// reproducible so that serving a result from cache is always desirable and +// correct. +message Action { + // The digest of the [Command][build.bazel.remote.execution.v2.Command] + // to run, which MUST be present in the + // [ContentAddressableStorage][build.bazel.remote.execution.v2.ContentAddressableStorage]. + Digest command_digest = 1; + + // The digest of the root + // [Directory][build.bazel.remote.execution.v2.Directory] for the input + // files. The files in the directory tree are available in the correct + // location on the build machine before the command is executed. The root + // directory, as well as every subdirectory and content blob referred to, MUST + // be in the + // [ContentAddressableStorage][build.bazel.remote.execution.v2.ContentAddressableStorage]. + Digest input_root_digest = 2; + + reserved 3 to 5; // Used for fields moved to [Command][build.bazel.remote.execution.v2.Command]. + + // A timeout after which the execution should be killed. If the timeout is + // absent, then the client is specifying that the execution should continue + // as long as the server will let it. The server SHOULD impose a timeout if + // the client does not specify one, however, if the client does specify a + // timeout that is longer than the server's maximum timeout, the server MUST + // reject the request. + // + // The timeout is a part of the + // [Action][build.bazel.remote.execution.v2.Action] message, and + // therefore two `Actions` with different timeouts are different, even if they + // are otherwise identical. This is because, if they were not, running an + // `Action` with a lower timeout than is required might result in a cache hit + // from an execution run with a longer timeout, hiding the fact that the + // timeout is too short. By encoding it directly in the `Action`, a lower + // timeout will result in a cache miss and the execution timeout will fail + // immediately, rather than whenever the cache entry gets evicted. + google.protobuf.Duration timeout = 6; + + // If true, then the `Action`'s result cannot be cached, and in-flight + // requests for the same `Action` may not be merged. + bool do_not_cache = 7; + + reserved 8; // Used for field moved to [Command][build.bazel.remote.execution.v2.Command]. + + // An optional additional salt value used to place this `Action` into a + // separate cache namespace from other instances having the same field + // contents. This salt typically comes from operational configuration + // specific to sources such as repo and service configuration, + // and allows disowning an entire set of ActionResults that might have been + // poisoned by buggy software or tool failures. + bytes salt = 9; + + // The optional platform requirements for the execution environment. The + // server MAY choose to execute the action on any worker satisfying the + // requirements, so the client SHOULD ensure that running the action on any + // such worker will have the same result. A detailed lexicon for this can be + // found in the accompanying platform.md. + // New in version 2.2: clients SHOULD set these platform properties as well + // as those in the [Command][build.bazel.remote.execution.v2.Command]. Servers + // SHOULD prefer those set here. + Platform platform = 10; +} + +// A `Command` is the actual command executed by a worker running an +// [Action][build.bazel.remote.execution.v2.Action] and specifications of its +// environment. +// +// Except as otherwise required, the environment (such as which system +// libraries or binaries are available, and what filesystems are mounted where) +// is defined by and specific to the implementation of the remote execution API. +message Command { + // An `EnvironmentVariable` is one variable to set in the running program's + // environment. + message EnvironmentVariable { + // The variable name. + string name = 1; + + // The variable value. + string value = 2; + } + + // The arguments to the command. The first argument must be the path to the + // executable, which must be either a relative path, in which case it is + // evaluated with respect to the input root, or an absolute path. + repeated string arguments = 1; + + // The environment variables to set when running the program. The worker may + // provide its own default environment variables; these defaults can be + // overridden using this field. Additional variables can also be specified. + // + // In order to ensure that equivalent + // [Command][build.bazel.remote.execution.v2.Command]s always hash to the same + // value, the environment variables MUST be lexicographically sorted by name. + // Sorting of strings is done by code point, equivalently, by the UTF-8 bytes. + repeated EnvironmentVariable environment_variables = 2; + + // A list of the output files that the client expects to retrieve from the + // action. Only the listed files, as well as directories listed in + // `output_directories`, will be returned to the client as output. + // Other files or directories that may be created during command execution + // are discarded. + // + // The paths are relative to the working directory of the action execution. + // The paths are specified using a single forward slash (`/`) as a path + // separator, even if the execution platform natively uses a different + // separator. The path MUST NOT include a trailing slash, nor a leading slash, + // being a relative path. + // + // In order to ensure consistent hashing of the same Action, the output paths + // MUST be sorted lexicographically by code point (or, equivalently, by UTF-8 + // bytes). + // + // An output file cannot be duplicated, be a parent of another output file, or + // have the same path as any of the listed output directories. + // + // Directories leading up to the output files are created by the worker prior + // to execution, even if they are not explicitly part of the input root. + // + // DEPRECATED since v2.1: Use `output_paths` instead. + repeated string output_files = 3; + + // A list of the output directories that the client expects to retrieve from + // the action. Only the listed directories will be returned (an entire + // directory structure will be returned as a + // [Tree][build.bazel.remote.execution.v2.Tree] message digest, see + // [OutputDirectory][build.bazel.remote.execution.v2.OutputDirectory]), as + // well as files listed in `output_files`. Other files or directories that + // may be created during command execution are discarded. + // + // The paths are relative to the working directory of the action execution. + // The paths are specified using a single forward slash (`/`) as a path + // separator, even if the execution platform natively uses a different + // separator. The path MUST NOT include a trailing slash, nor a leading slash, + // being a relative path. The special value of empty string is allowed, + // although not recommended, and can be used to capture the entire working + // directory tree, including inputs. + // + // In order to ensure consistent hashing of the same Action, the output paths + // MUST be sorted lexicographically by code point (or, equivalently, by UTF-8 + // bytes). + // + // An output directory cannot be duplicated or have the same path as any of + // the listed output files. An output directory is allowed to be a parent of + // another output directory. + // + // Directories leading up to the output directories (but not the output + // directories themselves) are created by the worker prior to execution, even + // if they are not explicitly part of the input root. + // + // DEPRECATED since 2.1: Use `output_paths` instead. + repeated string output_directories = 4; + + // A list of the output paths that the client expects to retrieve from the + // action. Only the listed paths will be returned to the client as output. + // The type of the output (file or directory) is not specified, and will be + // determined by the server after action execution. If the resulting path is + // a file, it will be returned in an + // [OutputFile][build.bazel.remote.execution.v2.OutputFile]) typed field. + // If the path is a directory, the entire directory structure will be returned + // as a [Tree][build.bazel.remote.execution.v2.Tree] message digest, see + // [OutputDirectory][build.bazel.remote.execution.v2.OutputDirectory]) + // Other files or directories that may be created during command execution + // are discarded. + // + // The paths are relative to the working directory of the action execution. + // The paths are specified using a single forward slash (`/`) as a path + // separator, even if the execution platform natively uses a different + // separator. The path MUST NOT include a trailing slash, nor a leading slash, + // being a relative path. + // + // In order to ensure consistent hashing of the same Action, the output paths + // MUST be deduplicated and sorted lexicographically by code point (or, + // equivalently, by UTF-8 bytes). + // + // Directories leading up to the output paths are created by the worker prior + // to execution, even if they are not explicitly part of the input root. + // + // New in v2.1: this field supersedes the DEPRECATED `output_files` and + // `output_directories` fields. If `output_paths` is used, `output_files` and + // `output_directories` will be ignored! + repeated string output_paths = 7; + + // The platform requirements for the execution environment. The server MAY + // choose to execute the action on any worker satisfying the requirements, so + // the client SHOULD ensure that running the action on any such worker will + // have the same result. A detailed lexicon for this can be found in the + // accompanying platform.md. + // DEPRECATED as of v2.2: platform properties are now specified directly in + // the action. See documentation note in the + // [Action][build.bazel.remote.execution.v2.Action] for migration. + Platform platform = 5; + + // The working directory, relative to the input root, for the command to run + // in. It must be a directory which exists in the input tree. If it is left + // empty, then the action is run in the input root. + string working_directory = 6; + + // A list of keys for node properties the client expects to retrieve for + // output files and directories. Keys are either names of string-based + // [NodeProperty][build.bazel.remote.execution.v2.NodeProperty] or + // names of fields in [NodeProperties][build.bazel.remote.execution.v2.NodeProperties]. + // In order to ensure that equivalent `Action`s always hash to the same + // value, the node properties MUST be lexicographically sorted by name. + // Sorting of strings is done by code point, equivalently, by the UTF-8 bytes. + // + // The interpretation of string-based properties is server-dependent. If a + // property is not recognized by the server, the server will return an + // `INVALID_ARGUMENT`. + repeated string output_node_properties = 8; +} + +// A `Platform` is a set of requirements, such as hardware, operating system, or +// compiler toolchain, for an +// [Action][build.bazel.remote.execution.v2.Action]'s execution +// environment. A `Platform` is represented as a series of key-value pairs +// representing the properties that are required of the platform. +message Platform { + // A single property for the environment. The server is responsible for + // specifying the property `name`s that it accepts. If an unknown `name` is + // provided in the requirements for an + // [Action][build.bazel.remote.execution.v2.Action], the server SHOULD + // reject the execution request. If permitted by the server, the same `name` + // may occur multiple times. + // + // The server is also responsible for specifying the interpretation of + // property `value`s. For instance, a property describing how much RAM must be + // available may be interpreted as allowing a worker with 16GB to fulfill a + // request for 8GB, while a property describing the OS environment on which + // the action must be performed may require an exact match with the worker's + // OS. + // + // The server MAY use the `value` of one or more properties to determine how + // it sets up the execution environment, such as by making specific system + // files available to the worker. + // + // Both names and values are typically case-sensitive. Note that the platform + // is implicitly part of the action digest, so even tiny changes in the names + // or values (like changing case) may result in different action cache + // entries. + message Property { + // The property name. + string name = 1; + + // The property value. + string value = 2; + } + + // The properties that make up this platform. In order to ensure that + // equivalent `Platform`s always hash to the same value, the properties MUST + // be lexicographically sorted by name, and then by value. Sorting of strings + // is done by code point, equivalently, by the UTF-8 bytes. + repeated Property properties = 1; +} + +// A `Directory` represents a directory node in a file tree, containing zero or +// more children [FileNodes][build.bazel.remote.execution.v2.FileNode], +// [DirectoryNodes][build.bazel.remote.execution.v2.DirectoryNode] and +// [SymlinkNodes][build.bazel.remote.execution.v2.SymlinkNode]. +// Each `Node` contains its name in the directory, either the digest of its +// content (either a file blob or a `Directory` proto) or a symlink target, as +// well as possibly some metadata about the file or directory. +// +// In order to ensure that two equivalent directory trees hash to the same +// value, the following restrictions MUST be obeyed when constructing a +// a `Directory`: +// +// * Every child in the directory must have a path of exactly one segment. +// Multiple levels of directory hierarchy may not be collapsed. +// * Each child in the directory must have a unique path segment (file name). +// Note that while the API itself is case-sensitive, the environment where +// the Action is executed may or may not be case-sensitive. That is, it is +// legal to call the API with a Directory that has both "Foo" and "foo" as +// children, but the Action may be rejected by the remote system upon +// execution. +// * The files, directories and symlinks in the directory must each be sorted +// in lexicographical order by path. The path strings must be sorted by code +// point, equivalently, by UTF-8 bytes. +// * The [NodeProperties][build.bazel.remote.execution.v2.NodeProperty] of files, +// directories, and symlinks must be sorted in lexicographical order by +// property name. +// +// A `Directory` that obeys the restrictions is said to be in canonical form. +// +// As an example, the following could be used for a file named `bar` and a +// directory named `foo` with an executable file named `baz` (hashes shortened +// for readability): +// +// ```json +// // (Directory proto) +// { +// files: [ +// { +// name: "bar", +// digest: { +// hash: "4a73bc9d03...", +// size: 65534 +// }, +// node_properties: [ +// { +// "name": "MTime", +// "value": "2017-01-15T01:30:15.01Z" +// } +// ] +// } +// ], +// directories: [ +// { +// name: "foo", +// digest: { +// hash: "4cf2eda940...", +// size: 43 +// } +// } +// ] +// } +// +// // (Directory proto with hash "4cf2eda940..." and size 43) +// { +// files: [ +// { +// name: "baz", +// digest: { +// hash: "b2c941073e...", +// size: 1294, +// }, +// is_executable: true +// } +// ] +// } +// ``` +message Directory { + // The files in the directory. + repeated FileNode files = 1; + + // The subdirectories in the directory. + repeated DirectoryNode directories = 2; + + // The symlinks in the directory. + repeated SymlinkNode symlinks = 3; + + // The node properties of the Directory. + reserved 4; + NodeProperties node_properties = 5; +} + +// A single property for [FileNodes][build.bazel.remote.execution.v2.FileNode], +// [DirectoryNodes][build.bazel.remote.execution.v2.DirectoryNode], and +// [SymlinkNodes][build.bazel.remote.execution.v2.SymlinkNode]. The server is +// responsible for specifying the property `name`s that it accepts. If +// permitted by the server, the same `name` may occur multiple times. +message NodeProperty { + // The property name. + string name = 1; + + // The property value. + string value = 2; +} + +// Node properties for [FileNodes][build.bazel.remote.execution.v2.FileNode], +// [DirectoryNodes][build.bazel.remote.execution.v2.DirectoryNode], and +// [SymlinkNodes][build.bazel.remote.execution.v2.SymlinkNode]. The server is +// responsible for specifying the properties that it accepts. +// +message NodeProperties { + // A list of string-based + // [NodeProperties][build.bazel.remote.execution.v2.NodeProperty]. + repeated NodeProperty properties = 1; + + // The file's last modification timestamp. + google.protobuf.Timestamp mtime = 2; + + // The UNIX file mode, e.g., 0755. + google.protobuf.UInt32Value unix_mode = 3; +} + +// A `FileNode` represents a single file and associated metadata. +message FileNode { + // The name of the file. + string name = 1; + + // The digest of the file's content. + Digest digest = 2; + + reserved 3; // Reserved to ensure wire-compatibility with `OutputFile`. + + // True if file is executable, false otherwise. + bool is_executable = 4; + + // The node properties of the FileNode. + reserved 5; + NodeProperties node_properties = 6; +} + +// A `DirectoryNode` represents a child of a +// [Directory][build.bazel.remote.execution.v2.Directory] which is itself +// a `Directory` and its associated metadata. +message DirectoryNode { + // The name of the directory. + string name = 1; + + // The digest of the + // [Directory][build.bazel.remote.execution.v2.Directory] object + // represented. See [Digest][build.bazel.remote.execution.v2.Digest] + // for information about how to take the digest of a proto message. + Digest digest = 2; +} + +// A `SymlinkNode` represents a symbolic link. +message SymlinkNode { + // The name of the symlink. + string name = 1; + + // The target path of the symlink. The path separator is a forward slash `/`. + // The target path can be relative to the parent directory of the symlink or + // it can be an absolute path starting with `/`. Support for absolute paths + // can be checked using the [Capabilities][build.bazel.remote.execution.v2.Capabilities] + // API. `..` components are allowed anywhere in the target path as logical + // canonicalization may lead to different behavior in the presence of + // directory symlinks (e.g. `foo/../bar` may not be the same as `bar`). + // To reduce potential cache misses, canonicalization is still recommended + // where this is possible without impacting correctness. + string target = 2; + + // The node properties of the SymlinkNode. + reserved 3; + NodeProperties node_properties = 4; +} + +// A content digest. A digest for a given blob consists of the size of the blob +// and its hash. The hash algorithm to use is defined by the server. +// +// The size is considered to be an integral part of the digest and cannot be +// separated. That is, even if the `hash` field is correctly specified but +// `size_bytes` is not, the server MUST reject the request. +// +// The reason for including the size in the digest is as follows: in a great +// many cases, the server needs to know the size of the blob it is about to work +// with prior to starting an operation with it, such as flattening Merkle tree +// structures or streaming it to a worker. Technically, the server could +// implement a separate metadata store, but this results in a significantly more +// complicated implementation as opposed to having the client specify the size +// up-front (or storing the size along with the digest in every message where +// digests are embedded). This does mean that the API leaks some implementation +// details of (what we consider to be) a reasonable server implementation, but +// we consider this to be a worthwhile tradeoff. +// +// When a `Digest` is used to refer to a proto message, it always refers to the +// message in binary encoded form. To ensure consistent hashing, clients and +// servers MUST ensure that they serialize messages according to the following +// rules, even if there are alternate valid encodings for the same message: +// +// * Fields are serialized in tag order. +// * There are no unknown fields. +// * There are no duplicate fields. +// * Fields are serialized according to the default semantics for their type. +// +// Most protocol buffer implementations will always follow these rules when +// serializing, but care should be taken to avoid shortcuts. For instance, +// concatenating two messages to merge them may produce duplicate fields. +message Digest { + // The hash. In the case of SHA-256, it will always be a lowercase hex string + // exactly 64 characters long. + string hash = 1; + + // The size of the blob, in bytes. + int64 size_bytes = 2; +} + +// ExecutedActionMetadata contains details about a completed execution. +message ExecutedActionMetadata { + // The name of the worker which ran the execution. + string worker = 1; + + // When was the action added to the queue. + google.protobuf.Timestamp queued_timestamp = 2; + + // When the worker received the action. + google.protobuf.Timestamp worker_start_timestamp = 3; + + // When the worker completed the action, including all stages. + google.protobuf.Timestamp worker_completed_timestamp = 4; + + // When the worker started fetching action inputs. + google.protobuf.Timestamp input_fetch_start_timestamp = 5; + + // When the worker finished fetching action inputs. + google.protobuf.Timestamp input_fetch_completed_timestamp = 6; + + // When the worker started executing the action command. + google.protobuf.Timestamp execution_start_timestamp = 7; + + // When the worker completed executing the action command. + google.protobuf.Timestamp execution_completed_timestamp = 8; + + // When the worker started uploading action outputs. + google.protobuf.Timestamp output_upload_start_timestamp = 9; + + // When the worker finished uploading action outputs. + google.protobuf.Timestamp output_upload_completed_timestamp = 10; + + // Details that are specific to the kind of worker used. For example, + // on POSIX-like systems this could contain a message with + // getrusage(2) statistics. + repeated google.protobuf.Any auxiliary_metadata = 11; +} + +// An ActionResult represents the result of an +// [Action][build.bazel.remote.execution.v2.Action] being run. +// +// It is advised that at least one field (for example +// `ActionResult.execution_metadata.Worker`) have a non-default value, to +// ensure that the serialized value is non-empty, which can then be used +// as a basic data sanity check. +message ActionResult { + reserved 1; // Reserved for use as the resource name. + + // The output files of the action. For each output file requested in the + // `output_files` or `output_paths` field of the Action, if the corresponding + // file existed after the action completed, a single entry will be present + // either in this field, or the `output_file_symlinks` field if the file was + // a symbolic link to another file (`output_symlinks` field after v2.1). + // + // If an output listed in `output_files` was found, but was a directory rather + // than a regular file, the server will return a FAILED_PRECONDITION. + // If the action does not produce the requested output, then that output + // will be omitted from the list. The server is free to arrange the output + // list as desired; clients MUST NOT assume that the output list is sorted. + repeated OutputFile output_files = 2; + + // The output files of the action that are symbolic links to other files. Those + // may be links to other output files, or input files, or even absolute paths + // outside of the working directory, if the server supports + // [SymlinkAbsolutePathStrategy.ALLOWED][build.bazel.remote.execution.v2.CacheCapabilities.SymlinkAbsolutePathStrategy]. + // For each output file requested in the `output_files` or `output_paths` + // field of the Action, if the corresponding file existed after + // the action completed, a single entry will be present either in this field, + // or in the `output_files` field, if the file was not a symbolic link. + // + // If an output symbolic link of the same name as listed in `output_files` of + // the Command was found, but its target type was not a regular file, the + // server will return a FAILED_PRECONDITION. + // If the action does not produce the requested output, then that output + // will be omitted from the list. The server is free to arrange the output + // list as desired; clients MUST NOT assume that the output list is sorted. + // + // DEPRECATED as of v2.1. Servers that wish to be compatible with v2.0 API + // should still populate this field in addition to `output_symlinks`. + repeated OutputSymlink output_file_symlinks = 10; + + // New in v2.1: this field will only be populated if the command + // `output_paths` field was used, and not the pre v2.1 `output_files` or + // `output_directories` fields. + // The output paths of the action that are symbolic links to other paths. Those + // may be links to other outputs, or inputs, or even absolute paths + // outside of the working directory, if the server supports + // [SymlinkAbsolutePathStrategy.ALLOWED][build.bazel.remote.execution.v2.CacheCapabilities.SymlinkAbsolutePathStrategy]. + // A single entry for each output requested in `output_paths` + // field of the Action, if the corresponding path existed after + // the action completed and was a symbolic link. + // + // If the action does not produce a requested output, then that output + // will be omitted from the list. The server is free to arrange the output + // list as desired; clients MUST NOT assume that the output list is sorted. + repeated OutputSymlink output_symlinks = 12; + + // The output directories of the action. For each output directory requested + // in the `output_directories` or `output_paths` field of the Action, if the + // corresponding directory existed after the action completed, a single entry + // will be present in the output list, which will contain the digest of a + // [Tree][build.bazel.remote.execution.v2.Tree] message containing the + // directory tree, and the path equal exactly to the corresponding Action + // output_directories member. + // + // As an example, suppose the Action had an output directory `a/b/dir` and the + // execution produced the following contents in `a/b/dir`: a file named `bar` + // and a directory named `foo` with an executable file named `baz`. Then, + // output_directory will contain (hashes shortened for readability): + // + // ```json + // // OutputDirectory proto: + // { + // path: "a/b/dir" + // tree_digest: { + // hash: "4a73bc9d03...", + // size: 55 + // } + // } + // // Tree proto with hash "4a73bc9d03..." and size 55: + // { + // root: { + // files: [ + // { + // name: "bar", + // digest: { + // hash: "4a73bc9d03...", + // size: 65534 + // } + // } + // ], + // directories: [ + // { + // name: "foo", + // digest: { + // hash: "4cf2eda940...", + // size: 43 + // } + // } + // ] + // } + // children : { + // // (Directory proto with hash "4cf2eda940..." and size 43) + // files: [ + // { + // name: "baz", + // digest: { + // hash: "b2c941073e...", + // size: 1294, + // }, + // is_executable: true + // } + // ] + // } + // } + // ``` + // If an output of the same name as listed in `output_files` of + // the Command was found in `output_directories`, but was not a directory, the + // server will return a FAILED_PRECONDITION. + repeated OutputDirectory output_directories = 3; + + // The output directories of the action that are symbolic links to other + // directories. Those may be links to other output directories, or input + // directories, or even absolute paths outside of the working directory, + // if the server supports + // [SymlinkAbsolutePathStrategy.ALLOWED][build.bazel.remote.execution.v2.CacheCapabilities.SymlinkAbsolutePathStrategy]. + // For each output directory requested in the `output_directories` field of + // the Action, if the directory existed after the action completed, a + // single entry will be present either in this field, or in the + // `output_directories` field, if the directory was not a symbolic link. + // + // If an output of the same name was found, but was a symbolic link to a file + // instead of a directory, the server will return a FAILED_PRECONDITION. + // If the action does not produce the requested output, then that output + // will be omitted from the list. The server is free to arrange the output + // list as desired; clients MUST NOT assume that the output list is sorted. + // + // DEPRECATED as of v2.1. Servers that wish to be compatible with v2.0 API + // should still populate this field in addition to `output_symlinks`. + repeated OutputSymlink output_directory_symlinks = 11; + + // The exit code of the command. + int32 exit_code = 4; + + // The standard output buffer of the action. The server SHOULD NOT inline + // stdout unless requested by the client in the + // [GetActionResultRequest][build.bazel.remote.execution.v2.GetActionResultRequest] + // message. The server MAY omit inlining, even if requested, and MUST do so if inlining + // would cause the response to exceed message size limits. + bytes stdout_raw = 5; + + // The digest for a blob containing the standard output of the action, which + // can be retrieved from the + // [ContentAddressableStorage][build.bazel.remote.execution.v2.ContentAddressableStorage]. + Digest stdout_digest = 6; + + // The standard error buffer of the action. The server SHOULD NOT inline + // stderr unless requested by the client in the + // [GetActionResultRequest][build.bazel.remote.execution.v2.GetActionResultRequest] + // message. The server MAY omit inlining, even if requested, and MUST do so if inlining + // would cause the response to exceed message size limits. + bytes stderr_raw = 7; + + // The digest for a blob containing the standard error of the action, which + // can be retrieved from the + // [ContentAddressableStorage][build.bazel.remote.execution.v2.ContentAddressableStorage]. + Digest stderr_digest = 8; + + // The details of the execution that originally produced this result. + ExecutedActionMetadata execution_metadata = 9; +} + +// An `OutputFile` is similar to a +// [FileNode][build.bazel.remote.execution.v2.FileNode], but it is used as an +// output in an `ActionResult`. It allows a full file path rather than +// only a name. +message OutputFile { + // The full path of the file relative to the working directory, including the + // filename. The path separator is a forward slash `/`. Since this is a + // relative path, it MUST NOT begin with a leading forward slash. + string path = 1; + + // The digest of the file's content. + Digest digest = 2; + + reserved 3; // Used for a removed field in an earlier version of the API. + + // True if file is executable, false otherwise. + bool is_executable = 4; + + // The contents of the file if inlining was requested. The server SHOULD NOT inline + // file contents unless requested by the client in the + // [GetActionResultRequest][build.bazel.remote.execution.v2.GetActionResultRequest] + // message. The server MAY omit inlining, even if requested, and MUST do so if inlining + // would cause the response to exceed message size limits. + bytes contents = 5; + + // The supported node properties of the OutputFile, if requested by the Action. + reserved 6; + NodeProperties node_properties = 7; +} + +// A `Tree` contains all the +// [Directory][build.bazel.remote.execution.v2.Directory] protos in a +// single directory Merkle tree, compressed into one message. +message Tree { + // The root directory in the tree. + Directory root = 1; + + // All the child directories: the directories referred to by the root and, + // recursively, all its children. In order to reconstruct the directory tree, + // the client must take the digests of each of the child directories and then + // build up a tree starting from the `root`. + repeated Directory children = 2; +} + +// An `OutputDirectory` is the output in an `ActionResult` corresponding to a +// directory's full contents rather than a single file. +message OutputDirectory { + // The full path of the directory relative to the working directory. The path + // separator is a forward slash `/`. Since this is a relative path, it MUST + // NOT begin with a leading forward slash. The empty string value is allowed, + // and it denotes the entire working directory. + string path = 1; + + reserved 2; // Used for a removed field in an earlier version of the API. + + // The digest of the encoded + // [Tree][build.bazel.remote.execution.v2.Tree] proto containing the + // directory's contents. + Digest tree_digest = 3; +} + +// An `OutputSymlink` is similar to a +// [Symlink][build.bazel.remote.execution.v2.SymlinkNode], but it is used as an +// output in an `ActionResult`. +// +// `OutputSymlink` is binary-compatible with `SymlinkNode`. +message OutputSymlink { + // The full path of the symlink relative to the working directory, including the + // filename. The path separator is a forward slash `/`. Since this is a + // relative path, it MUST NOT begin with a leading forward slash. + string path = 1; + + // The target path of the symlink. The path separator is a forward slash `/`. + // The target path can be relative to the parent directory of the symlink or + // it can be an absolute path starting with `/`. Support for absolute paths + // can be checked using the [Capabilities][build.bazel.remote.execution.v2.Capabilities] + // API. `..` components are allowed anywhere in the target path. + string target = 2; + + // The supported node properties of the OutputSymlink, if requested by the + // Action. + reserved 3; + NodeProperties node_properties = 4; +} + +// An `ExecutionPolicy` can be used to control the scheduling of the action. +message ExecutionPolicy { + // The priority (relative importance) of this action. Generally, a lower value + // means that the action should be run sooner than actions having a greater + // priority value, but the interpretation of a given value is server- + // dependent. A priority of 0 means the *default* priority. Priorities may be + // positive or negative, and such actions should run later or sooner than + // actions having the default priority, respectively. The particular semantics + // of this field is up to the server. In particular, every server will have + // their own supported range of priorities, and will decide how these map into + // scheduling policy. + int32 priority = 1; +} + +// A `ResultsCachePolicy` is used for fine-grained control over how action +// outputs are stored in the CAS and Action Cache. +message ResultsCachePolicy { + // The priority (relative importance) of this content in the overall cache. + // Generally, a lower value means a longer retention time or other advantage, + // but the interpretation of a given value is server-dependent. A priority of + // 0 means a *default* value, decided by the server. + // + // The particular semantics of this field is up to the server. In particular, + // every server will have their own supported range of priorities, and will + // decide how these map into retention/eviction policy. + int32 priority = 1; +} + +// A request message for +// [Execution.Execute][build.bazel.remote.execution.v2.Execution.Execute]. +message ExecuteRequest { + // The instance of the execution system to operate against. A server may + // support multiple instances of the execution system (with their own workers, + // storage, caches, etc.). The server MAY require use of this field to select + // between them in an implementation-defined fashion, otherwise it can be + // omitted. + string instance_name = 1; + + // If true, the action will be executed even if its result is already + // present in the [ActionCache][build.bazel.remote.execution.v2.ActionCache]. + // The execution is still allowed to be merged with other in-flight executions + // of the same action, however - semantically, the service MUST only guarantee + // that the results of an execution with this field set were not visible + // before the corresponding execution request was sent. + // Note that actions from execution requests setting this field set are still + // eligible to be entered into the action cache upon completion, and services + // SHOULD overwrite any existing entries that may exist. This allows + // skip_cache_lookup requests to be used as a mechanism for replacing action + // cache entries that reference outputs no longer available or that are + // poisoned in any way. + // If false, the result may be served from the action cache. + bool skip_cache_lookup = 3; + + reserved 2, 4, 5; // Used for removed fields in an earlier version of the API. + + // The digest of the [Action][build.bazel.remote.execution.v2.Action] to + // execute. + Digest action_digest = 6; + + // An optional policy for execution of the action. + // The server will have a default policy if this is not provided. + ExecutionPolicy execution_policy = 7; + + // An optional policy for the results of this execution in the remote cache. + // The server will have a default policy if this is not provided. + // This may be applied to both the ActionResult and the associated blobs. + ResultsCachePolicy results_cache_policy = 8; +} + +// A `LogFile` is a log stored in the CAS. +message LogFile { + // The digest of the log contents. + Digest digest = 1; + + // This is a hint as to the purpose of the log, and is set to true if the log + // is human-readable text that can be usefully displayed to a user, and false + // otherwise. For instance, if a command-line client wishes to print the + // server logs to the terminal for a failed action, this allows it to avoid + // displaying a binary file. + bool human_readable = 2; +} + +// The response message for +// [Execution.Execute][build.bazel.remote.execution.v2.Execution.Execute], +// which will be contained in the [response +// field][google.longrunning.Operation.response] of the +// [Operation][google.longrunning.Operation]. +message ExecuteResponse { + // The result of the action. + ActionResult result = 1; + + // True if the result was served from cache, false if it was executed. + bool cached_result = 2; + + // If the status has a code other than `OK`, it indicates that the action did + // not finish execution. For example, if the operation times out during + // execution, the status will have a `DEADLINE_EXCEEDED` code. Servers MUST + // use this field for errors in execution, rather than the error field on the + // `Operation` object. + // + // If the status code is other than `OK`, then the result MUST NOT be cached. + // For an error status, the `result` field is optional; the server may + // populate the output-, stdout-, and stderr-related fields if it has any + // information available, such as the stdout and stderr of a timed-out action. + google.rpc.Status status = 3; + + // An optional list of additional log outputs the server wishes to provide. A + // server can use this to return execution-specific logs however it wishes. + // This is intended primarily to make it easier for users to debug issues that + // may be outside of the actual job execution, such as by identifying the + // worker executing the action or by providing logs from the worker's setup + // phase. The keys SHOULD be human readable so that a client can display them + // to a user. + map server_logs = 4; + + // Freeform informational message with details on the execution of the action + // that may be displayed to the user upon failure or when requested explicitly. + string message = 5; +} + +// The current stage of action execution. +message ExecutionStage { + enum Value { + // Invalid value. + UNKNOWN = 0; + + // Checking the result against the cache. + CACHE_CHECK = 1; + + // Currently idle, awaiting a free machine to execute. + QUEUED = 2; + + // Currently being executed by a worker. + EXECUTING = 3; + + // Finished execution. + COMPLETED = 4; + } +} + +// Metadata about an ongoing +// [execution][build.bazel.remote.execution.v2.Execution.Execute], which +// will be contained in the [metadata +// field][google.longrunning.Operation.response] of the +// [Operation][google.longrunning.Operation]. +message ExecuteOperationMetadata { + // The current stage of execution. + ExecutionStage.Value stage = 1; + + // The digest of the [Action][build.bazel.remote.execution.v2.Action] + // being executed. + Digest action_digest = 2; + + // If set, the client can use this resource name with + // [ByteStream.Read][google.bytestream.ByteStream.Read] to stream the + // standard output from the endpoint hosting streamed responses. + string stdout_stream_name = 3; + + // If set, the client can use this resource name with + // [ByteStream.Read][google.bytestream.ByteStream.Read] to stream the + // standard error from the endpoint hosting streamed responses. + string stderr_stream_name = 4; +} + +// A request message for +// [WaitExecution][build.bazel.remote.execution.v2.Execution.WaitExecution]. +message WaitExecutionRequest { + // The name of the [Operation][google.longrunning.Operation] + // returned by [Execute][build.bazel.remote.execution.v2.Execution.Execute]. + string name = 1; +} + +// A request message for +// [ActionCache.GetActionResult][build.bazel.remote.execution.v2.ActionCache.GetActionResult]. +message GetActionResultRequest { + // The instance of the execution system to operate against. A server may + // support multiple instances of the execution system (with their own workers, + // storage, caches, etc.). The server MAY require use of this field to select + // between them in an implementation-defined fashion, otherwise it can be + // omitted. + string instance_name = 1; + + // The digest of the [Action][build.bazel.remote.execution.v2.Action] + // whose result is requested. + Digest action_digest = 2; + + // A hint to the server to request inlining stdout in the + // [ActionResult][build.bazel.remote.execution.v2.ActionResult] message. + bool inline_stdout = 3; + + // A hint to the server to request inlining stderr in the + // [ActionResult][build.bazel.remote.execution.v2.ActionResult] message. + bool inline_stderr = 4; + + // A hint to the server to inline the contents of the listed output files. + // Each path needs to exactly match one file path in either `output_paths` or + // `output_files` (DEPRECATED since v2.1) in the + // [Command][build.bazel.remote.execution.v2.Command] message. + repeated string inline_output_files = 5; +} + +// A request message for +// [ActionCache.UpdateActionResult][build.bazel.remote.execution.v2.ActionCache.UpdateActionResult]. +message UpdateActionResultRequest { + // The instance of the execution system to operate against. A server may + // support multiple instances of the execution system (with their own workers, + // storage, caches, etc.). The server MAY require use of this field to select + // between them in an implementation-defined fashion, otherwise it can be + // omitted. + string instance_name = 1; + + // The digest of the [Action][build.bazel.remote.execution.v2.Action] + // whose result is being uploaded. + Digest action_digest = 2; + + // The [ActionResult][build.bazel.remote.execution.v2.ActionResult] + // to store in the cache. + ActionResult action_result = 3; + + // An optional policy for the results of this execution in the remote cache. + // The server will have a default policy if this is not provided. + // This may be applied to both the ActionResult and the associated blobs. + ResultsCachePolicy results_cache_policy = 4; +} + +// A request message for +// [ContentAddressableStorage.FindMissingBlobs][build.bazel.remote.execution.v2.ContentAddressableStorage.FindMissingBlobs]. +message FindMissingBlobsRequest { + // The instance of the execution system to operate against. A server may + // support multiple instances of the execution system (with their own workers, + // storage, caches, etc.). The server MAY require use of this field to select + // between them in an implementation-defined fashion, otherwise it can be + // omitted. + string instance_name = 1; + + // A list of the blobs to check. + repeated Digest blob_digests = 2; +} + +// A response message for +// [ContentAddressableStorage.FindMissingBlobs][build.bazel.remote.execution.v2.ContentAddressableStorage.FindMissingBlobs]. +message FindMissingBlobsResponse { + // A list of the blobs requested *not* present in the storage. + repeated Digest missing_blob_digests = 2; +} + +// A request message for +// [ContentAddressableStorage.BatchUpdateBlobs][build.bazel.remote.execution.v2.ContentAddressableStorage.BatchUpdateBlobs]. +message BatchUpdateBlobsRequest { + // A request corresponding to a single blob that the client wants to upload. + message Request { + // The digest of the blob. This MUST be the digest of `data`. + Digest digest = 1; + + // The raw binary data. + bytes data = 2; + } + + // The instance of the execution system to operate against. A server may + // support multiple instances of the execution system (with their own workers, + // storage, caches, etc.). The server MAY require use of this field to select + // between them in an implementation-defined fashion, otherwise it can be + // omitted. + string instance_name = 1; + + // The individual upload requests. + repeated Request requests = 2; +} + +// A response message for +// [ContentAddressableStorage.BatchUpdateBlobs][build.bazel.remote.execution.v2.ContentAddressableStorage.BatchUpdateBlobs]. +message BatchUpdateBlobsResponse { + // A response corresponding to a single blob that the client tried to upload. + message Response { + // The blob digest to which this response corresponds. + Digest digest = 1; + + // The result of attempting to upload that blob. + google.rpc.Status status = 2; + } + + // The responses to the requests. + repeated Response responses = 1; +} + +// A request message for +// [ContentAddressableStorage.BatchReadBlobs][build.bazel.remote.execution.v2.ContentAddressableStorage.BatchReadBlobs]. +message BatchReadBlobsRequest { + // The instance of the execution system to operate against. A server may + // support multiple instances of the execution system (with their own workers, + // storage, caches, etc.). The server MAY require use of this field to select + // between them in an implementation-defined fashion, otherwise it can be + // omitted. + string instance_name = 1; + + // The individual blob digests. + repeated Digest digests = 2; +} + +// A response message for +// [ContentAddressableStorage.BatchReadBlobs][build.bazel.remote.execution.v2.ContentAddressableStorage.BatchReadBlobs]. +message BatchReadBlobsResponse { + // A response corresponding to a single blob that the client tried to download. + message Response { + // The digest to which this response corresponds. + Digest digest = 1; + + // The raw binary data. + bytes data = 2; + + // The result of attempting to download that blob. + google.rpc.Status status = 3; + } + + // The responses to the requests. + repeated Response responses = 1; +} + +// A request message for +// [ContentAddressableStorage.GetTree][build.bazel.remote.execution.v2.ContentAddressableStorage.GetTree]. +message GetTreeRequest { + // The instance of the execution system to operate against. A server may + // support multiple instances of the execution system (with their own workers, + // storage, caches, etc.). The server MAY require use of this field to select + // between them in an implementation-defined fashion, otherwise it can be + // omitted. + string instance_name = 1; + + // The digest of the root, which must be an encoded + // [Directory][build.bazel.remote.execution.v2.Directory] message + // stored in the + // [ContentAddressableStorage][build.bazel.remote.execution.v2.ContentAddressableStorage]. + Digest root_digest = 2; + + // A maximum page size to request. If present, the server will request no more + // than this many items. Regardless of whether a page size is specified, the + // server may place its own limit on the number of items to be returned and + // require the client to retrieve more items using a subsequent request. + int32 page_size = 3; + + // A page token, which must be a value received in a previous + // [GetTreeResponse][build.bazel.remote.execution.v2.GetTreeResponse]. + // If present, the server will use that token as an offset, returning only + // that page and the ones that succeed it. + string page_token = 4; +} + +// A response message for +// [ContentAddressableStorage.GetTree][build.bazel.remote.execution.v2.ContentAddressableStorage.GetTree]. +message GetTreeResponse { + // The directories descended from the requested root. + repeated Directory directories = 1; + + // If present, signifies that there are more results which the client can + // retrieve by passing this as the page_token in a subsequent + // [request][build.bazel.remote.execution.v2.GetTreeRequest]. + // If empty, signifies that this is the last page of results. + string next_page_token = 2; +} + +// A request message for +// [Capabilities.GetCapabilities][build.bazel.remote.execution.v2.Capabilities.GetCapabilities]. +message GetCapabilitiesRequest { + // The instance of the execution system to operate against. A server may + // support multiple instances of the execution system (with their own workers, + // storage, caches, etc.). The server MAY require use of this field to select + // between them in an implementation-defined fashion, otherwise it can be + // omitted. + string instance_name = 1; +} + +// A response message for +// [Capabilities.GetCapabilities][build.bazel.remote.execution.v2.Capabilities.GetCapabilities]. +message ServerCapabilities { + // Capabilities of the remote cache system. + CacheCapabilities cache_capabilities = 1; + + // Capabilities of the remote execution system. + ExecutionCapabilities execution_capabilities = 2; + + // Earliest RE API version supported, including deprecated versions. + build.bazel.semver.SemVer deprecated_api_version = 3; + + // Earliest non-deprecated RE API version supported. + build.bazel.semver.SemVer low_api_version = 4; + + // Latest RE API version supported. + build.bazel.semver.SemVer high_api_version = 5; +} + +// The digest function used for converting values into keys for CAS and Action +// Cache. +message DigestFunction { + enum Value { + // It is an error for the server to return this value. + UNKNOWN = 0; + + // The SHA-256 digest function. + SHA256 = 1; + + // The SHA-1 digest function. + SHA1 = 2; + + // The MD5 digest function. + MD5 = 3; + + // The Microsoft "VSO-Hash" paged SHA256 digest function. + // See https://github.com/microsoft/BuildXL/blob/master/Documentation/Specs/PagedHash.md . + VSO = 4; + + // The SHA-384 digest function. + SHA384 = 5; + + // The SHA-512 digest function. + SHA512 = 6; + + // Murmur3 128-bit digest function, x64 variant. Note that this is not a + // cryptographic hash function and its collision properties are not strongly guaranteed. + // See https://github.com/aappleby/smhasher/wiki/MurmurHash3 . + MURMUR3 = 7; + } +} + +// Describes the server/instance capabilities for updating the action cache. +message ActionCacheUpdateCapabilities { + bool update_enabled = 1; +} + +// Allowed values for priority in +// [ResultsCachePolicy][build.bazel.remoteexecution.v2.ResultsCachePolicy] and +// [ExecutionPolicy][build.bazel.remoteexecution.v2.ResultsCachePolicy] +// Used for querying both cache and execution valid priority ranges. +message PriorityCapabilities { + // Supported range of priorities, including boundaries. + message PriorityRange { + // The minimum numeric value for this priority range, which represents the + // most urgent task or longest retained item. + int32 min_priority = 1; + // The maximum numeric value for this priority range, which represents the + // least urgent task or shortest retained item. + int32 max_priority = 2; + } + repeated PriorityRange priorities = 1; +} + +// Describes how the server treats absolute symlink targets. +message SymlinkAbsolutePathStrategy { + enum Value { + // Invalid value. + UNKNOWN = 0; + + // Server will return an `INVALID_ARGUMENT` on input symlinks with absolute + // targets. + // If an action tries to create an output symlink with an absolute target, a + // `FAILED_PRECONDITION` will be returned. + DISALLOWED = 1; + + // Server will allow symlink targets to escape the input root tree, possibly + // resulting in non-hermetic builds. + ALLOWED = 2; + } +} + +// Compression formats which may be supported. +message Compressor { + enum Value { + // No compression. Servers and clients MUST always support this, and do + // not need to advertise it. + IDENTITY = 0; + + // Zstandard compression. + ZSTD = 1; + + // RFC 1951 Deflate. This format is identical to what is used by ZIP + // files. Headers such as the one generated by gzip are not + // included. + // + // It is advised to use algorithms such as Zstandard instead, as + // those are faster and/or provide a better compression ratio. + DEFLATE = 2; + } +} + +// Capabilities of the remote cache system. +message CacheCapabilities { + // All the digest functions supported by the remote cache. + // Remote cache may support multiple digest functions simultaneously. + repeated DigestFunction.Value digest_function = 1; + + // Capabilities for updating the action cache. + ActionCacheUpdateCapabilities action_cache_update_capabilities = 2; + + // Supported cache priority range for both CAS and ActionCache. + PriorityCapabilities cache_priority_capabilities = 3; + + // Maximum total size of blobs to be uploaded/downloaded using + // batch methods. A value of 0 means no limit is set, although + // in practice there will always be a message size limitation + // of the protocol in use, e.g. GRPC. + int64 max_batch_total_size_bytes = 4; + + // Whether absolute symlink targets are supported. + SymlinkAbsolutePathStrategy.Value symlink_absolute_path_strategy = 5; + + // Compressors supported by the "compressed-blobs" bytestream resources. + // Servers MUST support identity/no-compression, even if it is not listed + // here. + // + // Note that this does not imply which if any compressors are supported by + // the server at the gRPC level. + repeated Compressor.Value supported_compressor = 6; +} + +// Capabilities of the remote execution system. +message ExecutionCapabilities { + // Remote execution may only support a single digest function. + DigestFunction.Value digest_function = 1; + + // Whether remote execution is enabled for the particular server/instance. + bool exec_enabled = 2; + + // Supported execution priority range. + PriorityCapabilities execution_priority_capabilities = 3; + + // Supported node properties. + repeated string supported_node_properties = 4; +} + +// Details for the tool used to call the API. +message ToolDetails { + // Name of the tool, e.g. bazel. + string tool_name = 1; + + // Version of the tool used for the request, e.g. 5.0.3. + string tool_version = 2; +} + +// An optional Metadata to attach to any RPC request to tell the server about an +// external context of the request. The server may use this for logging or other +// purposes. To use it, the client attaches the header to the call using the +// canonical proto serialization: +// +// * name: `build.bazel.remote.execution.v2.requestmetadata-bin` +// * contents: the base64 encoded binary `RequestMetadata` message. +// Note: the gRPC library serializes binary headers encoded in base 64 by +// default (https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#requests). +// Therefore, if the gRPC library is used to pass/retrieve this +// metadata, the user may ignore the base64 encoding and assume it is simply +// serialized as a binary message. +message RequestMetadata { + // The details for the tool invoking the requests. + ToolDetails tool_details = 1; + + // An identifier that ties multiple requests to the same action. + // For example, multiple requests to the CAS, Action Cache, and Execution + // API are used in order to compile foo.cc. + string action_id = 2; + + // An identifier that ties multiple actions together to a final result. + // For example, multiple actions are required to build and run foo_test. + string tool_invocation_id = 3; + + // An identifier to tie multiple tool invocations together. For example, + // runs of foo_test, bar_test and baz_test on a post-submit of a given patch. + string correlated_invocations_id = 4; + + // A brief description of the kind of action, for example, CppCompile or GoLink. + // There is no standard agreed set of values for this, and they are expected to vary between different client tools. + string action_mnemonic = 5; + + // An identifier for the target which produced this action. + // No guarantees are made around how many actions may relate to a single target. + string target_id = 6; + + // An identifier for the configuration in which the target was built, + // e.g. for differentiating building host tools or different target platforms. + // There is no expectation that this value will have any particular structure, + // or equality across invocations, though some client tools may offer these guarantees. + string configuration_id = 7; +} diff --git a/proto/prost/private/tests/complex_imports/remote-apis/build/bazel/semver/BUILD.bazel b/proto/prost/private/tests/complex_imports/remote-apis/build/bazel/semver/BUILD.bazel new file mode 100644 index 0000000000..e8b2bf8a63 --- /dev/null +++ b/proto/prost/private/tests/complex_imports/remote-apis/build/bazel/semver/BUILD.bazel @@ -0,0 +1,15 @@ +load("@rules_rust//proto/prost:defs.bzl", "rust_prost_library") +load("@rules_proto//proto:defs.bzl", "proto_library") + +proto_library( + name = "semver_proto", + srcs = ["semver.proto"], + strip_import_prefix = "/proto/prost/private/tests/complex_imports/remote-apis", + visibility = ["//visibility:public"], +) + +rust_prost_library( + name = "semver_prost_proto", + proto = ":semver_proto", + visibility = ["//visibility:public"], +) diff --git a/proto/prost/private/tests/complex_imports/remote-apis/build/bazel/semver/semver.proto b/proto/prost/private/tests/complex_imports/remote-apis/build/bazel/semver/semver.proto new file mode 100644 index 0000000000..3b626b7e47 --- /dev/null +++ b/proto/prost/private/tests/complex_imports/remote-apis/build/bazel/semver/semver.proto @@ -0,0 +1,41 @@ +// Copyright 2018 The Bazel Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package build.bazel.semver; + +option csharp_namespace = "Build.Bazel.Semver"; +option go_package = "semver"; +option java_multiple_files = true; +option java_outer_classname = "SemverProto"; +option java_package = "build.bazel.semver"; +option objc_class_prefix = "SMV"; + +// The full version of a given tool. +message SemVer { + // The major version, e.g 10 for 10.2.3. + int32 major = 1; + + // The minor version, e.g. 2 for 10.2.3. + int32 minor = 2; + + // The patch version, e.g 3 for 10.2.3. + int32 patch = 3; + + // The pre-release version. Either this field or major/minor/patch fields + // must be filled. They are mutually exclusive. Pre-release versions are + // assumed to be earlier than any released versions. + string prerelease = 4; +} From 6ceafbbff55046015e3cd5bc0fbbc7b40b301bb2 Mon Sep 17 00:00:00 2001 From: Stu Schwartz Date: Wed, 28 Jun 2023 09:57:01 -0700 Subject: [PATCH 21/31] impl Display --- proto/prost/private/protoc_wrapper.rs | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/proto/prost/private/protoc_wrapper.rs b/proto/prost/private/protoc_wrapper.rs index 33cfe7a75c..093c9bdbcf 100644 --- a/proto/prost/private/protoc_wrapper.rs +++ b/proto/prost/private/protoc_wrapper.rs @@ -2,12 +2,12 @@ use std::collections::BTreeMap; use std::collections::BTreeSet; -use std::env; -use std::fmt::Write; +use std::fmt::{Display, Formatter, Write}; use std::fs; use std::path::Path; use std::path::PathBuf; use std::process; +use std::{env, fmt}; use prost::Message; use prost_types::{ @@ -238,9 +238,9 @@ impl ProtoPath { } } -impl ToString for ProtoPath { - fn to_string(&self) -> String { - self.0.clone() +impl Display for ProtoPath { + fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { + write!(f, "{}", self.0) } } @@ -270,9 +270,9 @@ impl RustModulePath { } } -impl ToString for RustModulePath { - fn to_string(&self) -> String { - self.0.clone() +impl Display for RustModulePath { + fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { + write!(f, "{}", self.0) } } @@ -735,9 +735,7 @@ fn main() { package_info_file, extern_paths .into_iter() - .map(|(proto_path, rust_path)| { - format!(".{}={}", proto_path.to_string(), rust_path.to_string()) - }) + .map(|(proto_path, rust_path)| format!(".{}={}", proto_path, rust_path)) .collect::>() .join("\n"), ) From e848353892549138d59a4690843906896dd3ff69 Mon Sep 17 00:00:00 2001 From: Stu Schwartz Date: Wed, 28 Jun 2023 14:39:20 -0700 Subject: [PATCH 22/31] Fix all tests --- .../3rdparty/patches/protoc-gen-prost.patch | 58 ++++----------- proto/prost/private/prost.bzl | 1 + proto/prost/private/protoc_wrapper.rs | 71 ++++++++++--------- .../googleapis/google/api/BUILD.bazel | 6 ++ .../googleapis/google/bytestream/BUILD.bazel | 10 +-- .../google/bytestream/bytestream.proto | 3 - .../googleapis/google/longrunning/BUILD.bazel | 6 ++ .../googleapis/google/rpc/BUILD.bazel | 16 +++++ .../bazel/remote/execution/v2/BUILD.bazel | 1 + .../build/bazel/semver/BUILD.bazel | 2 +- 10 files changed, 87 insertions(+), 87 deletions(-) diff --git a/proto/prost/private/3rdparty/patches/protoc-gen-prost.patch b/proto/prost/private/3rdparty/patches/protoc-gen-prost.patch index 7a0d804bb5..1ca697cfcd 100644 --- a/proto/prost/private/3rdparty/patches/protoc-gen-prost.patch +++ b/proto/prost/private/3rdparty/patches/protoc-gen-prost.patch @@ -1,34 +1,14 @@ diff --git a/src/lib.rs b/src/lib.rs -index 43fc5ba..94b8f7e 100644 +index 43fc5ba..aa86fb0 100644 --- a/src/lib.rs +++ b/src/lib.rs -@@ -62,12 +62,12 @@ impl ModuleRequestSet { - { - let raw_protos = RawProtos::decode(raw_request)?; - -- Ok(Self::new_decoded( -+ Self::new_decoded( - input_protos, - proto_file, - raw_protos, - default_package_filename.unwrap_or("_"), -- )) -+ ) - } - - fn new_decoded( -@@ -75,7 +75,7 @@ impl ModuleRequestSet { - proto_file: Vec, - raw_protos: RawProtos, - default_package_filename: &str, -- ) -> Self -+ ) -> std::result::Result - where - I: IntoIterator, - { -@@ -86,24 +86,29 @@ impl ModuleRequestSet { +@@ -84,19 +84,20 @@ impl ModuleRequestSet { + let requests = proto_file.into_iter().zip(raw_protos.proto_file).fold( + BTreeMap::new(), |mut acc, (proto, raw)| { - let module = Module::from_protobuf_package_name(proto.package()); +- let module = Module::from_protobuf_package_name(proto.package()); ++ let proto_package = proto.package(); ++ let module = Module::from_protobuf_package_name(proto_package); let proto_filename = proto.name(); - let entry = acc.entry(module).or_insert_with(|| { - let mut request = ModuleRequest::new(proto.package().to_owned()); @@ -38,19 +18,15 @@ index 43fc5ba..94b8f7e 100644 - package => format!("{package}.rs"), - }; - request.with_output_filename(filename); -+ let entry = acc -+ .entry(module) -+ .or_insert_with(|| ModuleRequest::new(proto.package().to_owned())); -+ -+ if input_protos.contains(proto_filename) { -+ if entry.output_filename().is_some() { -+ // TODO: Make a result -+ panic!("duplicate files detected"); - } +- } - request - }); ++ let entry = acc ++ .entry(module) ++ .or_insert_with(|| ModuleRequest::new(proto_package.to_owned())); + -+ let filename = match proto.package() { ++ if entry.output_filename().is_none() && input_protos.contains(proto_filename) { ++ let filename = match proto_package { + "" => default_package_filename.to_owned(), + package => format!("{package}.rs"), + }; @@ -59,11 +35,3 @@ index 43fc5ba..94b8f7e 100644 entry.push_file_descriptor_proto(proto, raw); acc - }, - ); - -- Self { requests } -+ Ok(Self { requests }) - } - - /// An ordered iterator of all requests diff --git a/proto/prost/private/prost.bzl b/proto/prost/private/prost.bzl index f0546f5f0f..8216d4ab2a 100644 --- a/proto/prost/private/prost.bzl +++ b/proto/prost/private/prost.bzl @@ -68,6 +68,7 @@ def _compile_proto(ctx, crate_name, proto_info, deps, prost_toolchain, is_tonic, tonic_plugin = prost_toolchain.tonic_plugin[DefaultInfo].files_to_run additional_args.add(prost_toolchain.tonic_plugin_flag % tonic_plugin.executable.path) additional_args.add("--tonic_opt=no_include") + additional_args.add("--tonic_opt=compile_well_known_types") additional_args.add("--is_tonic") additional_args.add_all(prost_toolchain.tonic_opts, format_each = "--tonic_opt=%s") tools = depset([tonic_plugin.executable], transitive = [tools]) diff --git a/proto/prost/private/protoc_wrapper.rs b/proto/prost/private/protoc_wrapper.rs index 093c9bdbcf..ff1c1ac8ac 100644 --- a/proto/prost/private/protoc_wrapper.rs +++ b/proto/prost/private/protoc_wrapper.rs @@ -446,6 +446,7 @@ impl Args { let mut rustfmt: Option = None; let mut proto_paths = Vec::new(); let mut label: Option = None; + let mut tonic_or_prost_opts = Vec::new(); let mut is_tonic = false; let mut extra_args = Vec::new(); @@ -510,7 +511,7 @@ impl Args { .expect("Failed to read file") .lines() { - extra_args.push(format!("--prost_opt=extern_path={}", flag.trim())); + tonic_or_prost_opts.push(format!("extern_path={}", flag.trim())); } } } @@ -535,6 +536,13 @@ impl Args { } } + for tonic_or_prost_opt in tonic_or_prost_opts { + extra_args.push(format!("--prost_opt={}", tonic_or_prost_opt)); + if is_tonic { + extra_args.push(format!("--tonic_opt={}", tonic_or_prost_opt)); + } + } + if protoc.is_none() { return Err( "No `--protoc` value was found. Unable to parse path to proto compiler." @@ -667,46 +675,28 @@ fn main() { let tonic_files: BTreeSet = find_generated_rust_files(&out_dir); for tonic_file in tonic_files.iter() { - if !tonic_file + let tonic_path_str = tonic_file.to_str().expect("Failed to convert to str"); + let filename = tonic_file .file_name() - .map(|os_name| { - os_name - .to_str() - .map(|name| name.ends_with(".tonic.rs")) - .unwrap_or(false) - }) - .unwrap_or(false) - { - let real_tonic_file = PathBuf::from(format!( - "{}.tonic.rs", - tonic_file - .to_str() - .expect("Failed to convert to str") - .strip_suffix(".rs") - .expect("Failed to strip suffix.") - )); - if real_tonic_file.exists() { - continue; - } - fs::rename(tonic_file, &real_tonic_file).unwrap_or_else(|err| { - panic!("Failed to rename file: {err:?}: {tonic_file:?} -> {real_tonic_file:?}"); - }); - } else { + .expect("Failed to get file name") + .to_str() + .expect("Failed to convert to str"); + + let is_tonic_file = filename.ends_with(".tonic.rs"); + + if is_tonic_file { let rs_file_str = format!( "{}.rs", - tonic_file - .to_str() - .expect("Failed to convert to str") + tonic_path_str .strip_suffix(".tonic.rs") .expect("Failed to strip suffix.") ); - let rs_file = PathBuf::from(&rs_file_str) - .canonicalize() - .unwrap_or_else(|err| { - panic!("Failed to canonicalize path: {err:?}: {rs_file_str:?}") - }); + let rs_file = PathBuf::from(&rs_file_str); if rs_file.exists() { + let rs_file = rs_file.canonicalize().unwrap_or_else(|err| { + panic!("Failed to canonicalize path: {err:?}: {rs_file_str:?}") + }); let rs_content = fs::read_to_string(&rs_file).expect("Failed to read file."); let tonic_content = fs::read_to_string(tonic_file).expect("Failed to read file."); @@ -716,6 +706,19 @@ fn main() { panic!("Failed to remove file: {err:?}: {rs_file:?}") }); } + } else { + let real_tonic_file = PathBuf::from(format!( + "{}.tonic.rs", + tonic_path_str + .strip_suffix(".rs") + .expect("Failed to strip suffix.") + )); + if real_tonic_file.exists() { + continue; + } + fs::rename(tonic_file, &real_tonic_file).unwrap_or_else(|err| { + panic!("Failed to rename file: {err:?}: {tonic_file:?} -> {real_tonic_file:?}"); + }); } } } @@ -735,7 +738,7 @@ fn main() { package_info_file, extern_paths .into_iter() - .map(|(proto_path, rust_path)| format!(".{}={}", proto_path, rust_path)) + .map(|(proto_path, rust_path)| format!(".{}=::{}", proto_path, rust_path)) .collect::>() .join("\n"), ) diff --git a/proto/prost/private/tests/complex_imports/googleapis/google/api/BUILD.bazel b/proto/prost/private/tests/complex_imports/googleapis/google/api/BUILD.bazel index e612f21b46..be45f90d96 100644 --- a/proto/prost/private/tests/complex_imports/googleapis/google/api/BUILD.bazel +++ b/proto/prost/private/tests/complex_imports/googleapis/google/api/BUILD.bazel @@ -1,4 +1,5 @@ load("@rules_proto//proto:defs.bzl", "proto_library") +load("//proto:defs.bzl", "rust_prost_library") proto_library( name = "annotations_proto", @@ -14,3 +15,8 @@ proto_library( "@com_google_protobuf//:descriptor_proto", ], ) + +rust_prost_library( + name = "annotations_rs_proto", + proto = ":annotations_proto", +) diff --git a/proto/prost/private/tests/complex_imports/googleapis/google/bytestream/BUILD.bazel b/proto/prost/private/tests/complex_imports/googleapis/google/bytestream/BUILD.bazel index 4d3c3ced75..d99900d2a9 100644 --- a/proto/prost/private/tests/complex_imports/googleapis/google/bytestream/BUILD.bazel +++ b/proto/prost/private/tests/complex_imports/googleapis/google/bytestream/BUILD.bazel @@ -1,11 +1,13 @@ load("@rules_proto//proto:defs.bzl", "proto_library") +load("//proto:defs.bzl", "rust_prost_library") proto_library( name = "bytestream_proto", srcs = ["bytestream.proto"], visibility = ["//visibility:public"], - deps = [ - "//proto/prost/private/tests/complex_imports/googleapis/google/api:annotations_proto", - "@com_google_protobuf//:wrappers_proto", - ], +) + +rust_prost_library( + name = "bytestream_rs_proto", + proto = ":bytestream_proto", ) diff --git a/proto/prost/private/tests/complex_imports/googleapis/google/bytestream/bytestream.proto b/proto/prost/private/tests/complex_imports/googleapis/google/bytestream/bytestream.proto index baf95deee7..2974601b76 100644 --- a/proto/prost/private/tests/complex_imports/googleapis/google/bytestream/bytestream.proto +++ b/proto/prost/private/tests/complex_imports/googleapis/google/bytestream/bytestream.proto @@ -16,9 +16,6 @@ syntax = "proto3"; package google.bytestream; -import "google/api/annotations.proto"; -import "google/protobuf/wrappers.proto"; - option go_package = "google.golang.org/genproto/googleapis/bytestream;bytestream"; option java_outer_classname = "ByteStreamProto"; option java_package = "com.google.bytestream"; diff --git a/proto/prost/private/tests/complex_imports/googleapis/google/longrunning/BUILD.bazel b/proto/prost/private/tests/complex_imports/googleapis/google/longrunning/BUILD.bazel index d55b3ce877..67970bb25f 100644 --- a/proto/prost/private/tests/complex_imports/googleapis/google/longrunning/BUILD.bazel +++ b/proto/prost/private/tests/complex_imports/googleapis/google/longrunning/BUILD.bazel @@ -1,4 +1,5 @@ load("@rules_proto//proto:defs.bzl", "proto_library") +load("//proto:defs.bzl", "rust_prost_library") proto_library( name = "longrunning_proto", @@ -14,3 +15,8 @@ proto_library( "@com_google_protobuf//:empty_proto", ], ) + +rust_prost_library( + name = "longrunning_rs_proto", + proto = ":longrunning_proto", +) diff --git a/proto/prost/private/tests/complex_imports/googleapis/google/rpc/BUILD.bazel b/proto/prost/private/tests/complex_imports/googleapis/google/rpc/BUILD.bazel index 3e912d8faf..1f9a3c10ff 100644 --- a/proto/prost/private/tests/complex_imports/googleapis/google/rpc/BUILD.bazel +++ b/proto/prost/private/tests/complex_imports/googleapis/google/rpc/BUILD.bazel @@ -1,4 +1,5 @@ load("@rules_proto//proto:defs.bzl", "proto_library") +load("//proto:defs.bzl", "rust_prost_library") proto_library( name = "code_proto", @@ -32,3 +33,18 @@ proto_library( "@com_google_protobuf//:any_proto", ], ) + +rust_prost_library( + name = "code_rs_proto", + proto = ":code_proto", +) + +rust_prost_library( + name = "error_details_rs_proto", + proto = ":error_details_proto", +) + +rust_prost_library( + name = "status_rs_proto", + proto = ":status_proto", +) diff --git a/proto/prost/private/tests/complex_imports/remote-apis/build/bazel/remote/execution/v2/BUILD.bazel b/proto/prost/private/tests/complex_imports/remote-apis/build/bazel/remote/execution/v2/BUILD.bazel index 90fa0b116f..e0b88af578 100644 --- a/proto/prost/private/tests/complex_imports/remote-apis/build/bazel/remote/execution/v2/BUILD.bazel +++ b/proto/prost/private/tests/complex_imports/remote-apis/build/bazel/remote/execution/v2/BUILD.bazel @@ -13,6 +13,7 @@ proto_library( "//proto/prost/private/tests/complex_imports/remote-apis/build/bazel/semver:semver_proto", "@com_google_protobuf//:any_proto", "@com_google_protobuf//:duration_proto", + "@com_google_protobuf//:empty_proto", "@com_google_protobuf//:timestamp_proto", "@com_google_protobuf//:wrappers_proto", ], diff --git a/proto/prost/private/tests/complex_imports/remote-apis/build/bazel/semver/BUILD.bazel b/proto/prost/private/tests/complex_imports/remote-apis/build/bazel/semver/BUILD.bazel index e8b2bf8a63..89b5728fc7 100644 --- a/proto/prost/private/tests/complex_imports/remote-apis/build/bazel/semver/BUILD.bazel +++ b/proto/prost/private/tests/complex_imports/remote-apis/build/bazel/semver/BUILD.bazel @@ -1,5 +1,5 @@ -load("@rules_rust//proto/prost:defs.bzl", "rust_prost_library") load("@rules_proto//proto:defs.bzl", "proto_library") +load("@rules_rust//proto/prost:defs.bzl", "rust_prost_library") proto_library( name = "semver_proto", From 3c91f2ce358a492a5e0ac3532a1a9ecd9fe97861 Mon Sep 17 00:00:00 2001 From: Stu Schwartz Date: Wed, 28 Jun 2023 16:19:49 -0700 Subject: [PATCH 23/31] Add rust checks for the complex import protos. --- .../googleapis/google/api/BUILD.bazel | 10 ++++++ .../googleapis/google/api/annotations_test.rs | 17 ++++++++++ .../googleapis/google/bytestream/BUILD.bazel | 14 +++++++-- .../google/bytestream/bytestream_test.rs | 15 +++++++++ .../googleapis/google/longrunning/BUILD.bazel | 14 +++++++-- .../google/longrunning/longrunning_test.rs | 12 +++++++ .../googleapis/google/rpc/BUILD.bazel | 12 +++++++ .../googleapis/google/rpc/rpc_test.rs | 31 +++++++++++++++++++ .../bazel/remote/execution/v2/BUILD.bazel | 12 ++++++- .../execution/v2/remoteexecution_test.rs | 12 +++++++ .../build/bazel/semver/BUILD.bazel | 12 ++++++- .../build/bazel/semver/semver_test.rs | 15 +++++++++ 12 files changed, 170 insertions(+), 6 deletions(-) create mode 100644 proto/prost/private/tests/complex_imports/googleapis/google/api/annotations_test.rs create mode 100644 proto/prost/private/tests/complex_imports/googleapis/google/bytestream/bytestream_test.rs create mode 100644 proto/prost/private/tests/complex_imports/googleapis/google/longrunning/longrunning_test.rs create mode 100644 proto/prost/private/tests/complex_imports/googleapis/google/rpc/rpc_test.rs create mode 100644 proto/prost/private/tests/complex_imports/remote-apis/build/bazel/remote/execution/v2/remoteexecution_test.rs create mode 100644 proto/prost/private/tests/complex_imports/remote-apis/build/bazel/semver/semver_test.rs diff --git a/proto/prost/private/tests/complex_imports/googleapis/google/api/BUILD.bazel b/proto/prost/private/tests/complex_imports/googleapis/google/api/BUILD.bazel index be45f90d96..5202016fe0 100644 --- a/proto/prost/private/tests/complex_imports/googleapis/google/api/BUILD.bazel +++ b/proto/prost/private/tests/complex_imports/googleapis/google/api/BUILD.bazel @@ -1,5 +1,6 @@ load("@rules_proto//proto:defs.bzl", "proto_library") load("//proto:defs.bzl", "rust_prost_library") +load("//rust:defs.bzl", "rust_test") proto_library( name = "annotations_proto", @@ -20,3 +21,12 @@ rust_prost_library( name = "annotations_rs_proto", proto = ":annotations_proto", ) + +rust_test( + name = "annotations_test", + srcs = ["annotations_test.rs"], + edition = "2021", + deps = [ + ":annotations_rs_proto", + ], +) diff --git a/proto/prost/private/tests/complex_imports/googleapis/google/api/annotations_test.rs b/proto/prost/private/tests/complex_imports/googleapis/google/api/annotations_test.rs new file mode 100644 index 0000000000..af6ee4fdd6 --- /dev/null +++ b/proto/prost/private/tests/complex_imports/googleapis/google/api/annotations_test.rs @@ -0,0 +1,17 @@ +//! Tests the annotations protos. + +use annotations_proto::google::api::http_rule::Pattern; +use annotations_proto::google::api::HttpRule; + +#[test] +fn test_annotations() { + let http_rule = HttpRule { + pattern: Some(Pattern::Get("/v1/{name=shelves/*}/books".to_string())), + ..HttpRule::default() + }; + + assert_eq!( + http_rule.pattern, + Some(Pattern::Get("/v1/{name=shelves/*}/books".to_string())) + ); +} diff --git a/proto/prost/private/tests/complex_imports/googleapis/google/bytestream/BUILD.bazel b/proto/prost/private/tests/complex_imports/googleapis/google/bytestream/BUILD.bazel index d99900d2a9..1188906701 100644 --- a/proto/prost/private/tests/complex_imports/googleapis/google/bytestream/BUILD.bazel +++ b/proto/prost/private/tests/complex_imports/googleapis/google/bytestream/BUILD.bazel @@ -1,5 +1,6 @@ load("@rules_proto//proto:defs.bzl", "proto_library") -load("//proto:defs.bzl", "rust_prost_library") +load("//proto:defs.bzl", "rust_tonic_library") +load("//rust:defs.bzl", "rust_test") proto_library( name = "bytestream_proto", @@ -7,7 +8,16 @@ proto_library( visibility = ["//visibility:public"], ) -rust_prost_library( +rust_tonic_library( name = "bytestream_rs_proto", proto = ":bytestream_proto", ) + +rust_test( + name = "bytestream_test", + srcs = ["bytestream_test.rs"], + edition = "2021", + deps = [ + ":bytestream_rs_proto", + ], +) diff --git a/proto/prost/private/tests/complex_imports/googleapis/google/bytestream/bytestream_test.rs b/proto/prost/private/tests/complex_imports/googleapis/google/bytestream/bytestream_test.rs new file mode 100644 index 0000000000..16e38fe976 --- /dev/null +++ b/proto/prost/private/tests/complex_imports/googleapis/google/bytestream/bytestream_test.rs @@ -0,0 +1,15 @@ +//! Tests the bytestream protos. + +use bytestream_proto::google::bytestream::WriteRequest; + +#[test] +fn test_bytestream() { + let write_request = WriteRequest { + resource_name: "resource_name".to_string(), + write_offset: 0, + finish_write: false, + data: vec![0, 1, 2, 3], + }; + + assert_eq!(write_request.resource_name, "resource_name") +} diff --git a/proto/prost/private/tests/complex_imports/googleapis/google/longrunning/BUILD.bazel b/proto/prost/private/tests/complex_imports/googleapis/google/longrunning/BUILD.bazel index 67970bb25f..25ffd4a221 100644 --- a/proto/prost/private/tests/complex_imports/googleapis/google/longrunning/BUILD.bazel +++ b/proto/prost/private/tests/complex_imports/googleapis/google/longrunning/BUILD.bazel @@ -1,5 +1,6 @@ load("@rules_proto//proto:defs.bzl", "proto_library") -load("//proto:defs.bzl", "rust_prost_library") +load("//proto:defs.bzl", "rust_tonic_library") +load("//rust:defs.bzl", "rust_test") proto_library( name = "longrunning_proto", @@ -16,7 +17,16 @@ proto_library( ], ) -rust_prost_library( +rust_tonic_library( name = "longrunning_rs_proto", proto = ":longrunning_proto", ) + +rust_test( + name = "longrunning_test", + srcs = ["longrunning_test.rs"], + edition = "2021", + deps = [ + ":longrunning_rs_proto", + ], +) diff --git a/proto/prost/private/tests/complex_imports/googleapis/google/longrunning/longrunning_test.rs b/proto/prost/private/tests/complex_imports/googleapis/google/longrunning/longrunning_test.rs new file mode 100644 index 0000000000..e3414a20e4 --- /dev/null +++ b/proto/prost/private/tests/complex_imports/googleapis/google/longrunning/longrunning_test.rs @@ -0,0 +1,12 @@ +//! Tests the longrunning protos. + +use longrunning_proto::google::longrunning::GetOperationRequest; + +#[test] +fn test_longrunning() { + let get_operation_request = GetOperationRequest { + name: "name".to_string(), + }; + + assert_eq!(get_operation_request.name, "name") +} diff --git a/proto/prost/private/tests/complex_imports/googleapis/google/rpc/BUILD.bazel b/proto/prost/private/tests/complex_imports/googleapis/google/rpc/BUILD.bazel index 1f9a3c10ff..8f38b4d9a1 100644 --- a/proto/prost/private/tests/complex_imports/googleapis/google/rpc/BUILD.bazel +++ b/proto/prost/private/tests/complex_imports/googleapis/google/rpc/BUILD.bazel @@ -1,5 +1,6 @@ load("@rules_proto//proto:defs.bzl", "proto_library") load("//proto:defs.bzl", "rust_prost_library") +load("//rust:defs.bzl", "rust_test") proto_library( name = "code_proto", @@ -48,3 +49,14 @@ rust_prost_library( name = "status_rs_proto", proto = ":status_proto", ) + +rust_test( + name = "rpc_test", + srcs = ["rpc_test.rs"], + edition = "2021", + deps = [ + ":code_rs_proto", + ":error_details_rs_proto", + ":status_rs_proto", + ], +) diff --git a/proto/prost/private/tests/complex_imports/googleapis/google/rpc/rpc_test.rs b/proto/prost/private/tests/complex_imports/googleapis/google/rpc/rpc_test.rs new file mode 100644 index 0000000000..21f1702cad --- /dev/null +++ b/proto/prost/private/tests/complex_imports/googleapis/google/rpc/rpc_test.rs @@ -0,0 +1,31 @@ +//! Tests the rpc protos. + +use code_proto::google::rpc::Code; +use duration_proto::google::protobuf::Duration; +use error_details_proto::google::rpc::RetryInfo; +use status_proto::google::rpc::Status; + +#[test] +fn test_rpc() { + let retry_info = RetryInfo { + retry_delay: Some(Duration { + seconds: 1, + nanos: 2, + }), + }; + assert_eq!( + retry_info.retry_delay, + Some(Duration { + seconds: 1, + nanos: 2, + }) + ); + + let status = Status { + code: Code::Ok.into(), + message: "message".to_string(), + details: vec![], + }; + + assert_eq!(status.code, Code::Ok.into()); +} diff --git a/proto/prost/private/tests/complex_imports/remote-apis/build/bazel/remote/execution/v2/BUILD.bazel b/proto/prost/private/tests/complex_imports/remote-apis/build/bazel/remote/execution/v2/BUILD.bazel index e0b88af578..858efc3009 100644 --- a/proto/prost/private/tests/complex_imports/remote-apis/build/bazel/remote/execution/v2/BUILD.bazel +++ b/proto/prost/private/tests/complex_imports/remote-apis/build/bazel/remote/execution/v2/BUILD.bazel @@ -1,5 +1,6 @@ load("@rules_proto//proto:defs.bzl", "proto_library") load("@rules_rust//proto/prost:defs.bzl", "rust_tonic_library") +load("@rules_rust//rust:defs.bzl", "rust_test") proto_library( name = "remoteexecution_proto", @@ -20,7 +21,16 @@ proto_library( ) rust_tonic_library( - name = "remoteexecution_tonic_proto", + name = "remoteexecution_rs_proto", proto = ":remoteexecution_proto", visibility = ["//visibility:public"], ) + +rust_test( + name = "remoteexecution_test", + srcs = ["remoteexecution_test.rs"], + edition = "2021", + deps = [ + ":remoteexecution_rs_proto", + ], +) diff --git a/proto/prost/private/tests/complex_imports/remote-apis/build/bazel/remote/execution/v2/remoteexecution_test.rs b/proto/prost/private/tests/complex_imports/remote-apis/build/bazel/remote/execution/v2/remoteexecution_test.rs new file mode 100644 index 0000000000..a582e7ad6d --- /dev/null +++ b/proto/prost/private/tests/complex_imports/remote-apis/build/bazel/remote/execution/v2/remoteexecution_test.rs @@ -0,0 +1,12 @@ +//! Tests the remote execution protos. + +use remoteexecution_proto::build::bazel::remote::execution::v2::Digest; + +#[test] +fn test_remote_execution() { + let digest = Digest { + hash: "hash".to_string(), + size_bytes: 50, + }; + assert_eq!(digest.hash, "hash"); +} diff --git a/proto/prost/private/tests/complex_imports/remote-apis/build/bazel/semver/BUILD.bazel b/proto/prost/private/tests/complex_imports/remote-apis/build/bazel/semver/BUILD.bazel index 89b5728fc7..22624417f5 100644 --- a/proto/prost/private/tests/complex_imports/remote-apis/build/bazel/semver/BUILD.bazel +++ b/proto/prost/private/tests/complex_imports/remote-apis/build/bazel/semver/BUILD.bazel @@ -1,5 +1,6 @@ load("@rules_proto//proto:defs.bzl", "proto_library") load("@rules_rust//proto/prost:defs.bzl", "rust_prost_library") +load("//rust:defs.bzl", "rust_test") proto_library( name = "semver_proto", @@ -9,7 +10,16 @@ proto_library( ) rust_prost_library( - name = "semver_prost_proto", + name = "semver_rs_proto", proto = ":semver_proto", visibility = ["//visibility:public"], ) + +rust_test( + name = "semver_test", + srcs = ["semver_test.rs"], + edition = "2021", + deps = [ + ":semver_rs_proto", + ], +) diff --git a/proto/prost/private/tests/complex_imports/remote-apis/build/bazel/semver/semver_test.rs b/proto/prost/private/tests/complex_imports/remote-apis/build/bazel/semver/semver_test.rs new file mode 100644 index 0000000000..8120610ecd --- /dev/null +++ b/proto/prost/private/tests/complex_imports/remote-apis/build/bazel/semver/semver_test.rs @@ -0,0 +1,15 @@ +//! Tests the semver protos. + +use semver_proto::build::bazel::semver::SemVer; + +#[test] +fn test_semver() { + let semver = SemVer { + major: 1, + minor: 2, + patch: 3, + prerelease: "prerelease".to_string(), + }; + + assert_eq!(semver.major, 1); +} From e08d9ad7a57ad3a8d50eacb3aad77c594b576a0a Mon Sep 17 00:00:00 2001 From: Stu Schwartz Date: Thu, 29 Jun 2023 16:52:48 -0700 Subject: [PATCH 24/31] Address feedback --- WORKSPACE.bazel | 2 ++ proto/prost/BUILD.bazel | 35 ------------------------ proto/prost/private/3rdparty/BUILD.bazel | 2 ++ proto/prost/private/BUILD.bazel | 35 ++++++++++++++++++++++++ proto/prost/private/prost.bzl | 32 +++++++++++++++------- proto/prost/private/protoc_wrapper.rs | 10 ++----- proto/prost/repositories.bzl | 7 ----- proto/repositories.bzl | 8 ++---- 8 files changed, 66 insertions(+), 65 deletions(-) diff --git a/WORKSPACE.bazel b/WORKSPACE.bazel index 71a3c612ec..fe4399dacb 100644 --- a/WORKSPACE.bazel +++ b/WORKSPACE.bazel @@ -20,6 +20,8 @@ load("@rules_rust//proto:transitive_repositories.bzl", "rust_proto_transitive_re rust_proto_transitive_repositories() +register_toolchains("@rules_rust//proto/prost/private/...") + load("@rules_rust//bindgen:repositories.bzl", "rust_bindgen_dependencies", "rust_bindgen_register_toolchains") rust_bindgen_dependencies() diff --git a/proto/prost/BUILD.bazel b/proto/prost/BUILD.bazel index de9c342e97..79b6641dc5 100644 --- a/proto/prost/BUILD.bazel +++ b/proto/prost/BUILD.bazel @@ -1,6 +1,4 @@ load("@bazel_skylib//:bzl_library.bzl", "bzl_library") -load("//rust:defs.bzl", "rust_library_group") -load(":defs.bzl", "rust_prost_toolchain") package(default_visibility = ["//visibility:public"]) @@ -8,39 +6,6 @@ toolchain_type( name = "toolchain_type", ) -rust_library_group( - name = "prost_runtime", - deps = [ - "//proto/prost/private/3rdparty/crates:prost", - ], -) - -rust_library_group( - name = "tonic_runtime", - deps = [ - ":prost_runtime", - "//proto/prost/private/3rdparty/crates:tonic", - ], -) - -rust_prost_toolchain( - name = "default_prost_toolchain_impl", - prost_plugin = "//proto/prost/private/3rdparty/crates:protoc-gen-prost__protoc-gen-prost", - prost_plugin_flag = "--plugin=protoc-gen-prost=%s", - prost_runtime = ":prost_runtime", - prost_types = "//proto/prost/private/3rdparty/crates:prost-types", - proto_compiler = "@com_google_protobuf//:protoc", - tonic_plugin = "//proto/prost/private/3rdparty/crates:protoc-gen-tonic__protoc-gen-tonic", - tonic_plugin_flag = "--plugin=protoc-gen-tonic=%s", - tonic_runtime = ":tonic_runtime", -) - -toolchain( - name = "default_prost_toolchain", - toolchain = "default_prost_toolchain_impl", - toolchain_type = "//proto/prost:toolchain_type", -) - bzl_library( name = "bzl_lib", srcs = glob(["**/*.bzl"]), diff --git a/proto/prost/private/3rdparty/BUILD.bazel b/proto/prost/private/3rdparty/BUILD.bazel index 1c6e5d00f5..21bb1f25ac 100644 --- a/proto/prost/private/3rdparty/BUILD.bazel +++ b/proto/prost/private/3rdparty/BUILD.bazel @@ -10,6 +10,8 @@ crates_vendor( "-p1", ], patches = [ + # This patch is needed to handle duplicate package names. + # See: https://github.com/neoeinstein/protoc-gen-prost/issues/70 "@rules_rust//proto/prost/private/3rdparty/patches:protoc-gen-prost.patch", ], )], diff --git a/proto/prost/private/BUILD.bazel b/proto/prost/private/BUILD.bazel index b667cd2da3..e860dfc9ad 100644 --- a/proto/prost/private/BUILD.bazel +++ b/proto/prost/private/BUILD.bazel @@ -1,6 +1,8 @@ load("@bazel_skylib//:bzl_library.bzl", "bzl_library") load("@rules_rust//rust:defs.bzl", "rust_binary", "rust_test") load(":prost.bzl", "RUST_EDITION", "current_prost_runtime") +load("//rust:defs.bzl", "rust_library_group") +load("//proto/prost:defs.bzl", "rust_prost_toolchain") current_prost_runtime( name = "current_prost_runtime", @@ -28,3 +30,36 @@ bzl_library( "//proto/prost/private/3rdparty:bzl_lib", ], ) + +rust_library_group( + name = "prost_runtime", + deps = [ + "//proto/prost/private/3rdparty/crates:prost", + ], +) + +rust_library_group( + name = "tonic_runtime", + deps = [ + ":prost_runtime", + "//proto/prost/private/3rdparty/crates:tonic", + ], +) + +rust_prost_toolchain( + name = "default_prost_toolchain_impl", + prost_plugin = "//proto/prost/private/3rdparty/crates:protoc-gen-prost__protoc-gen-prost", + prost_plugin_flag = "--plugin=protoc-gen-prost=%s", + prost_runtime = ":prost_runtime", + prost_types = "//proto/prost/private/3rdparty/crates:prost-types", + proto_compiler = "@com_google_protobuf//:protoc", + tonic_plugin = "//proto/prost/private/3rdparty/crates:protoc-gen-tonic__protoc-gen-tonic", + tonic_plugin_flag = "--plugin=protoc-gen-tonic=%s", + tonic_runtime = ":tonic_runtime", +) + +toolchain( + name = "default_prost_toolchain", + toolchain = "default_prost_toolchain_impl", + toolchain_type = "//proto/prost:toolchain_type", +) diff --git a/proto/prost/private/prost.bzl b/proto/prost/private/prost.bzl index 8216d4ab2a..940d368900 100644 --- a/proto/prost/private/prost.bzl +++ b/proto/prost/private/prost.bzl @@ -4,10 +4,10 @@ load("@rules_proto//proto:defs.bzl", "ProtoInfo", "proto_common") load("//rust:defs.bzl", "rust_common") # buildifier: disable=bzl-visibility -load("//rust/private:providers.bzl", "DepVariantInfo") +load("//rust/private:rustc.bzl", "rustc_compile_action") # buildifier: disable=bzl-visibility -load("//rust/private:rustc.bzl", "rustc_compile_action") +load("//rust/private:utils.bzl", "can_build_metadata") load(":providers.bzl", "ProstProtoInfo", "TonicProtoInfo") RUST_EDITION = "2021" @@ -17,6 +17,7 @@ TOOLCHAIN_TYPE = "@rules_rust//proto/prost:toolchain_type" def _create_proto_lang_toolchain(ctx, prost_toolchain): is_tonic = prost_toolchain.tonic_runtime != None + mnemonic = "TonicGenProto" if is_tonic else "ProstGenProto" proto_lang_toolchain = proto_common.ProtoLangToolchainInfo( out_replacement_format_flag = "--prost_out=%s", plugin_format_flag = prost_toolchain.prost_plugin_flag, @@ -25,8 +26,8 @@ def _create_proto_lang_toolchain(ctx, prost_toolchain): provided_proto_sources = depset(), proto_compiler = ctx.attr._prost_process_wrapper[DefaultInfo].files_to_run, protoc_opts = prost_toolchain.protoc_opts, - progress_message = "", - mnemonic = "TonicGenProto" if is_tonic else "ProstGenProto", + progress_message = mnemonic + " %{label}", + mnemonic = mnemonic, ) return proto_lang_toolchain @@ -113,7 +114,7 @@ def _get_cc_info(providers): return provider fail("Couldn't find a CcInfo in the list of providers") -def _compile_rust(ctx, attr, crate_name, src, deps, edition): +def _compile_rust(ctx, attr, crate_name, src, deps, edition, is_tonic): """Compiles a Rust source file. Args: @@ -123,12 +124,13 @@ def _compile_rust(ctx, attr, crate_name, src, deps, edition): src (File): The crate root source file to be compiled. deps (List of DepVariantInfo): A list of dependencies needed. edition (str): The Rust edition to use. + is_tonic (bool): Whether or not the crate is a tonic library. Returns: A DepVariantInfo provider. """ toolchain = ctx.toolchains["@rules_rust//rust:toolchain_type"] - output_hash = repr(hash(src.path)) + output_hash = repr(hash(src.path + (".tonic" if is_tonic else ".prost"))) lib_name = "{prefix}{name}-{lib_hash}{extension}".format( prefix = "lib", @@ -145,7 +147,16 @@ def _compile_rust(ctx, attr, crate_name, src, deps, edition): ) lib = ctx.actions.declare_file(lib_name) - rmeta = ctx.actions.declare_file(rmeta_name) + rmeta = None + + if can_build_metadata(toolchain, ctx, "rlib"): + rmeta_name = "{prefix}{name}-{lib_hash}{extension}".format( + prefix = "lib", + name = crate_name, + lib_hash = output_hash, + extension = ".rmeta", + ) + rmeta = ctx.actions.declare_file(rmeta_name) providers = rustc_compile_action( ctx = ctx, @@ -175,7 +186,7 @@ def _compile_rust(ctx, attr, crate_name, src, deps, edition): dep_info = _get_dep_info(providers) cc_info = _get_cc_info(providers) - return DepVariantInfo( + return rust_common.dep_variant_info( crate_info = crate_info, dep_info = dep_info, cc_info = cc_info, @@ -198,7 +209,7 @@ def _rust_prost_aspect_impl(target, ctx): crate_group_info = prost_runtime[rust_common.crate_group_info] runtime_deps.extend(crate_group_info.dep_variant_infos.to_list()) else: - runtime_deps.append(DepVariantInfo( + runtime_deps.append(rust_common.dep_variant_info( crate_info = prost_runtime[rust_common.crate_info] if rust_common.crate_info in prost_runtime else None, dep_info = prost_runtime[rust_common.dep_info] if rust_common.dep_info in prost_runtime else None, cc_info = prost_runtime[CcInfo] if CcInfo in prost_runtime else None, @@ -241,6 +252,7 @@ def _rust_prost_aspect_impl(target, ctx): src = lib_rs, deps = deps, edition = RUST_EDITION, + is_tonic = ctx.attr._is_tonic, ) return [ @@ -460,7 +472,7 @@ def _current_prost_runtime_impl(ctx): crate_group_info = target[rust_common.crate_group_info] runtime_deps.extend(crate_group_info.dep_variant_infos.to_list()) else: - runtime_deps.append(DepVariantInfo( + runtime_deps.append(rust_common.dep_variant_info( crate_info = target[rust_common.crate_info] if rust_common.crate_info in target else None, dep_info = target[rust_common.dep_info] if rust_common.dep_info in target else None, cc_info = target[CcInfo] if CcInfo in target else None, diff --git a/proto/prost/private/protoc_wrapper.rs b/proto/prost/private/protoc_wrapper.rs index ff1c1ac8ac..38a19196c4 100644 --- a/proto/prost/private/protoc_wrapper.rs +++ b/proto/prost/private/protoc_wrapper.rs @@ -479,17 +479,14 @@ impl Args { continue; } - let part = arg.split_once('=').expect("Failed to split argument on ="); - match part { + let parts = arg.split_once('=').expect("Failed to split argument on ="); + match parts { ("--protoc", value) => { protoc = Some(PathBuf::from(value)); } ("--prost_out", value) => { out_dir = Some(PathBuf::from(value)); } - ("--tonic_out", value) => { - out_dir = Some(PathBuf::from(value)); - } ("--crate_name", value) => { crate_name = Some(value.to_string()); } @@ -694,9 +691,6 @@ fn main() { let rs_file = PathBuf::from(&rs_file_str); if rs_file.exists() { - let rs_file = rs_file.canonicalize().unwrap_or_else(|err| { - panic!("Failed to canonicalize path: {err:?}: {rs_file_str:?}") - }); let rs_content = fs::read_to_string(&rs_file).expect("Failed to read file."); let tonic_content = fs::read_to_string(tonic_file).expect("Failed to read file."); diff --git a/proto/prost/repositories.bzl b/proto/prost/repositories.bzl index a44e9a4d84..791b6912aa 100644 --- a/proto/prost/repositories.bzl +++ b/proto/prost/repositories.bzl @@ -5,10 +5,3 @@ load("//proto/prost/private/3rdparty/crates:crates.bzl", "crate_repositories") def rust_prost_dependencies(): """Prost repository dependencies.""" crate_repositories() - -# buildifier: disable=unnamed-macro -def rust_prost_register_toolchains(register_toolchains = True): - """Register toolchains for Rust Prost rules.""" - - if register_toolchains: - native.register_toolchains("@rules_rust//proto/prost/...") diff --git a/proto/repositories.bzl b/proto/repositories.bzl index 92e38a3ed6..ccaee93809 100644 --- a/proto/repositories.bzl +++ b/proto/repositories.bzl @@ -17,7 +17,7 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") load("//proto/3rdparty/crates:defs.bzl", "crate_repositories") -load("//proto/prost:repositories.bzl", "rust_prost_dependencies", "rust_prost_register_toolchains") +load("//proto/prost:repositories.bzl", "rust_prost_dependencies") def rust_proto_dependencies(): maybe( @@ -51,11 +51,9 @@ def rust_proto_dependencies(): rust_prost_dependencies() # buildifier: disable=unnamed-macro -def rust_proto_register_toolchains(register_proto_toolchains = True, register_prost_toolchains = True): +def rust_proto_register_toolchains(register_proto_toolchains = True): """Register toolchains for proto compilation.""" - rust_prost_register_toolchains(register_prost_toolchains) - if register_proto_toolchains: native.register_toolchains(str(Label("//proto:default-proto-toolchain"))) @@ -70,4 +68,4 @@ def rust_proto_repositories(register_default_toolchain = True): """ rust_proto_dependencies() - rust_proto_register_toolchains(register_proto_toolchains = register_default_toolchain, register_prost_toolchains = False) + rust_proto_register_toolchains(register_proto_toolchains = register_default_toolchain) From d3ea3d74eb5644e6ca3cf151531f83acb2669f3c Mon Sep 17 00:00:00 2001 From: Stu Schwartz Date: Thu, 29 Jun 2023 16:55:32 -0700 Subject: [PATCH 25/31] Fix buildifier --- proto/prost/private/BUILD.bazel | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proto/prost/private/BUILD.bazel b/proto/prost/private/BUILD.bazel index e860dfc9ad..eea28b7dcb 100644 --- a/proto/prost/private/BUILD.bazel +++ b/proto/prost/private/BUILD.bazel @@ -1,8 +1,8 @@ load("@bazel_skylib//:bzl_library.bzl", "bzl_library") load("@rules_rust//rust:defs.bzl", "rust_binary", "rust_test") -load(":prost.bzl", "RUST_EDITION", "current_prost_runtime") -load("//rust:defs.bzl", "rust_library_group") load("//proto/prost:defs.bzl", "rust_prost_toolchain") +load("//rust:defs.bzl", "rust_library_group") +load(":prost.bzl", "RUST_EDITION", "current_prost_runtime") current_prost_runtime( name = "current_prost_runtime", From 74e5b0811b556d9306a4a9fa20aabc426420493d Mon Sep 17 00:00:00 2001 From: Stu Schwartz Date: Thu, 29 Jun 2023 18:52:36 -0700 Subject: [PATCH 26/31] Depend on remote-apis repo. --- proto/prost/private/protoc_wrapper.rs | 1 + .../tests/bazel_remote_apis/BUILD.bazel | 32 + .../remote_execution_test.rs} | 2 +- .../semver_test.rs | 0 .../googleapis/google/api/BUILD.bazel | 32 - .../googleapis/google/api/annotations.proto | 31 - .../googleapis/google/api/annotations_test.rs | 17 - .../googleapis/google/api/client.proto | 99 - .../google/api/field_behavior.proto | 90 - .../googleapis/google/api/http.proto | 375 ---- .../googleapis/google/bytestream/BUILD.bazel | 23 - .../google/bytestream/bytestream.proto | 178 -- .../google/bytestream/bytestream_test.rs | 15 - .../googleapis/google/longrunning/BUILD.bazel | 32 - .../google/longrunning/longrunning_test.rs | 12 - .../google/longrunning/operations.proto | 247 --- .../googleapis/google/rpc/BUILD.bazel | 62 - .../googleapis/google/rpc/code.proto | 186 -- .../googleapis/google/rpc/error_details.proto | 249 --- .../googleapis/google/rpc/rpc_test.rs | 31 - .../googleapis/google/rpc/status.proto | 47 - .../bazel/remote/execution/v2/BUILD.bazel | 36 - .../execution/v2/remote_execution.proto | 1795 ----------------- .../build/bazel/semver/BUILD.bazel | 25 - .../build/bazel/semver/semver.proto | 41 - test/deps.bzl | 26 + 26 files changed, 60 insertions(+), 3624 deletions(-) create mode 100644 proto/prost/private/tests/bazel_remote_apis/BUILD.bazel rename proto/prost/private/tests/{complex_imports/remote-apis/build/bazel/remote/execution/v2/remoteexecution_test.rs => bazel_remote_apis/remote_execution_test.rs} (74%) rename proto/prost/private/tests/{complex_imports/remote-apis/build/bazel/semver => bazel_remote_apis}/semver_test.rs (100%) delete mode 100644 proto/prost/private/tests/complex_imports/googleapis/google/api/BUILD.bazel delete mode 100644 proto/prost/private/tests/complex_imports/googleapis/google/api/annotations.proto delete mode 100644 proto/prost/private/tests/complex_imports/googleapis/google/api/annotations_test.rs delete mode 100644 proto/prost/private/tests/complex_imports/googleapis/google/api/client.proto delete mode 100644 proto/prost/private/tests/complex_imports/googleapis/google/api/field_behavior.proto delete mode 100644 proto/prost/private/tests/complex_imports/googleapis/google/api/http.proto delete mode 100644 proto/prost/private/tests/complex_imports/googleapis/google/bytestream/BUILD.bazel delete mode 100644 proto/prost/private/tests/complex_imports/googleapis/google/bytestream/bytestream.proto delete mode 100644 proto/prost/private/tests/complex_imports/googleapis/google/bytestream/bytestream_test.rs delete mode 100644 proto/prost/private/tests/complex_imports/googleapis/google/longrunning/BUILD.bazel delete mode 100644 proto/prost/private/tests/complex_imports/googleapis/google/longrunning/longrunning_test.rs delete mode 100644 proto/prost/private/tests/complex_imports/googleapis/google/longrunning/operations.proto delete mode 100644 proto/prost/private/tests/complex_imports/googleapis/google/rpc/BUILD.bazel delete mode 100644 proto/prost/private/tests/complex_imports/googleapis/google/rpc/code.proto delete mode 100644 proto/prost/private/tests/complex_imports/googleapis/google/rpc/error_details.proto delete mode 100644 proto/prost/private/tests/complex_imports/googleapis/google/rpc/rpc_test.rs delete mode 100644 proto/prost/private/tests/complex_imports/googleapis/google/rpc/status.proto delete mode 100644 proto/prost/private/tests/complex_imports/remote-apis/build/bazel/remote/execution/v2/BUILD.bazel delete mode 100644 proto/prost/private/tests/complex_imports/remote-apis/build/bazel/remote/execution/v2/remote_execution.proto delete mode 100644 proto/prost/private/tests/complex_imports/remote-apis/build/bazel/semver/BUILD.bazel delete mode 100644 proto/prost/private/tests/complex_imports/remote-apis/build/bazel/semver/semver.proto diff --git a/proto/prost/private/protoc_wrapper.rs b/proto/prost/private/protoc_wrapper.rs index 38a19196c4..817faac9b0 100644 --- a/proto/prost/private/protoc_wrapper.rs +++ b/proto/prost/private/protoc_wrapper.rs @@ -30,6 +30,7 @@ fn find_generated_rust_files(out_dir: &Path) -> BTreeSet { all_rs_files.insert(path); } } else if let Some(name) = path.file_name() { + // The filename is set to `_` when the package name is empty. if name == "_" { let rs_name = path.parent().expect("Failed to get parent").join("_.rs"); fs::rename(&path, &rs_name).unwrap_or_else(|err| { diff --git a/proto/prost/private/tests/bazel_remote_apis/BUILD.bazel b/proto/prost/private/tests/bazel_remote_apis/BUILD.bazel new file mode 100644 index 0000000000..e763e1d530 --- /dev/null +++ b/proto/prost/private/tests/bazel_remote_apis/BUILD.bazel @@ -0,0 +1,32 @@ +load("@rules_rust//proto/prost:defs.bzl", "rust_prost_library", "rust_tonic_library") +load("//rust:defs.bzl", "rust_test") + +rust_tonic_library( + name = "remote_execution_rs_proto", + proto = "@bazel_remote_apis//build/bazel/remote/execution/v2:remote_execution_proto", + visibility = ["//visibility:public"], +) + +rust_test( + name = "remote_execution_test", + srcs = ["remote_execution_test.rs"], + edition = "2021", + deps = [ + ":remote_execution_rs_proto", + ], +) + +rust_prost_library( + name = "semver_rs_proto", + proto = "@bazel_remote_apis//build/bazel/semver:semver_proto", + visibility = ["//visibility:public"], +) + +rust_test( + name = "semver_test", + srcs = ["semver_test.rs"], + edition = "2021", + deps = [ + ":semver_rs_proto", + ], +) diff --git a/proto/prost/private/tests/complex_imports/remote-apis/build/bazel/remote/execution/v2/remoteexecution_test.rs b/proto/prost/private/tests/bazel_remote_apis/remote_execution_test.rs similarity index 74% rename from proto/prost/private/tests/complex_imports/remote-apis/build/bazel/remote/execution/v2/remoteexecution_test.rs rename to proto/prost/private/tests/bazel_remote_apis/remote_execution_test.rs index a582e7ad6d..c0e2608abb 100644 --- a/proto/prost/private/tests/complex_imports/remote-apis/build/bazel/remote/execution/v2/remoteexecution_test.rs +++ b/proto/prost/private/tests/bazel_remote_apis/remote_execution_test.rs @@ -1,6 +1,6 @@ //! Tests the remote execution protos. -use remoteexecution_proto::build::bazel::remote::execution::v2::Digest; +use remote_execution_proto::build::bazel::remote::execution::v2::Digest; #[test] fn test_remote_execution() { diff --git a/proto/prost/private/tests/complex_imports/remote-apis/build/bazel/semver/semver_test.rs b/proto/prost/private/tests/bazel_remote_apis/semver_test.rs similarity index 100% rename from proto/prost/private/tests/complex_imports/remote-apis/build/bazel/semver/semver_test.rs rename to proto/prost/private/tests/bazel_remote_apis/semver_test.rs diff --git a/proto/prost/private/tests/complex_imports/googleapis/google/api/BUILD.bazel b/proto/prost/private/tests/complex_imports/googleapis/google/api/BUILD.bazel deleted file mode 100644 index 5202016fe0..0000000000 --- a/proto/prost/private/tests/complex_imports/googleapis/google/api/BUILD.bazel +++ /dev/null @@ -1,32 +0,0 @@ -load("@rules_proto//proto:defs.bzl", "proto_library") -load("//proto:defs.bzl", "rust_prost_library") -load("//rust:defs.bzl", "rust_test") - -proto_library( - name = "annotations_proto", - srcs = [ - "annotations.proto", - "client.proto", - "field_behavior.proto", - "http.proto", - ], - strip_import_prefix = "/proto/prost/private/tests/complex_imports/googleapis", - visibility = ["//visibility:public"], - deps = [ - "@com_google_protobuf//:descriptor_proto", - ], -) - -rust_prost_library( - name = "annotations_rs_proto", - proto = ":annotations_proto", -) - -rust_test( - name = "annotations_test", - srcs = ["annotations_test.rs"], - edition = "2021", - deps = [ - ":annotations_rs_proto", - ], -) diff --git a/proto/prost/private/tests/complex_imports/googleapis/google/api/annotations.proto b/proto/prost/private/tests/complex_imports/googleapis/google/api/annotations.proto deleted file mode 100644 index efdab3db6c..0000000000 --- a/proto/prost/private/tests/complex_imports/googleapis/google/api/annotations.proto +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2015 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -import "google/api/http.proto"; -import "google/protobuf/descriptor.proto"; - -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "AnnotationsProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -extend google.protobuf.MethodOptions { - // See `HttpRule`. - HttpRule http = 72295728; -} diff --git a/proto/prost/private/tests/complex_imports/googleapis/google/api/annotations_test.rs b/proto/prost/private/tests/complex_imports/googleapis/google/api/annotations_test.rs deleted file mode 100644 index af6ee4fdd6..0000000000 --- a/proto/prost/private/tests/complex_imports/googleapis/google/api/annotations_test.rs +++ /dev/null @@ -1,17 +0,0 @@ -//! Tests the annotations protos. - -use annotations_proto::google::api::http_rule::Pattern; -use annotations_proto::google::api::HttpRule; - -#[test] -fn test_annotations() { - let http_rule = HttpRule { - pattern: Some(Pattern::Get("/v1/{name=shelves/*}/books".to_string())), - ..HttpRule::default() - }; - - assert_eq!( - http_rule.pattern, - Some(Pattern::Get("/v1/{name=shelves/*}/books".to_string())) - ); -} diff --git a/proto/prost/private/tests/complex_imports/googleapis/google/api/client.proto b/proto/prost/private/tests/complex_imports/googleapis/google/api/client.proto deleted file mode 100644 index 3b3fd0c401..0000000000 --- a/proto/prost/private/tests/complex_imports/googleapis/google/api/client.proto +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright 2018 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -import "google/protobuf/descriptor.proto"; - -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "ClientProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -extend google.protobuf.MethodOptions { - // A definition of a client library method signature. - // - // In client libraries, each proto RPC corresponds to one or more methods - // which the end user is able to call, and calls the underlying RPC. - // Normally, this method receives a single argument (a struct or instance - // corresponding to the RPC request object). Defining this field will - // add one or more overloads providing flattened or simpler method signatures - // in some languages. - // - // The fields on the method signature are provided as a comma-separated - // string. - // - // For example, the proto RPC and annotation: - // - // rpc CreateSubscription(CreateSubscriptionRequest) - // returns (Subscription) { - // option (google.api.method_signature) = "name,topic"; - // } - // - // Would add the following Java overload (in addition to the method accepting - // the request object): - // - // public final Subscription createSubscription(String name, String topic) - // - // The following backwards-compatibility guidelines apply: - // - // * Adding this annotation to an unannotated method is backwards - // compatible. - // * Adding this annotation to a method which already has existing - // method signature annotations is backwards compatible if and only if - // the new method signature annotation is last in the sequence. - // * Modifying or removing an existing method signature annotation is - // a breaking change. - // * Re-ordering existing method signature annotations is a breaking - // change. - repeated string method_signature = 1051; -} - -extend google.protobuf.ServiceOptions { - // The hostname for this service. - // This should be specified with no prefix or protocol. - // - // Example: - // - // service Foo { - // option (google.api.default_host) = "foo.googleapi.com"; - // ... - // } - string default_host = 1049; - - // OAuth scopes needed for the client. - // - // Example: - // - // service Foo { - // option (google.api.oauth_scopes) = \ - // "https://www.googleapis.com/auth/cloud-platform"; - // ... - // } - // - // If there is more than one scope, use a comma-separated string: - // - // Example: - // - // service Foo { - // option (google.api.oauth_scopes) = \ - // "https://www.googleapis.com/auth/cloud-platform," - // "https://www.googleapis.com/auth/monitoring"; - // ... - // } - string oauth_scopes = 1050; -} diff --git a/proto/prost/private/tests/complex_imports/googleapis/google/api/field_behavior.proto b/proto/prost/private/tests/complex_imports/googleapis/google/api/field_behavior.proto deleted file mode 100644 index c4abe3b670..0000000000 --- a/proto/prost/private/tests/complex_imports/googleapis/google/api/field_behavior.proto +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright 2018 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -import "google/protobuf/descriptor.proto"; - -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "FieldBehaviorProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -extend google.protobuf.FieldOptions { - // A designation of a specific field behavior (required, output only, etc.) - // in protobuf messages. - // - // Examples: - // - // string name = 1 [(google.api.field_behavior) = REQUIRED]; - // State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // google.protobuf.Duration ttl = 1 - // [(google.api.field_behavior) = INPUT_ONLY]; - // google.protobuf.Timestamp expire_time = 1 - // [(google.api.field_behavior) = OUTPUT_ONLY, - // (google.api.field_behavior) = IMMUTABLE]; - repeated google.api.FieldBehavior field_behavior = 1052; -} - -// An indicator of the behavior of a given field (for example, that a field -// is required in requests, or given as output but ignored as input). -// This **does not** change the behavior in protocol buffers itself; it only -// denotes the behavior and may affect how API tooling handles the field. -// -// Note: This enum **may** receive new values in the future. -enum FieldBehavior { - // Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0; - - // Specifically denotes a field as optional. - // While all fields in protocol buffers are optional, this may be specified - // for emphasis if appropriate. - OPTIONAL = 1; - - // Denotes a field as required. - // This indicates that the field **must** be provided as part of the request, - // and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2; - - // Denotes a field as output only. - // This indicates that the field is provided in responses, but including the - // field in a request does nothing (the server *must* ignore it and - // *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3; - - // Denotes a field as input only. - // This indicates that the field is provided in requests, and the - // corresponding field is not included in output. - INPUT_ONLY = 4; - - // Denotes a field as immutable. - // This indicates that the field may be set once in a request to create a - // resource, but may not be changed thereafter. - IMMUTABLE = 5; - - // Denotes that a (repeated) field is an unordered list. - // This indicates that the service may provide the elements of the list - // in any arbitrary order, rather than the order the user originally - // provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6; - - // Denotes that this field returns a non-empty default value if not set. - // This indicates that if the user provides the empty value in a request, - // a non-empty value will be returned. The user will not be aware of what - // non-empty value to expect. - NON_EMPTY_DEFAULT = 7; -} diff --git a/proto/prost/private/tests/complex_imports/googleapis/google/api/http.proto b/proto/prost/private/tests/complex_imports/googleapis/google/api/http.proto deleted file mode 100644 index 113fa936a0..0000000000 --- a/proto/prost/private/tests/complex_imports/googleapis/google/api/http.proto +++ /dev/null @@ -1,375 +0,0 @@ -// Copyright 2015 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "HttpProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -// Defines the HTTP configuration for an API service. It contains a list of -// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method -// to one or more HTTP REST API methods. -message Http { - // A list of HTTP configuration rules that apply to individual API methods. - // - // **NOTE:** All service configuration rules follow "last one wins" order. - repeated HttpRule rules = 1; - - // When set to true, URL path parameters will be fully URI-decoded except in - // cases of single segment matches in reserved expansion, where "%2F" will be - // left encoded. - // - // The default behavior is to not decode RFC 6570 reserved characters in multi - // segment matches. - bool fully_decode_reserved_expansion = 2; -} - -// # gRPC Transcoding -// -// gRPC Transcoding is a feature for mapping between a gRPC method and one or -// more HTTP REST endpoints. It allows developers to build a single API service -// that supports both gRPC APIs and REST APIs. Many systems, including [Google -// APIs](https://github.com/googleapis/googleapis), -// [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC -// Gateway](https://github.com/grpc-ecosystem/grpc-gateway), -// and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature -// and use it for large scale production services. -// -// `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies -// how different portions of the gRPC request message are mapped to the URL -// path, URL query parameters, and HTTP request body. It also controls how the -// gRPC response message is mapped to the HTTP response body. `HttpRule` is -// typically specified as an `google.api.http` annotation on the gRPC method. -// -// Each mapping specifies a URL path template and an HTTP method. The path -// template may refer to one or more fields in the gRPC request message, as long -// as each field is a non-repeated field with a primitive (non-message) type. -// The path template controls how fields of the request message are mapped to -// the URL path. -// -// Example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get: "/v1/{name=messages/*}" -// }; -// } -// } -// message GetMessageRequest { -// string name = 1; // Mapped to URL path. -// } -// message Message { -// string text = 1; // The resource content. -// } -// -// This enables an HTTP REST to gRPC mapping as below: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")` -// -// Any fields in the request message which are not bound by the path template -// automatically become HTTP query parameters if there is no HTTP request body. -// For example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get:"/v1/messages/{message_id}" -// }; -// } -// } -// message GetMessageRequest { -// message SubMessage { -// string subfield = 1; -// } -// string message_id = 1; // Mapped to URL path. -// int64 revision = 2; // Mapped to URL query parameter `revision`. -// SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. -// } -// -// This enables a HTTP JSON to RPC mapping as below: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456?revision=2&sub.subfield=foo` | -// `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: -// "foo"))` -// -// Note that fields which are mapped to URL query parameters must have a -// primitive type or a repeated primitive type or a non-repeated message type. -// In the case of a repeated type, the parameter can be repeated in the URL -// as `...?param=A¶m=B`. In the case of a message type, each field of the -// message is mapped to a separate parameter, such as -// `...?foo.a=A&foo.b=B&foo.c=C`. -// -// For HTTP methods that allow a request body, the `body` field -// specifies the mapping. Consider a REST update method on the -// message resource collection: -// -// service Messaging { -// rpc UpdateMessage(UpdateMessageRequest) returns (Message) { -// option (google.api.http) = { -// patch: "/v1/messages/{message_id}" -// body: "message" -// }; -// } -// } -// message UpdateMessageRequest { -// string message_id = 1; // mapped to the URL -// Message message = 2; // mapped to the body -// } -// -// The following HTTP JSON to RPC mapping is enabled, where the -// representation of the JSON in the request body is determined by -// protos JSON encoding: -// -// HTTP | gRPC -// -----|----- -// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: -// "123456" message { text: "Hi!" })` -// -// The special name `*` can be used in the body mapping to define that -// every field not bound by the path template should be mapped to the -// request body. This enables the following alternative definition of -// the update method: -// -// service Messaging { -// rpc UpdateMessage(Message) returns (Message) { -// option (google.api.http) = { -// patch: "/v1/messages/{message_id}" -// body: "*" -// }; -// } -// } -// message Message { -// string message_id = 1; -// string text = 2; -// } -// -// -// The following HTTP JSON to RPC mapping is enabled: -// -// HTTP | gRPC -// -----|----- -// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: -// "123456" text: "Hi!")` -// -// Note that when using `*` in the body mapping, it is not possible to -// have HTTP parameters, as all fields not bound by the path end in -// the body. This makes this option more rarely used in practice when -// defining REST APIs. The common usage of `*` is in custom methods -// which don't use the URL at all for transferring data. -// -// It is possible to define multiple HTTP methods for one RPC by using -// the `additional_bindings` option. Example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get: "/v1/messages/{message_id}" -// additional_bindings { -// get: "/v1/users/{user_id}/messages/{message_id}" -// } -// }; -// } -// } -// message GetMessageRequest { -// string message_id = 1; -// string user_id = 2; -// } -// -// This enables the following two alternative HTTP JSON to RPC mappings: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` -// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: -// "123456")` -// -// ## Rules for HTTP mapping -// -// 1. Leaf request fields (recursive expansion nested messages in the request -// message) are classified into three categories: -// - Fields referred by the path template. They are passed via the URL path. -// - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They are passed via the HTTP -// request body. -// - All other fields are passed via the URL query parameters, and the -// parameter name is the field path in the request message. A repeated -// field can be represented as multiple query parameters under the same -// name. -// 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL query parameter, all fields -// are passed via URL path and HTTP request body. -// 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP request body, all -// fields are passed via URL path and URL query parameters. -// -// ### Path template syntax -// -// Template = "/" Segments [ Verb ] ; -// Segments = Segment { "/" Segment } ; -// Segment = "*" | "**" | LITERAL | Variable ; -// Variable = "{" FieldPath [ "=" Segments ] "}" ; -// FieldPath = IDENT { "." IDENT } ; -// Verb = ":" LITERAL ; -// -// The syntax `*` matches a single URL path segment. The syntax `**` matches -// zero or more URL path segments, which must be the last part of the URL path -// except the `Verb`. -// -// The syntax `Variable` matches part of the URL path as specified by its -// template. A variable template must not contain other variables. If a variable -// matches a single path segment, its template may be omitted, e.g. `{var}` -// is equivalent to `{var=*}`. -// -// The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` -// contains any reserved character, such characters should be percent-encoded -// before the matching. -// -// If a variable contains exactly one path segment, such as `"{var}"` or -// `"{var=*}"`, when such a variable is expanded into a URL path on the client -// side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The -// server side does the reverse decoding. Such variables show up in the -// [Discovery -// Document](https://developers.google.com/discovery/v1/reference/apis) as -// `{var}`. -// -// If a variable contains multiple path segments, such as `"{var=foo/*}"` -// or `"{var=**}"`, when such a variable is expanded into a URL path on the -// client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. -// The server side does the reverse decoding, except "%2F" and "%2f" are left -// unchanged. Such variables show up in the -// [Discovery -// Document](https://developers.google.com/discovery/v1/reference/apis) as -// `{+var}`. -// -// ## Using gRPC API Service Configuration -// -// gRPC API Service Configuration (service config) is a configuration language -// for configuring a gRPC service to become a user-facing product. The -// service config is simply the YAML representation of the `google.api.Service` -// proto message. -// -// As an alternative to annotating your proto file, you can configure gRPC -// transcoding in your service config YAML files. You do this by specifying a -// `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same -// effect as the proto annotation. This can be particularly useful if you -// have a proto that is reused in multiple services. Note that any transcoding -// specified in the service config will override any matching transcoding -// configuration in the proto. -// -// Example: -// -// http: -// rules: -// # Selects a gRPC method and applies HttpRule to it. -// - selector: example.v1.Messaging.GetMessage -// get: /v1/messages/{message_id}/{sub.subfield} -// -// ## Special notes -// -// When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the -// proto to JSON conversion must follow the [proto3 -// specification](https://developers.google.com/protocol-buffers/docs/proto3#json). -// -// While the single segment variable follows the semantics of -// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String -// Expansion, the multi segment variable **does not** follow RFC 6570 Section -// 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion -// does not expand special characters like `?` and `#`, which would lead -// to invalid URLs. As the result, gRPC Transcoding uses a custom encoding -// for multi segment variables. -// -// The path variables **must not** refer to any repeated or mapped field, -// because client libraries are not capable of handling such variable expansion. -// -// The path variables **must not** capture the leading "/" character. The reason -// is that the most common use case "{var}" does not capture the leading "/" -// character. For consistency, all path variables must share the same behavior. -// -// Repeated message fields must not be mapped to URL query parameters, because -// no client library can support such complicated mapping. -// -// If an API needs to use a JSON array for request or response body, it can map -// the request or response body to a repeated field. However, some gRPC -// Transcoding implementations may not support this feature. -message HttpRule { - // Selects a method to which this rule applies. - // - // Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - string selector = 1; - - // Determines the URL pattern is matched by this rules. This pattern can be - // used with any of the {get|put|post|delete|patch} methods. A custom method - // can be defined using the 'custom' field. - oneof pattern { - // Maps to HTTP GET. Used for listing and getting information about - // resources. - string get = 2; - - // Maps to HTTP PUT. Used for replacing a resource. - string put = 3; - - // Maps to HTTP POST. Used for creating a resource or performing an action. - string post = 4; - - // Maps to HTTP DELETE. Used for deleting a resource. - string delete = 5; - - // Maps to HTTP PATCH. Used for updating a resource. - string patch = 6; - - // The custom pattern is used for specifying an HTTP method that is not - // included in the `pattern` field, such as HEAD, or "*" to leave the - // HTTP method unspecified for this rule. The wild-card rule is useful - // for services that provide content to Web (HTML) clients. - CustomHttpPattern custom = 8; - } - - // The name of the request field whose value is mapped to the HTTP request - // body, or `*` for mapping all request fields not captured by the path - // pattern to the HTTP body, or omitted for not having any HTTP request body. - // - // NOTE: the referred field must be present at the top-level of the request - // message type. - string body = 7; - - // Optional. The name of the response field whose value is mapped to the HTTP - // response body. When omitted, the entire response message will be used - // as the HTTP response body. - // - // NOTE: The referred field must be present at the top-level of the response - // message type. - string response_body = 12; - - // Additional HTTP bindings for the selector. Nested bindings must - // not contain an `additional_bindings` field themselves (that is, - // the nesting may only be one level deep). - repeated HttpRule additional_bindings = 11; -} - -// A custom pattern is used for defining custom HTTP verb. -message CustomHttpPattern { - // The name of this custom HTTP verb. - string kind = 1; - - // The path matched by this custom verb. - string path = 2; -} diff --git a/proto/prost/private/tests/complex_imports/googleapis/google/bytestream/BUILD.bazel b/proto/prost/private/tests/complex_imports/googleapis/google/bytestream/BUILD.bazel deleted file mode 100644 index 1188906701..0000000000 --- a/proto/prost/private/tests/complex_imports/googleapis/google/bytestream/BUILD.bazel +++ /dev/null @@ -1,23 +0,0 @@ -load("@rules_proto//proto:defs.bzl", "proto_library") -load("//proto:defs.bzl", "rust_tonic_library") -load("//rust:defs.bzl", "rust_test") - -proto_library( - name = "bytestream_proto", - srcs = ["bytestream.proto"], - visibility = ["//visibility:public"], -) - -rust_tonic_library( - name = "bytestream_rs_proto", - proto = ":bytestream_proto", -) - -rust_test( - name = "bytestream_test", - srcs = ["bytestream_test.rs"], - edition = "2021", - deps = [ - ":bytestream_rs_proto", - ], -) diff --git a/proto/prost/private/tests/complex_imports/googleapis/google/bytestream/bytestream.proto b/proto/prost/private/tests/complex_imports/googleapis/google/bytestream/bytestream.proto deleted file mode 100644 index 2974601b76..0000000000 --- a/proto/prost/private/tests/complex_imports/googleapis/google/bytestream/bytestream.proto +++ /dev/null @@ -1,178 +0,0 @@ -// Copyright 2016 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.bytestream; - -option go_package = "google.golang.org/genproto/googleapis/bytestream;bytestream"; -option java_outer_classname = "ByteStreamProto"; -option java_package = "com.google.bytestream"; - -// #### Introduction -// -// The Byte Stream API enables a client to read and write a stream of bytes to -// and from a resource. Resources have names, and these names are supplied in -// the API calls below to identify the resource that is being read from or -// written to. -// -// All implementations of the Byte Stream API export the interface defined here: -// -// * `Read()`: Reads the contents of a resource. -// -// * `Write()`: Writes the contents of a resource. The client can call `Write()` -// multiple times with the same resource and can check the status of the write -// by calling `QueryWriteStatus()`. -// -// #### Service parameters and metadata -// -// The ByteStream API provides no direct way to access/modify any metadata -// associated with the resource. -// -// #### Errors -// -// The errors returned by the service are in the Google canonical error space. -service ByteStream { - // `Read()` is used to retrieve the contents of a resource as a sequence - // of bytes. The bytes are returned in a sequence of responses, and the - // responses are delivered as the results of a server-side streaming RPC. - rpc Read(ReadRequest) returns (stream ReadResponse); - - // `Write()` is used to send the contents of a resource as a sequence of - // bytes. The bytes are sent in a sequence of request protos of a client-side - // streaming RPC. - // - // A `Write()` action is resumable. If there is an error or the connection is - // broken during the `Write()`, the client should check the status of the - // `Write()` by calling `QueryWriteStatus()` and continue writing from the - // returned `committed_size`. This may be less than the amount of data the - // client previously sent. - // - // Calling `Write()` on a resource name that was previously written and - // finalized could cause an error, depending on whether the underlying service - // allows over-writing of previously written resources. - // - // When the client closes the request channel, the service will respond with - // a `WriteResponse`. The service will not view the resource as `complete` - // until the client has sent a `WriteRequest` with `finish_write` set to - // `true`. Sending any requests on a stream after sending a request with - // `finish_write` set to `true` will cause an error. The client **should** - // check the `WriteResponse` it receives to determine how much data the - // service was able to commit and whether the service views the resource as - // `complete` or not. - rpc Write(stream WriteRequest) returns (WriteResponse); - - // `QueryWriteStatus()` is used to find the `committed_size` for a resource - // that is being written, which can then be used as the `write_offset` for - // the next `Write()` call. - // - // If the resource does not exist (i.e., the resource has been deleted, or the - // first `Write()` has not yet reached the service), this method returns the - // error `NOT_FOUND`. - // - // The client **may** call `QueryWriteStatus()` at any time to determine how - // much data has been processed for this resource. This is useful if the - // client is buffering data and needs to know which data can be safely - // evicted. For any sequence of `QueryWriteStatus()` calls for a given - // resource name, the sequence of returned `committed_size` values will be - // non-decreasing. - rpc QueryWriteStatus(QueryWriteStatusRequest) - returns (QueryWriteStatusResponse); -} - -// Request object for ByteStream.Read. -message ReadRequest { - // The name of the resource to read. - string resource_name = 1; - - // The offset for the first byte to return in the read, relative to the start - // of the resource. - // - // A `read_offset` that is negative or greater than the size of the resource - // will cause an `OUT_OF_RANGE` error. - int64 read_offset = 2; - - // The maximum number of `data` bytes the server is allowed to return in the - // sum of all `ReadResponse` messages. A `read_limit` of zero indicates that - // there is no limit, and a negative `read_limit` will cause an error. - // - // If the stream returns fewer bytes than allowed by the `read_limit` and no - // error occurred, the stream includes all data from the `read_offset` to the - // end of the resource. - int64 read_limit = 3; -} - -// Response object for ByteStream.Read. -message ReadResponse { - // A portion of the data for the resource. The service **may** leave `data` - // empty for any given `ReadResponse`. This enables the service to inform the - // client that the request is still live while it is running an operation to - // generate more data. - bytes data = 10; -} - -// Request object for ByteStream.Write. -message WriteRequest { - // The name of the resource to write. This **must** be set on the first - // `WriteRequest` of each `Write()` action. If it is set on subsequent calls, - // it **must** match the value of the first request. - string resource_name = 1; - - // The offset from the beginning of the resource at which the data should be - // written. It is required on all `WriteRequest`s. - // - // In the first `WriteRequest` of a `Write()` action, it indicates - // the initial offset for the `Write()` call. The value **must** be equal to - // the `committed_size` that a call to `QueryWriteStatus()` would return. - // - // On subsequent calls, this value **must** be set and **must** be equal to - // the sum of the first `write_offset` and the sizes of all `data` bundles - // sent previously on this stream. - // - // An incorrect value will cause an error. - int64 write_offset = 2; - - // If `true`, this indicates that the write is complete. Sending any - // `WriteRequest`s subsequent to one in which `finish_write` is `true` will - // cause an error. - bool finish_write = 3; - - // A portion of the data for the resource. The client **may** leave `data` - // empty for any given `WriteRequest`. This enables the client to inform the - // service that the request is still live while it is running an operation to - // generate more data. - bytes data = 10; -} - -// Response object for ByteStream.Write. -message WriteResponse { - // The number of bytes that have been processed for the given resource. - int64 committed_size = 1; -} - -// Request object for ByteStream.QueryWriteStatus. -message QueryWriteStatusRequest { - // The name of the resource whose write status is being requested. - string resource_name = 1; -} - -// Response object for ByteStream.QueryWriteStatus. -message QueryWriteStatusResponse { - // The number of bytes that have been processed for the given resource. - int64 committed_size = 1; - - // `complete` is `true` only if the client has sent a `WriteRequest` with - // `finish_write` set to true, and the server has processed that request. - bool complete = 2; -} diff --git a/proto/prost/private/tests/complex_imports/googleapis/google/bytestream/bytestream_test.rs b/proto/prost/private/tests/complex_imports/googleapis/google/bytestream/bytestream_test.rs deleted file mode 100644 index 16e38fe976..0000000000 --- a/proto/prost/private/tests/complex_imports/googleapis/google/bytestream/bytestream_test.rs +++ /dev/null @@ -1,15 +0,0 @@ -//! Tests the bytestream protos. - -use bytestream_proto::google::bytestream::WriteRequest; - -#[test] -fn test_bytestream() { - let write_request = WriteRequest { - resource_name: "resource_name".to_string(), - write_offset: 0, - finish_write: false, - data: vec![0, 1, 2, 3], - }; - - assert_eq!(write_request.resource_name, "resource_name") -} diff --git a/proto/prost/private/tests/complex_imports/googleapis/google/longrunning/BUILD.bazel b/proto/prost/private/tests/complex_imports/googleapis/google/longrunning/BUILD.bazel deleted file mode 100644 index 25ffd4a221..0000000000 --- a/proto/prost/private/tests/complex_imports/googleapis/google/longrunning/BUILD.bazel +++ /dev/null @@ -1,32 +0,0 @@ -load("@rules_proto//proto:defs.bzl", "proto_library") -load("//proto:defs.bzl", "rust_tonic_library") -load("//rust:defs.bzl", "rust_test") - -proto_library( - name = "longrunning_proto", - srcs = ["operations.proto"], - strip_import_prefix = "/proto/prost/private/tests/complex_imports/googleapis", - visibility = ["//visibility:public"], - deps = [ - "//proto/prost/private/tests/complex_imports/googleapis/google/api:annotations_proto", - "//proto/prost/private/tests/complex_imports/googleapis/google/rpc:status_proto", - "@com_google_protobuf//:any_proto", - "@com_google_protobuf//:descriptor_proto", - "@com_google_protobuf//:duration_proto", - "@com_google_protobuf//:empty_proto", - ], -) - -rust_tonic_library( - name = "longrunning_rs_proto", - proto = ":longrunning_proto", -) - -rust_test( - name = "longrunning_test", - srcs = ["longrunning_test.rs"], - edition = "2021", - deps = [ - ":longrunning_rs_proto", - ], -) diff --git a/proto/prost/private/tests/complex_imports/googleapis/google/longrunning/longrunning_test.rs b/proto/prost/private/tests/complex_imports/googleapis/google/longrunning/longrunning_test.rs deleted file mode 100644 index e3414a20e4..0000000000 --- a/proto/prost/private/tests/complex_imports/googleapis/google/longrunning/longrunning_test.rs +++ /dev/null @@ -1,12 +0,0 @@ -//! Tests the longrunning protos. - -use longrunning_proto::google::longrunning::GetOperationRequest; - -#[test] -fn test_longrunning() { - let get_operation_request = GetOperationRequest { - name: "name".to_string(), - }; - - assert_eq!(get_operation_request.name, "name") -} diff --git a/proto/prost/private/tests/complex_imports/googleapis/google/longrunning/operations.proto b/proto/prost/private/tests/complex_imports/googleapis/google/longrunning/operations.proto deleted file mode 100644 index c1fdc6f529..0000000000 --- a/proto/prost/private/tests/complex_imports/googleapis/google/longrunning/operations.proto +++ /dev/null @@ -1,247 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.longrunning; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/empty.proto"; -import "google/rpc/status.proto"; -import "google/protobuf/descriptor.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.LongRunning"; -option go_package = "google.golang.org/genproto/googleapis/longrunning;longrunning"; -option java_multiple_files = true; -option java_outer_classname = "OperationsProto"; -option java_package = "com.google.longrunning"; -option php_namespace = "Google\\LongRunning"; - -extend google.protobuf.MethodOptions { - // Additional information regarding long-running operations. - // In particular, this specifies the types that are returned from - // long-running operations. - // - // Required for methods that return `google.longrunning.Operation`; invalid - // otherwise. - google.longrunning.OperationInfo operation_info = 1049; -} - -// Manages long-running operations with an API service. -// -// When an API method normally takes long time to complete, it can be designed -// to return [Operation][google.longrunning.Operation] to the client, and the client can use this -// interface to receive the real response asynchronously by polling the -// operation resource, or pass the operation resource to another API (such as -// Google Cloud Pub/Sub API) to receive the response. Any API service that -// returns long-running operations should implement the `Operations` interface -// so developers can have a consistent client experience. -service Operations { - option (google.api.default_host) = "longrunning.googleapis.com"; - - // Lists operations that match the specified filter in the request. If the - // server doesn't support this method, it returns `UNIMPLEMENTED`. - // - // NOTE: the `name` binding allows API services to override the binding - // to use different resource name schemes, such as `users/*/operations`. To - // override the binding, API services can add a binding such as - // `"/v1/{name=users/*}/operations"` to their service configuration. - // For backwards compatibility, the default name includes the operations - // collection id, however overriding users must ensure the name binding - // is the parent resource, without the operations collection id. - rpc ListOperations(ListOperationsRequest) returns (ListOperationsResponse) { - option (google.api.http) = { - get: "/v1/{name=operations}" - }; - option (google.api.method_signature) = "name,filter"; - } - - // Gets the latest state of a long-running operation. Clients can use this - // method to poll the operation result at intervals as recommended by the API - // service. - rpc GetOperation(GetOperationRequest) returns (Operation) { - option (google.api.http) = { - get: "/v1/{name=operations/**}" - }; - option (google.api.method_signature) = "name"; - } - - // Deletes a long-running operation. This method indicates that the client is - // no longer interested in the operation result. It does not cancel the - // operation. If the server doesn't support this method, it returns - // `google.rpc.Code.UNIMPLEMENTED`. - rpc DeleteOperation(DeleteOperationRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1/{name=operations/**}" - }; - option (google.api.method_signature) = "name"; - } - - // Starts asynchronous cancellation on a long-running operation. The server - // makes a best effort to cancel the operation, but success is not - // guaranteed. If the server doesn't support this method, it returns - // `google.rpc.Code.UNIMPLEMENTED`. Clients can use - // [Operations.GetOperation][google.longrunning.Operations.GetOperation] or - // other methods to check whether the cancellation succeeded or whether the - // operation completed despite cancellation. On successful cancellation, - // the operation is not deleted; instead, it becomes an operation with - // an [Operation.error][google.longrunning.Operation.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, - // corresponding to `Code.CANCELLED`. - rpc CancelOperation(CancelOperationRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - post: "/v1/{name=operations/**}:cancel" - body: "*" - }; - option (google.api.method_signature) = "name"; - } - - // Waits until the specified long-running operation is done or reaches at most - // a specified timeout, returning the latest state. If the operation is - // already done, the latest state is immediately returned. If the timeout - // specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - // timeout is used. If the server does not support this method, it returns - // `google.rpc.Code.UNIMPLEMENTED`. - // Note that this method is on a best-effort basis. It may return the latest - // state before the specified timeout (including immediately), meaning even an - // immediate response is no guarantee that the operation is done. - rpc WaitOperation(WaitOperationRequest) returns (Operation) { - } -} - -// This resource represents a long-running operation that is the result of a -// network API call. -message Operation { - // The server-assigned name, which is only unique within the same service that - // originally returns it. If you use the default HTTP mapping, the - // `name` should be a resource name ending with `operations/{unique_id}`. - string name = 1; - - // Service-specific metadata associated with the operation. It typically - // contains progress information and common metadata such as create time. - // Some services might not provide such metadata. Any method that returns a - // long-running operation should document the metadata type, if any. - google.protobuf.Any metadata = 2; - - // If the value is `false`, it means the operation is still in progress. - // If `true`, the operation is completed, and either `error` or `response` is - // available. - bool done = 3; - - // The operation result, which can be either an `error` or a valid `response`. - // If `done` == `false`, neither `error` nor `response` is set. - // If `done` == `true`, exactly one of `error` or `response` is set. - oneof result { - // The error result of the operation in case of failure or cancellation. - google.rpc.Status error = 4; - - // The normal response of the operation in case of success. If the original - // method returns no data on success, such as `Delete`, the response is - // `google.protobuf.Empty`. If the original method is standard - // `Get`/`Create`/`Update`, the response should be the resource. For other - // methods, the response should have the type `XxxResponse`, where `Xxx` - // is the original method name. For example, if the original method name - // is `TakeSnapshot()`, the inferred response type is - // `TakeSnapshotResponse`. - google.protobuf.Any response = 5; - } -} - -// The request message for [Operations.GetOperation][google.longrunning.Operations.GetOperation]. -message GetOperationRequest { - // The name of the operation resource. - string name = 1; -} - -// The request message for [Operations.ListOperations][google.longrunning.Operations.ListOperations]. -message ListOperationsRequest { - // The name of the operation's parent resource. - string name = 4; - - // The standard list filter. - string filter = 1; - - // The standard list page size. - int32 page_size = 2; - - // The standard list page token. - string page_token = 3; -} - -// The response message for [Operations.ListOperations][google.longrunning.Operations.ListOperations]. -message ListOperationsResponse { - // A list of operations that matches the specified filter in the request. - repeated Operation operations = 1; - - // The standard List next-page token. - string next_page_token = 2; -} - -// The request message for [Operations.CancelOperation][google.longrunning.Operations.CancelOperation]. -message CancelOperationRequest { - // The name of the operation resource to be cancelled. - string name = 1; -} - -// The request message for [Operations.DeleteOperation][google.longrunning.Operations.DeleteOperation]. -message DeleteOperationRequest { - // The name of the operation resource to be deleted. - string name = 1; -} - -// The request message for [Operations.WaitOperation][google.longrunning.Operations.WaitOperation]. -message WaitOperationRequest { - // The name of the operation resource to wait on. - string name = 1; - - // The maximum duration to wait before timing out. If left blank, the wait - // will be at most the time permitted by the underlying HTTP/RPC protocol. - // If RPC context deadline is also specified, the shorter one will be used. - google.protobuf.Duration timeout = 2; -} - -// A message representing the message types used by a long-running operation. -// -// Example: -// -// rpc LongRunningRecognize(LongRunningRecognizeRequest) -// returns (google.longrunning.Operation) { -// option (google.longrunning.operation_info) = { -// response_type: "LongRunningRecognizeResponse" -// metadata_type: "LongRunningRecognizeMetadata" -// }; -// } -message OperationInfo { - // Required. The message name of the primary return type for this - // long-running operation. - // This type will be used to deserialize the LRO's response. - // - // If the response is in a different package from the rpc, a fully-qualified - // message name must be used (e.g. `google.protobuf.Struct`). - // - // Note: Altering this value constitutes a breaking change. - string response_type = 1; - - // Required. The message name of the metadata type for this long-running - // operation. - // - // If the response is in a different package from the rpc, a fully-qualified - // message name must be used (e.g. `google.protobuf.Struct`). - // - // Note: Altering this value constitutes a breaking change. - string metadata_type = 2; -} diff --git a/proto/prost/private/tests/complex_imports/googleapis/google/rpc/BUILD.bazel b/proto/prost/private/tests/complex_imports/googleapis/google/rpc/BUILD.bazel deleted file mode 100644 index 8f38b4d9a1..0000000000 --- a/proto/prost/private/tests/complex_imports/googleapis/google/rpc/BUILD.bazel +++ /dev/null @@ -1,62 +0,0 @@ -load("@rules_proto//proto:defs.bzl", "proto_library") -load("//proto:defs.bzl", "rust_prost_library") -load("//rust:defs.bzl", "rust_test") - -proto_library( - name = "code_proto", - srcs = [ - "code.proto", - ], - strip_import_prefix = "/proto/prost/private/tests/complex_imports/googleapis", - visibility = ["//visibility:public"], -) - -proto_library( - name = "error_details_proto", - srcs = [ - "error_details.proto", - ], - strip_import_prefix = "/proto/prost/private/tests/complex_imports/googleapis", - visibility = ["//visibility:public"], - deps = [ - "@com_google_protobuf//:duration_proto", - ], -) - -proto_library( - name = "status_proto", - srcs = [ - "status.proto", - ], - strip_import_prefix = "/proto/prost/private/tests/complex_imports/googleapis", - visibility = ["//visibility:public"], - deps = [ - "@com_google_protobuf//:any_proto", - ], -) - -rust_prost_library( - name = "code_rs_proto", - proto = ":code_proto", -) - -rust_prost_library( - name = "error_details_rs_proto", - proto = ":error_details_proto", -) - -rust_prost_library( - name = "status_rs_proto", - proto = ":status_proto", -) - -rust_test( - name = "rpc_test", - srcs = ["rpc_test.rs"], - edition = "2021", - deps = [ - ":code_rs_proto", - ":error_details_rs_proto", - ":status_rs_proto", - ], -) diff --git a/proto/prost/private/tests/complex_imports/googleapis/google/rpc/code.proto b/proto/prost/private/tests/complex_imports/googleapis/google/rpc/code.proto deleted file mode 100644 index 98ae0ac18f..0000000000 --- a/proto/prost/private/tests/complex_imports/googleapis/google/rpc/code.proto +++ /dev/null @@ -1,186 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.rpc; - -option go_package = "google.golang.org/genproto/googleapis/rpc/code;code"; -option java_multiple_files = true; -option java_outer_classname = "CodeProto"; -option java_package = "com.google.rpc"; -option objc_class_prefix = "RPC"; - -// The canonical error codes for gRPC APIs. -// -// -// Sometimes multiple error codes may apply. Services should return -// the most specific error code that applies. For example, prefer -// `OUT_OF_RANGE` over `FAILED_PRECONDITION` if both codes apply. -// Similarly prefer `NOT_FOUND` or `ALREADY_EXISTS` over `FAILED_PRECONDITION`. -enum Code { - // Not an error; returned on success - // - // HTTP Mapping: 200 OK - OK = 0; - - // The operation was cancelled, typically by the caller. - // - // HTTP Mapping: 499 Client Closed Request - CANCELLED = 1; - - // Unknown error. For example, this error may be returned when - // a `Status` value received from another address space belongs to - // an error space that is not known in this address space. Also - // errors raised by APIs that do not return enough error information - // may be converted to this error. - // - // HTTP Mapping: 500 Internal Server Error - UNKNOWN = 2; - - // The client specified an invalid argument. Note that this differs - // from `FAILED_PRECONDITION`. `INVALID_ARGUMENT` indicates arguments - // that are problematic regardless of the state of the system - // (e.g., a malformed file name). - // - // HTTP Mapping: 400 Bad Request - INVALID_ARGUMENT = 3; - - // The deadline expired before the operation could complete. For operations - // that change the state of the system, this error may be returned - // even if the operation has completed successfully. For example, a - // successful response from a server could have been delayed long - // enough for the deadline to expire. - // - // HTTP Mapping: 504 Gateway Timeout - DEADLINE_EXCEEDED = 4; - - // Some requested entity (e.g., file or directory) was not found. - // - // Note to server developers: if a request is denied for an entire class - // of users, such as gradual feature rollout or undocumented whitelist, - // `NOT_FOUND` may be used. If a request is denied for some users within - // a class of users, such as user-based access control, `PERMISSION_DENIED` - // must be used. - // - // HTTP Mapping: 404 Not Found - NOT_FOUND = 5; - - // The entity that a client attempted to create (e.g., file or directory) - // already exists. - // - // HTTP Mapping: 409 Conflict - ALREADY_EXISTS = 6; - - // The caller does not have permission to execute the specified - // operation. `PERMISSION_DENIED` must not be used for rejections - // caused by exhausting some resource (use `RESOURCE_EXHAUSTED` - // instead for those errors). `PERMISSION_DENIED` must not be - // used if the caller can not be identified (use `UNAUTHENTICATED` - // instead for those errors). This error code does not imply the - // request is valid or the requested entity exists or satisfies - // other pre-conditions. - // - // HTTP Mapping: 403 Forbidden - PERMISSION_DENIED = 7; - - // The request does not have valid authentication credentials for the - // operation. - // - // HTTP Mapping: 401 Unauthorized - UNAUTHENTICATED = 16; - - // Some resource has been exhausted, perhaps a per-user quota, or - // perhaps the entire file system is out of space. - // - // HTTP Mapping: 429 Too Many Requests - RESOURCE_EXHAUSTED = 8; - - // The operation was rejected because the system is not in a state - // required for the operation's execution. For example, the directory - // to be deleted is non-empty, an rmdir operation is applied to - // a non-directory, etc. - // - // Service implementors can use the following guidelines to decide - // between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`: - // (a) Use `UNAVAILABLE` if the client can retry just the failing call. - // (b) Use `ABORTED` if the client should retry at a higher level - // (e.g., when a client-specified test-and-set fails, indicating the - // client should restart a read-modify-write sequence). - // (c) Use `FAILED_PRECONDITION` if the client should not retry until - // the system state has been explicitly fixed. E.g., if an "rmdir" - // fails because the directory is non-empty, `FAILED_PRECONDITION` - // should be returned since the client should not retry unless - // the files are deleted from the directory. - // - // HTTP Mapping: 400 Bad Request - FAILED_PRECONDITION = 9; - - // The operation was aborted, typically due to a concurrency issue such as - // a sequencer check failure or transaction abort. - // - // See the guidelines above for deciding between `FAILED_PRECONDITION`, - // `ABORTED`, and `UNAVAILABLE`. - // - // HTTP Mapping: 409 Conflict - ABORTED = 10; - - // The operation was attempted past the valid range. E.g., seeking or - // reading past end-of-file. - // - // Unlike `INVALID_ARGUMENT`, this error indicates a problem that may - // be fixed if the system state changes. For example, a 32-bit file - // system will generate `INVALID_ARGUMENT` if asked to read at an - // offset that is not in the range [0,2^32-1], but it will generate - // `OUT_OF_RANGE` if asked to read from an offset past the current - // file size. - // - // There is a fair bit of overlap between `FAILED_PRECONDITION` and - // `OUT_OF_RANGE`. We recommend using `OUT_OF_RANGE` (the more specific - // error) when it applies so that callers who are iterating through - // a space can easily look for an `OUT_OF_RANGE` error to detect when - // they are done. - // - // HTTP Mapping: 400 Bad Request - OUT_OF_RANGE = 11; - - // The operation is not implemented or is not supported/enabled in this - // service. - // - // HTTP Mapping: 501 Not Implemented - UNIMPLEMENTED = 12; - - // Internal errors. This means that some invariants expected by the - // underlying system have been broken. This error code is reserved - // for serious errors. - // - // HTTP Mapping: 500 Internal Server Error - INTERNAL = 13; - - // The service is currently unavailable. This is most likely a - // transient condition, which can be corrected by retrying with - // a backoff. Note that it is not always safe to retry - // non-idempotent operations. - // - // See the guidelines above for deciding between `FAILED_PRECONDITION`, - // `ABORTED`, and `UNAVAILABLE`. - // - // HTTP Mapping: 503 Service Unavailable - UNAVAILABLE = 14; - - // Unrecoverable data loss or corruption. - // - // HTTP Mapping: 500 Internal Server Error - DATA_LOSS = 15; -} diff --git a/proto/prost/private/tests/complex_imports/googleapis/google/rpc/error_details.proto b/proto/prost/private/tests/complex_imports/googleapis/google/rpc/error_details.proto deleted file mode 100644 index c4d6c4b78c..0000000000 --- a/proto/prost/private/tests/complex_imports/googleapis/google/rpc/error_details.proto +++ /dev/null @@ -1,249 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.rpc; - -import "google/protobuf/duration.proto"; - -option go_package = "google.golang.org/genproto/googleapis/rpc/errdetails;errdetails"; -option java_multiple_files = true; -option java_outer_classname = "ErrorDetailsProto"; -option java_package = "com.google.rpc"; -option objc_class_prefix = "RPC"; - -// Describes when the clients can retry a failed request. Clients could ignore -// the recommendation here or retry when this information is missing from error -// responses. -// -// It's always recommended that clients should use exponential backoff when -// retrying. -// -// Clients should wait until `retry_delay` amount of time has passed since -// receiving the error response before retrying. If retrying requests also -// fail, clients should use an exponential backoff scheme to gradually increase -// the delay between retries based on `retry_delay`, until either a maximum -// number of retries have been reached or a maximum retry delay cap has been -// reached. -message RetryInfo { - // Clients should wait at least this long between retrying the same request. - google.protobuf.Duration retry_delay = 1; -} - -// Describes additional debugging info. -message DebugInfo { - // The stack trace entries indicating where the error occurred. - repeated string stack_entries = 1; - - // Additional debugging information provided by the server. - string detail = 2; -} - -// Describes how a quota check failed. -// -// For example if a daily limit was exceeded for the calling project, -// a service could respond with a QuotaFailure detail containing the project -// id and the description of the quota limit that was exceeded. If the -// calling project hasn't enabled the service in the developer console, then -// a service could respond with the project id and set `service_disabled` -// to true. -// -// Also see RetryInfo and Help types for other details about handling a -// quota failure. -message QuotaFailure { - // A message type used to describe a single quota violation. For example, a - // daily quota or a custom quota that was exceeded. - message Violation { - // The subject on which the quota check failed. - // For example, "clientip:" or "project:". - string subject = 1; - - // A description of how the quota check failed. Clients can use this - // description to find more about the quota configuration in the service's - // public documentation, or find the relevant quota limit to adjust through - // developer console. - // - // For example: "Service disabled" or "Daily Limit for read operations - // exceeded". - string description = 2; - } - - // Describes all quota violations. - repeated Violation violations = 1; -} - -// Describes the cause of the error with structured details. -// -// Example of an error when contacting the "pubsub.googleapis.com" API when it -// is not enabled: -// -// { "reason": "API_DISABLED" -// "domain": "googleapis.com" -// "metadata": { -// "resource": "projects/123", -// "service": "pubsub.googleapis.com" -// } -// } -// -// This response indicates that the pubsub.googleapis.com API is not enabled. -// -// Example of an error that is returned when attempting to create a Spanner -// instance in a region that is out of stock: -// -// { "reason": "STOCKOUT" -// "domain": "spanner.googleapis.com", -// "metadata": { -// "availableRegions": "us-central1,us-east2" -// } -// } -message ErrorInfo { - // The reason of the error. This is a constant value that identifies the - // proximate cause of the error. Error reasons are unique within a particular - // domain of errors. This should be at most 63 characters and match - // /[A-Z0-9_]+/. - string reason = 1; - - // The logical grouping to which the "reason" belongs. The error domain - // is typically the registered service name of the tool or product that - // generates the error. Example: "pubsub.googleapis.com". If the error is - // generated by some common infrastructure, the error domain must be a - // globally unique value that identifies the infrastructure. For Google API - // infrastructure, the error domain is "googleapis.com". - string domain = 2; - - // Additional structured details about this error. - // - // Keys should match /[a-zA-Z0-9-_]/ and be limited to 64 characters in - // length. When identifying the current value of an exceeded limit, the units - // should be contained in the key, not the value. For example, rather than - // {"instanceLimit": "100/request"}, should be returned as, - // {"instanceLimitPerRequest": "100"}, if the client exceeds the number of - // instances that can be created in a single (batch) request. - map metadata = 3; -} - -// Describes what preconditions have failed. -// -// For example, if an RPC failed because it required the Terms of Service to be -// acknowledged, it could list the terms of service violation in the -// PreconditionFailure message. -message PreconditionFailure { - // A message type used to describe a single precondition failure. - message Violation { - // The type of PreconditionFailure. We recommend using a service-specific - // enum type to define the supported precondition violation subjects. For - // example, "TOS" for "Terms of Service violation". - string type = 1; - - // The subject, relative to the type, that failed. - // For example, "google.com/cloud" relative to the "TOS" type would indicate - // which terms of service is being referenced. - string subject = 2; - - // A description of how the precondition failed. Developers can use this - // description to understand how to fix the failure. - // - // For example: "Terms of service not accepted". - string description = 3; - } - - // Describes all precondition violations. - repeated Violation violations = 1; -} - -// Describes violations in a client request. This error type focuses on the -// syntactic aspects of the request. -message BadRequest { - // A message type used to describe a single bad request field. - message FieldViolation { - // A path leading to a field in the request body. The value will be a - // sequence of dot-separated identifiers that identify a protocol buffer - // field. E.g., "field_violations.field" would identify this field. - string field = 1; - - // A description of why the request element is bad. - string description = 2; - } - - // Describes all violations in a client request. - repeated FieldViolation field_violations = 1; -} - -// Contains metadata about the request that clients can attach when filing a bug -// or providing other forms of feedback. -message RequestInfo { - // An opaque string that should only be interpreted by the service generating - // it. For example, it can be used to identify requests in the service's logs. - string request_id = 1; - - // Any data that was used to serve this request. For example, an encrypted - // stack trace that can be sent back to the service provider for debugging. - string serving_data = 2; -} - -// Describes the resource that is being accessed. -message ResourceInfo { - // A name for the type of resource being accessed, e.g. "sql table", - // "cloud storage bucket", "file", "Google calendar"; or the type URL - // of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic". - string resource_type = 1; - - // The name of the resource being accessed. For example, a shared calendar - // name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current - // error is [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED]. - string resource_name = 2; - - // The owner of the resource (optional). - // For example, "user:" or "project:". - string owner = 3; - - // Describes what error is encountered when accessing this resource. - // For example, updating a cloud project may require the `writer` permission - // on the developer console project. - string description = 4; -} - -// Provides links to documentation or for performing an out of band action. -// -// For example, if a quota check failed with an error indicating the calling -// project hasn't enabled the accessed service, this can contain a URL pointing -// directly to the right place in the developer console to flip the bit. -message Help { - // Describes a URL link. - message Link { - // Describes what the link offers. - string description = 1; - - // The URL of the link. - string url = 2; - } - - // URL(s) pointing to additional information on handling the current error. - repeated Link links = 1; -} - -// Provides a localized error message that is safe to return to the user -// which can be attached to an RPC error. -message LocalizedMessage { - // The locale used following the specification defined at - // http://www.rfc-editor.org/rfc/bcp/bcp47.txt. - // Examples are: "en-US", "fr-CH", "es-MX" - string locale = 1; - - // The localized error message in the above locale. - string message = 2; -} diff --git a/proto/prost/private/tests/complex_imports/googleapis/google/rpc/rpc_test.rs b/proto/prost/private/tests/complex_imports/googleapis/google/rpc/rpc_test.rs deleted file mode 100644 index 21f1702cad..0000000000 --- a/proto/prost/private/tests/complex_imports/googleapis/google/rpc/rpc_test.rs +++ /dev/null @@ -1,31 +0,0 @@ -//! Tests the rpc protos. - -use code_proto::google::rpc::Code; -use duration_proto::google::protobuf::Duration; -use error_details_proto::google::rpc::RetryInfo; -use status_proto::google::rpc::Status; - -#[test] -fn test_rpc() { - let retry_info = RetryInfo { - retry_delay: Some(Duration { - seconds: 1, - nanos: 2, - }), - }; - assert_eq!( - retry_info.retry_delay, - Some(Duration { - seconds: 1, - nanos: 2, - }) - ); - - let status = Status { - code: Code::Ok.into(), - message: "message".to_string(), - details: vec![], - }; - - assert_eq!(status.code, Code::Ok.into()); -} diff --git a/proto/prost/private/tests/complex_imports/googleapis/google/rpc/status.proto b/proto/prost/private/tests/complex_imports/googleapis/google/rpc/status.proto deleted file mode 100644 index 3b1f7a932f..0000000000 --- a/proto/prost/private/tests/complex_imports/googleapis/google/rpc/status.proto +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.rpc; - -import "google/protobuf/any.proto"; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/rpc/status;status"; -option java_multiple_files = true; -option java_outer_classname = "StatusProto"; -option java_package = "com.google.rpc"; -option objc_class_prefix = "RPC"; - -// The `Status` type defines a logical error model that is suitable for -// different programming environments, including REST APIs and RPC APIs. It is -// used by [gRPC](https://github.com/grpc). Each `Status` message contains -// three pieces of data: error code, error message, and error details. -// -// You can find out more about this error model and how to work with it in the -// [API Design Guide](https://cloud.google.com/apis/design/errors). -message Status { - // The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - int32 code = 1; - - // A developer-facing error message, which should be in English. Any - // user-facing error message should be localized and sent in the - // [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. - string message = 2; - - // A list of messages that carry the error details. There is a common set of - // message types for APIs to use. - repeated google.protobuf.Any details = 3; -} diff --git a/proto/prost/private/tests/complex_imports/remote-apis/build/bazel/remote/execution/v2/BUILD.bazel b/proto/prost/private/tests/complex_imports/remote-apis/build/bazel/remote/execution/v2/BUILD.bazel deleted file mode 100644 index 858efc3009..0000000000 --- a/proto/prost/private/tests/complex_imports/remote-apis/build/bazel/remote/execution/v2/BUILD.bazel +++ /dev/null @@ -1,36 +0,0 @@ -load("@rules_proto//proto:defs.bzl", "proto_library") -load("@rules_rust//proto/prost:defs.bzl", "rust_tonic_library") -load("@rules_rust//rust:defs.bzl", "rust_test") - -proto_library( - name = "remoteexecution_proto", - srcs = ["remote_execution.proto"], - strip_import_prefix = "/proto/prost/private/tests/complex_imports/remote-apis", - visibility = ["//visibility:public"], - deps = [ - "//proto/prost/private/tests/complex_imports/googleapis/google/api:annotations_proto", - "//proto/prost/private/tests/complex_imports/googleapis/google/longrunning:longrunning_proto", - "//proto/prost/private/tests/complex_imports/googleapis/google/rpc:status_proto", - "//proto/prost/private/tests/complex_imports/remote-apis/build/bazel/semver:semver_proto", - "@com_google_protobuf//:any_proto", - "@com_google_protobuf//:duration_proto", - "@com_google_protobuf//:empty_proto", - "@com_google_protobuf//:timestamp_proto", - "@com_google_protobuf//:wrappers_proto", - ], -) - -rust_tonic_library( - name = "remoteexecution_rs_proto", - proto = ":remoteexecution_proto", - visibility = ["//visibility:public"], -) - -rust_test( - name = "remoteexecution_test", - srcs = ["remoteexecution_test.rs"], - edition = "2021", - deps = [ - ":remoteexecution_rs_proto", - ], -) diff --git a/proto/prost/private/tests/complex_imports/remote-apis/build/bazel/remote/execution/v2/remote_execution.proto b/proto/prost/private/tests/complex_imports/remote-apis/build/bazel/remote/execution/v2/remote_execution.proto deleted file mode 100644 index 6f7cdde25a..0000000000 --- a/proto/prost/private/tests/complex_imports/remote-apis/build/bazel/remote/execution/v2/remote_execution.proto +++ /dev/null @@ -1,1795 +0,0 @@ -// Copyright 2018 The Bazel Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package build.bazel.remote.execution.v2; - -import "build/bazel/semver/semver.proto"; -import "google/api/annotations.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/wrappers.proto"; -import "google/rpc/status.proto"; - -option csharp_namespace = "Build.Bazel.Remote.Execution.V2"; -option go_package = "remoteexecution"; -option java_multiple_files = true; -option java_outer_classname = "RemoteExecutionProto"; -option java_package = "build.bazel.remote.execution.v2"; -option objc_class_prefix = "REX"; - - -// The Remote Execution API is used to execute an -// [Action][build.bazel.remote.execution.v2.Action] on the remote -// workers. -// -// As with other services in the Remote Execution API, any call may return an -// error with a [RetryInfo][google.rpc.RetryInfo] error detail providing -// information about when the client should retry the request; clients SHOULD -// respect the information provided. -service Execution { - // Execute an action remotely. - // - // In order to execute an action, the client must first upload all of the - // inputs, the - // [Command][build.bazel.remote.execution.v2.Command] to run, and the - // [Action][build.bazel.remote.execution.v2.Action] into the - // [ContentAddressableStorage][build.bazel.remote.execution.v2.ContentAddressableStorage]. - // It then calls `Execute` with an `action_digest` referring to them. The - // server will run the action and eventually return the result. - // - // The input `Action`'s fields MUST meet the various canonicalization - // requirements specified in the documentation for their types so that it has - // the same digest as other logically equivalent `Action`s. The server MAY - // enforce the requirements and return errors if a non-canonical input is - // received. It MAY also proceed without verifying some or all of the - // requirements, such as for performance reasons. If the server does not - // verify the requirement, then it will treat the `Action` as distinct from - // another logically equivalent action if they hash differently. - // - // Returns a stream of - // [google.longrunning.Operation][google.longrunning.Operation] messages - // describing the resulting execution, with eventual `response` - // [ExecuteResponse][build.bazel.remote.execution.v2.ExecuteResponse]. The - // `metadata` on the operation is of type - // [ExecuteOperationMetadata][build.bazel.remote.execution.v2.ExecuteOperationMetadata]. - // - // If the client remains connected after the first response is returned after - // the server, then updates are streamed as if the client had called - // [WaitExecution][build.bazel.remote.execution.v2.Execution.WaitExecution] - // until the execution completes or the request reaches an error. The - // operation can also be queried using [Operations - // API][google.longrunning.Operations.GetOperation]. - // - // The server NEED NOT implement other methods or functionality of the - // Operations API. - // - // Errors discovered during creation of the `Operation` will be reported - // as gRPC Status errors, while errors that occurred while running the - // action will be reported in the `status` field of the `ExecuteResponse`. The - // server MUST NOT set the `error` field of the `Operation` proto. - // The possible errors include: - // - // * `INVALID_ARGUMENT`: One or more arguments are invalid. - // * `FAILED_PRECONDITION`: One or more errors occurred in setting up the - // action requested, such as a missing input or command or no worker being - // available. The client may be able to fix the errors and retry. - // * `RESOURCE_EXHAUSTED`: There is insufficient quota of some resource to run - // the action. - // * `UNAVAILABLE`: Due to a transient condition, such as all workers being - // occupied (and the server does not support a queue), the action could not - // be started. The client should retry. - // * `INTERNAL`: An internal error occurred in the execution engine or the - // worker. - // * `DEADLINE_EXCEEDED`: The execution timed out. - // * `CANCELLED`: The operation was cancelled by the client. This status is - // only possible if the server implements the Operations API CancelOperation - // method, and it was called for the current execution. - // - // In the case of a missing input or command, the server SHOULD additionally - // send a [PreconditionFailure][google.rpc.PreconditionFailure] error detail - // where, for each requested blob not present in the CAS, there is a - // `Violation` with a `type` of `MISSING` and a `subject` of - // `"blobs/{hash}/{size}"` indicating the digest of the missing blob. - // - // The server does not need to guarantee that a call to this method leads to - // at most one execution of the action. The server MAY execute the action - // multiple times, potentially in parallel. These redundant executions MAY - // continue to run, even if the operation is completed. - rpc Execute(ExecuteRequest) returns (stream google.longrunning.Operation) { - option (google.api.http) = { post: "/v2/{instance_name=**}/actions:execute" body: "*" }; - } - - // Wait for an execution operation to complete. When the client initially - // makes the request, the server immediately responds with the current status - // of the execution. The server will leave the request stream open until the - // operation completes, and then respond with the completed operation. The - // server MAY choose to stream additional updates as execution progresses, - // such as to provide an update as to the state of the execution. - rpc WaitExecution(WaitExecutionRequest) returns (stream google.longrunning.Operation) { - option (google.api.http) = { post: "/v2/{name=operations/**}:waitExecution" body: "*" }; - } -} - -// The action cache API is used to query whether a given action has already been -// performed and, if so, retrieve its result. Unlike the -// [ContentAddressableStorage][build.bazel.remote.execution.v2.ContentAddressableStorage], -// which addresses blobs by their own content, the action cache addresses the -// [ActionResult][build.bazel.remote.execution.v2.ActionResult] by a -// digest of the encoded [Action][build.bazel.remote.execution.v2.Action] -// which produced them. -// -// The lifetime of entries in the action cache is implementation-specific, but -// the server SHOULD assume that more recently used entries are more likely to -// be used again. -// -// As with other services in the Remote Execution API, any call may return an -// error with a [RetryInfo][google.rpc.RetryInfo] error detail providing -// information about when the client should retry the request; clients SHOULD -// respect the information provided. -service ActionCache { - // Retrieve a cached execution result. - // - // Implementations SHOULD ensure that any blobs referenced from the - // [ContentAddressableStorage][build.bazel.remote.execution.v2.ContentAddressableStorage] - // are available at the time of returning the - // [ActionResult][build.bazel.remote.execution.v2.ActionResult] and will be - // for some period of time afterwards. The lifetimes of the referenced blobs SHOULD be increased - // if necessary and applicable. - // - // Errors: - // - // * `NOT_FOUND`: The requested `ActionResult` is not in the cache. - rpc GetActionResult(GetActionResultRequest) returns (ActionResult) { - option (google.api.http) = { get: "/v2/{instance_name=**}/actionResults/{action_digest.hash}/{action_digest.size_bytes}" }; - } - - // Upload a new execution result. - // - // In order to allow the server to perform access control based on the type of - // action, and to assist with client debugging, the client MUST first upload - // the [Action][build.bazel.remote.execution.v2.Execution] that produced the - // result, along with its - // [Command][build.bazel.remote.execution.v2.Command], into the - // `ContentAddressableStorage`. - // - // Server implementations MAY modify the - // `UpdateActionResultRequest.action_result` and return an equivalent value. - // - // Errors: - // - // * `INVALID_ARGUMENT`: One or more arguments are invalid. - // * `FAILED_PRECONDITION`: One or more errors occurred in updating the - // action result, such as a missing command or action. - // * `RESOURCE_EXHAUSTED`: There is insufficient storage space to add the - // entry to the cache. - rpc UpdateActionResult(UpdateActionResultRequest) returns (ActionResult) { - option (google.api.http) = { put: "/v2/{instance_name=**}/actionResults/{action_digest.hash}/{action_digest.size_bytes}" body: "action_result" }; - } -} - -// The CAS (content-addressable storage) is used to store the inputs to and -// outputs from the execution service. Each piece of content is addressed by the -// digest of its binary data. -// -// Most of the binary data stored in the CAS is opaque to the execution engine, -// and is only used as a communication medium. In order to build an -// [Action][build.bazel.remote.execution.v2.Action], -// however, the client will need to also upload the -// [Command][build.bazel.remote.execution.v2.Command] and input root -// [Directory][build.bazel.remote.execution.v2.Directory] for the Action. -// The Command and Directory messages must be marshalled to wire format and then -// uploaded under the hash as with any other piece of content. In practice, the -// input root directory is likely to refer to other Directories in its -// hierarchy, which must also each be uploaded on their own. -// -// For small file uploads the client should group them together and call -// [BatchUpdateBlobs][build.bazel.remote.execution.v2.ContentAddressableStorage.BatchUpdateBlobs]. -// -// For large uploads, the client must use the -// [Write method][google.bytestream.ByteStream.Write] of the ByteStream API. -// -// For uncompressed data, The `WriteRequest.resource_name` is of the following form: -// `{instance_name}/uploads/{uuid}/blobs/{hash}/{size}{/optional_metadata}` -// -// Where: -// * `instance_name` is an identifier, possibly containing multiple path -// segments, used to distinguish between the various instances on the server, -// in a manner defined by the server. If it is the empty path, the leading -// slash is omitted, so that the `resource_name` becomes -// `uploads/{uuid}/blobs/{hash}/{size}{/optional_metadata}`. -// To simplify parsing, a path segment cannot equal any of the following -// keywords: `blobs`, `uploads`, `actions`, `actionResults`, `operations`, -// `capabilities` or `compressed-blobs`. -// * `uuid` is a version 4 UUID generated by the client, used to avoid -// collisions between concurrent uploads of the same data. Clients MAY -// reuse the same `uuid` for uploading different blobs. -// * `hash` and `size` refer to the [Digest][build.bazel.remote.execution.v2.Digest] -// of the data being uploaded. -// * `optional_metadata` is implementation specific data, which clients MAY omit. -// Servers MAY ignore this metadata. -// -// Data can alternatively be uploaded in compressed form, with the following -// `WriteRequest.resource_name` form: -// `{instance_name}/uploads/{uuid}/compressed-blobs/{compressor}/{uncompressed_hash}/{uncompressed_size}{/optional_metadata}` -// -// Where: -// * `instance_name`, `uuid` and `optional_metadata` are defined as above. -// * `compressor` is a lowercase string form of a `Compressor.Value` enum -// other than `identity`, which is supported by the server and advertised in -// [CacheCapabilities.supported_compressor][build.bazel.remote.execution.v2.CacheCapabilities.supported_compressor]. -// * `uncompressed_hash` and `uncompressed_size` refer to the -// [Digest][build.bazel.remote.execution.v2.Digest] of the data being -// uploaded, once uncompressed. Servers MUST verify that these match -// the uploaded data once uncompressed, and MUST return an -// `INVALID_ARGUMENT` error in the case of mismatch. -// -// Note that when writing compressed blobs, the `WriteRequest.write_offset` in -// the initial request in a stream refers to the offset in the uncompressed form -// of the blob. In subsequent requests, `WriteRequest.write_offset` MUST be the -// sum of the first request's 'WriteRequest.write_offset' and the total size of -// all the compressed data bundles in the previous requests. -// Note that this mixes an uncompressed offset with a compressed byte length, -// which is nonsensical, but it is done to fit the semantics of the existing -// ByteStream protocol. -// -// Uploads of the same data MAY occur concurrently in any form, compressed or -// uncompressed. -// -// Clients SHOULD NOT use gRPC-level compression for ByteStream API `Write` -// calls of compressed blobs, since this would compress already-compressed data. -// -// When attempting an upload, if another client has already completed the upload -// (which may occur in the middle of a single upload if another client uploads -// the same blob concurrently), the request will terminate immediately with -// a response whose `committed_size` is the full size of the uploaded file -// (regardless of how much data was transmitted by the client). If the client -// completes the upload but the -// [Digest][build.bazel.remote.execution.v2.Digest] does not match, an -// `INVALID_ARGUMENT` error will be returned. In either case, the client should -// not attempt to retry the upload. -// -// Small downloads can be grouped and requested in a batch via -// [BatchReadBlobs][build.bazel.remote.execution.v2.ContentAddressableStorage.BatchReadBlobs]. -// -// For large downloads, the client must use the -// [Read method][google.bytestream.ByteStream.Read] of the ByteStream API. -// -// For uncompressed data, The `ReadRequest.resource_name` is of the following form: -// `{instance_name}/blobs/{hash}/{size}` -// Where `instance_name`, `hash` and `size` are defined as for uploads. -// -// Data can alternatively be downloaded in compressed form, with the following -// `ReadRequest.resource_name` form: -// `{instance_name}/compressed-blobs/{compressor}/{uncompressed_hash}/{uncompressed_size}` -// -// Where: -// * `instance_name` and `compressor` are defined as for uploads. -// * `uncompressed_hash` and `uncompressed_size` refer to the -// [Digest][build.bazel.remote.execution.v2.Digest] of the data being -// downloaded, once uncompressed. Clients MUST verify that these match -// the downloaded data once uncompressed, and take appropriate steps in -// the case of failure such as retrying a limited number of times or -// surfacing an error to the user. -// -// When downloading compressed blobs: -// * `ReadRequest.read_offset` refers to the offset in the uncompressed form -// of the blob. -// * Servers MUST return `INVALID_ARGUMENT` if `ReadRequest.read_limit` is -// non-zero. -// * Servers MAY use any compression level they choose, including different -// levels for different blobs (e.g. choosing a level designed for maximum -// speed for data known to be incompressible). -// * Clients SHOULD NOT use gRPC-level compression, since this would compress -// already-compressed data. -// -// Servers MUST be able to provide data for all recently advertised blobs in -// each of the compression formats that the server supports, as well as in -// uncompressed form. -// -// The lifetime of entries in the CAS is implementation specific, but it SHOULD -// be long enough to allow for newly-added and recently looked-up entries to be -// used in subsequent calls (e.g. to -// [Execute][build.bazel.remote.execution.v2.Execution.Execute]). -// -// Servers MUST behave as though empty blobs are always available, even if they -// have not been uploaded. Clients MAY optimize away the uploading or -// downloading of empty blobs. -// -// As with other services in the Remote Execution API, any call may return an -// error with a [RetryInfo][google.rpc.RetryInfo] error detail providing -// information about when the client should retry the request; clients SHOULD -// respect the information provided. -service ContentAddressableStorage { - // Determine if blobs are present in the CAS. - // - // Clients can use this API before uploading blobs to determine which ones are - // already present in the CAS and do not need to be uploaded again. - // - // Servers SHOULD increase the lifetimes of the referenced blobs if necessary and - // applicable. - // - // There are no method-specific errors. - rpc FindMissingBlobs(FindMissingBlobsRequest) returns (FindMissingBlobsResponse) { - option (google.api.http) = { post: "/v2/{instance_name=**}/blobs:findMissing" body: "*" }; - } - - // Upload many blobs at once. - // - // The server may enforce a limit of the combined total size of blobs - // to be uploaded using this API. This limit may be obtained using the - // [Capabilities][build.bazel.remote.execution.v2.Capabilities] API. - // Requests exceeding the limit should either be split into smaller - // chunks or uploaded using the - // [ByteStream API][google.bytestream.ByteStream], as appropriate. - // - // This request is equivalent to calling a Bytestream `Write` request - // on each individual blob, in parallel. The requests may succeed or fail - // independently. - // - // Errors: - // - // * `INVALID_ARGUMENT`: The client attempted to upload more than the - // server supported limit. - // - // Individual requests may return the following errors, additionally: - // - // * `RESOURCE_EXHAUSTED`: There is insufficient disk quota to store the blob. - // * `INVALID_ARGUMENT`: The - // [Digest][build.bazel.remote.execution.v2.Digest] does not match the - // provided data. - rpc BatchUpdateBlobs(BatchUpdateBlobsRequest) returns (BatchUpdateBlobsResponse) { - option (google.api.http) = { post: "/v2/{instance_name=**}/blobs:batchUpdate" body: "*" }; - } - - // Download many blobs at once. - // - // The server may enforce a limit of the combined total size of blobs - // to be downloaded using this API. This limit may be obtained using the - // [Capabilities][build.bazel.remote.execution.v2.Capabilities] API. - // Requests exceeding the limit should either be split into smaller - // chunks or downloaded using the - // [ByteStream API][google.bytestream.ByteStream], as appropriate. - // - // This request is equivalent to calling a Bytestream `Read` request - // on each individual blob, in parallel. The requests may succeed or fail - // independently. - // - // Errors: - // - // * `INVALID_ARGUMENT`: The client attempted to read more than the - // server supported limit. - // - // Every error on individual read will be returned in the corresponding digest - // status. - rpc BatchReadBlobs(BatchReadBlobsRequest) returns (BatchReadBlobsResponse) { - option (google.api.http) = { post: "/v2/{instance_name=**}/blobs:batchRead" body: "*" }; - } - - // Fetch the entire directory tree rooted at a node. - // - // This request must be targeted at a - // [Directory][build.bazel.remote.execution.v2.Directory] stored in the - // [ContentAddressableStorage][build.bazel.remote.execution.v2.ContentAddressableStorage] - // (CAS). The server will enumerate the `Directory` tree recursively and - // return every node descended from the root. - // - // The GetTreeRequest.page_token parameter can be used to skip ahead in - // the stream (e.g. when retrying a partially completed and aborted request), - // by setting it to a value taken from GetTreeResponse.next_page_token of the - // last successfully processed GetTreeResponse). - // - // The exact traversal order is unspecified and, unless retrieving subsequent - // pages from an earlier request, is not guaranteed to be stable across - // multiple invocations of `GetTree`. - // - // If part of the tree is missing from the CAS, the server will return the - // portion present and omit the rest. - // - // Errors: - // - // * `NOT_FOUND`: The requested tree root is not present in the CAS. - rpc GetTree(GetTreeRequest) returns (stream GetTreeResponse) { - option (google.api.http) = { get: "/v2/{instance_name=**}/blobs/{root_digest.hash}/{root_digest.size_bytes}:getTree" }; - } -} - -// The Capabilities service may be used by remote execution clients to query -// various server properties, in order to self-configure or return meaningful -// error messages. -// -// The query may include a particular `instance_name`, in which case the values -// returned will pertain to that instance. -service Capabilities { - // GetCapabilities returns the server capabilities configuration of the - // remote endpoint. - // Only the capabilities of the services supported by the endpoint will - // be returned: - // * Execution + CAS + Action Cache endpoints should return both - // CacheCapabilities and ExecutionCapabilities. - // * Execution only endpoints should return ExecutionCapabilities. - // * CAS + Action Cache only endpoints should return CacheCapabilities. - rpc GetCapabilities(GetCapabilitiesRequest) returns (ServerCapabilities) { - option (google.api.http) = { - get: "/v2/{instance_name=**}/capabilities" - }; - } -} - -// An `Action` captures all the information about an execution which is required -// to reproduce it. -// -// `Action`s are the core component of the [Execution] service. A single -// `Action` represents a repeatable action that can be performed by the -// execution service. `Action`s can be succinctly identified by the digest of -// their wire format encoding and, once an `Action` has been executed, will be -// cached in the action cache. Future requests can then use the cached result -// rather than needing to run afresh. -// -// When a server completes execution of an -// [Action][build.bazel.remote.execution.v2.Action], it MAY choose to -// cache the [result][build.bazel.remote.execution.v2.ActionResult] in -// the [ActionCache][build.bazel.remote.execution.v2.ActionCache] unless -// `do_not_cache` is `true`. Clients SHOULD expect the server to do so. By -// default, future calls to -// [Execute][build.bazel.remote.execution.v2.Execution.Execute] the same -// `Action` will also serve their results from the cache. Clients must take care -// to understand the caching behaviour. Ideally, all `Action`s will be -// reproducible so that serving a result from cache is always desirable and -// correct. -message Action { - // The digest of the [Command][build.bazel.remote.execution.v2.Command] - // to run, which MUST be present in the - // [ContentAddressableStorage][build.bazel.remote.execution.v2.ContentAddressableStorage]. - Digest command_digest = 1; - - // The digest of the root - // [Directory][build.bazel.remote.execution.v2.Directory] for the input - // files. The files in the directory tree are available in the correct - // location on the build machine before the command is executed. The root - // directory, as well as every subdirectory and content blob referred to, MUST - // be in the - // [ContentAddressableStorage][build.bazel.remote.execution.v2.ContentAddressableStorage]. - Digest input_root_digest = 2; - - reserved 3 to 5; // Used for fields moved to [Command][build.bazel.remote.execution.v2.Command]. - - // A timeout after which the execution should be killed. If the timeout is - // absent, then the client is specifying that the execution should continue - // as long as the server will let it. The server SHOULD impose a timeout if - // the client does not specify one, however, if the client does specify a - // timeout that is longer than the server's maximum timeout, the server MUST - // reject the request. - // - // The timeout is a part of the - // [Action][build.bazel.remote.execution.v2.Action] message, and - // therefore two `Actions` with different timeouts are different, even if they - // are otherwise identical. This is because, if they were not, running an - // `Action` with a lower timeout than is required might result in a cache hit - // from an execution run with a longer timeout, hiding the fact that the - // timeout is too short. By encoding it directly in the `Action`, a lower - // timeout will result in a cache miss and the execution timeout will fail - // immediately, rather than whenever the cache entry gets evicted. - google.protobuf.Duration timeout = 6; - - // If true, then the `Action`'s result cannot be cached, and in-flight - // requests for the same `Action` may not be merged. - bool do_not_cache = 7; - - reserved 8; // Used for field moved to [Command][build.bazel.remote.execution.v2.Command]. - - // An optional additional salt value used to place this `Action` into a - // separate cache namespace from other instances having the same field - // contents. This salt typically comes from operational configuration - // specific to sources such as repo and service configuration, - // and allows disowning an entire set of ActionResults that might have been - // poisoned by buggy software or tool failures. - bytes salt = 9; - - // The optional platform requirements for the execution environment. The - // server MAY choose to execute the action on any worker satisfying the - // requirements, so the client SHOULD ensure that running the action on any - // such worker will have the same result. A detailed lexicon for this can be - // found in the accompanying platform.md. - // New in version 2.2: clients SHOULD set these platform properties as well - // as those in the [Command][build.bazel.remote.execution.v2.Command]. Servers - // SHOULD prefer those set here. - Platform platform = 10; -} - -// A `Command` is the actual command executed by a worker running an -// [Action][build.bazel.remote.execution.v2.Action] and specifications of its -// environment. -// -// Except as otherwise required, the environment (such as which system -// libraries or binaries are available, and what filesystems are mounted where) -// is defined by and specific to the implementation of the remote execution API. -message Command { - // An `EnvironmentVariable` is one variable to set in the running program's - // environment. - message EnvironmentVariable { - // The variable name. - string name = 1; - - // The variable value. - string value = 2; - } - - // The arguments to the command. The first argument must be the path to the - // executable, which must be either a relative path, in which case it is - // evaluated with respect to the input root, or an absolute path. - repeated string arguments = 1; - - // The environment variables to set when running the program. The worker may - // provide its own default environment variables; these defaults can be - // overridden using this field. Additional variables can also be specified. - // - // In order to ensure that equivalent - // [Command][build.bazel.remote.execution.v2.Command]s always hash to the same - // value, the environment variables MUST be lexicographically sorted by name. - // Sorting of strings is done by code point, equivalently, by the UTF-8 bytes. - repeated EnvironmentVariable environment_variables = 2; - - // A list of the output files that the client expects to retrieve from the - // action. Only the listed files, as well as directories listed in - // `output_directories`, will be returned to the client as output. - // Other files or directories that may be created during command execution - // are discarded. - // - // The paths are relative to the working directory of the action execution. - // The paths are specified using a single forward slash (`/`) as a path - // separator, even if the execution platform natively uses a different - // separator. The path MUST NOT include a trailing slash, nor a leading slash, - // being a relative path. - // - // In order to ensure consistent hashing of the same Action, the output paths - // MUST be sorted lexicographically by code point (or, equivalently, by UTF-8 - // bytes). - // - // An output file cannot be duplicated, be a parent of another output file, or - // have the same path as any of the listed output directories. - // - // Directories leading up to the output files are created by the worker prior - // to execution, even if they are not explicitly part of the input root. - // - // DEPRECATED since v2.1: Use `output_paths` instead. - repeated string output_files = 3; - - // A list of the output directories that the client expects to retrieve from - // the action. Only the listed directories will be returned (an entire - // directory structure will be returned as a - // [Tree][build.bazel.remote.execution.v2.Tree] message digest, see - // [OutputDirectory][build.bazel.remote.execution.v2.OutputDirectory]), as - // well as files listed in `output_files`. Other files or directories that - // may be created during command execution are discarded. - // - // The paths are relative to the working directory of the action execution. - // The paths are specified using a single forward slash (`/`) as a path - // separator, even if the execution platform natively uses a different - // separator. The path MUST NOT include a trailing slash, nor a leading slash, - // being a relative path. The special value of empty string is allowed, - // although not recommended, and can be used to capture the entire working - // directory tree, including inputs. - // - // In order to ensure consistent hashing of the same Action, the output paths - // MUST be sorted lexicographically by code point (or, equivalently, by UTF-8 - // bytes). - // - // An output directory cannot be duplicated or have the same path as any of - // the listed output files. An output directory is allowed to be a parent of - // another output directory. - // - // Directories leading up to the output directories (but not the output - // directories themselves) are created by the worker prior to execution, even - // if they are not explicitly part of the input root. - // - // DEPRECATED since 2.1: Use `output_paths` instead. - repeated string output_directories = 4; - - // A list of the output paths that the client expects to retrieve from the - // action. Only the listed paths will be returned to the client as output. - // The type of the output (file or directory) is not specified, and will be - // determined by the server after action execution. If the resulting path is - // a file, it will be returned in an - // [OutputFile][build.bazel.remote.execution.v2.OutputFile]) typed field. - // If the path is a directory, the entire directory structure will be returned - // as a [Tree][build.bazel.remote.execution.v2.Tree] message digest, see - // [OutputDirectory][build.bazel.remote.execution.v2.OutputDirectory]) - // Other files or directories that may be created during command execution - // are discarded. - // - // The paths are relative to the working directory of the action execution. - // The paths are specified using a single forward slash (`/`) as a path - // separator, even if the execution platform natively uses a different - // separator. The path MUST NOT include a trailing slash, nor a leading slash, - // being a relative path. - // - // In order to ensure consistent hashing of the same Action, the output paths - // MUST be deduplicated and sorted lexicographically by code point (or, - // equivalently, by UTF-8 bytes). - // - // Directories leading up to the output paths are created by the worker prior - // to execution, even if they are not explicitly part of the input root. - // - // New in v2.1: this field supersedes the DEPRECATED `output_files` and - // `output_directories` fields. If `output_paths` is used, `output_files` and - // `output_directories` will be ignored! - repeated string output_paths = 7; - - // The platform requirements for the execution environment. The server MAY - // choose to execute the action on any worker satisfying the requirements, so - // the client SHOULD ensure that running the action on any such worker will - // have the same result. A detailed lexicon for this can be found in the - // accompanying platform.md. - // DEPRECATED as of v2.2: platform properties are now specified directly in - // the action. See documentation note in the - // [Action][build.bazel.remote.execution.v2.Action] for migration. - Platform platform = 5; - - // The working directory, relative to the input root, for the command to run - // in. It must be a directory which exists in the input tree. If it is left - // empty, then the action is run in the input root. - string working_directory = 6; - - // A list of keys for node properties the client expects to retrieve for - // output files and directories. Keys are either names of string-based - // [NodeProperty][build.bazel.remote.execution.v2.NodeProperty] or - // names of fields in [NodeProperties][build.bazel.remote.execution.v2.NodeProperties]. - // In order to ensure that equivalent `Action`s always hash to the same - // value, the node properties MUST be lexicographically sorted by name. - // Sorting of strings is done by code point, equivalently, by the UTF-8 bytes. - // - // The interpretation of string-based properties is server-dependent. If a - // property is not recognized by the server, the server will return an - // `INVALID_ARGUMENT`. - repeated string output_node_properties = 8; -} - -// A `Platform` is a set of requirements, such as hardware, operating system, or -// compiler toolchain, for an -// [Action][build.bazel.remote.execution.v2.Action]'s execution -// environment. A `Platform` is represented as a series of key-value pairs -// representing the properties that are required of the platform. -message Platform { - // A single property for the environment. The server is responsible for - // specifying the property `name`s that it accepts. If an unknown `name` is - // provided in the requirements for an - // [Action][build.bazel.remote.execution.v2.Action], the server SHOULD - // reject the execution request. If permitted by the server, the same `name` - // may occur multiple times. - // - // The server is also responsible for specifying the interpretation of - // property `value`s. For instance, a property describing how much RAM must be - // available may be interpreted as allowing a worker with 16GB to fulfill a - // request for 8GB, while a property describing the OS environment on which - // the action must be performed may require an exact match with the worker's - // OS. - // - // The server MAY use the `value` of one or more properties to determine how - // it sets up the execution environment, such as by making specific system - // files available to the worker. - // - // Both names and values are typically case-sensitive. Note that the platform - // is implicitly part of the action digest, so even tiny changes in the names - // or values (like changing case) may result in different action cache - // entries. - message Property { - // The property name. - string name = 1; - - // The property value. - string value = 2; - } - - // The properties that make up this platform. In order to ensure that - // equivalent `Platform`s always hash to the same value, the properties MUST - // be lexicographically sorted by name, and then by value. Sorting of strings - // is done by code point, equivalently, by the UTF-8 bytes. - repeated Property properties = 1; -} - -// A `Directory` represents a directory node in a file tree, containing zero or -// more children [FileNodes][build.bazel.remote.execution.v2.FileNode], -// [DirectoryNodes][build.bazel.remote.execution.v2.DirectoryNode] and -// [SymlinkNodes][build.bazel.remote.execution.v2.SymlinkNode]. -// Each `Node` contains its name in the directory, either the digest of its -// content (either a file blob or a `Directory` proto) or a symlink target, as -// well as possibly some metadata about the file or directory. -// -// In order to ensure that two equivalent directory trees hash to the same -// value, the following restrictions MUST be obeyed when constructing a -// a `Directory`: -// -// * Every child in the directory must have a path of exactly one segment. -// Multiple levels of directory hierarchy may not be collapsed. -// * Each child in the directory must have a unique path segment (file name). -// Note that while the API itself is case-sensitive, the environment where -// the Action is executed may or may not be case-sensitive. That is, it is -// legal to call the API with a Directory that has both "Foo" and "foo" as -// children, but the Action may be rejected by the remote system upon -// execution. -// * The files, directories and symlinks in the directory must each be sorted -// in lexicographical order by path. The path strings must be sorted by code -// point, equivalently, by UTF-8 bytes. -// * The [NodeProperties][build.bazel.remote.execution.v2.NodeProperty] of files, -// directories, and symlinks must be sorted in lexicographical order by -// property name. -// -// A `Directory` that obeys the restrictions is said to be in canonical form. -// -// As an example, the following could be used for a file named `bar` and a -// directory named `foo` with an executable file named `baz` (hashes shortened -// for readability): -// -// ```json -// // (Directory proto) -// { -// files: [ -// { -// name: "bar", -// digest: { -// hash: "4a73bc9d03...", -// size: 65534 -// }, -// node_properties: [ -// { -// "name": "MTime", -// "value": "2017-01-15T01:30:15.01Z" -// } -// ] -// } -// ], -// directories: [ -// { -// name: "foo", -// digest: { -// hash: "4cf2eda940...", -// size: 43 -// } -// } -// ] -// } -// -// // (Directory proto with hash "4cf2eda940..." and size 43) -// { -// files: [ -// { -// name: "baz", -// digest: { -// hash: "b2c941073e...", -// size: 1294, -// }, -// is_executable: true -// } -// ] -// } -// ``` -message Directory { - // The files in the directory. - repeated FileNode files = 1; - - // The subdirectories in the directory. - repeated DirectoryNode directories = 2; - - // The symlinks in the directory. - repeated SymlinkNode symlinks = 3; - - // The node properties of the Directory. - reserved 4; - NodeProperties node_properties = 5; -} - -// A single property for [FileNodes][build.bazel.remote.execution.v2.FileNode], -// [DirectoryNodes][build.bazel.remote.execution.v2.DirectoryNode], and -// [SymlinkNodes][build.bazel.remote.execution.v2.SymlinkNode]. The server is -// responsible for specifying the property `name`s that it accepts. If -// permitted by the server, the same `name` may occur multiple times. -message NodeProperty { - // The property name. - string name = 1; - - // The property value. - string value = 2; -} - -// Node properties for [FileNodes][build.bazel.remote.execution.v2.FileNode], -// [DirectoryNodes][build.bazel.remote.execution.v2.DirectoryNode], and -// [SymlinkNodes][build.bazel.remote.execution.v2.SymlinkNode]. The server is -// responsible for specifying the properties that it accepts. -// -message NodeProperties { - // A list of string-based - // [NodeProperties][build.bazel.remote.execution.v2.NodeProperty]. - repeated NodeProperty properties = 1; - - // The file's last modification timestamp. - google.protobuf.Timestamp mtime = 2; - - // The UNIX file mode, e.g., 0755. - google.protobuf.UInt32Value unix_mode = 3; -} - -// A `FileNode` represents a single file and associated metadata. -message FileNode { - // The name of the file. - string name = 1; - - // The digest of the file's content. - Digest digest = 2; - - reserved 3; // Reserved to ensure wire-compatibility with `OutputFile`. - - // True if file is executable, false otherwise. - bool is_executable = 4; - - // The node properties of the FileNode. - reserved 5; - NodeProperties node_properties = 6; -} - -// A `DirectoryNode` represents a child of a -// [Directory][build.bazel.remote.execution.v2.Directory] which is itself -// a `Directory` and its associated metadata. -message DirectoryNode { - // The name of the directory. - string name = 1; - - // The digest of the - // [Directory][build.bazel.remote.execution.v2.Directory] object - // represented. See [Digest][build.bazel.remote.execution.v2.Digest] - // for information about how to take the digest of a proto message. - Digest digest = 2; -} - -// A `SymlinkNode` represents a symbolic link. -message SymlinkNode { - // The name of the symlink. - string name = 1; - - // The target path of the symlink. The path separator is a forward slash `/`. - // The target path can be relative to the parent directory of the symlink or - // it can be an absolute path starting with `/`. Support for absolute paths - // can be checked using the [Capabilities][build.bazel.remote.execution.v2.Capabilities] - // API. `..` components are allowed anywhere in the target path as logical - // canonicalization may lead to different behavior in the presence of - // directory symlinks (e.g. `foo/../bar` may not be the same as `bar`). - // To reduce potential cache misses, canonicalization is still recommended - // where this is possible without impacting correctness. - string target = 2; - - // The node properties of the SymlinkNode. - reserved 3; - NodeProperties node_properties = 4; -} - -// A content digest. A digest for a given blob consists of the size of the blob -// and its hash. The hash algorithm to use is defined by the server. -// -// The size is considered to be an integral part of the digest and cannot be -// separated. That is, even if the `hash` field is correctly specified but -// `size_bytes` is not, the server MUST reject the request. -// -// The reason for including the size in the digest is as follows: in a great -// many cases, the server needs to know the size of the blob it is about to work -// with prior to starting an operation with it, such as flattening Merkle tree -// structures or streaming it to a worker. Technically, the server could -// implement a separate metadata store, but this results in a significantly more -// complicated implementation as opposed to having the client specify the size -// up-front (or storing the size along with the digest in every message where -// digests are embedded). This does mean that the API leaks some implementation -// details of (what we consider to be) a reasonable server implementation, but -// we consider this to be a worthwhile tradeoff. -// -// When a `Digest` is used to refer to a proto message, it always refers to the -// message in binary encoded form. To ensure consistent hashing, clients and -// servers MUST ensure that they serialize messages according to the following -// rules, even if there are alternate valid encodings for the same message: -// -// * Fields are serialized in tag order. -// * There are no unknown fields. -// * There are no duplicate fields. -// * Fields are serialized according to the default semantics for their type. -// -// Most protocol buffer implementations will always follow these rules when -// serializing, but care should be taken to avoid shortcuts. For instance, -// concatenating two messages to merge them may produce duplicate fields. -message Digest { - // The hash. In the case of SHA-256, it will always be a lowercase hex string - // exactly 64 characters long. - string hash = 1; - - // The size of the blob, in bytes. - int64 size_bytes = 2; -} - -// ExecutedActionMetadata contains details about a completed execution. -message ExecutedActionMetadata { - // The name of the worker which ran the execution. - string worker = 1; - - // When was the action added to the queue. - google.protobuf.Timestamp queued_timestamp = 2; - - // When the worker received the action. - google.protobuf.Timestamp worker_start_timestamp = 3; - - // When the worker completed the action, including all stages. - google.protobuf.Timestamp worker_completed_timestamp = 4; - - // When the worker started fetching action inputs. - google.protobuf.Timestamp input_fetch_start_timestamp = 5; - - // When the worker finished fetching action inputs. - google.protobuf.Timestamp input_fetch_completed_timestamp = 6; - - // When the worker started executing the action command. - google.protobuf.Timestamp execution_start_timestamp = 7; - - // When the worker completed executing the action command. - google.protobuf.Timestamp execution_completed_timestamp = 8; - - // When the worker started uploading action outputs. - google.protobuf.Timestamp output_upload_start_timestamp = 9; - - // When the worker finished uploading action outputs. - google.protobuf.Timestamp output_upload_completed_timestamp = 10; - - // Details that are specific to the kind of worker used. For example, - // on POSIX-like systems this could contain a message with - // getrusage(2) statistics. - repeated google.protobuf.Any auxiliary_metadata = 11; -} - -// An ActionResult represents the result of an -// [Action][build.bazel.remote.execution.v2.Action] being run. -// -// It is advised that at least one field (for example -// `ActionResult.execution_metadata.Worker`) have a non-default value, to -// ensure that the serialized value is non-empty, which can then be used -// as a basic data sanity check. -message ActionResult { - reserved 1; // Reserved for use as the resource name. - - // The output files of the action. For each output file requested in the - // `output_files` or `output_paths` field of the Action, if the corresponding - // file existed after the action completed, a single entry will be present - // either in this field, or the `output_file_symlinks` field if the file was - // a symbolic link to another file (`output_symlinks` field after v2.1). - // - // If an output listed in `output_files` was found, but was a directory rather - // than a regular file, the server will return a FAILED_PRECONDITION. - // If the action does not produce the requested output, then that output - // will be omitted from the list. The server is free to arrange the output - // list as desired; clients MUST NOT assume that the output list is sorted. - repeated OutputFile output_files = 2; - - // The output files of the action that are symbolic links to other files. Those - // may be links to other output files, or input files, or even absolute paths - // outside of the working directory, if the server supports - // [SymlinkAbsolutePathStrategy.ALLOWED][build.bazel.remote.execution.v2.CacheCapabilities.SymlinkAbsolutePathStrategy]. - // For each output file requested in the `output_files` or `output_paths` - // field of the Action, if the corresponding file existed after - // the action completed, a single entry will be present either in this field, - // or in the `output_files` field, if the file was not a symbolic link. - // - // If an output symbolic link of the same name as listed in `output_files` of - // the Command was found, but its target type was not a regular file, the - // server will return a FAILED_PRECONDITION. - // If the action does not produce the requested output, then that output - // will be omitted from the list. The server is free to arrange the output - // list as desired; clients MUST NOT assume that the output list is sorted. - // - // DEPRECATED as of v2.1. Servers that wish to be compatible with v2.0 API - // should still populate this field in addition to `output_symlinks`. - repeated OutputSymlink output_file_symlinks = 10; - - // New in v2.1: this field will only be populated if the command - // `output_paths` field was used, and not the pre v2.1 `output_files` or - // `output_directories` fields. - // The output paths of the action that are symbolic links to other paths. Those - // may be links to other outputs, or inputs, or even absolute paths - // outside of the working directory, if the server supports - // [SymlinkAbsolutePathStrategy.ALLOWED][build.bazel.remote.execution.v2.CacheCapabilities.SymlinkAbsolutePathStrategy]. - // A single entry for each output requested in `output_paths` - // field of the Action, if the corresponding path existed after - // the action completed and was a symbolic link. - // - // If the action does not produce a requested output, then that output - // will be omitted from the list. The server is free to arrange the output - // list as desired; clients MUST NOT assume that the output list is sorted. - repeated OutputSymlink output_symlinks = 12; - - // The output directories of the action. For each output directory requested - // in the `output_directories` or `output_paths` field of the Action, if the - // corresponding directory existed after the action completed, a single entry - // will be present in the output list, which will contain the digest of a - // [Tree][build.bazel.remote.execution.v2.Tree] message containing the - // directory tree, and the path equal exactly to the corresponding Action - // output_directories member. - // - // As an example, suppose the Action had an output directory `a/b/dir` and the - // execution produced the following contents in `a/b/dir`: a file named `bar` - // and a directory named `foo` with an executable file named `baz`. Then, - // output_directory will contain (hashes shortened for readability): - // - // ```json - // // OutputDirectory proto: - // { - // path: "a/b/dir" - // tree_digest: { - // hash: "4a73bc9d03...", - // size: 55 - // } - // } - // // Tree proto with hash "4a73bc9d03..." and size 55: - // { - // root: { - // files: [ - // { - // name: "bar", - // digest: { - // hash: "4a73bc9d03...", - // size: 65534 - // } - // } - // ], - // directories: [ - // { - // name: "foo", - // digest: { - // hash: "4cf2eda940...", - // size: 43 - // } - // } - // ] - // } - // children : { - // // (Directory proto with hash "4cf2eda940..." and size 43) - // files: [ - // { - // name: "baz", - // digest: { - // hash: "b2c941073e...", - // size: 1294, - // }, - // is_executable: true - // } - // ] - // } - // } - // ``` - // If an output of the same name as listed in `output_files` of - // the Command was found in `output_directories`, but was not a directory, the - // server will return a FAILED_PRECONDITION. - repeated OutputDirectory output_directories = 3; - - // The output directories of the action that are symbolic links to other - // directories. Those may be links to other output directories, or input - // directories, or even absolute paths outside of the working directory, - // if the server supports - // [SymlinkAbsolutePathStrategy.ALLOWED][build.bazel.remote.execution.v2.CacheCapabilities.SymlinkAbsolutePathStrategy]. - // For each output directory requested in the `output_directories` field of - // the Action, if the directory existed after the action completed, a - // single entry will be present either in this field, or in the - // `output_directories` field, if the directory was not a symbolic link. - // - // If an output of the same name was found, but was a symbolic link to a file - // instead of a directory, the server will return a FAILED_PRECONDITION. - // If the action does not produce the requested output, then that output - // will be omitted from the list. The server is free to arrange the output - // list as desired; clients MUST NOT assume that the output list is sorted. - // - // DEPRECATED as of v2.1. Servers that wish to be compatible with v2.0 API - // should still populate this field in addition to `output_symlinks`. - repeated OutputSymlink output_directory_symlinks = 11; - - // The exit code of the command. - int32 exit_code = 4; - - // The standard output buffer of the action. The server SHOULD NOT inline - // stdout unless requested by the client in the - // [GetActionResultRequest][build.bazel.remote.execution.v2.GetActionResultRequest] - // message. The server MAY omit inlining, even if requested, and MUST do so if inlining - // would cause the response to exceed message size limits. - bytes stdout_raw = 5; - - // The digest for a blob containing the standard output of the action, which - // can be retrieved from the - // [ContentAddressableStorage][build.bazel.remote.execution.v2.ContentAddressableStorage]. - Digest stdout_digest = 6; - - // The standard error buffer of the action. The server SHOULD NOT inline - // stderr unless requested by the client in the - // [GetActionResultRequest][build.bazel.remote.execution.v2.GetActionResultRequest] - // message. The server MAY omit inlining, even if requested, and MUST do so if inlining - // would cause the response to exceed message size limits. - bytes stderr_raw = 7; - - // The digest for a blob containing the standard error of the action, which - // can be retrieved from the - // [ContentAddressableStorage][build.bazel.remote.execution.v2.ContentAddressableStorage]. - Digest stderr_digest = 8; - - // The details of the execution that originally produced this result. - ExecutedActionMetadata execution_metadata = 9; -} - -// An `OutputFile` is similar to a -// [FileNode][build.bazel.remote.execution.v2.FileNode], but it is used as an -// output in an `ActionResult`. It allows a full file path rather than -// only a name. -message OutputFile { - // The full path of the file relative to the working directory, including the - // filename. The path separator is a forward slash `/`. Since this is a - // relative path, it MUST NOT begin with a leading forward slash. - string path = 1; - - // The digest of the file's content. - Digest digest = 2; - - reserved 3; // Used for a removed field in an earlier version of the API. - - // True if file is executable, false otherwise. - bool is_executable = 4; - - // The contents of the file if inlining was requested. The server SHOULD NOT inline - // file contents unless requested by the client in the - // [GetActionResultRequest][build.bazel.remote.execution.v2.GetActionResultRequest] - // message. The server MAY omit inlining, even if requested, and MUST do so if inlining - // would cause the response to exceed message size limits. - bytes contents = 5; - - // The supported node properties of the OutputFile, if requested by the Action. - reserved 6; - NodeProperties node_properties = 7; -} - -// A `Tree` contains all the -// [Directory][build.bazel.remote.execution.v2.Directory] protos in a -// single directory Merkle tree, compressed into one message. -message Tree { - // The root directory in the tree. - Directory root = 1; - - // All the child directories: the directories referred to by the root and, - // recursively, all its children. In order to reconstruct the directory tree, - // the client must take the digests of each of the child directories and then - // build up a tree starting from the `root`. - repeated Directory children = 2; -} - -// An `OutputDirectory` is the output in an `ActionResult` corresponding to a -// directory's full contents rather than a single file. -message OutputDirectory { - // The full path of the directory relative to the working directory. The path - // separator is a forward slash `/`. Since this is a relative path, it MUST - // NOT begin with a leading forward slash. The empty string value is allowed, - // and it denotes the entire working directory. - string path = 1; - - reserved 2; // Used for a removed field in an earlier version of the API. - - // The digest of the encoded - // [Tree][build.bazel.remote.execution.v2.Tree] proto containing the - // directory's contents. - Digest tree_digest = 3; -} - -// An `OutputSymlink` is similar to a -// [Symlink][build.bazel.remote.execution.v2.SymlinkNode], but it is used as an -// output in an `ActionResult`. -// -// `OutputSymlink` is binary-compatible with `SymlinkNode`. -message OutputSymlink { - // The full path of the symlink relative to the working directory, including the - // filename. The path separator is a forward slash `/`. Since this is a - // relative path, it MUST NOT begin with a leading forward slash. - string path = 1; - - // The target path of the symlink. The path separator is a forward slash `/`. - // The target path can be relative to the parent directory of the symlink or - // it can be an absolute path starting with `/`. Support for absolute paths - // can be checked using the [Capabilities][build.bazel.remote.execution.v2.Capabilities] - // API. `..` components are allowed anywhere in the target path. - string target = 2; - - // The supported node properties of the OutputSymlink, if requested by the - // Action. - reserved 3; - NodeProperties node_properties = 4; -} - -// An `ExecutionPolicy` can be used to control the scheduling of the action. -message ExecutionPolicy { - // The priority (relative importance) of this action. Generally, a lower value - // means that the action should be run sooner than actions having a greater - // priority value, but the interpretation of a given value is server- - // dependent. A priority of 0 means the *default* priority. Priorities may be - // positive or negative, and such actions should run later or sooner than - // actions having the default priority, respectively. The particular semantics - // of this field is up to the server. In particular, every server will have - // their own supported range of priorities, and will decide how these map into - // scheduling policy. - int32 priority = 1; -} - -// A `ResultsCachePolicy` is used for fine-grained control over how action -// outputs are stored in the CAS and Action Cache. -message ResultsCachePolicy { - // The priority (relative importance) of this content in the overall cache. - // Generally, a lower value means a longer retention time or other advantage, - // but the interpretation of a given value is server-dependent. A priority of - // 0 means a *default* value, decided by the server. - // - // The particular semantics of this field is up to the server. In particular, - // every server will have their own supported range of priorities, and will - // decide how these map into retention/eviction policy. - int32 priority = 1; -} - -// A request message for -// [Execution.Execute][build.bazel.remote.execution.v2.Execution.Execute]. -message ExecuteRequest { - // The instance of the execution system to operate against. A server may - // support multiple instances of the execution system (with their own workers, - // storage, caches, etc.). The server MAY require use of this field to select - // between them in an implementation-defined fashion, otherwise it can be - // omitted. - string instance_name = 1; - - // If true, the action will be executed even if its result is already - // present in the [ActionCache][build.bazel.remote.execution.v2.ActionCache]. - // The execution is still allowed to be merged with other in-flight executions - // of the same action, however - semantically, the service MUST only guarantee - // that the results of an execution with this field set were not visible - // before the corresponding execution request was sent. - // Note that actions from execution requests setting this field set are still - // eligible to be entered into the action cache upon completion, and services - // SHOULD overwrite any existing entries that may exist. This allows - // skip_cache_lookup requests to be used as a mechanism for replacing action - // cache entries that reference outputs no longer available or that are - // poisoned in any way. - // If false, the result may be served from the action cache. - bool skip_cache_lookup = 3; - - reserved 2, 4, 5; // Used for removed fields in an earlier version of the API. - - // The digest of the [Action][build.bazel.remote.execution.v2.Action] to - // execute. - Digest action_digest = 6; - - // An optional policy for execution of the action. - // The server will have a default policy if this is not provided. - ExecutionPolicy execution_policy = 7; - - // An optional policy for the results of this execution in the remote cache. - // The server will have a default policy if this is not provided. - // This may be applied to both the ActionResult and the associated blobs. - ResultsCachePolicy results_cache_policy = 8; -} - -// A `LogFile` is a log stored in the CAS. -message LogFile { - // The digest of the log contents. - Digest digest = 1; - - // This is a hint as to the purpose of the log, and is set to true if the log - // is human-readable text that can be usefully displayed to a user, and false - // otherwise. For instance, if a command-line client wishes to print the - // server logs to the terminal for a failed action, this allows it to avoid - // displaying a binary file. - bool human_readable = 2; -} - -// The response message for -// [Execution.Execute][build.bazel.remote.execution.v2.Execution.Execute], -// which will be contained in the [response -// field][google.longrunning.Operation.response] of the -// [Operation][google.longrunning.Operation]. -message ExecuteResponse { - // The result of the action. - ActionResult result = 1; - - // True if the result was served from cache, false if it was executed. - bool cached_result = 2; - - // If the status has a code other than `OK`, it indicates that the action did - // not finish execution. For example, if the operation times out during - // execution, the status will have a `DEADLINE_EXCEEDED` code. Servers MUST - // use this field for errors in execution, rather than the error field on the - // `Operation` object. - // - // If the status code is other than `OK`, then the result MUST NOT be cached. - // For an error status, the `result` field is optional; the server may - // populate the output-, stdout-, and stderr-related fields if it has any - // information available, such as the stdout and stderr of a timed-out action. - google.rpc.Status status = 3; - - // An optional list of additional log outputs the server wishes to provide. A - // server can use this to return execution-specific logs however it wishes. - // This is intended primarily to make it easier for users to debug issues that - // may be outside of the actual job execution, such as by identifying the - // worker executing the action or by providing logs from the worker's setup - // phase. The keys SHOULD be human readable so that a client can display them - // to a user. - map server_logs = 4; - - // Freeform informational message with details on the execution of the action - // that may be displayed to the user upon failure or when requested explicitly. - string message = 5; -} - -// The current stage of action execution. -message ExecutionStage { - enum Value { - // Invalid value. - UNKNOWN = 0; - - // Checking the result against the cache. - CACHE_CHECK = 1; - - // Currently idle, awaiting a free machine to execute. - QUEUED = 2; - - // Currently being executed by a worker. - EXECUTING = 3; - - // Finished execution. - COMPLETED = 4; - } -} - -// Metadata about an ongoing -// [execution][build.bazel.remote.execution.v2.Execution.Execute], which -// will be contained in the [metadata -// field][google.longrunning.Operation.response] of the -// [Operation][google.longrunning.Operation]. -message ExecuteOperationMetadata { - // The current stage of execution. - ExecutionStage.Value stage = 1; - - // The digest of the [Action][build.bazel.remote.execution.v2.Action] - // being executed. - Digest action_digest = 2; - - // If set, the client can use this resource name with - // [ByteStream.Read][google.bytestream.ByteStream.Read] to stream the - // standard output from the endpoint hosting streamed responses. - string stdout_stream_name = 3; - - // If set, the client can use this resource name with - // [ByteStream.Read][google.bytestream.ByteStream.Read] to stream the - // standard error from the endpoint hosting streamed responses. - string stderr_stream_name = 4; -} - -// A request message for -// [WaitExecution][build.bazel.remote.execution.v2.Execution.WaitExecution]. -message WaitExecutionRequest { - // The name of the [Operation][google.longrunning.Operation] - // returned by [Execute][build.bazel.remote.execution.v2.Execution.Execute]. - string name = 1; -} - -// A request message for -// [ActionCache.GetActionResult][build.bazel.remote.execution.v2.ActionCache.GetActionResult]. -message GetActionResultRequest { - // The instance of the execution system to operate against. A server may - // support multiple instances of the execution system (with their own workers, - // storage, caches, etc.). The server MAY require use of this field to select - // between them in an implementation-defined fashion, otherwise it can be - // omitted. - string instance_name = 1; - - // The digest of the [Action][build.bazel.remote.execution.v2.Action] - // whose result is requested. - Digest action_digest = 2; - - // A hint to the server to request inlining stdout in the - // [ActionResult][build.bazel.remote.execution.v2.ActionResult] message. - bool inline_stdout = 3; - - // A hint to the server to request inlining stderr in the - // [ActionResult][build.bazel.remote.execution.v2.ActionResult] message. - bool inline_stderr = 4; - - // A hint to the server to inline the contents of the listed output files. - // Each path needs to exactly match one file path in either `output_paths` or - // `output_files` (DEPRECATED since v2.1) in the - // [Command][build.bazel.remote.execution.v2.Command] message. - repeated string inline_output_files = 5; -} - -// A request message for -// [ActionCache.UpdateActionResult][build.bazel.remote.execution.v2.ActionCache.UpdateActionResult]. -message UpdateActionResultRequest { - // The instance of the execution system to operate against. A server may - // support multiple instances of the execution system (with their own workers, - // storage, caches, etc.). The server MAY require use of this field to select - // between them in an implementation-defined fashion, otherwise it can be - // omitted. - string instance_name = 1; - - // The digest of the [Action][build.bazel.remote.execution.v2.Action] - // whose result is being uploaded. - Digest action_digest = 2; - - // The [ActionResult][build.bazel.remote.execution.v2.ActionResult] - // to store in the cache. - ActionResult action_result = 3; - - // An optional policy for the results of this execution in the remote cache. - // The server will have a default policy if this is not provided. - // This may be applied to both the ActionResult and the associated blobs. - ResultsCachePolicy results_cache_policy = 4; -} - -// A request message for -// [ContentAddressableStorage.FindMissingBlobs][build.bazel.remote.execution.v2.ContentAddressableStorage.FindMissingBlobs]. -message FindMissingBlobsRequest { - // The instance of the execution system to operate against. A server may - // support multiple instances of the execution system (with their own workers, - // storage, caches, etc.). The server MAY require use of this field to select - // between them in an implementation-defined fashion, otherwise it can be - // omitted. - string instance_name = 1; - - // A list of the blobs to check. - repeated Digest blob_digests = 2; -} - -// A response message for -// [ContentAddressableStorage.FindMissingBlobs][build.bazel.remote.execution.v2.ContentAddressableStorage.FindMissingBlobs]. -message FindMissingBlobsResponse { - // A list of the blobs requested *not* present in the storage. - repeated Digest missing_blob_digests = 2; -} - -// A request message for -// [ContentAddressableStorage.BatchUpdateBlobs][build.bazel.remote.execution.v2.ContentAddressableStorage.BatchUpdateBlobs]. -message BatchUpdateBlobsRequest { - // A request corresponding to a single blob that the client wants to upload. - message Request { - // The digest of the blob. This MUST be the digest of `data`. - Digest digest = 1; - - // The raw binary data. - bytes data = 2; - } - - // The instance of the execution system to operate against. A server may - // support multiple instances of the execution system (with their own workers, - // storage, caches, etc.). The server MAY require use of this field to select - // between them in an implementation-defined fashion, otherwise it can be - // omitted. - string instance_name = 1; - - // The individual upload requests. - repeated Request requests = 2; -} - -// A response message for -// [ContentAddressableStorage.BatchUpdateBlobs][build.bazel.remote.execution.v2.ContentAddressableStorage.BatchUpdateBlobs]. -message BatchUpdateBlobsResponse { - // A response corresponding to a single blob that the client tried to upload. - message Response { - // The blob digest to which this response corresponds. - Digest digest = 1; - - // The result of attempting to upload that blob. - google.rpc.Status status = 2; - } - - // The responses to the requests. - repeated Response responses = 1; -} - -// A request message for -// [ContentAddressableStorage.BatchReadBlobs][build.bazel.remote.execution.v2.ContentAddressableStorage.BatchReadBlobs]. -message BatchReadBlobsRequest { - // The instance of the execution system to operate against. A server may - // support multiple instances of the execution system (with their own workers, - // storage, caches, etc.). The server MAY require use of this field to select - // between them in an implementation-defined fashion, otherwise it can be - // omitted. - string instance_name = 1; - - // The individual blob digests. - repeated Digest digests = 2; -} - -// A response message for -// [ContentAddressableStorage.BatchReadBlobs][build.bazel.remote.execution.v2.ContentAddressableStorage.BatchReadBlobs]. -message BatchReadBlobsResponse { - // A response corresponding to a single blob that the client tried to download. - message Response { - // The digest to which this response corresponds. - Digest digest = 1; - - // The raw binary data. - bytes data = 2; - - // The result of attempting to download that blob. - google.rpc.Status status = 3; - } - - // The responses to the requests. - repeated Response responses = 1; -} - -// A request message for -// [ContentAddressableStorage.GetTree][build.bazel.remote.execution.v2.ContentAddressableStorage.GetTree]. -message GetTreeRequest { - // The instance of the execution system to operate against. A server may - // support multiple instances of the execution system (with their own workers, - // storage, caches, etc.). The server MAY require use of this field to select - // between them in an implementation-defined fashion, otherwise it can be - // omitted. - string instance_name = 1; - - // The digest of the root, which must be an encoded - // [Directory][build.bazel.remote.execution.v2.Directory] message - // stored in the - // [ContentAddressableStorage][build.bazel.remote.execution.v2.ContentAddressableStorage]. - Digest root_digest = 2; - - // A maximum page size to request. If present, the server will request no more - // than this many items. Regardless of whether a page size is specified, the - // server may place its own limit on the number of items to be returned and - // require the client to retrieve more items using a subsequent request. - int32 page_size = 3; - - // A page token, which must be a value received in a previous - // [GetTreeResponse][build.bazel.remote.execution.v2.GetTreeResponse]. - // If present, the server will use that token as an offset, returning only - // that page and the ones that succeed it. - string page_token = 4; -} - -// A response message for -// [ContentAddressableStorage.GetTree][build.bazel.remote.execution.v2.ContentAddressableStorage.GetTree]. -message GetTreeResponse { - // The directories descended from the requested root. - repeated Directory directories = 1; - - // If present, signifies that there are more results which the client can - // retrieve by passing this as the page_token in a subsequent - // [request][build.bazel.remote.execution.v2.GetTreeRequest]. - // If empty, signifies that this is the last page of results. - string next_page_token = 2; -} - -// A request message for -// [Capabilities.GetCapabilities][build.bazel.remote.execution.v2.Capabilities.GetCapabilities]. -message GetCapabilitiesRequest { - // The instance of the execution system to operate against. A server may - // support multiple instances of the execution system (with their own workers, - // storage, caches, etc.). The server MAY require use of this field to select - // between them in an implementation-defined fashion, otherwise it can be - // omitted. - string instance_name = 1; -} - -// A response message for -// [Capabilities.GetCapabilities][build.bazel.remote.execution.v2.Capabilities.GetCapabilities]. -message ServerCapabilities { - // Capabilities of the remote cache system. - CacheCapabilities cache_capabilities = 1; - - // Capabilities of the remote execution system. - ExecutionCapabilities execution_capabilities = 2; - - // Earliest RE API version supported, including deprecated versions. - build.bazel.semver.SemVer deprecated_api_version = 3; - - // Earliest non-deprecated RE API version supported. - build.bazel.semver.SemVer low_api_version = 4; - - // Latest RE API version supported. - build.bazel.semver.SemVer high_api_version = 5; -} - -// The digest function used for converting values into keys for CAS and Action -// Cache. -message DigestFunction { - enum Value { - // It is an error for the server to return this value. - UNKNOWN = 0; - - // The SHA-256 digest function. - SHA256 = 1; - - // The SHA-1 digest function. - SHA1 = 2; - - // The MD5 digest function. - MD5 = 3; - - // The Microsoft "VSO-Hash" paged SHA256 digest function. - // See https://github.com/microsoft/BuildXL/blob/master/Documentation/Specs/PagedHash.md . - VSO = 4; - - // The SHA-384 digest function. - SHA384 = 5; - - // The SHA-512 digest function. - SHA512 = 6; - - // Murmur3 128-bit digest function, x64 variant. Note that this is not a - // cryptographic hash function and its collision properties are not strongly guaranteed. - // See https://github.com/aappleby/smhasher/wiki/MurmurHash3 . - MURMUR3 = 7; - } -} - -// Describes the server/instance capabilities for updating the action cache. -message ActionCacheUpdateCapabilities { - bool update_enabled = 1; -} - -// Allowed values for priority in -// [ResultsCachePolicy][build.bazel.remoteexecution.v2.ResultsCachePolicy] and -// [ExecutionPolicy][build.bazel.remoteexecution.v2.ResultsCachePolicy] -// Used for querying both cache and execution valid priority ranges. -message PriorityCapabilities { - // Supported range of priorities, including boundaries. - message PriorityRange { - // The minimum numeric value for this priority range, which represents the - // most urgent task or longest retained item. - int32 min_priority = 1; - // The maximum numeric value for this priority range, which represents the - // least urgent task or shortest retained item. - int32 max_priority = 2; - } - repeated PriorityRange priorities = 1; -} - -// Describes how the server treats absolute symlink targets. -message SymlinkAbsolutePathStrategy { - enum Value { - // Invalid value. - UNKNOWN = 0; - - // Server will return an `INVALID_ARGUMENT` on input symlinks with absolute - // targets. - // If an action tries to create an output symlink with an absolute target, a - // `FAILED_PRECONDITION` will be returned. - DISALLOWED = 1; - - // Server will allow symlink targets to escape the input root tree, possibly - // resulting in non-hermetic builds. - ALLOWED = 2; - } -} - -// Compression formats which may be supported. -message Compressor { - enum Value { - // No compression. Servers and clients MUST always support this, and do - // not need to advertise it. - IDENTITY = 0; - - // Zstandard compression. - ZSTD = 1; - - // RFC 1951 Deflate. This format is identical to what is used by ZIP - // files. Headers such as the one generated by gzip are not - // included. - // - // It is advised to use algorithms such as Zstandard instead, as - // those are faster and/or provide a better compression ratio. - DEFLATE = 2; - } -} - -// Capabilities of the remote cache system. -message CacheCapabilities { - // All the digest functions supported by the remote cache. - // Remote cache may support multiple digest functions simultaneously. - repeated DigestFunction.Value digest_function = 1; - - // Capabilities for updating the action cache. - ActionCacheUpdateCapabilities action_cache_update_capabilities = 2; - - // Supported cache priority range for both CAS and ActionCache. - PriorityCapabilities cache_priority_capabilities = 3; - - // Maximum total size of blobs to be uploaded/downloaded using - // batch methods. A value of 0 means no limit is set, although - // in practice there will always be a message size limitation - // of the protocol in use, e.g. GRPC. - int64 max_batch_total_size_bytes = 4; - - // Whether absolute symlink targets are supported. - SymlinkAbsolutePathStrategy.Value symlink_absolute_path_strategy = 5; - - // Compressors supported by the "compressed-blobs" bytestream resources. - // Servers MUST support identity/no-compression, even if it is not listed - // here. - // - // Note that this does not imply which if any compressors are supported by - // the server at the gRPC level. - repeated Compressor.Value supported_compressor = 6; -} - -// Capabilities of the remote execution system. -message ExecutionCapabilities { - // Remote execution may only support a single digest function. - DigestFunction.Value digest_function = 1; - - // Whether remote execution is enabled for the particular server/instance. - bool exec_enabled = 2; - - // Supported execution priority range. - PriorityCapabilities execution_priority_capabilities = 3; - - // Supported node properties. - repeated string supported_node_properties = 4; -} - -// Details for the tool used to call the API. -message ToolDetails { - // Name of the tool, e.g. bazel. - string tool_name = 1; - - // Version of the tool used for the request, e.g. 5.0.3. - string tool_version = 2; -} - -// An optional Metadata to attach to any RPC request to tell the server about an -// external context of the request. The server may use this for logging or other -// purposes. To use it, the client attaches the header to the call using the -// canonical proto serialization: -// -// * name: `build.bazel.remote.execution.v2.requestmetadata-bin` -// * contents: the base64 encoded binary `RequestMetadata` message. -// Note: the gRPC library serializes binary headers encoded in base 64 by -// default (https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#requests). -// Therefore, if the gRPC library is used to pass/retrieve this -// metadata, the user may ignore the base64 encoding and assume it is simply -// serialized as a binary message. -message RequestMetadata { - // The details for the tool invoking the requests. - ToolDetails tool_details = 1; - - // An identifier that ties multiple requests to the same action. - // For example, multiple requests to the CAS, Action Cache, and Execution - // API are used in order to compile foo.cc. - string action_id = 2; - - // An identifier that ties multiple actions together to a final result. - // For example, multiple actions are required to build and run foo_test. - string tool_invocation_id = 3; - - // An identifier to tie multiple tool invocations together. For example, - // runs of foo_test, bar_test and baz_test on a post-submit of a given patch. - string correlated_invocations_id = 4; - - // A brief description of the kind of action, for example, CppCompile or GoLink. - // There is no standard agreed set of values for this, and they are expected to vary between different client tools. - string action_mnemonic = 5; - - // An identifier for the target which produced this action. - // No guarantees are made around how many actions may relate to a single target. - string target_id = 6; - - // An identifier for the configuration in which the target was built, - // e.g. for differentiating building host tools or different target platforms. - // There is no expectation that this value will have any particular structure, - // or equality across invocations, though some client tools may offer these guarantees. - string configuration_id = 7; -} diff --git a/proto/prost/private/tests/complex_imports/remote-apis/build/bazel/semver/BUILD.bazel b/proto/prost/private/tests/complex_imports/remote-apis/build/bazel/semver/BUILD.bazel deleted file mode 100644 index 22624417f5..0000000000 --- a/proto/prost/private/tests/complex_imports/remote-apis/build/bazel/semver/BUILD.bazel +++ /dev/null @@ -1,25 +0,0 @@ -load("@rules_proto//proto:defs.bzl", "proto_library") -load("@rules_rust//proto/prost:defs.bzl", "rust_prost_library") -load("//rust:defs.bzl", "rust_test") - -proto_library( - name = "semver_proto", - srcs = ["semver.proto"], - strip_import_prefix = "/proto/prost/private/tests/complex_imports/remote-apis", - visibility = ["//visibility:public"], -) - -rust_prost_library( - name = "semver_rs_proto", - proto = ":semver_proto", - visibility = ["//visibility:public"], -) - -rust_test( - name = "semver_test", - srcs = ["semver_test.rs"], - edition = "2021", - deps = [ - ":semver_rs_proto", - ], -) diff --git a/proto/prost/private/tests/complex_imports/remote-apis/build/bazel/semver/semver.proto b/proto/prost/private/tests/complex_imports/remote-apis/build/bazel/semver/semver.proto deleted file mode 100644 index 3b626b7e47..0000000000 --- a/proto/prost/private/tests/complex_imports/remote-apis/build/bazel/semver/semver.proto +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2018 The Bazel Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package build.bazel.semver; - -option csharp_namespace = "Build.Bazel.Semver"; -option go_package = "semver"; -option java_multiple_files = true; -option java_outer_classname = "SemverProto"; -option java_package = "build.bazel.semver"; -option objc_class_prefix = "SMV"; - -// The full version of a given tool. -message SemVer { - // The major version, e.g 10 for 10.2.3. - int32 major = 1; - - // The minor version, e.g. 2 for 10.2.3. - int32 minor = 2; - - // The patch version, e.g 3 for 10.2.3. - int32 patch = 3; - - // The pre-release version. Either this field or major/minor/patch fields - // must be filled. They are mutually exclusive. Pre-release versions are - // assumed to be earlier than any released versions. - string prerelease = 4; -} diff --git a/test/deps.bzl b/test/deps.bzl index 35821618fc..dfbfd413af 100644 --- a/test/deps.bzl +++ b/test/deps.bzl @@ -45,3 +45,29 @@ def rules_rust_test_deps(): name = "rules_rust_toolchain_test_target_json", target_json = Label("//test/unit/toolchain:toolchain-test-triple.json"), ) + + maybe( + http_archive, + name = "bazel_remote_apis", + urls = ["https://github.com/bazelbuild/remote-apis/archive/068363a3625e166056c155f6441cfb35ca8dfbf2.zip"], + sha256 = "34263013f19e6161195747dc0d3293f8bf65c8fed1f60ba40d4246c4f8008de1", + strip_prefix = "remote-apis-068363a3625e166056c155f6441cfb35ca8dfbf2", + workspace_file_content = "exports_files(['external/BUILD.googleapis'])", + ) + + maybe( + http_archive, + name = "googleapis", + build_file = "@bazel_remote_apis//:external/BUILD.googleapis", + sha256 = "7b6ea252f0b8fb5cd722f45feb83e115b689909bbb6a393a873b6cbad4ceae1d", + strip_prefix = "googleapis-143084a2624b6591ee1f9d23e7f5241856642f4d", + urls = ["https://github.com/googleapis/googleapis/archive/143084a2624b6591ee1f9d23e7f5241856642f4d.zip"], + ) + + maybe( + http_archive, + name = "com_github_grpc_grpc", + sha256 = "b391a327429279f6f29b9ae7e5317cd80d5e9d49cc100e6d682221af73d984a6", + strip_prefix = "grpc-93e8830070e9afcbaa992c75817009ee3f4b63a0", # v1.24.3 with fixes + urls = ["https://github.com/grpc/grpc/archive/93e8830070e9afcbaa992c75817009ee3f4b63a0.zip"], + ) From 9bd48e189a251cf331750df0e38c26c576b7fa6b Mon Sep 17 00:00:00 2001 From: Stu Schwartz Date: Thu, 29 Jun 2023 19:15:01 -0700 Subject: [PATCH 27/31] Remove bazel remote apis due to file length and transitive dependency issues. --- .../tests/bazel_remote_apis/BUILD.bazel | 32 ------------------- .../remote_execution_test.rs | 12 ------- .../tests/bazel_remote_apis/semver_test.rs | 15 --------- test/deps.bzl | 26 --------------- 4 files changed, 85 deletions(-) delete mode 100644 proto/prost/private/tests/bazel_remote_apis/BUILD.bazel delete mode 100644 proto/prost/private/tests/bazel_remote_apis/remote_execution_test.rs delete mode 100644 proto/prost/private/tests/bazel_remote_apis/semver_test.rs diff --git a/proto/prost/private/tests/bazel_remote_apis/BUILD.bazel b/proto/prost/private/tests/bazel_remote_apis/BUILD.bazel deleted file mode 100644 index e763e1d530..0000000000 --- a/proto/prost/private/tests/bazel_remote_apis/BUILD.bazel +++ /dev/null @@ -1,32 +0,0 @@ -load("@rules_rust//proto/prost:defs.bzl", "rust_prost_library", "rust_tonic_library") -load("//rust:defs.bzl", "rust_test") - -rust_tonic_library( - name = "remote_execution_rs_proto", - proto = "@bazel_remote_apis//build/bazel/remote/execution/v2:remote_execution_proto", - visibility = ["//visibility:public"], -) - -rust_test( - name = "remote_execution_test", - srcs = ["remote_execution_test.rs"], - edition = "2021", - deps = [ - ":remote_execution_rs_proto", - ], -) - -rust_prost_library( - name = "semver_rs_proto", - proto = "@bazel_remote_apis//build/bazel/semver:semver_proto", - visibility = ["//visibility:public"], -) - -rust_test( - name = "semver_test", - srcs = ["semver_test.rs"], - edition = "2021", - deps = [ - ":semver_rs_proto", - ], -) diff --git a/proto/prost/private/tests/bazel_remote_apis/remote_execution_test.rs b/proto/prost/private/tests/bazel_remote_apis/remote_execution_test.rs deleted file mode 100644 index c0e2608abb..0000000000 --- a/proto/prost/private/tests/bazel_remote_apis/remote_execution_test.rs +++ /dev/null @@ -1,12 +0,0 @@ -//! Tests the remote execution protos. - -use remote_execution_proto::build::bazel::remote::execution::v2::Digest; - -#[test] -fn test_remote_execution() { - let digest = Digest { - hash: "hash".to_string(), - size_bytes: 50, - }; - assert_eq!(digest.hash, "hash"); -} diff --git a/proto/prost/private/tests/bazel_remote_apis/semver_test.rs b/proto/prost/private/tests/bazel_remote_apis/semver_test.rs deleted file mode 100644 index 8120610ecd..0000000000 --- a/proto/prost/private/tests/bazel_remote_apis/semver_test.rs +++ /dev/null @@ -1,15 +0,0 @@ -//! Tests the semver protos. - -use semver_proto::build::bazel::semver::SemVer; - -#[test] -fn test_semver() { - let semver = SemVer { - major: 1, - minor: 2, - patch: 3, - prerelease: "prerelease".to_string(), - }; - - assert_eq!(semver.major, 1); -} diff --git a/test/deps.bzl b/test/deps.bzl index dfbfd413af..35821618fc 100644 --- a/test/deps.bzl +++ b/test/deps.bzl @@ -45,29 +45,3 @@ def rules_rust_test_deps(): name = "rules_rust_toolchain_test_target_json", target_json = Label("//test/unit/toolchain:toolchain-test-triple.json"), ) - - maybe( - http_archive, - name = "bazel_remote_apis", - urls = ["https://github.com/bazelbuild/remote-apis/archive/068363a3625e166056c155f6441cfb35ca8dfbf2.zip"], - sha256 = "34263013f19e6161195747dc0d3293f8bf65c8fed1f60ba40d4246c4f8008de1", - strip_prefix = "remote-apis-068363a3625e166056c155f6441cfb35ca8dfbf2", - workspace_file_content = "exports_files(['external/BUILD.googleapis'])", - ) - - maybe( - http_archive, - name = "googleapis", - build_file = "@bazel_remote_apis//:external/BUILD.googleapis", - sha256 = "7b6ea252f0b8fb5cd722f45feb83e115b689909bbb6a393a873b6cbad4ceae1d", - strip_prefix = "googleapis-143084a2624b6591ee1f9d23e7f5241856642f4d", - urls = ["https://github.com/googleapis/googleapis/archive/143084a2624b6591ee1f9d23e7f5241856642f4d.zip"], - ) - - maybe( - http_archive, - name = "com_github_grpc_grpc", - sha256 = "b391a327429279f6f29b9ae7e5317cd80d5e9d49cc100e6d682221af73d984a6", - strip_prefix = "grpc-93e8830070e9afcbaa992c75817009ee3f4b63a0", # v1.24.3 with fixes - urls = ["https://github.com/grpc/grpc/archive/93e8830070e9afcbaa992c75817009ee3f4b63a0.zip"], - ) From b9b28727c605711d036b783335b1fd4115c43997 Mon Sep 17 00:00:00 2001 From: Stu Schwartz Date: Fri, 30 Jun 2023 11:19:57 -0700 Subject: [PATCH 28/31] Update patch and docs. --- proto/prost/private/3rdparty/patches/README.md | 6 ++++++ .../3rdparty/patches/protoc-gen-prost.patch | 14 +++++--------- 2 files changed, 11 insertions(+), 9 deletions(-) create mode 100644 proto/prost/private/3rdparty/patches/README.md diff --git a/proto/prost/private/3rdparty/patches/README.md b/proto/prost/private/3rdparty/patches/README.md new file mode 100644 index 0000000000..45bf60cab4 --- /dev/null +++ b/proto/prost/private/3rdparty/patches/README.md @@ -0,0 +1,6 @@ +# Patches + +## [protoc-gen-prost](./protoc-gen-prost.patch) + +This patch addresses the issue described in https://github.com/neoeinstein/protoc-gen-prost/issues/70. +Whenever a version greater than `0.2.2` is released it can be dropped. diff --git a/proto/prost/private/3rdparty/patches/protoc-gen-prost.patch b/proto/prost/private/3rdparty/patches/protoc-gen-prost.patch index 1ca697cfcd..25ab69a4ce 100644 --- a/proto/prost/private/3rdparty/patches/protoc-gen-prost.patch +++ b/proto/prost/private/3rdparty/patches/protoc-gen-prost.patch @@ -1,14 +1,10 @@ diff --git a/src/lib.rs b/src/lib.rs -index 43fc5ba..aa86fb0 100644 +index 43fc5ba..2098949 100644 --- a/src/lib.rs +++ b/src/lib.rs -@@ -84,19 +84,20 @@ impl ModuleRequestSet { - let requests = proto_file.into_iter().zip(raw_protos.proto_file).fold( - BTreeMap::new(), +@@ -86,17 +86,17 @@ impl ModuleRequestSet { |mut acc, (proto, raw)| { -- let module = Module::from_protobuf_package_name(proto.package()); -+ let proto_package = proto.package(); -+ let module = Module::from_protobuf_package_name(proto_package); + let module = Module::from_protobuf_package_name(proto.package()); let proto_filename = proto.name(); - let entry = acc.entry(module).or_insert_with(|| { - let mut request = ModuleRequest::new(proto.package().to_owned()); @@ -23,10 +19,10 @@ index 43fc5ba..aa86fb0 100644 - }); + let entry = acc + .entry(module) -+ .or_insert_with(|| ModuleRequest::new(proto_package.to_owned())); ++ .or_insert_with(|| ModuleRequest::new(proto.package().to_owned())); + + if entry.output_filename().is_none() && input_protos.contains(proto_filename) { -+ let filename = match proto_package { ++ let filename = match proto.package() { + "" => default_package_filename.to_owned(), + package => format!("{package}.rs"), + }; From 5d64e3c665e5e19e14a1099bce706694b9be7842 Mon Sep 17 00:00:00 2001 From: Stu Schwartz Date: Fri, 30 Jun 2023 12:08:50 -0700 Subject: [PATCH 29/31] Regenerate documentation --- docs/rust_proto.md | 127 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 119 insertions(+), 8 deletions(-) diff --git a/docs/rust_proto.md b/docs/rust_proto.md index 051cf87bce..7e91daf7f1 100644 --- a/docs/rust_proto.md +++ b/docs/rust_proto.md @@ -11,12 +11,19 @@ ## Overview - These build rules are used for building [protobufs][protobuf]/[gRPC][grpc] in [Rust][rust] with Bazel. +There are two rule sets. The first ruleset defines the `rust_proto_library` and `rust_grpc_library` +rules which generate Rust code using the [`rust-protobuf`] dependencies. The second ruleset defines +the `rust_prost_library` and `rust_tonic_library` rules which generate Rust code using the [`prost`] +and [`tonic`] dependencies respectively. + [rust]: http://www.rust-lang.org/ [protobuf]: https://developers.google.com/protocol-buffers/ [grpc]: https://grpc.io +[`rust-protobuf`]: https://github.com/stepancheg/rust-protobuf/ +[`prost`]: https://github.com/tokio-rs/prost +[`tonic`]: https://github.com/hyperium/tonic See the [protobuf example](../examples/proto) for a more complete example of use. @@ -35,17 +42,21 @@ load("@rules_rust//proto:transitive_repositories.bzl", "rust_proto_transitive_re rust_proto_transitive_repositories() ``` -This will load crate dependencies of protobuf that are generated using -[crate_universe](./crate_universe.md) inside the rules_rust -repository. However, using those dependencies might conflict with other uses -of [crate_universe](./crate_universe.md). If you need to change -those dependencies, please see the [dedicated section below](#custom-deps). +This will load the required dependencies for the Proto, Prost, and Tonic rules. It will also +register a default toolchain for the `rust_proto_library` and `rust_grpc_library` rules. The +`prost` and `tonic` rules do not specify a default toolchain in order to avoid mismatched +dependency issues. + +To customize the `rust_proto_library` and `rust_grpc_library` toolchain, please see the section +[Customizing `rust-protobuf` Dependencies](#custom-proto-deps). + +To setup the `prost` and `tonic` toolchain, please see the section [Customizing `prost` and `tonic` Dependencies](#custom-prost-deps). For additional information about Bazel toolchains, see [here](https://docs.bazel.build/versions/master/toolchains.html). -## Customizing dependencies +## Customizing `rust-protobuf` Dependencies -These rules depends on the [`protobuf`](https://crates.io/crates/protobuf) and +These rules depend on the [`protobuf`](https://crates.io/crates/protobuf) and the [`grpc`](https://crates.io/crates/grpc) crates in addition to the [protobuf compiler](https://github.com/google/protobuf). To obtain these crates, `rust_proto_repositories` imports the given crates using BUILD files generated with @@ -116,6 +127,106 @@ but due to [bazelbuild/bazel#6889](https://github.com/bazelbuild/bazel/issues/68 all dependencies added via the toolchain ends-up being in the wrong configuration. +## Customizing `prost` and `tonic` Dependencies + +These rules depend on the [`prost`] and [`tonic`] dependencies. To setup the necessary toolchain +for these rules, you must define a toolchain with the `prost`, `prost-types`, `tonic`, `protoc`, `protoc-gen-prost`, and `protoc-gen-tonic` crates. + +To get access to these crates, you can use the [crate_universe](./crate_universe.md) repository +rules. For example: + +```python +load("//crate_universe:defs.bzl", "crate", "crates_repository") + +crates_repository( + name = "crates_io", + annotations = { + "protoc-gen-prost": [crate.annotation( + gen_binaries = ["protoc-gen-prost"], + patch_args = [ + "-p1", + ], + patches = [ + # Note: You will need to use this patch until a version greater than `0.2.2` of + # `protoc-gen-prost` is released. + "@rules_rust//proto/prost/private/3rdparty/patches:protoc-gen-prost.patch", + ], + )], + "protoc-gen-tonic": [crate.annotation( + gen_binaries = ["protoc-gen-tonic"], + )], + }, + cargo_lockfile = "Cargo.Bazel.lock", + mode = "remote", + packages = { + "prost": crate.spec( + version = "0", + ), + "prost-types": crate.spec( + version = "0", + ), + "protoc-gen-prost": crate.spec( + version = "0", + ), + "protoc-gen-tonic": crate.spec( + version = "0", + ), + "tonic": crate.spec( + version = "0", + ), + }, + repository_name = "rules_rust_prost", + tags = ["manual"], +) +``` + +You can then define a toolchain with the `rust_prost_toolchain` rule which uses the crates +defined above. For example: + +```python +load("@rules_rust//proto/prost:defs.bzl", "rust_prost_toolchain") +load("@rules_rust//rust:defs.bzl", "rust_library_group") + +rust_library_group( + name = "prost_runtime", + deps = [ + "@crates_io//:prost", + ], +) + +rust_library_group( + name = "tonic_runtime", + deps = [ + ":prost_runtime", + "@crates_io//:tonic", + ], +) + +rust_prost_toolchain( + name = "prost_toolchain_impl", + prost_plugin = "@crates_io//:protoc-gen-prost__protoc-gen-prost", + prost_runtime = ":prost_runtime", + prost_types = "@crates_io//:prost-types", + proto_compiler = "@com_google_protobuf//:protoc", + tonic_plugin = "@crates_io//:protoc-gen-tonic__protoc-gen-tonic", + tonic_runtime = ":tonic_runtime", +) + +toolchain( + name = "prost_toolchain", + toolchain = "default_prost_toolchain_impl", + toolchain_type = "//proto/prost:toolchain_type", +) +``` + +Lastly, you must register the toolchain in your `WORKSPACE` file. For example: + +```python +register_toolchains("//toolchains:prost_toolchain") +``` + + + From 38b99897552e37d2ded25b623a6607f866123a55 Mon Sep 17 00:00:00 2001 From: Stu Schwartz Date: Fri, 30 Jun 2023 12:12:50 -0700 Subject: [PATCH 30/31] Regenerate documentation --- docs/rust_proto.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/rust_proto.md b/docs/rust_proto.md index 7e91daf7f1..1e0b0418cb 100644 --- a/docs/rust_proto.md +++ b/docs/rust_proto.md @@ -22,8 +22,6 @@ and [`tonic`] dependencies respectively. [protobuf]: https://developers.google.com/protocol-buffers/ [grpc]: https://grpc.io [`rust-protobuf`]: https://github.com/stepancheg/rust-protobuf/ -[`prost`]: https://github.com/tokio-rs/prost -[`tonic`]: https://github.com/hyperium/tonic See the [protobuf example](../examples/proto) for a more complete example of use. @@ -130,7 +128,14 @@ configuration. ## Customizing `prost` and `tonic` Dependencies These rules depend on the [`prost`] and [`tonic`] dependencies. To setup the necessary toolchain -for these rules, you must define a toolchain with the `prost`, `prost-types`, `tonic`, `protoc`, `protoc-gen-prost`, and `protoc-gen-tonic` crates. +for these rules, you must define a toolchain with the [`prost`], [`prost-types`], [`tonic`],[`protoc-gen-prost`], and [`protoc-gen-tonic`] crates as well as the [`protoc`] binary. + +[`prost`]: https://crates.io/crates/prost +[`prost-types`]: https://crates.io/crates/prost-types +[`protoc-gen-prost`]: https://crates.io/crates/protoc-gen-prost +[`protoc-gen-tonic`]: https://crates.io/crates/protoc-gen-tonic +[`tonic`]: https://crates.io/crates/tonic +[`protoc`]: https://github.com/protocolbuffers/protobuf To get access to these crates, you can use the [crate_universe](./crate_universe.md) repository rules. For example: @@ -226,8 +231,6 @@ register_toolchains("//toolchains:prost_toolchain") ``` - - ## rust_grpc_library From 7ac0bd16ab2706b9df2ce123ff60b4fea1e04ff0 Mon Sep 17 00:00:00 2001 From: Stu Schwartz Date: Fri, 30 Jun 2023 12:13:12 -0700 Subject: [PATCH 31/31] Update docs. --- docs/rust_proto.vm | 130 +++++++++++++++++++++++++++++++--- proto/prost/private/prost.bzl | 2 + 2 files changed, 124 insertions(+), 8 deletions(-) diff --git a/docs/rust_proto.vm b/docs/rust_proto.vm index c5e069cf88..b2dce936be 100644 --- a/docs/rust_proto.vm +++ b/docs/rust_proto.vm @@ -1,11 +1,16 @@ #[[ ## Overview - These build rules are used for building [protobufs][protobuf]/[gRPC][grpc] in [Rust][rust] with Bazel. +There are two rule sets. The first ruleset defines the `rust_proto_library` and `rust_grpc_library` +rules which generate Rust code using the [`rust-protobuf`] dependencies. The second ruleset defines +the `rust_prost_library` and `rust_tonic_library` rules which generate Rust code using the [`prost`] +and [`tonic`] dependencies respectively. + [rust]: http://www.rust-lang.org/ [protobuf]: https://developers.google.com/protocol-buffers/ [grpc]: https://grpc.io +[`rust-protobuf`]: https://github.com/stepancheg/rust-protobuf/ See the [protobuf example](../examples/proto) for a more complete example of use. @@ -24,17 +29,21 @@ load("@rules_rust//proto:transitive_repositories.bzl", "rust_proto_transitive_re rust_proto_transitive_repositories() ``` -This will load crate dependencies of protobuf that are generated using -[crate_universe](./crate_universe.md) inside the rules_rust -repository. However, using those dependencies might conflict with other uses -of [crate_universe](./crate_universe.md). If you need to change -those dependencies, please see the [dedicated section below](#custom-deps). +This will load the required dependencies for the Proto, Prost, and Tonic rules. It will also +register a default toolchain for the `rust_proto_library` and `rust_grpc_library` rules. The +`prost` and `tonic` rules do not specify a default toolchain in order to avoid mismatched +dependency issues. + +To customize the `rust_proto_library` and `rust_grpc_library` toolchain, please see the section +[Customizing `rust-protobuf` Dependencies](#custom-proto-deps). + +To setup the `prost` and `tonic` toolchain, please see the section [Customizing `prost` and `tonic` Dependencies](#custom-prost-deps). For additional information about Bazel toolchains, see [here](https://docs.bazel.build/versions/master/toolchains.html). -## Customizing dependencies +## Customizing `rust-protobuf` Dependencies -These rules depends on the [`protobuf`](https://crates.io/crates/protobuf) and +These rules depend on the [`protobuf`](https://crates.io/crates/protobuf) and the [`grpc`](https://crates.io/crates/grpc) crates in addition to the [protobuf compiler](https://github.com/google/protobuf). To obtain these crates, `rust_proto_repositories` imports the given crates using BUILD files generated with @@ -104,4 +113,109 @@ __Note__: Ideally, we would inject those dependencies from the toolchain, but due to [bazelbuild/bazel#6889](https://github.com/bazelbuild/bazel/issues/6889) all dependencies added via the toolchain ends-up being in the wrong configuration. + +## Customizing `prost` and `tonic` Dependencies + +These rules depend on the [`prost`] and [`tonic`] dependencies. To setup the necessary toolchain +for these rules, you must define a toolchain with the [`prost`], [`prost-types`], [`tonic`],[`protoc-gen-prost`], and [`protoc-gen-tonic`] crates as well as the [`protoc`] binary. + +[`prost`]: https://crates.io/crates/prost +[`prost-types`]: https://crates.io/crates/prost-types +[`protoc-gen-prost`]: https://crates.io/crates/protoc-gen-prost +[`protoc-gen-tonic`]: https://crates.io/crates/protoc-gen-tonic +[`tonic`]: https://crates.io/crates/tonic +[`protoc`]: https://github.com/protocolbuffers/protobuf + +To get access to these crates, you can use the [crate_universe](./crate_universe.md) repository +rules. For example: + +```python +load("//crate_universe:defs.bzl", "crate", "crates_repository") + +crates_repository( + name = "crates_io", + annotations = { + "protoc-gen-prost": [crate.annotation( + gen_binaries = ["protoc-gen-prost"], + patch_args = [ + "-p1", + ], + patches = [ + # Note: You will need to use this patch until a version greater than `0.2.2` of + # `protoc-gen-prost` is released. + "@rules_rust//proto/prost/private/3rdparty/patches:protoc-gen-prost.patch", + ], + )], + "protoc-gen-tonic": [crate.annotation( + gen_binaries = ["protoc-gen-tonic"], + )], + }, + cargo_lockfile = "Cargo.Bazel.lock", + mode = "remote", + packages = { + "prost": crate.spec( + version = "0", + ), + "prost-types": crate.spec( + version = "0", + ), + "protoc-gen-prost": crate.spec( + version = "0", + ), + "protoc-gen-tonic": crate.spec( + version = "0", + ), + "tonic": crate.spec( + version = "0", + ), + }, + repository_name = "rules_rust_prost", + tags = ["manual"], +) +``` + +You can then define a toolchain with the `rust_prost_toolchain` rule which uses the crates +defined above. For example: + +```python +load("@rules_rust//proto/prost:defs.bzl", "rust_prost_toolchain") +load("@rules_rust//rust:defs.bzl", "rust_library_group") + +rust_library_group( + name = "prost_runtime", + deps = [ + "@crates_io//:prost", + ], +) + +rust_library_group( + name = "tonic_runtime", + deps = [ + ":prost_runtime", + "@crates_io//:tonic", + ], +) + +rust_prost_toolchain( + name = "prost_toolchain_impl", + prost_plugin = "@crates_io//:protoc-gen-prost__protoc-gen-prost", + prost_runtime = ":prost_runtime", + prost_types = "@crates_io//:prost-types", + proto_compiler = "@com_google_protobuf//:protoc", + tonic_plugin = "@crates_io//:protoc-gen-tonic__protoc-gen-tonic", + tonic_runtime = ":tonic_runtime", +) + +toolchain( + name = "prost_toolchain", + toolchain = "default_prost_toolchain_impl", + toolchain_type = "//proto/prost:toolchain_type", +) +``` + +Lastly, you must register the toolchain in your `WORKSPACE` file. For example: + +```python +register_toolchains("//toolchains:prost_toolchain") +``` ]]# diff --git a/proto/prost/private/prost.bzl b/proto/prost/private/prost.bzl index 940d368900..f41e4fe7ff 100644 --- a/proto/prost/private/prost.bzl +++ b/proto/prost/private/prost.bzl @@ -427,6 +427,7 @@ rust_prost_toolchain = rule( "prost_plugin_flag": attr.string( doc = "Prost plugin flag format. (e.g. `--plugin=protoc-gen-prost=%s`)", mandatory = True, + default = "--plugin=protoc-gen-prost=%s", ), "prost_runtime": attr.label( doc = "The Prost runtime crates to use.", @@ -454,6 +455,7 @@ rust_prost_toolchain = rule( ), "tonic_plugin_flag": attr.string( doc = "Tonic plugin flag format. (e.g. `--plugin=protoc-gen-tonic=%s`))", + default = "--plugin=protoc-gen-tonic=%s", ), "tonic_runtime": attr.label( doc = "The Tonic runtime crates to use.",