You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| <aid="rust_proto_toolchain-name"></a>name | A unique name for this target. | <ahref="https://bazel.build/docs/build-ref.html#name">Name</a> | required ||
782
-
| <aid="rust_proto_toolchain-edition"></a>edition | The edition used by the generated rust source. | String | optional | "2018" |
782
+
| <aid="rust_proto_toolchain-edition"></a>edition | The edition used by the generated rust source. | String | optional | "" |
783
783
| <aid="rust_proto_toolchain-grpc_compile_deps"></a>grpc_compile_deps | The crates the generated grpc libraries depends on. | <ahref="https://bazel.build/docs/build-ref.html#labels">List of labels</a> | optional |[Label("//proto/raze:protobuf"), Label("//proto/raze:grpc"), Label("//proto/raze:tls_api"), Label("//proto/raze:tls_api_stub")]|
784
784
| <aid="rust_proto_toolchain-grpc_plugin"></a>grpc_plugin | The location of the Rust protobuf compiler plugin to generate rust gRPC stubs. | <ahref="https://bazel.build/docs/build-ref.html#labels">Label</a> | optional | //proto:protoc_gen_rust_grpc|
785
785
| <aid="rust_proto_toolchain-proto_compile_deps"></a>proto_compile_deps | The crates the generated protobuf libraries depends on. | <ahref="https://bazel.build/docs/build-ref.html#labels">List of labels</a> | optional |[Label("//proto/raze:protobuf")]|
@@ -1117,7 +1117,7 @@ See @rules_rust//rust:repositories.bzl for examples of defining the @rust_cpuX r
1117
1117
| <aid="rust_toolchain-cargo"></a>cargo | The location of the <code>cargo</code> binary. Can be a direct source or a filegroup containing one item. | <ahref="https://bazel.build/docs/build-ref.html#labels">Label</a> | optional | None |
1118
1118
| <aid="rust_toolchain-clippy_driver"></a>clippy_driver | The location of the <code>clippy-driver</code> binary. Can be a direct source or a filegroup containing one item. | <ahref="https://bazel.build/docs/build-ref.html#labels">Label</a> | optional | None |
| <aid="rust_toolchain-default_edition"></a>default_edition | The edition to use for rust_* rules that don't specify an edition. | String | optional | "2018" |
1120
+
| <aid="rust_toolchain-default_edition"></a>default_edition | The edition to use for rust_* rules that don't specify an edition. If absent, every rule is required to specify its <code>edition</code> attribute. | String | optional | "" |
1121
1121
| <aid="rust_toolchain-dylib_ext"></a>dylib_ext | The extension for dynamic libraries created from rustc. | String | required ||
1122
1122
| <aid="rust_toolchain-exec_triple"></a>exec_triple | The platform triple for the toolchains execution environment. For more details see: https://docs.bazel.build/versions/master/skylark/rules.html#configurations| String | required ||
1123
1123
| <aid="rust_toolchain-llvm_tools"></a>llvm_tools | LLVM tools that are shipped with the Rust toolchain. | <ahref="https://bazel.build/docs/build-ref.html#labels">Label</a> | optional | None |
@@ -1158,7 +1158,7 @@ A given instance of this rule should be accompanied by a rust_toolchain_reposito
1158
1158
| <aid="rust_toolchain_repository-name"></a>name | A unique name for this repository. | <ahref="https://bazel.build/docs/build-ref.html#name">Name</a> | required ||
1159
1159
| <aid="rust_toolchain_repository-auth"></a>auth | Auth object compatible with repository_ctx.download to use when downloading files. See [repository_ctx.download](https://docs.bazel.build/versions/main/skylark/lib/repository_ctx.html#download) for more details. | <ahref="https://bazel.build/docs/skylark/lib/dict.html">Dictionary: String -> String</a> | optional | {} |
1160
1160
| <aid="rust_toolchain_repository-dev_components"></a>dev_components | Whether to download the rustc-dev components (defaults to False). Requires version to be "nightly". | Boolean | optional | False |
1161
-
| <aid="rust_toolchain_repository-edition"></a>edition | The rust edition to be used by default. | String | optional | "2018" |
1161
+
| <aid="rust_toolchain_repository-edition"></a>edition | The rust edition to be used by default (2015, 2018, or 2021). If absent, every rule is required to specify its <code>edition</code> attribute. | String | optional | "" |
1162
1162
| <aid="rust_toolchain_repository-exec_triple"></a>exec_triple | The Rust-style target that this compiler runs on | String | required ||
1163
1163
| <aid="rust_toolchain_repository-extra_target_triples"></a>extra_target_triples | Additional rust-style targets that this set of toolchains should support. | List of strings | optional |[]|
1164
1164
| <aid="rust_toolchain_repository-include_rustc_srcs"></a>include_rustc_srcs | Whether to download and unpack the rustc source files. These are very large, and slow to unpack, but are required to support rust analyzer. An environment variable <code>RULES_RUST_TOOLCHAIN_INCLUDE_RUSTC_SRCS</code> can also be used to control this attribute. This variable will take precedence over the hard coded attribute. Setting it to <code>true</code> to activates this attribute where all other values deactivate it. | Boolean | optional | False |
@@ -1632,7 +1632,7 @@ N.B. A "proxy repository" is needed to allow for registering the toolchain (with
1632
1632
| <aid="rust_repository_set-extra_target_triples"></a>extra_target_triples | Additional rust-style targets that this set of toolchains should support. Defaults to []. | <code>[]</code> |
1633
1633
| <aid="rust_repository_set-iso_date"></a>iso_date | The date of the tool. Defaults to None. | <code>None</code> |
1634
1634
| <aid="rust_repository_set-rustfmt_version"></a>rustfmt_version | The version of rustfmt to be associated with the toolchain. Defaults to None. | <code>None</code> |
1635
-
| <aid="rust_repository_set-edition"></a>edition | The rust edition to be used by default (2015, 2018 (if None), or 2021). | <code>None</code> |
1635
+
| <aid="rust_repository_set-edition"></a>edition | The rust edition to be used by default (2015, 2018, or 2021). If absent, every rule is required to specify its <code>edition</code> attribute. | <code>None</code> |
1636
1636
| <aid="rust_repository_set-dev_components"></a>dev_components | Whether to download the rustc-dev components. Requires version to be "nightly". Defaults to False. | <code>False</code> |
1637
1637
| <aid="rust_repository_set-sha256s"></a>sha256s | A dict associating tool subdirectories to sha256 hashes. See [rust_repositories](#rust_repositories) for more details. | <code>None</code> |
1638
1638
| <aid="rust_repository_set-urls"></a>urls | A list of mirror urls containing the tools from the Rust-lang static file server. These must contain the '{}' used to substitute the tool being fetched (using .format). Defaults to ['https://static.rust-lang.org/dist/{}.tar.gz']| <code>["https://static.rust-lang.org/dist/{}.tar.gz"]</code> |
| <aid="rust_proto_toolchain-name"></a>name | A unique name for this target. | <ahref="https://bazel.build/docs/build-ref.html#name">Name</a> | required ||
255
-
| <aid="rust_proto_toolchain-edition"></a>edition | The edition used by the generated rust source. | String | optional | "2018" |
255
+
| <aid="rust_proto_toolchain-edition"></a>edition | The edition used by the generated rust source. | String | optional | "" |
256
256
| <aid="rust_proto_toolchain-grpc_compile_deps"></a>grpc_compile_deps | The crates the generated grpc libraries depends on. | <ahref="https://bazel.build/docs/build-ref.html#labels">List of labels</a> | optional |[Label("//proto/raze:protobuf"), Label("//proto/raze:grpc"), Label("//proto/raze:tls_api"), Label("//proto/raze:tls_api_stub")]|
257
257
| <aid="rust_proto_toolchain-grpc_plugin"></a>grpc_plugin | The location of the Rust protobuf compiler plugin to generate rust gRPC stubs. | <ahref="https://bazel.build/docs/build-ref.html#labels">Label</a> | optional | //proto:protoc_gen_rust_grpc|
258
258
| <aid="rust_proto_toolchain-proto_compile_deps"></a>proto_compile_deps | The crates the generated protobuf libraries depends on. | <ahref="https://bazel.build/docs/build-ref.html#labels">List of labels</a> | optional |[Label("//proto/raze:protobuf")]|
Copy file name to clipboardExpand all lines: docs/rust_repositories.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -92,7 +92,7 @@ See @rules_rust//rust:repositories.bzl for examples of defining the @rust_cpuX r
92
92
| <aid="rust_toolchain-cargo"></a>cargo | The location of the <code>cargo</code> binary. Can be a direct source or a filegroup containing one item. | <ahref="https://bazel.build/docs/build-ref.html#labels">Label</a> | optional | None |
93
93
| <aid="rust_toolchain-clippy_driver"></a>clippy_driver | The location of the <code>clippy-driver</code> binary. Can be a direct source or a filegroup containing one item. | <ahref="https://bazel.build/docs/build-ref.html#labels">Label</a> | optional | None |
| <aid="rust_toolchain-default_edition"></a>default_edition | The edition to use for rust_* rules that don't specify an edition. | String | optional | "2018" |
95
+
| <aid="rust_toolchain-default_edition"></a>default_edition | The edition to use for rust_* rules that don't specify an edition. If absent, every rule is required to specify its <code>edition</code> attribute. | String | optional | "" |
96
96
| <aid="rust_toolchain-dylib_ext"></a>dylib_ext | The extension for dynamic libraries created from rustc. | String | required ||
97
97
| <aid="rust_toolchain-exec_triple"></a>exec_triple | The platform triple for the toolchains execution environment. For more details see: https://docs.bazel.build/versions/master/skylark/rules.html#configurations| String | required ||
98
98
| <aid="rust_toolchain-llvm_tools"></a>llvm_tools | LLVM tools that are shipped with the Rust toolchain. | <ahref="https://bazel.build/docs/build-ref.html#labels">Label</a> | optional | None |
@@ -133,7 +133,7 @@ A given instance of this rule should be accompanied by a rust_toolchain_reposito
133
133
| <aid="rust_toolchain_repository-name"></a>name | A unique name for this repository. | <ahref="https://bazel.build/docs/build-ref.html#name">Name</a> | required ||
134
134
| <aid="rust_toolchain_repository-auth"></a>auth | Auth object compatible with repository_ctx.download to use when downloading files. See [repository_ctx.download](https://docs.bazel.build/versions/main/skylark/lib/repository_ctx.html#download) for more details. | <ahref="https://bazel.build/docs/skylark/lib/dict.html">Dictionary: String -> String</a> | optional | {} |
135
135
| <aid="rust_toolchain_repository-dev_components"></a>dev_components | Whether to download the rustc-dev components (defaults to False). Requires version to be "nightly". | Boolean | optional | False |
136
-
| <aid="rust_toolchain_repository-edition"></a>edition | The rust edition to be used by default. | String | optional | "2018" |
136
+
| <aid="rust_toolchain_repository-edition"></a>edition | The rust edition to be used by default (2015, 2018, or 2021). If absent, every rule is required to specify its <code>edition</code> attribute. | String | optional | "" |
137
137
| <aid="rust_toolchain_repository-exec_triple"></a>exec_triple | The Rust-style target that this compiler runs on | String | required ||
138
138
| <aid="rust_toolchain_repository-extra_target_triples"></a>extra_target_triples | Additional rust-style targets that this set of toolchains should support. | List of strings | optional |[]|
139
139
| <aid="rust_toolchain_repository-include_rustc_srcs"></a>include_rustc_srcs | Whether to download and unpack the rustc source files. These are very large, and slow to unpack, but are required to support rust analyzer. An environment variable <code>RULES_RUST_TOOLCHAIN_INCLUDE_RUSTC_SRCS</code> can also be used to control this attribute. This variable will take precedence over the hard coded attribute. Setting it to <code>true</code> to activates this attribute where all other values deactivate it. | Boolean | optional | False |
@@ -214,7 +214,7 @@ N.B. A "proxy repository" is needed to allow for registering the toolchain (with
214
214
| <aid="rust_repository_set-extra_target_triples"></a>extra_target_triples | Additional rust-style targets that this set of toolchains should support. Defaults to []. | <code>[]</code> |
215
215
| <aid="rust_repository_set-iso_date"></a>iso_date | The date of the tool. Defaults to None. | <code>None</code> |
216
216
| <aid="rust_repository_set-rustfmt_version"></a>rustfmt_version | The version of rustfmt to be associated with the toolchain. Defaults to None. | <code>None</code> |
217
-
| <aid="rust_repository_set-edition"></a>edition | The rust edition to be used by default (2015, 2018 (if None), or 2021). | <code>None</code> |
217
+
| <aid="rust_repository_set-edition"></a>edition | The rust edition to be used by default (2015, 2018, or 2021). If absent, every rule is required to specify its <code>edition</code> attribute. | <code>None</code> |
218
218
| <aid="rust_repository_set-dev_components"></a>dev_components | Whether to download the rustc-dev components. Requires version to be "nightly". Defaults to False. | <code>False</code> |
219
219
| <aid="rust_repository_set-sha256s"></a>sha256s | A dict associating tool subdirectories to sha256 hashes. See [rust_repositories](#rust_repositories) for more details. | <code>None</code> |
220
220
| <aid="rust_repository_set-urls"></a>urls | A list of mirror urls containing the tools from the Rust-lang static file server. These must contain the '{}' used to substitute the tool being fetched (using .format). Defaults to ['https://static.rust-lang.org/dist/{}.tar.gz']| <code>["https://static.rust-lang.org/dist/{}.tar.gz"]</code> |
Copy file name to clipboardExpand all lines: rust/repositories.bzl
+6-4
Original file line number
Diff line number
Diff line change
@@ -91,7 +91,7 @@ def rust_register_toolchains(
91
91
92
92
Args:
93
93
dev_components (bool, optional): Whether to download the rustc-dev components (defaults to False). Requires version to be "nightly".
94
-
edition (str, optional): The rust edition to be used by default (2015, 2018 (default), or 2021)
94
+
edition (str, optional): The rust edition to be used by default (2015, 2018, or 2021). If absent, every rule is required to specify its `edition` attribute.
95
95
include_rustc_srcs (bool, optional): Whether to download rustc's src code. This is required in order to use rust-analyzer support.
96
96
See [rust_toolchain_repository.include_rustc_srcs](#rust_toolchain_repository-include_rustc_srcs). for more details
97
97
iso_date (str, optional): The date of the nightly or beta release (ignored if the version is a specific version).
"The rust edition to be used by default (2015, 2018, or 2021). "+
207
+
"If absent, every rule is required to specify its `edition` attribute."
208
+
),
207
209
),
208
210
"exec_triple": attr.string(
209
211
doc="The Rust-style target that this compiler runs on",
@@ -301,7 +303,7 @@ def rust_repository_set(
301
303
iso_date (str, optional): The date of the tool. Defaults to None.
302
304
rustfmt_version (str, optional): The version of rustfmt to be associated with the
303
305
toolchain. Defaults to None.
304
-
edition (str, optional): The rust edition to be used by default (2015, 2018 (if None), or 2021).
306
+
edition (str, optional): The rust edition to be used by default (2015, 2018, or 2021). If absent, every rule is required to specify its `edition` attribute.
305
307
dev_components (bool, optional): Whether to download the rustc-dev components.
306
308
Requires version to be "nightly". Defaults to False.
307
309
sha256s (str, optional): A dict associating tool subdirectories to sha256 hashes. See
0 commit comments