fork/rules_rust
git clone https://git.julia.blue/fork/rules_rust
2bad96d9
main
1load ( "@bazel_skylib//rules:build_test.bzl" , "build_test" ) 2load ( "@rules_proto//proto:defs.bzl" , "proto_library" ) 3load ( "@rules_rust_protobuf//:defs.bzl" , "rust_proto_library" ) 4 5proto_library ( 6name = "a_proto" , 7srcs = [ "a.proto" ], 8strip_import_prefix = "" , 9) 10 11proto_library ( 12name = "b_proto" , 13srcs = [ "b.proto" ], 14strip_import_prefix = "" , 15deps = [ ":a_proto" ], 16) 17 18rust_proto_library ( 19name = "b_rust" , 20# In Rust nightly (2023-04-20), this target fails due to the following issue: 21# https://doc.rust-lang.org/nightly/nightly-rustc/rustc_lint/builtin/static.AMBIGUOUS_GLOB_REEXPORTS.html 22tags = [ "no-clippy" ], 23# The protobuf rules don't currently work on Windows. 24target_compatible_with = select ({ 25"@platforms//os:windows" : [ "@platforms//:incompatible" ], 26"//conditions:default" : [], 27}), 28deps = [ ":b_proto" ], 29) 30 31build_test ( 32name = "build_test" , 33targets = [ ":b_rust" ], 34)