diff --git a/docs/defs.md b/docs/defs.md index 1b574208b8..2e9bc76d09 100644 --- a/docs/defs.md +++ b/docs/defs.md @@ -72,8 +72,8 @@ Add additional rustc_flags from the command line with `--@rules_rust//:extra_rus
rust_binary(name, aliases, compile_data, crate_features, crate_name, crate_root, crate_type, data, - deps, edition, experimental_use_whole_archive_for_native_deps, linker_script, out_binary, - proc_macro_deps, rustc_env, rustc_env_files, rustc_flags, srcs, stamp, version) + deps, edition, linker_script, out_binary, proc_macro_deps, rustc_env, rustc_env_files, + rustc_flags, srcs, stamp, version)Builds a Rust binary crate. @@ -178,7 +178,6 @@ is available under the key `dsym_folder` in `OutputGroupInfo`. | data | List of files used by this rule at compile time and runtime.
compile_data
over data
, to prevent the data also being included in the runfiles. | List of labels | optional | [] |
| deps | List of other libraries to be linked to this library target.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 | "" |
-| experimental_use_whole_archive_for_native_deps | Whether to use +whole-archive linking modifier for native dependencies.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 | [] |
@@ -196,8 +195,7 @@ is available under the key `dsym_folder` in `OutputGroupInfo`.
rust_library(name, aliases, compile_data, crate_features, crate_name, crate_root, data, deps, - edition, experimental_use_whole_archive_for_native_deps, proc_macro_deps, rustc_env, - rustc_env_files, rustc_flags, srcs, stamp, version) + edition, proc_macro_deps, rustc_env, rustc_env_files, rustc_flags, srcs, stamp, version)Builds a Rust library crate. @@ -278,7 +276,6 @@ INFO: Elapsed time: 1.245s, Critical Path: 1.01s | data | List of files used by this rule at compile time and runtime.
compile_data
over data
, to prevent the data also being included in the runfiles. | List of labels | optional | [] |
| deps | List of other libraries to be linked to this library target.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 | "" |
-| experimental_use_whole_archive_for_native_deps | Whether to use +whole-archive linking modifier for native dependencies.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.NAME=value
, and newlines may be included in a value by ending a line with a trailing back-slash (\\
).stamp
attribute be enabled. Stamp variables should be wrapped in brackets in order to be resolved. E.g. NAME={WORKSPACE_STATUS_VARIABLE}
. | List of labels | optional | [] |
@@ -294,8 +291,8 @@ INFO: Elapsed time: 1.245s, Critical Path: 1.01s
rust_proc_macro(name, aliases, compile_data, crate_features, crate_name, crate_root, data, deps, - edition, experimental_use_whole_archive_for_native_deps, proc_macro_deps, rustc_env, - rustc_env_files, rustc_flags, srcs, stamp, version) + edition, proc_macro_deps, rustc_env, rustc_env_files, rustc_flags, srcs, stamp, + version)Builds a Rust proc-macro crate. @@ -315,7 +312,6 @@ Builds a Rust proc-macro crate. | data | List of files used by this rule at compile time and runtime.
compile_data
over data
, to prevent the data also being included in the runfiles. | List of labels | optional | [] |
| deps | List of other libraries to be linked to this library target.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 | "" |
-| experimental_use_whole_archive_for_native_deps | Whether to use +whole-archive linking modifier for native dependencies.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.NAME=value
, and newlines may be included in a value by ending a line with a trailing back-slash (\\
).stamp
attribute be enabled. Stamp variables should be wrapped in brackets in order to be resolved. E.g. NAME={WORKSPACE_STATUS_VARIABLE}
. | List of labels | optional | [] |
@@ -331,8 +327,8 @@ Builds a Rust proc-macro crate.
rust_shared_library(name, aliases, compile_data, crate_features, crate_name, crate_root, data, deps, - edition, experimental_use_whole_archive_for_native_deps, proc_macro_deps, - rustc_env, rustc_env_files, rustc_flags, srcs, stamp, version) + edition, proc_macro_deps, rustc_env, rustc_env_files, rustc_flags, srcs, stamp, + version)Builds a Rust shared library. @@ -360,7 +356,6 @@ When building the whole binary in Bazel, use `rust_library` instead. | data | List of files used by this rule at compile time and runtime.
compile_data
over data
, to prevent the data also being included in the runfiles. | List of labels | optional | [] |
| deps | List of other libraries to be linked to this library target.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 | "" |
-| experimental_use_whole_archive_for_native_deps | Whether to use +whole-archive linking modifier for native dependencies.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.NAME=value
, and newlines may be included in a value by ending a line with a trailing back-slash (\\
).stamp
attribute be enabled. Stamp variables should be wrapped in brackets in order to be resolved. E.g. NAME={WORKSPACE_STATUS_VARIABLE}
. | List of labels | optional | [] |
@@ -376,8 +371,8 @@ When building the whole binary in Bazel, use `rust_library` instead.
rust_static_library(name, aliases, compile_data, crate_features, crate_name, crate_root, data, deps, - edition, experimental_use_whole_archive_for_native_deps, proc_macro_deps, - rustc_env, rustc_env_files, rustc_flags, srcs, stamp, version) + edition, proc_macro_deps, rustc_env, rustc_env_files, rustc_flags, srcs, stamp, + version)Builds a Rust static library. @@ -405,7 +400,6 @@ When building the whole binary in Bazel, use `rust_library` instead. | data | List of files used by this rule at compile time and runtime.
compile_data
over data
, to prevent the data also being included in the runfiles. | List of labels | optional | [] |
| deps | List of other libraries to be linked to this library target.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 | "" |
-| experimental_use_whole_archive_for_native_deps | Whether to use +whole-archive linking modifier for native dependencies.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.NAME=value
, and newlines may be included in a value by ending a line with a trailing back-slash (\\
).stamp
attribute be enabled. Stamp variables should be wrapped in brackets in order to be resolved. E.g. NAME={WORKSPACE_STATUS_VARIABLE}
. | List of labels | optional | [] |
@@ -421,8 +415,8 @@ When building the whole binary in Bazel, use `rust_library` instead.
rust_test(name, aliases, compile_data, crate, crate_features, crate_name, crate_root, data, deps, - edition, env, experimental_use_whole_archive_for_native_deps, proc_macro_deps, rustc_env, - rustc_env_files, rustc_flags, srcs, stamp, use_libtest_harness, version) + edition, env, proc_macro_deps, rustc_env, rustc_env_files, rustc_flags, srcs, stamp, + use_libtest_harness, version)Builds a Rust test crate. @@ -557,7 +551,6 @@ Run the test with `bazel build //hello_lib:greeting_test`. | deps | List of other libraries to be linked to this library target.
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 | "" |
| env | Specifies additional environment variables to set when the test is executed by bazel test. Values are subject to $(rootpath)
, $(execpath)
, location, and ["Make variable"](https://docs.bazel.build/versions/master/be/make-variables.html) substitution.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.NAME=value
, and newlines may be included in a value by ending a line with a trailing back-slash (\\
).stamp
attribute be enabled. Stamp variables should be wrapped in brackets in order to be resolved. E.g. NAME={WORKSPACE_STATUS_VARIABLE}
. | List of labels | optional | [] |
diff --git a/docs/flatten.md b/docs/flatten.md
index ddff575214..c443f88bd1 100644
--- a/docs/flatten.md
+++ b/docs/flatten.md
@@ -183,8 +183,8 @@ Deprecated: gen_rust_project can now create a rust-project.json without a rust_a
rust_binary(name, aliases, compile_data, crate_features, crate_name, crate_root, crate_type, data, - deps, edition, experimental_use_whole_archive_for_native_deps, linker_script, out_binary, - proc_macro_deps, rustc_env, rustc_env_files, rustc_flags, srcs, stamp, version) + deps, edition, linker_script, out_binary, proc_macro_deps, rustc_env, rustc_env_files, + rustc_flags, srcs, stamp, version)Builds a Rust binary crate. @@ -289,7 +289,6 @@ is available under the key `dsym_folder` in `OutputGroupInfo`. | data | List of files used by this rule at compile time and runtime.
compile_data
over data
, to prevent the data also being included in the runfiles. | List of labels | optional | [] |
| deps | List of other libraries to be linked to this library target.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 | "" |
-| experimental_use_whole_archive_for_native_deps | Whether to use +whole-archive linking modifier for native dependencies.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 | [] |
@@ -406,8 +405,7 @@ rust_clippy(
## rust_doc
-rust_doc(name, crate, experimental_use_whole_archive_for_native_deps, html_after_content, - html_before_content, html_in_header, markdown_css) +rust_doc(name, crate, html_after_content, html_before_content, html_in_header, markdown_css)Generates code documentation. @@ -454,7 +452,6 @@ Running `bazel build //hello_lib:hello_lib_doc` will build a zip file containing | :------------- | :------------- | :------------- | :------------- | :------------- | | name | A unique name for this target. | Name | required | | | crate | The label of the target to generate code documentation for.
rust_doc
can generate HTML code documentation for the source files of rust_library
or rust_binary
targets. | Label | required | |
-| experimental_use_whole_archive_for_native_deps | Whether to use +whole-archive linking modifier for native dependencies.<body>
, after content. | Label | optional | None |
| html_before_content | File to add in <body>
, before content. | Label | optional | None |
| html_in_header | File to add to <head>
. | Label | optional | None |
@@ -466,7 +463,7 @@ Running `bazel build //hello_lib:hello_lib_doc` will build a zip file containing
## rust_doc_test
-rust_doc_test(name, crate, deps, experimental_use_whole_archive_for_native_deps) +rust_doc_test(name, crate, deps)Runs Rust documentation tests. @@ -515,7 +512,6 @@ Running `bazel test //hello_lib:hello_lib_doc_test` will run all documentation t | name | A unique name for this target. | Name | required | | | crate | The label of the target to generate code documentation for.
rust_doc_test
can generate HTML code documentation for the source files of rust_library
or rust_binary
targets. | Label | required | |
| deps | List of other libraries to be linked to this library target.rust_library
targets or cc_library
targets if linking a native library. | List of labels | optional | [] |
-| experimental_use_whole_archive_for_native_deps | Whether to use +whole-archive linking modifier for native dependencies.rust_library(name, aliases, compile_data, crate_features, crate_name, crate_root, data, deps, - edition, experimental_use_whole_archive_for_native_deps, proc_macro_deps, rustc_env, - rustc_env_files, rustc_flags, srcs, stamp, version) + edition, proc_macro_deps, rustc_env, rustc_env_files, rustc_flags, srcs, stamp, version)Builds a Rust library crate. @@ -649,7 +644,6 @@ INFO: Elapsed time: 1.245s, Critical Path: 1.01s | data | List of files used by this rule at compile time and runtime.
compile_data
over data
, to prevent the data also being included in the runfiles. | List of labels | optional | [] |
| deps | List of other libraries to be linked to this library target.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 | "" |
-| experimental_use_whole_archive_for_native_deps | Whether to use +whole-archive linking modifier for native dependencies.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.NAME=value
, and newlines may be included in a value by ending a line with a trailing back-slash (\\
).stamp
attribute be enabled. Stamp variables should be wrapped in brackets in order to be resolved. E.g. NAME={WORKSPACE_STATUS_VARIABLE}
. | List of labels | optional | [] |
@@ -665,8 +659,8 @@ INFO: Elapsed time: 1.245s, Critical Path: 1.01s
rust_proc_macro(name, aliases, compile_data, crate_features, crate_name, crate_root, data, deps, - edition, experimental_use_whole_archive_for_native_deps, proc_macro_deps, rustc_env, - rustc_env_files, rustc_flags, srcs, stamp, version) + edition, proc_macro_deps, rustc_env, rustc_env_files, rustc_flags, srcs, stamp, + version)Builds a Rust proc-macro crate. @@ -686,7 +680,6 @@ Builds a Rust proc-macro crate. | data | List of files used by this rule at compile time and runtime.
compile_data
over data
, to prevent the data also being included in the runfiles. | List of labels | optional | [] |
| deps | List of other libraries to be linked to this library target.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 | "" |
-| experimental_use_whole_archive_for_native_deps | Whether to use +whole-archive linking modifier for native dependencies.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.NAME=value
, and newlines may be included in a value by ending a line with a trailing back-slash (\\
).stamp
attribute be enabled. Stamp variables should be wrapped in brackets in order to be resolved. E.g. NAME={WORKSPACE_STATUS_VARIABLE}
. | List of labels | optional | [] |
@@ -802,8 +795,8 @@ See @rules_rust//proto:BUILD for examples of defining the toolchain.
rust_shared_library(name, aliases, compile_data, crate_features, crate_name, crate_root, data, deps, - edition, experimental_use_whole_archive_for_native_deps, proc_macro_deps, - rustc_env, rustc_env_files, rustc_flags, srcs, stamp, version) + edition, proc_macro_deps, rustc_env, rustc_env_files, rustc_flags, srcs, stamp, + version)Builds a Rust shared library. @@ -831,7 +824,6 @@ When building the whole binary in Bazel, use `rust_library` instead. | data | List of files used by this rule at compile time and runtime.
compile_data
over data
, to prevent the data also being included in the runfiles. | List of labels | optional | [] |
| deps | List of other libraries to be linked to this library target.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 | "" |
-| experimental_use_whole_archive_for_native_deps | Whether to use +whole-archive linking modifier for native dependencies.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.NAME=value
, and newlines may be included in a value by ending a line with a trailing back-slash (\\
).stamp
attribute be enabled. Stamp variables should be wrapped in brackets in order to be resolved. E.g. NAME={WORKSPACE_STATUS_VARIABLE}
. | List of labels | optional | [] |
@@ -847,8 +839,8 @@ When building the whole binary in Bazel, use `rust_library` instead.
rust_static_library(name, aliases, compile_data, crate_features, crate_name, crate_root, data, deps, - edition, experimental_use_whole_archive_for_native_deps, proc_macro_deps, - rustc_env, rustc_env_files, rustc_flags, srcs, stamp, version) + edition, proc_macro_deps, rustc_env, rustc_env_files, rustc_flags, srcs, stamp, + version)Builds a Rust static library. @@ -876,7 +868,6 @@ When building the whole binary in Bazel, use `rust_library` instead. | data | List of files used by this rule at compile time and runtime.
compile_data
over data
, to prevent the data also being included in the runfiles. | List of labels | optional | [] |
| deps | List of other libraries to be linked to this library target.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 | "" |
-| experimental_use_whole_archive_for_native_deps | Whether to use +whole-archive linking modifier for native dependencies.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.NAME=value
, and newlines may be included in a value by ending a line with a trailing back-slash (\\
).stamp
attribute be enabled. Stamp variables should be wrapped in brackets in order to be resolved. E.g. NAME={WORKSPACE_STATUS_VARIABLE}
. | List of labels | optional | [] |
@@ -911,8 +902,8 @@ A dedicated filegroup-like rule for Rust stdlib artifacts.
rust_test(name, aliases, compile_data, crate, crate_features, crate_name, crate_root, data, deps, - edition, env, experimental_use_whole_archive_for_native_deps, proc_macro_deps, rustc_env, - rustc_env_files, rustc_flags, srcs, stamp, use_libtest_harness, version) + edition, env, proc_macro_deps, rustc_env, rustc_env_files, rustc_flags, srcs, stamp, + use_libtest_harness, version)Builds a Rust test crate. @@ -1047,7 +1038,6 @@ Run the test with `bazel build //hello_lib:greeting_test`. | deps | List of other libraries to be linked to this library target.
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 | "" |
| env | Specifies additional environment variables to set when the test is executed by bazel test. Values are subject to $(rootpath)
, $(execpath)
, location, and ["Make variable"](https://docs.bazel.build/versions/master/be/make-variables.html) substitution.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.NAME=value
, and newlines may be included in a value by ending a line with a trailing back-slash (\\
).stamp
attribute be enabled. Stamp variables should be wrapped in brackets in order to be resolved. E.g. NAME={WORKSPACE_STATUS_VARIABLE}
. | List of labels | optional | [] |
diff --git a/docs/rust_doc.md b/docs/rust_doc.md
index c43d6b69ae..e6502c36a9 100644
--- a/docs/rust_doc.md
+++ b/docs/rust_doc.md
@@ -9,8 +9,7 @@
## rust_doc
-rust_doc(name, crate, experimental_use_whole_archive_for_native_deps, html_after_content, - html_before_content, html_in_header, markdown_css) +rust_doc(name, crate, html_after_content, html_before_content, html_in_header, markdown_css)Generates code documentation. @@ -57,7 +56,6 @@ Running `bazel build //hello_lib:hello_lib_doc` will build a zip file containing | :------------- | :------------- | :------------- | :------------- | :------------- | | name | A unique name for this target. | Name | required | | | crate | The label of the target to generate code documentation for.
rust_doc
can generate HTML code documentation for the source files of rust_library
or rust_binary
targets. | Label | required | |
-| experimental_use_whole_archive_for_native_deps | Whether to use +whole-archive linking modifier for native dependencies.<body>
, after content. | Label | optional | None |
| html_before_content | File to add in <body>
, before content. | Label | optional | None |
| html_in_header | File to add to <head>
. | Label | optional | None |
@@ -69,7 +67,7 @@ Running `bazel build //hello_lib:hello_lib_doc` will build a zip file containing
## rust_doc_test
-rust_doc_test(name, crate, deps, experimental_use_whole_archive_for_native_deps) +rust_doc_test(name, crate, deps)Runs Rust documentation tests. @@ -118,6 +116,5 @@ Running `bazel test //hello_lib:hello_lib_doc_test` will run all documentation t | name | A unique name for this target. | Name | required | | | crate | The label of the target to generate code documentation for.
rust_doc_test
can generate HTML code documentation for the source files of rust_library
or rust_binary
targets. | Label | required | |
| deps | List of other libraries to be linked to this library target.rust_library
targets or cc_library
targets if linking a native library. | List of labels | optional | [] |
-| experimental_use_whole_archive_for_native_deps | Whether to use +whole-archive linking modifier for native dependencies.