docs/versions/8.1.0/rules/lib/builtins/rule.mdx
{% dynamic setvar source_file "src/main/java/com/google/devtools/build/lib/starlarkbuildapi/RuleFunctionApi.java" %} {% dynamic setvar version "8.1.0" %} {% dynamic setvar original_path "/rules/lib/builtins/rule" %} {% include "_buttons.html" %}
<!-- {% raw %} -->A callable value representing the type of a native or Starlark rule (created by <a href="../globals/bzl.html#rule"><code>rule()</code></a>). Calling the value during evaluation of a package's BUILD file creates an instance of the rule and adds it to the package's target set. For more information, visit this page about <a href ="https://bazel.build/versions/8.1.0/extending/rules">Rules</a>.
</body> </html> <!-- {% endraw %} -->