fork/rules_rust
git clone https://git.julia.blue/fork/rules_rust
f7cb22ef
0.7.0
1load ( "@bazel_skylib//:bzl_library.bzl" , "bzl_library" ) 2load ( "//rust:defs.bzl" , "capture_clippy_output" , "clippy_flags" , "error_format" , "extra_exec_rustc_flags" , "extra_rustc_flags" ) 3 4exports_files ([ "LICENSE" ]) 5 6bzl_library ( 7name = "bzl_lib" , 8srcs = [ 9":workspace.bzl" , 10], 11visibility = [ "//visibility:public" ], 12) 13 14filegroup ( 15name = "distro" , 16srcs = glob ([ "*.bzl" ]) + [ 17"//bindgen:distro" , 18"//cargo:distro" , 19"//crate_universe:distro" , 20"//proto:distro" , 21"//rust:distro" , 22"//tools:distro" , 23"//util:distro" , 24"//wasm_bindgen:distro" , 25"BUILD.bazel" , 26"README.md" , 27"LICENSE.txt" , 28"WORKSPACE.bazel" , 29], 30visibility = [ "//:__subpackages__" ], 31) 32 33# This setting may be changed from the command line to generate machine readable errors. 34error_format ( 35name = "error_format" , 36build_setting_default = "human" , 37visibility = [ "//visibility:public" ], 38) 39 40# This setting may be used to pass extra options to clippy from the command line. 41# It applies across all targets. 42clippy_flags ( 43name = "clippy_flags" , 44build_setting_default = [], 45visibility = [ "//visibility:public" ], 46) 47 48# This setting may be used to pass extra options to rustc from the command line 49# in non-exec configuration. 50# It applies across all targets whereas the rustc_flags option on targets applies only 51# to that target. This can be useful for passing build-wide options such as LTO. 52extra_rustc_flags ( 53name = "extra_rustc_flags" , 54build_setting_default = [], 55visibility = [ "//visibility:public" ], 56) 57 58# This setting may be used to pass extra options to rustc from the command line 59# in exec configuration. 60# It applies across all targets whereas the rustc_flags option on targets applies only 61# to that target. This can be useful for passing build-wide options such as LTO. 62extra_exec_rustc_flags ( 63name = "extra_exec_rustc_flags" , 64build_setting_default = [], 65visibility = [ "//visibility:public" ], 66) 67 68# This setting is used by the clippy rules. See https://bazelbuild.github.io/rules_rust/rust_clippy.html 69label_flag ( 70name = "clippy.toml" , 71build_setting_default = "//tools/clippy:clippy.toml" , 72visibility = [ "//visibility:public" ], 73) 74 75# This setting is used by the rustfmt rules. See https://bazelbuild.github.io/rules_rust/rust_fmt.html 76label_flag ( 77name = "rustfmt.toml" , 78build_setting_default = "//tools/rustfmt:rustfmt.toml" , 79visibility = [ "//visibility:public" ], 80) 81 82alias ( 83name = "rustfmt" , 84actual = "//tools/rustfmt" , 85visibility = [ "//visibility:public" ], 86) 87 88capture_clippy_output ( 89name = "capture_clippy_output" , 90build_setting_default = False , 91visibility = [ "//visibility:public" ], 92)