diff --git a/bindgen/clang.BUILD b/bindgen/clang.BUILD index 46e4eebf0b..3a4a15880d 100644 --- a/bindgen/clang.BUILD +++ b/bindgen/clang.BUILD @@ -1,3 +1,5 @@ +load("@rules_cc//cc:defs.bzl", "cc_library") + package(default_visibility = ["//visibility:public"]) sh_binary( diff --git a/bindgen/raze/libloading.BUILD b/bindgen/raze/libloading.BUILD index 81be67070a..9a17cfcaba 100644 --- a/bindgen/raze/libloading.BUILD +++ b/bindgen/raze/libloading.BUILD @@ -5,6 +5,8 @@ cargo-raze crate build file. - Libloading has a CC dep that needs to be built. """ +load("@rules_cc//cc:defs.bzl", "cc_library") + licenses([ "notice", # "ISC" ]) diff --git a/examples/ffi/c_calling_rust/BUILD b/examples/ffi/c_calling_rust/BUILD index 312a3e55b5..e0c644ae9e 100644 --- a/examples/ffi/c_calling_rust/BUILD +++ b/examples/ffi/c_calling_rust/BUILD @@ -1,4 +1,5 @@ -load("@io_bazel_rules_rust//rust:rust.bzl", "rust_binary", "rust_library", "rust_test") +load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test") +load("@io_bazel_rules_rust//rust:rust.bzl", "rust_library") rust_library( name = "rusty", diff --git a/examples/ffi/rust_calling_c/BUILD b/examples/ffi/rust_calling_c/BUILD index c9b0964e9e..80dba6cc34 100644 --- a/examples/ffi/rust_calling_c/BUILD +++ b/examples/ffi/rust_calling_c/BUILD @@ -1,6 +1,6 @@ package(default_visibility = ["//ffi/rust_calling_c:__subpackages__"]) -load("@io_bazel_rules_rust//rust:rust.bzl", "rust_binary", "rust_doc", "rust_library", "rust_test") +load("@io_bazel_rules_rust//rust:rust.bzl", "rust_doc", "rust_library", "rust_test") rust_library( name = "matrix", diff --git a/examples/ffi/rust_calling_c/c/BUILD b/examples/ffi/rust_calling_c/c/BUILD index 71fd21047e..b2c3ce6952 100644 --- a/examples/ffi/rust_calling_c/c/BUILD +++ b/examples/ffi/rust_calling_c/c/BUILD @@ -1,3 +1,5 @@ +load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library", "cc_test") + package(default_visibility = ["//ffi/rust_calling_c:__subpackages__"]) cc_library( diff --git a/examples/ffi/rust_calling_c/simple/BUILD b/examples/ffi/rust_calling_c/simple/BUILD index b304a24043..c7cb865365 100644 --- a/examples/ffi/rust_calling_c/simple/BUILD +++ b/examples/ffi/rust_calling_c/simple/BUILD @@ -1,4 +1,5 @@ -load("@io_bazel_rules_rust//rust:rust.bzl", "rust_binary", "rust_doc", "rust_library", "rust_test") +load("@rules_cc//cc:defs.bzl", "cc_library") +load("@io_bazel_rules_rust//rust:rust.bzl", "rust_binary", "rust_test") load("@io_bazel_rules_rust//bindgen:bindgen.bzl", "rust_bindgen_library") cc_library( diff --git a/examples/hello_runfiles/BUILD b/examples/hello_runfiles/BUILD index 82a22c4d93..01df6f597b 100644 --- a/examples/hello_runfiles/BUILD +++ b/examples/hello_runfiles/BUILD @@ -3,8 +3,6 @@ package(default_visibility = ["//visibility:public"]) load( "@io_bazel_rules_rust//rust:rust.bzl", "rust_binary", - "rust_library", - "rust_test", ) rust_binary( diff --git a/examples/hello_world/BUILD b/examples/hello_world/BUILD index 509985cc48..40b793048d 100644 --- a/examples/hello_world/BUILD +++ b/examples/hello_world/BUILD @@ -4,7 +4,6 @@ load( "@io_bazel_rules_rust//rust:rust.bzl", "rust_binary", "rust_doc", - "rust_doc_test", ) rust_binary( diff --git a/examples/proto/BUILD b/examples/proto/BUILD index df78b89e8a..9ddf0e33f2 100644 --- a/examples/proto/BUILD +++ b/examples/proto/BUILD @@ -1,3 +1,5 @@ +load("@rules_proto//proto:defs.bzl", "proto_library") + package(default_visibility = ["//proto:__subpackages__"]) proto_library( diff --git a/examples/proto/helloworld/BUILD b/examples/proto/helloworld/BUILD index 0421c1b4c9..f326a00af6 100644 --- a/examples/proto/helloworld/BUILD +++ b/examples/proto/helloworld/BUILD @@ -1,3 +1,4 @@ +load("@rules_proto//proto:defs.bzl", "proto_library") load("@io_bazel_rules_rust//proto:proto.bzl", "rust_grpc_library") load("@io_bazel_rules_rust//rust:rust.bzl", "rust_test") diff --git a/proto/BUILD b/proto/BUILD index 99feff92b8..3b0207a427 100644 --- a/proto/BUILD +++ b/proto/BUILD @@ -1,3 +1,5 @@ +load("@rules_python//python:defs.bzl", "py_binary") + package(default_visibility = ["//visibility:public"]) load("@bazel_skylib//:bzl_library.bzl", "bzl_library") diff --git a/proto/proto.bzl b/proto/proto.bzl index 8f4c04b965..15f1354342 100644 --- a/proto/proto.bzl +++ b/proto/proto.bzl @@ -12,6 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +load("@rules_proto//proto:defs.bzl", "ProtoInfo") + """Rust Protobuf Rules These build rules are used for building [protobufs][protobuf]/[gRPC][grpc] in [Rust][rust] with Bazel. diff --git a/test/BUILD b/test/BUILD index 4aaab03fa8..fb5c838cba 100644 --- a/test/BUILD +++ b/test/BUILD @@ -1,9 +1,3 @@ -load( - "//rust:rust.bzl", - "rust_binary", - "rust_library", - "rust_test", -) load( "@bazel_tools//tools/build_rules:test_rules.bzl", "rule_test", diff --git a/test/proto/BUILD b/test/proto/BUILD index 7217e55c47..faae5c0dae 100644 --- a/test/proto/BUILD +++ b/test/proto/BUILD @@ -1,3 +1,4 @@ +load("@rules_proto//proto:defs.bzl", "proto_library") load("@io_bazel_rules_rust//proto:proto.bzl", "rust_proto_library") proto_library( diff --git a/wasm_bindgen/raze/overrides/backtrace-sys-0.1.29.BUILD b/wasm_bindgen/raze/overrides/backtrace-sys-0.1.29.BUILD index 6ab0d5f672..3e2709a7ae 100644 --- a/wasm_bindgen/raze/overrides/backtrace-sys-0.1.29.BUILD +++ b/wasm_bindgen/raze/overrides/backtrace-sys-0.1.29.BUILD @@ -1,3 +1,5 @@ +load("@rules_cc//cc:defs.bzl", "cc_library") + package(default_visibility = ["//ext/public/rust/cargo:__subpackages__"]) licenses([ diff --git a/wasm_bindgen/wasm_bindgen.bzl b/wasm_bindgen/wasm_bindgen.bzl index e4cbc17257..dc9d8f4565 100644 --- a/wasm_bindgen/wasm_bindgen.bzl +++ b/wasm_bindgen/wasm_bindgen.bzl @@ -12,8 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -load("@io_bazel_rules_rust//rust:rust.bzl", "rust_library") -load("@io_bazel_rules_rust//rust:private/legacy_cc_starlark_api_shim.bzl", "get_libs_for_static_executable") load("@io_bazel_rules_rust//rust:private/transitions.bzl", "wasm_bindgen_transition") def _rust_wasm_bindgen_impl(ctx): @@ -59,8 +57,8 @@ def _rust_wasm_bindgen_impl(ctx): type_blacklisted_declarations = depset(), es5_sources = depset([ctx.outputs.javascript_bindings]), es6_sources = depset([ctx.outputs.javascript_bindings]), - transitive_es5_sources = depset(depset([ctx.outputs.javascript_bindings])), - transitive_es6_sources = depset(depset([ctx.outputs.javascript_bindings])), + transitive_es5_sources = depset(depset([ctx.outputs.javascript_bindings]).to_list()), + transitive_es6_sources = depset(depset([ctx.outputs.javascript_bindings]).to_list()), ), )