fork/rules_rust
git clone https://git.julia.blue/fork/rules_rust
76360dd3
0.10.0
1load ( "@bazel_skylib//:bzl_library.bzl" , "bzl_library" ) 2load ( "//rust:defs.bzl" , "capture_clippy_output" , "clippy_flags" , "error_format" , "extra_exec_rustc_flag" , "extra_exec_rustc_flags" , "extra_rustc_flag" , "extra_rustc_flags" , "is_proc_macro_dep" , "is_proc_macro_dep_enabled" ) 3 4exports_files ([ "LICENSE" ]) 5 6bzl_library ( 7name = "bzl_lib" , 8srcs = [ 9":workspace.bzl" , 10], 11visibility = [ "//visibility:public" ], 12) 13 14# This setting may be changed from the command line to generate machine readable errors. 15error_format ( 16name = "error_format" , 17build_setting_default = "human" , 18visibility = [ "//visibility:public" ], 19) 20 21# This setting may be used to pass extra options to clippy from the command line. 22# It applies across all targets. 23clippy_flags ( 24name = "clippy_flags" , 25build_setting_default = [], 26visibility = [ "//visibility:public" ], 27) 28 29# This setting may be used to identify dependencies of proc-macro-s. 30# This feature is only enabled if `is_proc_macro_dep_enabled` is true. 31# Its value controls the BAZEL_RULES_RUST_IS_PROC_MACRO_DEP environment variable 32# made available to the rustc invocation. 33is_proc_macro_dep ( 34name = "is_proc_macro_dep" , 35build_setting_default = False , 36visibility = [ "//visibility:public" ], 37) 38 39# This setting enables the feature to identify dependencies of proc-macro-s, 40# see `is_proc_macro_dep`. 41is_proc_macro_dep_enabled ( 42name = "is_proc_macro_dep_enabled" , 43build_setting_default = False , 44visibility = [ "//visibility:public" ], 45) 46 47# This setting may be used to pass extra options to rustc from the command line 48# in non-exec configuration. 49# It applies across all targets whereas the rustc_flags option on targets applies only 50# to that target. This can be useful for passing build-wide options such as LTO. 51extra_rustc_flags ( 52name = "extra_rustc_flags" , 53build_setting_default = [], 54visibility = [ "//visibility:public" ], 55) 56 57extra_rustc_flag ( 58name = "extra_rustc_flag" , 59build_setting_default = "" , 60visibility = [ "//visibility:public" ], 61) 62 63# This setting may be used to pass extra options to rustc from the command line 64# in exec configuration. 65# It applies across all targets whereas the rustc_flags option on targets applies only 66# to that target. This can be useful for passing build-wide options such as LTO. 67extra_exec_rustc_flags ( 68name = "extra_exec_rustc_flags" , 69build_setting_default = [], 70visibility = [ "//visibility:public" ], 71) 72 73extra_exec_rustc_flag ( 74name = "extra_exec_rustc_flag" , 75build_setting_default = "" , 76visibility = [ "//visibility:public" ], 77) 78 79# This setting is used by the clippy rules. See https://bazelbuild.github.io/rules_rust/rust_clippy.html 80label_flag ( 81name = "clippy.toml" , 82build_setting_default = "//tools/clippy:clippy.toml" , 83visibility = [ "//visibility:public" ], 84) 85 86# This setting is used by the rustfmt rules. See https://bazelbuild.github.io/rules_rust/rust_fmt.html 87label_flag ( 88name = "rustfmt.toml" , 89build_setting_default = "//tools/rustfmt:rustfmt.toml" , 90visibility = [ "//visibility:public" ], 91) 92 93alias ( 94name = "rustfmt" , 95actual = "//tools/rustfmt" , 96visibility = [ "//visibility:public" ], 97) 98 99capture_clippy_output ( 100name = "capture_clippy_output" , 101build_setting_default = False , 102visibility = [ "//visibility:public" ], 103)