1"""A module wrapping the core rules of `rules_rust`""" 2 3load( 4 "@rules_rust//rust:rust.bzl", 5 _rust_binary = "rust_binary", 6 _rust_library = "rust_library", 7 _rust_test = "rust_test", 8) 9load("@third-party//:vendor.bzl", "vendored") 10 11def third_party_glob(include): 12 return vendored and native.glob(include) 13 14def rust_binary(edition = "2018", **kwargs): 15 _rust_binary(edition = edition, **kwargs) 16 17def third_party_rust_binary(rustc_flags = [], **kwargs): 18 rustc_flags = rustc_flags + ["--cap-lints=allow"] 19 rust_binary(rustc_flags = rustc_flags, **kwargs) 20 21def rust_library(edition = "2018", **kwargs): 22 _rust_library(edition = edition, **kwargs) 23 24def third_party_rust_library(rustc_flags = [], **kwargs): 25 rustc_flags = rustc_flags + ["--cap-lints=allow"] 26 rust_library(rustc_flags = rustc_flags, **kwargs) 27 28def rust_test(edition = "2018", **kwargs): 29 _rust_test(edition = edition, **kwargs) 30