fork/rules_rust

git clone https://git.julia.blue/fork/rules_rust

UebelAndreImplement rules archive release artifact in github action. (#1501)76360dd3

0.9.0
1.5 KiB43 linesraw
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(
12    name = "rename_first_party_crates",
13    build_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(
21    name = "third_party_dir",
22    build_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(
28    name = "use_real_import_macro",
29    build_setting_default = False,
30)
31
32# When set, this flag causes rustc to emit .rmeta files and use them for rlib -> rlib dependencies.
33# While this involves one extra (short) rustc invocation to build the rmeta file,
34# it allows library dependencies to be unlocked much sooner, increasing parallelism during compilation.
35bool_flag(
36    name = "pipelined_compilation",
37    build_setting_default = False,
38)
39
40bzl_library(
41    name = "bzl_lib",
42    srcs = glob(["**/*.bzl"]),
43)