Welcome to your comprehensive Bazel learning repository! This collection contains everything a software developer should know about Bazel - from its history and technical foundations to practical examples and best practices.
This repository includes a devcontainer configuration for consistent, reproducible development across different machines and teams. The container includes:
- Bazel (latest stable version)
- C/C++ toolchain (GCC, Clang)
- Rust toolchain (rustc, cargo)
- Python (for code generation)
- VS Code extensions for Bazel development
This repository focuses on systems programming languages and includes:
- History & Context: Understanding where Bazel came from and why it exists
- Technical Foundation: The tech stack, architecture, and dependencies
- Core Concepts: Essential knowledge for working with Bazel
- Practical Examples: Hands-on projects with C, C++, and Rust
- Code Generation: Using Python/Jinja2 for build-time code generation
- Resources: Curated links and references for deeper learning
- 📖 History of Bazel - Origins, evolution, and timeline
- ⚙️ Tech Stack & Architecture - Languages, dependencies, and technical details
- 🎯 Core Concepts - Build files, workspaces, targets, and rules
- 🐳 Devcontainer Setup - Reproducible development environment
- 🔧 VS Code Configuration - Extensions and workspace settings
- 💡 Basic Examples - Simple C/C++/Rust projects
- 🦀 Rust Integration - Rust-specific Bazel patterns
- ⚙️ Code Generation - Python/Jinja2 code generation
- 📦 Advanced Patterns - Complex build scenarios
- 📚 Resources & Links - Official docs, tutorials, and community resources
- ❓ FAQ - Common questions and troubleshooting
- 📝 Glossary - Bazel terminology explained
- Open in VS Code: Clone this repo and open in VS Code
- Reopen in Container: Use "Reopen in Container" when prompted
- Start Learning: Everything is pre-configured!
- Install Bazel: Follow instructions at bazel.build
- Install Toolchains: C/C++ (GCC/Clang), Rust, Python
- Start with Basics: Navigate to
examples/basic/
If you're completely new to Bazel:
- Start with the History of Bazel to understand the context
- Learn about the Tech Stack to understand what you're working with
- Dive into Core Concepts for the fundamentals
- Try the Basic Examples to get hands-on experience
- Basic understanding of build systems and compilation
- Familiarity with command-line tools
- Experience with C, C++, or Rust programming
- VS Code and Docker (for devcontainer setup)
- Basic Git knowledge
This is a personal learning repository, but feel free to:
- Suggest improvements via issues
- Share interesting Bazel patterns or examples
- Point out errors or outdated information
This repository serves as a comprehensive knowledge base for learning Bazel, structured to take you from zero knowledge to practical competency. Each section builds upon the previous one, with plenty of examples and references for further exploration.
Happy learning! 🎉
Last updated: September 2025
The content of this repo is mostly AI generated (Claude Sonnet 4).