diff --git a/docs/defs.md b/docs/defs.md
index 6a846d27a1..60ecff4c9f 100644
--- a/docs/defs.md
+++ b/docs/defs.md
@@ -226,7 +226,7 @@ Hello world
| deps | List of other libraries to be linked to this library target.
These can be either other rust_library
targets or cc_library
targets if linking a native library. | List of labels | optional | [] |
| edition | The rust edition to use for this crate. Defaults to the edition specified in the rust_toolchain. | String | optional | "" |
| linker_script | Link script to forward into linker via rustc options. | Label | optional | None |
-| out_binary | - | Boolean | optional | False |
+| out_binary | Force a target, regardless of it's crate_type
, to always mark the file as executable. This attribute is only used to support wasm targets but is expected to be removed following a resolution to https://github.com/bazelbuild/rules_rust/issues/771. | Boolean | optional | False |
| proc_macro_deps | List of rust_library
targets with kind proc-macro
used to help build this library target. | List of labels | optional | [] |
| rustc_env | Dictionary of additional "key": "value"
environment variables to set for rustc.
rust_test()/rust_binary() rules can use $(rootpath //package:target) to pass in the location of a generated file or external tool. Cargo build scripts that wish to expand locations should use cargo_build_script()'s build_script_env argument instead, as build scripts are run in a different environment - see cargo_build_script()'s documentation for more. | Dictionary: String -> String | optional | {} |
| rustc_env_files | Files containing additional environment variables to set for rustc.
These files should contain a single variable per line, of format NAME=value
, and newlines may be included in a value by ending a line with a trailing back-slash (\
).
The order that these files will be processed is unspecified, so multiple definitions of a particular variable are discouraged. | List of labels | optional | [] |
diff --git a/docs/flatten.md b/docs/flatten.md
index 4d86b83f12..aca03640fe 100644
--- a/docs/flatten.md
+++ b/docs/flatten.md
@@ -317,7 +317,7 @@ Hello world
| deps | List of other libraries to be linked to this library target.
These can be either other rust_library
targets or cc_library
targets if linking a native library. | List of labels | optional | [] |
| edition | The rust edition to use for this crate. Defaults to the edition specified in the rust_toolchain. | String | optional | "" |
| linker_script | Link script to forward into linker via rustc options. | Label | optional | None |
-| out_binary | - | Boolean | optional | False |
+| out_binary | Force a target, regardless of it's crate_type
, to always mark the file as executable. This attribute is only used to support wasm targets but is expected to be removed following a resolution to https://github.com/bazelbuild/rules_rust/issues/771. | Boolean | optional | False |
| proc_macro_deps | List of rust_library
targets with kind proc-macro
used to help build this library target. | List of labels | optional | [] |
| rustc_env | Dictionary of additional "key": "value"
environment variables to set for rustc.
rust_test()/rust_binary() rules can use $(rootpath //package:target) to pass in the location of a generated file or external tool. Cargo build scripts that wish to expand locations should use cargo_build_script()'s build_script_env argument instead, as build scripts are run in a different environment - see cargo_build_script()'s documentation for more. | Dictionary: String -> String | optional | {} |
| rustc_env_files | Files containing additional environment variables to set for rustc.
These files should contain a single variable per line, of format NAME=value
, and newlines may be included in a value by ending a line with a trailing back-slash (\
).
The order that these files will be processed is unspecified, so multiple definitions of a particular variable are discouraged. | List of labels | optional | [] |
diff --git a/rust/private/rust.bzl b/rust/private/rust.bzl
index 62ddced299..32fcfdfc55 100644
--- a/rust/private/rust.bzl
+++ b/rust/private/rust.bzl
@@ -860,7 +860,14 @@ _rust_binary_attrs = {
cfg = "exec",
allow_single_file = True,
),
- "out_binary": attr.bool(),
+ "out_binary": attr.bool(
+ doc = (
+ "Force a target, regardless of it's `crate_type`, to always mark the " +
+ "file as executable. This attribute is only used to support wasm targets but is " +
+ "expected to be removed following a resolution to https://github.com/bazelbuild/rules_rust/issues/771."
+ ),
+ default = False,
+ ),
}
rust_binary = rule(