Go
Built-in Gazelle support for go_library, go_binary, and go_test rules. Enabled by default.
Learn more →
Bazelle provides support for multiple programming languages through Gazelle extensions. Each language extension must be explicitly enabled (except Go and Proto which are enabled by default).
Go
Built-in Gazelle support for go_library, go_binary, and go_test rules. Enabled by default.
Learn more →
Kotlin
Custom extension for kt_jvm_library and kt_jvm_test. Requires Maven-style layout.
Learn more →
Python
Custom extension for py_library, py_binary, and py_test. Detects if __name__ == "__main__": blocks.
Learn more →
C/C++
Via gazelle_cc for cc_library, cc_binary, and cc_test.
Learn more →
| Language | Registered | Default | Rules Generated |
|---|---|---|---|
| Go | ✅ Yes | Enabled | go_library, go_binary, go_test |
| Proto | ✅ Yes | Enabled | proto_library, go_proto_library |
| Kotlin | ✅ Yes | Disabled | kt_jvm_library, kt_jvm_test |
| Python | ✅ Yes | Disabled | py_library, py_binary, py_test |
| C/C++ | ✅ Yes | Disabled | cc_library, cc_binary, cc_test |
| Groovy | ✅ Yes | Disabled | groovy_library, groovy_test |
| Java | ❌ No | — | Blocked on Bazel 9 compatibility |
| Scala | ❌ No | — | Planned |
| Rust | ❌ No | — | Blocked on proto dependencies |
Bazelle runs all enabled language extensions on your codebase. Each extension:
deps and srcsWhen you run bazelle init, it detects languages by scanning for file extensions:
| Extensions | Language |
|---|---|
.go | Go |
.kt, .kts | Kotlin |
.java | Java |
.py | Python |
.proto | Proto |
.groovy | Groovy |
.cc, .cpp, .cxx, .c, .h, .hpp, .hxx | C/C++ |
Ignored directories: bazel-*, .*, node_modules, __pycache__, vendor
Enable languages via BUILD file directives:
# In your root BUILD.bazel
# Enable Kotlin# gazelle:kotlin_enabled true
# Enable Python# gazelle:python_enabled true
# Enable Groovy# gazelle:groovy_enabled trueOr filter at runtime:
# Only run Go and Kotlin extensionsbazelle update --languages go,kotlin