run_binary

Runs a binary as a build action.

This rule does not require Bash (unlike native.genrule).

ATTRIBUTES

NameDescriptionTypeMandatoryDefault
nameA unique name for this target.Namerequired
argsCommand line arguments of the binary.<br/><br/>Subject to<code><a href=“https://docs.bazel.build/versions/main/be/make-variables.html#location”>$(location)</a></code> expansion.List of stringsoptional[]
envEnvironment variables of the action.<br/><br/>Subject to <code><a href=“https://docs.bazel.build/versions/main/be/make-variables.html#location”>$(location)</a></code> expansion.Dictionary: String -> Stringoptional{}
outsOutput files generated by the action.<br/><br/>These labels are available for <code>$(location)</code> expansion in <code>args</code> and <code>env</code>.List of labelsrequired
srcsAdditional inputs of the action.<br/><br/>These labels are available for <code>$(location)</code> expansion in <code>args</code> and <code>env</code>.List of labelsoptional[]
toolThe tool to run in the action.<br/><br/>Must be the label of a *_binary rule, of a rule that generates an executable file, or of a file that can be executed as a subprocess (e.g. an .exe or .bat file on Windows or a binary with executable permission on Linux). This label is available for <code>$(location)</code> expansion in <code>args</code> and <code>env</code>.Labelrequired