rule() API is not documented at all
- Dominant language
- Rust
- Stars
- 4.4k
- Forks
- 394
- PR merge metrics
- No merged PRs in 30d
Description
Adding custom rules is quite a fundamental part of a build system, but as far as I can tell the API for `rule()` is not documented at all. The best you get is a single example in [this page](https://buck2.build/docs/rule_authors/writing_rules/):
```
pascal_binary = rule(
impl = pascal_binary_impl,
attrs = {
"deps": attrs.list(attrs.dep()),
"src": attrs.source(),
}
)
```
I tracked the source to [here](https://github.com/facebook/buck2/blob/cefbc3974f0b96143965b9a2c6fe2da7cba1c450/app/buck2_interpreter_for_build/src/rule.rs#L564-L578) which lists all the parameters:
* `impl`
* `attrs`
* `cfg`
* `doc`
* `is_configuration_rule`
* `is_toolchain_rule`
* `uses_plugins`
* `eval`
Contributor guide
Assessment
This issue has not been assessed yet.