fork/rules_rust
git clone https://git.julia.blue/fork/rules_rust
6b54feb0
0.8.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 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 identify dependencies of proc-macro-s. 49# This feature is only enabled if `is_proc_macro_dep_enabled` is true. 50# Its value controls the BAZEL_RULES_RUST_IS_PROC_MACRO_DEP environment variable 51# made available to the rustc invocation. 52is_proc_macro_dep ( 53name = "is_proc_macro_dep" , 54build_setting_default = False , 55visibility = [ "//visibility:public" ], 56) 57 58# This setting enables the feature to identify dependencies of proc-macro-s, 59# see `is_proc_macro_dep`. 60is_proc_macro_dep_enabled ( 61name = "is_proc_macro_dep_enabled" , 62build_setting_default = False , 63visibility = [ "//visibility:public" ], 64) 65 66# This setting may be used to pass extra options to rustc from the command line 67# in non-exec configuration. 68# It applies across all targets whereas the rustc_flags option on targets applies only 69# to that target. This can be useful for passing build-wide options such as LTO. 70extra_rustc_flags ( 71name = "extra_rustc_flags" , 72build_setting_default = [], 73visibility = [ "//visibility:public" ], 74) 75 76extra_rustc_flag ( 77name = "extra_rustc_flag" , 78build_setting_default = "" , 79visibility = [ "//visibility:public" ], 80) 81 82# This setting may be used to pass extra options to rustc from the command line 83# in exec configuration. 84# It applies across all targets whereas the rustc_flags option on targets applies only 85# to that target. This can be useful for passing build-wide options such as LTO. 86extra_exec_rustc_flags ( 87name = "extra_exec_rustc_flags" , 88build_setting_default = [], 89visibility = [ "//visibility:public" ], 90) 91 92extra_exec_rustc_flag ( 93name = "extra_exec_rustc_flag" , 94build_setting_default = "" , 95visibility = [ "//visibility:public" ], 96) 97 98# This setting is used by the clippy rules. See https://bazelbuild.github.io/rules_rust/rust_clippy.html 99label_flag ( 100name = "clippy.toml" , 101build_setting_default = "//tools/clippy:clippy.toml" , 102visibility = [ "//visibility:public" ], 103) 104 105# This setting is used by the rustfmt rules. See https://bazelbuild.github.io/rules_rust/rust_fmt.html 106label_flag ( 107name = "rustfmt.toml" , 108build_setting_default = "//tools/rustfmt:rustfmt.toml" , 109visibility = [ "//visibility:public" ], 110) 111 112alias ( 113name = "rustfmt" , 114actual = "//tools/rustfmt" , 115visibility = [ "//visibility:public" ], 116) 117 118capture_clippy_output ( 119name = "capture_clippy_output" , 120build_setting_default = False , 121visibility = [ "//visibility:public" ], 122)