Rules
Much of Bazel’s strength comes from the ability to define new rules which can be used by others. There is a growing and evolving set of rules to support popular languages and packages.
Recommended rules
Additional rules
Rules for many popular languages have been created and are being maintained outside of Bazel. Contact the respective rule set’s maintainers regarding issues and feature requests.
To find more Bazel rules, use a search engine or look on GitHub.
Here is a selection of popular rules:
- Android
- Apple platforms
- Boost
- C#
- Closure
- Docker
- Go
- Haskell
- Jsonnet
- Kotlin
- Kubernetes
- NodeJS
- Protobuf
- Python
- Rust
- Scala
- Swift
- Typescript
- Webtesting (Webdriver)
The repository Skylib contains additional functions that can be useful when writing new rules and new macros.
Native rules that do not apply to a specific programming language
- Extra actions
- General
- Platform
- Workspace
Embedded non-native rules
Bazel also embeds additional rules written in Starlark. Those can be loaded from
the @bazel_tools
built-in external repository.