| <aid="mtree_spec-srcs"></a>srcs | Files that are placed into the tar | <ahref="https://bazel.build/docs/build-ref.html#labels">List of labels</a> | required | |
| <aid="tar_rule-name"></a>name | A unique name for this target. | <ahref="https://bazel.build/docs/build-ref.html#name">Name</a> | required | |
| <aid="tar_rule-args"></a>args | Additional flags permitted by BSD tar; see the man page. | List of strings | optional | [] |
| <aid="tar_rule-compress"></a>compress | Compress the archive file with a supported algorithm. | String | optional | "" |
| <aid="tar_rule-mode"></a>mode | A mode indicator from the following list, copied from the tar manpage:<br><br> - create: Create a new archive containing the specified items. - append: Like <code>create</code>, but new entries are appended to the archive. Note that this only works on uncompressed archives stored in regular files. The -f option is required. - list: List archive contents to stdout. - update: Like <code>append</code>, but new entries are added only if they have a modification date newer than the corresponding entry in the archive. Note that this only works on uncompressed archives stored in regular files. The -f option is required. - extract: Extract to disk from the archive. If a file with the same name appears more than once in the archive, each copy will be extracted, with later copies overwriting (replacing) earlier copies. | String | optional | "create" |
| <aid="tar_rule-out"></a>out | Resulting tar file to write. If absent, <code>[name].tar</code> is written. | <ahref="https://bazel.build/docs/build-ref.html#labels">Label</a> | optional | |
| <aid="tar_rule-srcs"></a>srcs | Files, directories, or other targets whose default outputs are placed into the tar.<br><br> If any of the srcs are binaries with runfiles, those are copied into the resulting tar as well. | <ahref="https://bazel.build/docs/build-ref.html#labels">List of labels</a> | required | |