1load("@bazel_skylib//:bzl_library.bzl", "bzl_library") 2load("@rules_rust//rust:defs.bzl", "rust_binary", "rust_test") 3load("//proto/prost:defs.bzl", "rust_prost_toolchain") 4load("//rust:defs.bzl", "rust_library_group") 5load(":prost.bzl", "RUST_EDITION", "current_prost_runtime") 6 7current_prost_runtime( 8 name = "current_prost_runtime", 9) 10 11rust_binary( 12 name = "protoc_wrapper", 13 srcs = ["protoc_wrapper.rs"], 14 edition = RUST_EDITION, 15 visibility = ["//visibility:public"], 16 deps = [ 17 ":current_prost_runtime", 18 "@rules_rust_prost__heck//:heck", 19 ], 20) 21 22rust_test( 23 name = "protoc_wrapper_test", 24 crate = ":protoc_wrapper", 25 edition = RUST_EDITION, 26) 27 28bzl_library( 29 name = "bzl_lib", 30 srcs = glob(["**/*.bzl"]), 31 visibility = ["//proto/prost:__pkg__"], 32 deps = [ 33 "//proto/prost/private/3rdparty:bzl_lib", 34 ], 35) 36 37rust_library_group( 38 name = "prost_runtime", 39 deps = [ 40 "//proto/prost/private/3rdparty/crates:prost", 41 ], 42) 43 44rust_library_group( 45 name = "tonic_runtime", 46 deps = [ 47 ":prost_runtime", 48 "//proto/prost/private/3rdparty/crates:tonic", 49 ], 50) 51 52rust_prost_toolchain( 53 name = "default_prost_toolchain_impl", 54 prost_plugin = "//proto/prost/private/3rdparty/crates:protoc-gen-prost__protoc-gen-prost", 55 prost_plugin_flag = "--plugin=protoc-gen-prost=%s", 56 prost_runtime = ":prost_runtime", 57 prost_types = "//proto/prost/private/3rdparty/crates:prost-types", 58 tonic_plugin = "//proto/prost/private/3rdparty/crates:protoc-gen-tonic__protoc-gen-tonic", 59 tonic_plugin_flag = "--plugin=protoc-gen-tonic=%s", 60 tonic_runtime = ":tonic_runtime", 61) 62