Skip to content

Commit 88e83f2

Browse files
authored
Added Rust 1.67.0 (#1799)
* Added Rust 1.67.0 * Updated crate_universe examples * Regenerate documentation * Addressed new clippy defects
1 parent 6922b50 commit 88e83f2

File tree

21 files changed

+295
-23
lines changed

21 files changed

+295
-23
lines changed

docs/cargo.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ A rule for bootstrapping a Rust binary using [Cargo](https://doc.rust-lang.org/c
3636
| <a id="cargo_bootstrap_repository-rust_toolchain_rustc_template"></a>rust_toolchain_rustc_template | The template to use for finding the host <code>rustc</code> binary. <code>{version}</code> (eg. '1.53.0'), <code>{triple}</code> (eg. 'x86_64-unknown-linux-gnu'), <code>{arch}</code> (eg. 'aarch64'), <code>{vendor}</code> (eg. 'unknown'), <code>{system}</code> (eg. 'darwin'), <code>{channel}</code> (eg. 'stable'), and <code>{tool}</code> (eg. 'rustc.exe') will be replaced in the string if present. | String | optional | <code>"@rust_{system}_{arch}__{triple}__{channel}_tools//:bin/{tool}"</code> |
3737
| <a id="cargo_bootstrap_repository-srcs"></a>srcs | Souce files of the crate to build. Passing source files here can be used to trigger rebuilds when changes are made | <a href="https://bazel.build/concepts/labels">List of labels</a> | optional | <code>[]</code> |
3838
| <a id="cargo_bootstrap_repository-timeout"></a>timeout | Maximum duration of the Cargo build command in seconds | Integer | optional | <code>600</code> |
39-
| <a id="cargo_bootstrap_repository-version"></a>version | The version of cargo the resolver should use | String | optional | <code>"1.66.1"</code> |
39+
| <a id="cargo_bootstrap_repository-version"></a>version | The version of cargo the resolver should use | String | optional | <code>"1.67.0"</code> |
4040

4141

4242
<a id="cargo_dep_env"></a>

docs/crate_universe.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ CARGO_BAZEL_REPIN=1 CARGO_BAZEL_REPIN_ONLY=crate_index bazel sync --only=crate_i
386386
| <a id="crates_repository-repo_mapping"></a>repo_mapping | A dictionary from local repository name to global repository name. This allows controls over workspace dependency resolution for dependencies of this repository.&lt;p&gt;For example, an entry <code>"@foo": "@bar"</code> declares that, for any time this repository depends on <code>@foo</code> (such as a dependency on <code>@foo//some:target</code>, it should actually resolve that dependency within globally-declared <code>@bar</code> (<code>@bar//some:target</code>). | <a href="https://bazel.build/rules/lib/dict">Dictionary: String -> String</a> | required | |
387387
| <a id="crates_repository-rust_toolchain_cargo_template"></a>rust_toolchain_cargo_template | The template to use for finding the host <code>cargo</code> binary. <code>{version}</code> (eg. '1.53.0'), <code>{triple}</code> (eg. 'x86_64-unknown-linux-gnu'), <code>{arch}</code> (eg. 'aarch64'), <code>{vendor}</code> (eg. 'unknown'), <code>{system}</code> (eg. 'darwin'), <code>{cfg}</code> (eg. 'exec'), <code>{channel}</code> (eg. 'stable'), and <code>{tool}</code> (eg. 'rustc.exe') will be replaced in the string if present. | String | optional | <code>"@rust_{system}_{arch}__{triple}__{channel}_tools//:bin/{tool}"</code> |
388388
| <a id="crates_repository-rust_toolchain_rustc_template"></a>rust_toolchain_rustc_template | The template to use for finding the host <code>rustc</code> binary. <code>{version}</code> (eg. '1.53.0'), <code>{triple}</code> (eg. 'x86_64-unknown-linux-gnu'), <code>{arch}</code> (eg. 'aarch64'), <code>{vendor}</code> (eg. 'unknown'), <code>{system}</code> (eg. 'darwin'), <code>{cfg}</code> (eg. 'exec'), <code>{channel}</code> (eg. 'stable'), and <code>{tool}</code> (eg. 'cargo.exe') will be replaced in the string if present. | String | optional | <code>"@rust_{system}_{arch}__{triple}__{channel}_tools//:bin/{tool}"</code> |
389-
| <a id="crates_repository-rust_version"></a>rust_version | The version of Rust the currently registered toolchain is using. Eg. <code>1.56.0</code>, or <code>nightly/2021-09-08</code> | String | optional | <code>"1.66.1"</code> |
389+
| <a id="crates_repository-rust_version"></a>rust_version | The version of Rust the currently registered toolchain is using. Eg. <code>1.56.0</code>, or <code>nightly/2021-09-08</code> | String | optional | <code>"1.67.0"</code> |
390390
| <a id="crates_repository-splicing_config"></a>splicing_config | The configuration flags to use for splicing Cargo maniests. Use <code>//crate_universe:defs.bzl\%rsplicing_config</code> to generate the value for this field. If unset, the defaults defined there will be used. | String | optional | <code>""</code> |
391391
| <a id="crates_repository-supported_platform_triples"></a>supported_platform_triples | A set of all platform triples to consider when generating dependencies. | List of strings | optional | <code>["i686-apple-darwin", "i686-pc-windows-msvc", "i686-unknown-linux-gnu", "x86_64-apple-darwin", "x86_64-pc-windows-msvc", "x86_64-unknown-linux-gnu", "aarch64-apple-darwin", "aarch64-apple-ios", "aarch64-apple-ios-sim", "aarch64-pc-windows-msvc", "aarch64-linux-android", "aarch64-unknown-linux-gnu", "arm-unknown-linux-gnueabi", "armv7-unknown-linux-gnueabi", "armv7-linux-androideabi", "i686-linux-android", "i686-unknown-freebsd", "powerpc-unknown-linux-gnu", "s390x-unknown-linux-gnu", "wasm32-unknown-unknown", "wasm32-wasi", "x86_64-apple-ios", "x86_64-linux-android", "x86_64-unknown-freebsd", "riscv32imc-unknown-none-elf", "riscv64gc-unknown-none-elf"]</code> |
392392

@@ -720,7 +720,7 @@ Define dependencies of the `cargo-bazel` Rust target
720720

721721
| Name | Description | Default Value |
722722
| :------------- | :------------- | :------------- |
723-
| <a id="crate_universe_dependencies-rust_version"></a>rust_version | The version of rust to use when generating dependencies. | `"1.66.1"` |
723+
| <a id="crate_universe_dependencies-rust_version"></a>rust_version | The version of rust to use when generating dependencies. | `"1.67.0"` |
724724
| <a id="crate_universe_dependencies-bootstrap"></a>bootstrap | If true, a <code>cargo_bootstrap_repository</code> target will be generated. | `False` |
725725

726726

docs/flatten.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ A rule for bootstrapping a Rust binary using [Cargo](https://doc.rust-lang.org/c
103103
| <a id="cargo_bootstrap_repository-rust_toolchain_rustc_template"></a>rust_toolchain_rustc_template | The template to use for finding the host <code>rustc</code> binary. <code>{version}</code> (eg. '1.53.0'), <code>{triple}</code> (eg. 'x86_64-unknown-linux-gnu'), <code>{arch}</code> (eg. 'aarch64'), <code>{vendor}</code> (eg. 'unknown'), <code>{system}</code> (eg. 'darwin'), <code>{channel}</code> (eg. 'stable'), and <code>{tool}</code> (eg. 'rustc.exe') will be replaced in the string if present. | String | optional | <code>"@rust_{system}_{arch}__{triple}__{channel}_tools//:bin/{tool}"</code> |
104104
| <a id="cargo_bootstrap_repository-srcs"></a>srcs | Souce files of the crate to build. Passing source files here can be used to trigger rebuilds when changes are made | <a href="https://bazel.build/concepts/labels">List of labels</a> | optional | <code>[]</code> |
105105
| <a id="cargo_bootstrap_repository-timeout"></a>timeout | Maximum duration of the Cargo build command in seconds | Integer | optional | <code>600</code> |
106-
| <a id="cargo_bootstrap_repository-version"></a>version | The version of cargo the resolver should use | String | optional | <code>"1.66.1"</code> |
106+
| <a id="cargo_bootstrap_repository-version"></a>version | The version of cargo the resolver should use | String | optional | <code>"1.67.0"</code> |
107107

108108

109109
<a id="cargo_dep_env"></a>
@@ -1798,7 +1798,7 @@ See `load_arbitrary_tool` in `@rules_rust//rust:repositories.bzl` for more detai
17981798
| <a id="rust_register_toolchains-allocator_library"></a>allocator_library | Target that provides allocator functions when rust_library targets are embedded in a cc_binary. | `None` |
17991799
| <a id="rust_register_toolchains-iso_date"></a>iso_date | **Deprecated**: Use <code>versions</code> instead. | `None` |
18001800
| <a id="rust_register_toolchains-register_toolchains"></a>register_toolchains | If true, repositories will be generated to produce and register <code>rust_toolchain</code> targets. | `True` |
1801-
| <a id="rust_register_toolchains-rustfmt_version"></a>rustfmt_version | The version of rustfmt. | `"nightly/2023-01-11"` |
1801+
| <a id="rust_register_toolchains-rustfmt_version"></a>rustfmt_version | The version of rustfmt. | `"nightly/2023-01-26"` |
18021802
| <a id="rust_register_toolchains-rust_analyzer_version"></a>rust_analyzer_version | The version of Rustc to pair with rust-analyzer. | `None` |
18031803
| <a id="rust_register_toolchains-sha256s"></a>sha256s | A dict associating tool subdirectories to sha256 hashes. | `None` |
18041804
| <a id="rust_register_toolchains-extra_target_triples"></a>extra_target_triples | Additional rust-style targets that rust toolchains should support. | `["wasm32-unknown-unknown", "wasm32-wasi"]` |

docs/rust_repositories.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ See `load_arbitrary_tool` in `@rules_rust//rust:repositories.bzl` for more detai
259259
| <a id="rust_register_toolchains-allocator_library"></a>allocator_library | Target that provides allocator functions when rust_library targets are embedded in a cc_binary. | `None` |
260260
| <a id="rust_register_toolchains-iso_date"></a>iso_date | **Deprecated**: Use <code>versions</code> instead. | `None` |
261261
| <a id="rust_register_toolchains-register_toolchains"></a>register_toolchains | If true, repositories will be generated to produce and register <code>rust_toolchain</code> targets. | `True` |
262-
| <a id="rust_register_toolchains-rustfmt_version"></a>rustfmt_version | The version of rustfmt. | `"nightly/2023-01-11"` |
262+
| <a id="rust_register_toolchains-rustfmt_version"></a>rustfmt_version | The version of rustfmt. | `"nightly/2023-01-26"` |
263263
| <a id="rust_register_toolchains-rust_analyzer_version"></a>rust_analyzer_version | The version of Rustc to pair with rust-analyzer. | `None` |
264264
| <a id="rust_register_toolchains-sha256s"></a>sha256s | A dict associating tool subdirectories to sha256 hashes. | `None` |
265265
| <a id="rust_register_toolchains-extra_target_triples"></a>extra_target_triples | Additional rust-style targets that rust toolchains should support. | `["wasm32-unknown-unknown", "wasm32-wasi"]` |

examples/WORKSPACE.bazel

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,12 @@ rust_repository_set(
6161
edition = "2018",
6262
exec_triple = "x86_64-unknown-linux-gnu",
6363
extra_target_triples = [],
64-
rustfmt_version = "1.4.12",
6564
sha256s = {
6665
"rust-1.46.0-x86_64-unknown-linux-gnu": "e3b98bc3440fe92817881933f9564389eccb396f5f431f33d48b979fa2fbdcf5",
6766
"rust-std-1.46.0-x86_64-unknown-linux-gnu": "ac04aef80423f612c0079829b504902de27a6997214eb58ab0765d02f7ec1dbc",
6867
"rustfmt-1.4.12-x86_64-unknown-linux-gnu": "1894e76913303d66bf40885a601462844eec15fca9e76a6d13c390d7000d64b0",
6968
},
70-
version = "1.46.0",
69+
versions = ["1.46.0"],
7170
)
7271

7372
###############################################################################

examples/crate_universe/cargo_aliases/cargo-bazel-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/crate_universe/cargo_workspace/cargo-bazel-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/crate_universe/cargo_workspace/printer/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use std::io::BufWriter;
22

33
/// Have ferris say a number
44
pub fn say_number(num: i32) -> String {
5-
let number = format!("{}", num);
5+
let number = format!("{num}");
66
let buf = Vec::new();
77
let mut writer = BufWriter::new(buf);
88
ferris_says::say(number.as_bytes(), number.len(), &mut writer).unwrap();

examples/crate_universe/multi_package/cargo-bazel-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/crate_universe/no_cargo_manifests/cargo-bazel-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)