How bazel-contrib/bazel-lib works
• How rules interact with Bazel's build system
• How toolchains are resolved and used
• Demonstrate file transformation pipelines
• Relationship with bazel-skylib
• Internal component dependencies
• Optional vs. required dependencies
Key Architectural Patterns
a. Toolchain Pattern (Highlight with a boundary):
• Toolchain definitions
• Toolchain resolution flow
• Platform-specific implementations
b. Rule Pattern (Highlight with a boundary):
• Rule implementation structure
• Provider definitions
• Extension points
Specific Elements
a. Directory Structure (Use nested containers):
• /lib (core implementation)
• /tools (binary implementations)
• /docs (documentation)
• /tests (test suite)
b. Integration Points (Use interface symbols):
• Bazel Rule Interface
• Starlark API Surface
• Toolchain Registration Points
Implementation Details Layer
Specific implementations for:
• File operations (copy, transform)
• Template expansion
• JSON/YAML processing
• Testing infrastructure