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