Concepts and terminology
Functions
Rules
Native rules ship with the Bazel binary and do not require aload
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
Language | Binary rules | Library rules | Test rules | Other rules |
---|---|---|---|---|
C / C++ |
cc_binary
|
cc_import
cc_library cc_shared_library cc_static_library |
cc_test
|
cc_toolchain
cc_toolchain_suite fdo_prefetch_hints fdo_profile memprof_profile propeller_optimize |
Java |
java_binary
|
java_import
java_library |
java_test
|
java_plugin
|
Objective-C |
objc_import
objc_library |
|||
Python |
py_binary
|
py_library
|
py_test
|
py_runtime
|
Shell |
sh_binary
|
sh_test
|
Language-agnostic native rules
Family | Rules |
---|---|
Extra Actions | |
General | |
Platforms and Toolchains | |
Workspace |