Remove rust_binary(out_binary=True) hack. (#3891)
rust_shared_library() should be used instead.
closes https://github.com/bazelbuild/rules_rust/pull/3814
Signed-off-by: Piotr Sikora <code@piotrsikora.dev>
diff --git a/rust/private/rust.bzl b/rust/private/rust.bzl
index 0b2a88a..d06f5fa 100644
--- a/rust/private/rust.bzl
+++ b/rust/private/rust.bzl
@@ -1176,14 +1176,6 @@
"""),
allow_single_file = True,
),
- "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,
- ),
"stamp": _stamp_attribute(default_value = -1),
} | _experimental_use_cc_common_link_attrs
diff --git a/rust/private/rustc.bzl b/rust/private/rustc.bzl
index 1c1917a..776dce7 100644
--- a/rust/private/rustc.bzl
+++ b/rust/private/rustc.bzl
@@ -1679,11 +1679,7 @@
transitive_runfiles.append(dynamic_libraries)
runfiles = runfiles.merge_all(transitive_runfiles)
- # TODO: Remove after some resolution to
- # https://github.com/bazelbuild/rules_rust/issues/771
- out_binary = getattr(attr, "out_binary", False)
-
- executable = crate_info.output if crate_info.type == "bin" or crate_info.is_test or out_binary else None
+ executable = crate_info.output if crate_info.type == "bin" or crate_info.is_test else None
instrumented_files_kwargs = {
"dependency_attributes": ["deps", "crate"],
@@ -1895,11 +1891,6 @@
if crate_info.type not in ("staticlib", "cdylib", "rlib", "lib"):
return []
- # TODO: Remove after some resolution to
- # https://github.com/bazelbuild/rules_rust/issues/771
- if getattr(attr, "out_binary", False):
- return []
-
dot_a = None
library_to_link = None