Skip to main content
The first approach is just to learn more APIs which are already available. If the problem you’re solving isn’t novel, then other engineers probably ran into it before, and may have provided a solution you can simply adopt. There is a vibrant ecosystem of rules for Bazel, and you should be able to find documentation for those. You should skim through these to form a rough memory of what’s available. This way when you encounter an interesting problem while writing a BUILD file, you can search on this site to find that useful nugget. You can also look through example repositories like aspect bazel-examples to find solutions to problems similar to yours.
Aspect can be hired to write “missing” rulesets.If you don’t find one you need, consider donating a Feature Bounty on our OpenCollective and we can add it for you.For example, we were contracted to write rules_distroless, rules_apko, and rules_sol.