Skip to main content

Concepts and terminology

Functions

Rules

Native rules ship with the Bazel binary and do not require a load statement. Native rules are available globally in BUILD files. In .bzl files, you can find them in the native module. For non-native Starlark rules that ship separately from Bazel, see the list of recommended rules.

Language-specific native rules

LanguageFlagsBinary rulesLibrary rulesTest rulesOther rulesC / C++cc_binary cc_import cc_library cc_shared_library cc_static_library cc_test cc_toolchain fdo_prefetch_hints fdo_profile memprof_profile propeller_optimize Javajava_binary java_import java_library java_test java_package_configuration java_plugin java_runtime java_single_jar java_toolchain Objective-Cobjc_import objc_library Protocol Buffercc_proto_library java_lite_proto_library java_proto_library proto_library py_proto_library proto_lang_toolchain proto_toolchain Pythonpy_binary py_library py_test py_runtime Shellsh_binary sh_library sh_test

Language-agnostic native rules

FamilyRulesExtra Actions General Platforms and Toolchains