blob: 4bdd2dcae8a3061cf0d6768284a67e1b819d1431 [file] [log] [blame]
UebelAndre52c87aa2021-06-01 14:18:58 -07001# `.bazelrc` is a Bazel configuration file.
UebelAndreacca6f42022-03-01 06:59:47 -08002# https://bazel.build/docs/best-practices#bazelrc-file
UebelAndre52c87aa2021-06-01 14:18:58 -07003
Daniel Wagner-Hallf5813fa2023-06-02 12:34:55 +01004# Required on windows
5common --enable_platform_specific_config
Daniel Wagner-Hall1b636512023-06-14 15:27:22 +01006startup --windows_enable_symlinks
Daniel Wagner-Hallf5813fa2023-06-02 12:34:55 +01007build:windows --enable_runfiles
8
UebelAndre52c87aa2021-06-01 14:18:58 -07009# Enable rustfmt for all targets in the workspace
10build:rustfmt --aspects=@rules_rust//rust:defs.bzl%rustfmt_aspect
11build:rustfmt --output_groups=+rustfmt_checks
UebelAndreed647162021-07-10 09:22:07 -070012
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
UebelAndreacca6f42022-03-01 06:59:47 -080016
Yun Penga4587572023-10-06 18:01:55 +020017# TODO: migrate all dependencies from WORKSPACE to MODULE.bazel
18# https://github.com/bazelbuild/rules_rust/issues/2181
19common --noenable_bzlmod
20
Daniel Wagner-Hall53daac72024-02-22 14:59:10 +000021# 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
Daniel Wagner-Hallbb73b642024-06-14 09:46:12 +010024build --java_runtime_version=remotejdk_21
25build --java_language_version=21
26build --tool_java_runtime_version=remotejdk_21
27build --tool_java_language_version=21
28
UebelAndreacca6f42022-03-01 06:59:47 -080029# This import should always be last to allow users to override
30# settings for local development.
31try-import %workspace%/user.bazelrc