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
move _CRATES_REPOSITORY_ATTRS to a variable and only include _CRATES_REPOSITORY_ATTRS in reproducible attrs, not builtin attrs to repository_ctx.attr not added by us
"In the case that your `crates_repository` corresponds directly with an existing "+
51
+
"`Cargo.toml` file which has a paired `Cargo.lock` file, that `Cargo.lock` file "+
52
+
"should be used here, which will keep the versions used by cargo and bazel in sync."
53
+
),
54
+
mandatory=True,
55
+
),
56
+
"compressed_windows_toolchain_names": attr.bool(
57
+
doc="Whether or not the toolchain names of windows toolchains are expected to be in a `compressed` format.",
58
+
default=True,
59
+
),
60
+
"generate_binaries": attr.bool(
61
+
doc= (
62
+
"Whether to generate `rust_binary` targets for all the binary crates in every package. "+
63
+
"By default only the `rust_library` targets are generated."
64
+
),
65
+
default=False,
66
+
),
67
+
"generate_build_scripts": attr.bool(
68
+
doc= (
69
+
"Whether or not to generate "+
70
+
"[cargo build scripts](https://doc.rust-lang.org/cargo/reference/build-scripts.html) by default."
71
+
),
72
+
default=True,
73
+
),
74
+
"generate_target_compatible_with": attr.bool(
75
+
doc="DEPRECATED: Moved to `render_config`.",
76
+
default=True,
77
+
),
78
+
"generator": attr.string(
79
+
doc= (
80
+
"The absolute label of a generator. Eg. `@cargo_bazel_bootstrap//:cargo-bazel`. "+
81
+
"This is typically used when bootstrapping"
82
+
),
83
+
),
84
+
"generator_sha256s": attr.string_dict(
85
+
doc="Dictionary of `host_triple` -> `sha256` for a `cargo-bazel` binary.",
86
+
default=CARGO_BAZEL_SHA256S,
87
+
),
88
+
"generator_urls": attr.string_dict(
89
+
doc= (
90
+
"URL template from which to download the `cargo-bazel` binary. `{host_triple}` and will be "+
91
+
"filled in according to the host platform."
92
+
),
93
+
default=CARGO_BAZEL_URLS,
94
+
),
95
+
"isolated": attr.bool(
96
+
doc= (
97
+
"If true, `CARGO_HOME` will be overwritten to a directory within the generated repository in "+
98
+
"order to prevent other uses of Cargo from impacting having any effect on the generated targets "+
99
+
"produced by this rule. For users who either have multiple `crate_repository` definitions in a "+
100
+
"WORKSPACE or rapidly re-pin dependencies, setting this to false may improve build times. This "+
101
+
"variable is also controlled by `CARGO_BAZEL_ISOLATED` environment variable."
102
+
),
103
+
default=True,
104
+
),
105
+
"lockfile": attr.label(
106
+
doc= (
107
+
"The path to a file to use for reproducible renderings. "+
108
+
"If set, this file must exist within the workspace (but can be empty) before this rule will work."+
109
+
"If you already have a `MODULE.bazel.lock` file, you don't need this."+
110
+
"If you don't have a `MODULE.bazel.lock` file, the `lockfile` will save you generation time."
111
+
),
112
+
),
113
+
"manifests": attr.label_list(
114
+
doc="A list of Cargo manifests (`Cargo.toml` files).",
115
+
),
116
+
"packages": attr.string_dict(
117
+
doc="A set of crates (packages) specifications to depend on. See [crate.spec](#crate.spec).",
118
+
),
119
+
"quiet": attr.bool(
120
+
doc="If stdout and stderr should not be printed to the terminal.",
121
+
default=True,
122
+
),
123
+
"render_config": attr.string(
124
+
doc= (
125
+
"The configuration flags to use for rendering. Use `//crate_universe:defs.bzl\\%render_config` to "+
126
+
"generate the value for this field. If unset, the defaults defined there will be used."
127
+
),
128
+
),
129
+
"repin_instructions": attr.string(
130
+
doc="Instructions to re-pin the repository if required. Many people have wrapper scripts for keeping dependencies up to date, and would like to point users to that instead of the default.",
131
+
),
132
+
"rust_toolchain_cargo_template": attr.string(
133
+
doc= (
134
+
"The template to use for finding the host `cargo` binary. `{version}` (eg. '1.53.0'), "+
"In the case that your `crates_repository` corresponds directly with an existing "+
264
-
"`Cargo.toml` file which has a paired `Cargo.lock` file, that `Cargo.lock` file "+
265
-
"should be used here, which will keep the versions used by cargo and bazel in sync."
266
-
),
267
-
mandatory=True,
268
-
),
269
-
"compressed_windows_toolchain_names": attr.bool(
270
-
doc="Whether or not the toolchain names of windows toolchains are expected to be in a `compressed` format.",
271
-
default=True,
272
-
),
273
-
"generate_binaries": attr.bool(
274
-
doc= (
275
-
"Whether to generate `rust_binary` targets for all the binary crates in every package. "+
276
-
"By default only the `rust_library` targets are generated."
277
-
),
278
-
default=False,
279
-
),
280
-
"generate_build_scripts": attr.bool(
281
-
doc= (
282
-
"Whether or not to generate "+
283
-
"[cargo build scripts](https://doc.rust-lang.org/cargo/reference/build-scripts.html) by default."
284
-
),
285
-
default=True,
286
-
),
287
-
"generate_target_compatible_with": attr.bool(
288
-
doc="DEPRECATED: Moved to `render_config`.",
289
-
default=True,
290
-
),
291
-
"generator": attr.string(
292
-
doc= (
293
-
"The absolute label of a generator. Eg. `@cargo_bazel_bootstrap//:cargo-bazel`. "+
294
-
"This is typically used when bootstrapping"
295
-
),
296
-
),
297
-
"generator_sha256s": attr.string_dict(
298
-
doc="Dictionary of `host_triple` -> `sha256` for a `cargo-bazel` binary.",
299
-
default=CARGO_BAZEL_SHA256S,
300
-
),
301
-
"generator_urls": attr.string_dict(
302
-
doc= (
303
-
"URL template from which to download the `cargo-bazel` binary. `{host_triple}` and will be "+
304
-
"filled in according to the host platform."
305
-
),
306
-
default=CARGO_BAZEL_URLS,
307
-
),
308
-
"isolated": attr.bool(
309
-
doc= (
310
-
"If true, `CARGO_HOME` will be overwritten to a directory within the generated repository in "+
311
-
"order to prevent other uses of Cargo from impacting having any effect on the generated targets "+
312
-
"produced by this rule. For users who either have multiple `crate_repository` definitions in a "+
313
-
"WORKSPACE or rapidly re-pin dependencies, setting this to false may improve build times. This "+
314
-
"variable is also controlled by `CARGO_BAZEL_ISOLATED` environment variable."
315
-
),
316
-
default=True,
317
-
),
318
-
"lockfile": attr.label(
319
-
doc= (
320
-
"The path to a file to use for reproducible renderings. "+
321
-
"If set, this file must exist within the workspace (but can be empty) before this rule will work."+
322
-
"If you already have a `MODULE.bazel.lock` file, you don't need this."+
323
-
"If you don't have a `MODULE.bazel.lock` file, the `lockfile` will save you generation time."
324
-
),
325
-
),
326
-
"manifests": attr.label_list(
327
-
doc="A list of Cargo manifests (`Cargo.toml` files).",
328
-
),
329
-
"packages": attr.string_dict(
330
-
doc="A set of crates (packages) specifications to depend on. See [crate.spec](#crate.spec).",
331
-
),
332
-
"quiet": attr.bool(
333
-
doc="If stdout and stderr should not be printed to the terminal.",
334
-
default=True,
335
-
),
336
-
"render_config": attr.string(
337
-
doc= (
338
-
"The configuration flags to use for rendering. Use `//crate_universe:defs.bzl\\%render_config` to "+
339
-
"generate the value for this field. If unset, the defaults defined there will be used."
340
-
),
341
-
),
342
-
"repin_instructions": attr.string(
343
-
doc="Instructions to re-pin the repository if required. Many people have wrapper scripts for keeping dependencies up to date, and would like to point users to that instead of the default.",
344
-
),
345
-
"rust_toolchain_cargo_template": attr.string(
346
-
doc= (
347
-
"The template to use for finding the host `cargo` binary. `{version}` (eg. '1.53.0'), "+
0 commit comments