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 ||
790
-
| <aid="rust_proto_toolchain-edition"></a>edition | The edition used by the generated rust source. | String | optional | "2018" |
790
+
| <aid="rust_proto_toolchain-edition"></a>edition | The edition used by the generated rust source. | String | optional | "" |
791
791
| <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")]|
792
792
| <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|
793
793
| <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")]|
@@ -1120,7 +1120,7 @@ See @rules_rust//rust:repositories.bzl for examples of defining the @rust_cpuX r
1120
1120
|<a id="rust_toolchain-cargo"></a>cargo | The location of the <code>cargo</code> binary. Can be a direct source or a filegroup containing one item. |<a href="https://bazel.build/docs/build-ref.html#labels">Label</a>| optional |None|
1121
1121
|<a id="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. |<a href="https://bazel.build/docs/build-ref.html#labels">Label</a>| optional |None|
|<a id="rust_toolchain-default_edition"></a>default_edition | The edition to use for rust_* rules that don't specify an edition. | String | optional | "2018" |
1123
+
|<a id="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 | "" |
1124
1124
|<a id="rust_toolchain-dylib_ext"></a>dylib_ext | The extension for dynamic libraries created from rustc. | String | required ||
1125
1125
|<a id="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 | |
1126
1126
|<a id="rust_toolchain-llvm_tools"></a>llvm_tools |LLVM tools that are shipped with the Rust toolchain. |<a href="https://bazel.build/docs/build-ref.html#labels">Label</a>| optional |None|
@@ -1161,7 +1161,7 @@ A given instance of this rule should be accompanied by a rust_toolchain_reposito
1161
1161
|<a id="rust_toolchain_repository-name"></a>name | A unique name for this repository. |<a href="https://bazel.build/docs/build-ref.html#name">Name</a>| required ||
1162
1162
|<a id="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. | <a href="https://bazel.build/docs/skylark/lib/dict.html">Dictionary: String -> String</a> | optional | {} |
1163
1163
|<a id="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|
1164
-
|<a id="rust_toolchain_repository-edition"></a>edition | The rust edition to be used by default. | String | optional |"2018"|
1164
+
|<a id="rust_toolchain_repository-edition"></a>edition | The rust edition to be used by default (2015, 2018, or2021). If absent, every rule is required to specify its <code>edition</code> attribute. | String | optional |""|
1165
1165
|<a id="rust_toolchain_repository-exec_triple"></a>exec_triple | The Rust-style target that this compiler runs on | String | required ||
1166
1166
|<a id="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 | [] |
1167
1167
|<a id="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|
@@ -1635,7 +1635,7 @@ N.B. A "proxy repository" is needed to allow for registering the toolchain (with
1635
1635
|<a id="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>|
1636
1636
|<a id="rust_repository_set-iso_date"></a>iso_date | The date of the tool. Defaults to None. |<code>None</code>|
1637
1637
|<a id="rust_repository_set-rustfmt_version"></a>rustfmt_version | The version of rustfmt to be associated with the toolchain. Defaults to None. |<code>None</code>|
1638
-
|<a id="rust_repository_set-edition"></a>edition | The rust edition to be used by default (2015, 2018 (ifNone), or2021). |<code>None</code>|
1638
+
|<a id="rust_repository_set-edition"></a>edition | The rust edition to be used by default (2015, 2018, or2021). If absent, every rule is required to specify its <code>edition</code> attribute. |<code>None</code>|
1639
1639
|<a id="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>|
1640
1640
|<a id="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> |
1641
1641
|<a id="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
@@ -101,7 +101,7 @@ def rust_register_toolchains(
101
101
102
102
Args:
103
103
dev_components (bool, optional): Whether to download the rustc-dev components (defaults to False). Requires version to be "nightly".
104
-
edition (str, optional): The rust edition to be used by default (2015, 2018 (default), or 2021)
104
+
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.
105
105
include_rustc_srcs (bool, optional): Whether to download rustc's src code. This is required in order to use rust-analyzer support.
106
106
See [rust_toolchain_repository.include_rustc_srcs](#rust_toolchain_repository-include_rustc_srcs). for more details
107
107
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). "+
217
+
"If absent, every rule is required to specify its `edition` attribute."
218
+
),
217
219
),
218
220
"exec_triple": attr.string(
219
221
doc="The Rust-style target that this compiler runs on",
@@ -311,7 +313,7 @@ def rust_repository_set(
311
313
iso_date (str, optional): The date of the tool. Defaults to None.
312
314
rustfmt_version (str, optional): The version of rustfmt to be associated with the
313
315
toolchain. Defaults to None.
314
-
edition (str, optional): The rust edition to be used by default (2015, 2018 (if None), or 2021).
316
+
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.
315
317
dev_components (bool, optional): Whether to download the rustc-dev components.
316
318
Requires version to be "nightly". Defaults to False.
317
319
sha256s (str, optional): A dict associating tool subdirectories to sha256 hashes. See
0 commit comments