1load("@rules_rust//cargo:cargo_build_script.bzl", "cargo_build_script") 2load("@rules_rust//rust:rust.bzl", "rust_binary", "rust_library") 3load("@third-party//:vendor.bzl", "vendored") 4 5def third_party_glob(include): 6 return vendored and native.glob(include) 7 8def third_party_cargo_build_script(rustc_flags = [], **kwargs): 9 rustc_flags = rustc_flags + ["--cap-lints=allow"] 10 cargo_build_script(rustc_flags = rustc_flags, **kwargs) 11 12def third_party_rust_binary(rustc_flags = [], **kwargs): 13 rustc_flags = rustc_flags + ["--cap-lints=allow"] 14 rust_binary(rustc_flags = rustc_flags, **kwargs) 15 16def third_party_rust_library(rustc_flags = [], **kwargs): 17 rustc_flags = rustc_flags + ["--cap-lints=allow"] 18 rust_library(rustc_flags = rustc_flags, **kwargs) 19