xref: /aosp_15_r20/external/bazelbuild-rules_rust/examples/.bazelrc (revision d4726bddaa87cc4778e7472feed243fa4b6c267f)
1# `.bazelrc` is a Bazel configuration file.
2# https://bazel.build/docs/best-practices#bazelrc-file
3
4# Required on windows
5common --enable_platform_specific_config
6startup --windows_enable_symlinks
7build:windows --enable_runfiles
8
9# Enable rustfmt for all targets in the workspace
10build:rustfmt --aspects=@rules_rust//rust:defs.bzl%rustfmt_aspect
11build:rustfmt --output_groups=+rustfmt_checks
12
13# Enable clippy for all targets in the workspace
14build:clippy --aspects=@rules_rust//rust:defs.bzl%rust_clippy_aspect
15build:clippy --output_groups=+clippy_checks
16
17# TODO: migrate all dependencies from WORKSPACE to MODULE.bazel
18# https://github.com/bazelbuild/rules_rust/issues/2181
19common --noenable_bzlmod
20
21# This isn't currently the defaut in Bazel, but we enable it to test we'll be ready if/when it flips.
22build --incompatible_disallow_empty_glob
23
24build --java_runtime_version=remotejdk_21
25build --java_language_version=21
26build --tool_java_runtime_version=remotejdk_21
27build --tool_java_language_version=21
28
29# This import should always be last to allow users to override
30# settings for local development.
31try-import %workspace%/user.bazelrc
32