1<!-- Generated with Stardoc: http://skydoc.bazel.build --> 2 3native_binary() and native_test() rule implementations. 4 5These rules let you wrap a pre-built binary or script in a conventional binary 6and test rule respectively. They fulfill the same goal as sh_binary and sh_test 7do, but they run the wrapped binary directly, instead of through Bash, so they 8don't depend on Bash and work with --shell_exectuable="". 9 10 11<a id="#native_binary"></a> 12 13## native_binary 14 15<pre> 16native_binary(<a href="#native_binary-name">name</a>, <a href="#native_binary-src">src</a>, <a href="#native_binary-out">out</a>, <a href="#native_binary-data">data</a>, <a href="#native_binary-kwargs">kwargs</a>) 17</pre> 18 19Wraps a pre-built binary or script with a binary rule. 20 21You can "bazel run" this rule like any other binary rule, and use it as a tool in genrule.tools for example. You can also augment the binary with runfiles. 22 23 24**PARAMETERS** 25 26 27| Name | Description | Default Value | 28| :------------- | :------------- | :------------- | 29| <a id="native_binary-name"></a>name | The name of the rule. | none | 30| <a id="native_binary-src"></a>src | label; path of the pre-built executable | none | 31| <a id="native_binary-out"></a>out | output; an output name for the copy of the binary. (Bazel requires that this rule make a copy of 'src'.) | none | 32| <a id="native_binary-data"></a>data | list of labels; data dependencies | <code>None</code> | 33| <a id="native_binary-kwargs"></a>kwargs | The <a href="https://docs.bazel.build/versions/main/be/common-definitions.html#common-attributes-binaries">common attributes for binaries</a>. | none | 34 35 36<a id="#native_test"></a> 37 38## native_test 39 40<pre> 41native_test(<a href="#native_test-name">name</a>, <a href="#native_test-src">src</a>, <a href="#native_test-out">out</a>, <a href="#native_test-data">data</a>, <a href="#native_test-kwargs">kwargs</a>) 42</pre> 43 44Wraps a pre-built binary or script with a test rule. 45 46You can "bazel test" this rule like any other test rule. You can also augment the binary with 47runfiles. 48 49 50**PARAMETERS** 51 52 53| Name | Description | Default Value | 54| :------------- | :------------- | :------------- | 55| <a id="native_test-name"></a>name | The name of the test rule. | none | 56| <a id="native_test-src"></a>src | label; path of the pre-built executable | none | 57| <a id="native_test-out"></a>out | output; an output name for the copy of the binary. (Bazel requires that this rule make a copy of 'src'.) | none | 58| <a id="native_test-data"></a>data | list of labels; data dependencies | <code>None</code> | 59| <a id="native_test-kwargs"></a>kwargs | The <a href="https://docs.bazel.build/versions/main/be/common-definitions.html#common-attributes-tests">common attributes for tests</a>. | none | 60 61 62