A collection of simple Bazel examples demonstrating how to build projects in different programming languages.
-
Go Example (
//hello-go:hello-go)- Basic Go program
- Shows Go integration with Bazel
-
Python Example (
//hello-py:hello)- Python binary and library
- Demonstrates PyBinary rule
- Bazel installed (version 6.x or later recommended)
- For specific examples:
- Go toolchain (for Go examples)
- Python (for Python examples)
To build any target, run:
bazel build //hello-py:hello
bazel build //hello-go:hello-goTo run a target directly:
bazel run //hello-go:gazelle
bazel run //hello-go:hello-go
bazel run //hello-py:hello