rulesforeigncc
March 12, 2026 ยท View on GitHub
Rules for building C/C++ projects using foreign build systems inside Bazel projects.
This is not an officially supported Google product (meaning, support and/or new releases may be limited.)
Documentation
Documentation for all rules and providers are available at the doc site
Version compatibility
bazel
The intent is to support the latest minor of all Active or Maintenance Bazel Versions.
This generally means that older bazel versions may work, but they won't be tested and so they might break.
delegated build systems (e.g. cmake, ninja)
Some of these projects don't use semver, but the intent is is to support the logical equivalent of:
- Latest version that is upstream-supported (meaning, they will accept patches for it)
- If upstream will accept patches for multiple release branches, then the latest patch for each of those will be supported.
- Exact version and latest patch version for supported LTS releases of distributions. The idea is that most packages only get tested with the versions in the distros, so these are the versions most likely to work.
News
For more generalized updates, please see NEWS.md or checkout the release notes of current or previous releases
Design document
External C/C++ libraries rules
Caveats
- FreeBSD support is currently experimental and on a best-effort basis. Google currently doesn't have a CI test environment for FreeBSD, but please make your voice heard by upvoting this issue.