Specifies a fuzzing engine that can be used to run C++ fuzz targets.
ATTRIBUTES
Name | Description | Type | Mandatory | Default |
---|---|---|---|---|
name | A unique name for this target. | Name | required | |
data | A dict mapping additional runtime dependencies needed by the fuzzing engine to environment variables that will be available inside the launcher, holding the runtime path to the dependency. | Dictionary: Label -> String | optional | {} |
display_name | The name of the fuzzing engine, as it should be rendered in human-readable output. | String | required | |
launcher | A shell script that knows how to launch the fuzzing executable based on configuration specified in the environment. | Label | required | |
library | A cc_library target that implements the fuzzing engine entry point. | Label | required |
Defines a fuzz test and a few associated tools and metadata.
For each fuzz test <name>
, this macro expands into a number of targets:
<name>
: The instrumented fuzz test executable. Use this target for debugging or for accessing the complete command line interface of the fuzzing engine. Most developers should only need to use this target rarely.<name>_run
: An executable target used to launch the fuzz test using a simpler, engine-agnostic command line interface.<name>_corpus
: Generates a corpus directory containing all the corpus files specified in the corpus
attribute.<name>_dict
: Validates the set of dictionary files provided and emits the result to a <name>.dict
file.<name>_raw
: The raw, uninstrumented fuzz test executable. This should be rarely needed and may be useful when debugging instrumentation-related build failures or misbehavior.TODO: Document here the command line interface of the
<name>_run
targets.
PARAMETERS
Name | Description | Default Value |
---|---|---|
name | A unique name for this target. Required. | none |
corpus | A list containing corpus files. | None |
dicts | A list containing dictionaries. | None |
engine | A label pointing to the fuzzing engine to use. | “@rules_fuzzing//fuzzing:cc_engine” |
tags | Tags set on the fuzz test executable. | None |
binary_kwargs | Keyword arguments directly forwarded to the fuzz test binary rule. | none |