blob: b19f06e58b088bf464c2c8ebce0582cd38cb8ac8 [file] [log] [blame]
# `.bazelrc` is a Bazel configuration file.
# https://bazel.build/docs/best-practices#bazelrc-file
# Required on windows
common --enable_platform_specific_config
startup --windows_enable_symlinks
build:windows --enable_runfiles
# Enable rustfmt for all targets in the workspace
build:rustfmt --aspects=@rules_rust//rust:defs.bzl%rustfmt_aspect
build:rustfmt --output_groups=+rustfmt_checks
# Enable clippy for all targets in the workspace
build:clippy --aspects=@rules_rust//rust:defs.bzl%rust_clippy_aspect
build:clippy --output_groups=+clippy_checks
# Confirm crate universe works without relying on the legacy
# external symlink in runfiles.
build --nolegacy_external_runfiles
# TODO: migrate all dependencies from WORKSPACE to MODULE.bazel
# https://github.com/bazelbuild/rules_rust/issues/2181
common --noenable_bzlmod
# This isn't currently the defaut in Bazel, but we enable it to test we'll be ready if/when it flips.
build --incompatible_disallow_empty_glob
# Required for cargo_build_script support before Bazel 7
build --incompatible_merge_fixed_and_default_shell_env
# This import should always be last to allow users to override
# settings for local development.
try-import %workspace%/user.bazelrc