fork/rules_rust
git clone https://git.julia.blue/fork/rules_rust
cde4c082
0.6.0
1load ( "@bazel_skylib//:bzl_library.bzl" , "bzl_library" ) 2load ( "@bazel_skylib//rules:common_settings.bzl" , "bool_flag" , "string_flag" ) 3 4package ( default_visibility = [ "//visibility:public" ]) 5 6# A flag controlling whether to rename first-party crates such that their names 7# encode the Bazel package and target name, instead of just the target name. 8# 9# First-party vs. third-party crates are identified using the value of 10# //settings:third_party_dir. 11bool_flag ( 12name = "rename_first_party_crates" , 13build_setting_default = False , 14) 15 16# A flag specifying the location of vendored third-party rust crates within this 17# repository that must not be renamed when `rename_first_party_crates` is enabled. 18# 19# Must be specified as a Bazel package, e.g. "//some/location/in/repo". 20string_flag ( 21name = "third_party_dir" , 22build_setting_default = "//third_party/rust" , 23) 24 25# A flag to control whether rust_library and rust_binary targets should 26# implicitly depend on the *real* import macro, or on a no-op target. 27bool_flag ( 28name = "use_real_import_macro" , 29build_setting_default = False , 30) 31 32bzl_library ( 33name = "bzl_lib" , 34srcs = glob ([ "**/*.bzl" ]), 35) 36 37filegroup ( 38name = "distro" , 39srcs = glob ([ "*.bzl" ]) + [ 40"BUILD.bazel" , 41], 42visibility = [ "//:__subpackages__" ], 43)