run_binary() build rule implementation.

Runs a binary as a build action. This rule does not require Bash (unlike native.genrule()).

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
srcsAdditional inputs of the action.

These labels are available for $(execpath) and $(location) expansion in args and env.
List of labelsoptional[]
outsOutput files generated by the action.

These labels are available for $(execpath) and $(location) expansion in args and env.
List of labelsrequired
argsCommand line arguments of the binary.

Subject to $(execpath) and $(location) expansion.
List of stringsoptional[]
envEnvironment variables of the action.

Subject to $(execpath) and $(location) expansion.
Dictionary: String -> Stringoptional{}
toolThe tool to run in the action.

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 $(execpath) and $(location) expansion in args and env.
Labelrequired