Bazel Rules
"Rules" are how Bazel is extended to learn how to use new tools to build and test more languages and frameworks. Thus rules are a critical part of Aspect's Bazel platform.
This documentation is mirrored from open-source rule sets, making them easier to use:
- a single search bar that finds results from all the rules we mirror - thanks Algolia!
- versioned so you can find docs for the release you're using
- better rendering than Stardoc, including deep-links to attributes
- copy-paste usage examples including the
load
statement
Use the sidebar on the left to navigate all the rules we've mirrored so far. Come visit this site again as we'll continue to add more.
Aspect's Rules
The Bazel rules listed below are built and maintained by Aspect engineers. They are free to use and released under the Apache 2.0 License.
If you use our free software, please consider supporting the development and maintenance of our open source Bazel rules through open collective. We also accept Bug Bounties and Feature Bounties to unblock your usage of our rules when you find something broken or missing.
Aspect's Bazel OSS Support is the missing commercial support option for Bazel and its ecosystem of rules, including Aspect’s rules. We will do our best to keep your team unblocked by answering questions, pointing to relevant documentation and issues, and recommending best practice patterns we've seen succeed. To learn more, contact us.
JavaScript
Ruleset | Version | Description |
---|---|---|
rules_js | Bazel rules for building JavaScript programs | |
rules_ts | Bazel rules for TypeScript | |
rules_swc | Bazel rules for swc | |
rules_esbuild | Bazel rules for esbuild JS bundler | |
rules_terser | Bazel rules for Terser - a JavaScript minifier | |
rules_webpack | Bazel rules for Webpack | |
rules_rollup | Bazel rules for Rollup - a JavaScript bundler | |
rules_jest | Bazel rules to run tests using Jest | |
rules_jasmine | Bazel rules to run tests using Jasmine | |
rules_cypress | Bazel rules to run tests using Cypress | |
rules_deno | Bazel rules for Deno, an alternative server JS runtime to Node.js |
Python
Ruleset | Version | Description |
---|---|---|
rules_py | Bazel rules for running Python tools and building Python projects |
Containers
Ruleset | Version | Description |
---|---|---|
rules_oci | Bazel rules for building OCI containers |
Crypto
Ruleset | Version | Description |
---|---|---|
rules_sol | Bazel rules for the Solidity blockchain contracts compiler, solc (soliditylang.org) |
Utilities
Ruleset | Version | Description |
---|---|---|
bazel-lib | Common useful rules & functions for writing custom build rules with Starlark | |
bazel-super-formatter | Hermetic aggregation formatter to format code in most languages |
Community Rules
Any rules mirrored on this site which don't appear in the "Aspect Rules" section above are owned and maintained by others in the Bazel community. Aspect engineers have good relationships with these maintainers and we can help to resolve issues or contribute fixes to those as well.
Support for community rules is included in Aspect Build Enterprise in the Bazel Ecosystem plan.