From de5a44312d4ae138f49e8d2dacdc9d801a78c11f Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Wed, 31 May 2023 11:47:19 -0700 Subject: [PATCH] Apply suggestions regarding Cargo Co-authored-by: Eric Huss --- posts/2023-06-01-Rust-1.70.0.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/posts/2023-06-01-Rust-1.70.0.md b/posts/2023-06-01-Rust-1.70.0.md index dfa4d5a88..09a1eb3b8 100644 --- a/posts/2023-06-01-Rust-1.70.0.md +++ b/posts/2023-06-01-Rust-1.70.0.md @@ -21,7 +21,9 @@ If you'd like to help us out by testing future releases, you might consider upda ### Sparse by default for crates.io -Cargo's "sparse" protocol is now enabled by default for reading the index from crates.io. This feature was previously stabilized with [Rust 1.68.0](https://blog.rust-lang.org/2023/03/09/Rust-1.68.0.html#cargos-sparse-protocol), but still required configuration to use that with crates.io. The announced plan was to make that the default in 1.70.0, and here it is! (TODO: maybe a statement about effects from user and infra sides?) +Cargo's "sparse" protocol is now enabled by default for reading the index from crates.io. This feature was previously stabilized with [Rust 1.68.0](https://blog.rust-lang.org/2023/03/09/Rust-1.68.0.html#cargos-sparse-protocol), but still required configuration to use that with crates.io. The announced plan was to make that the default in 1.70.0, and here it is! + +You should see substantially improved performance when fetching information from the crates.io index. Users behind a restrictive firewall will need to ensure that access to `https://index.crates.io` is available. If for some reason you need to stay with the previous default of using the git index hosted by GitHub, the [`registries.crates-io.protocol`](https://doc.rust-lang.org/cargo/reference/config.html#registriescrates-ioprotocol) config setting can be used to change the default. ### `OnceCell` and `OnceLock` @@ -53,6 +55,8 @@ The `-Cdebuginfo` compiler option has previously only supported numbers 0..=2 fo The Cargo and rustc documentation both called level 1 "line tables only" before, but it was more than that with information about all functions, just not types and variables. That level is now called "limited", and the new "line-tables-only" level is further reduced to the minimum needed for backtraces with filenames and line numbers. This may eventually become the level used for `-Cdebuginfo=1`. The other `line-directives-only` level is intended for NVPTX profiling, and is otherwise not recommended. +Note that these named options are not yet available to be used via `Cargo.toml`. Support for that will be available in the next release 1.71. + ### Enforced stability in the `test` CLI When `#[test]` functions are compiled, the executable gets a command-line interface from the `test` crate. This CLI has a number of options, including some that are not yet stabilized and require specifying `-Zunstable-options` as well, like many other commands in the Rust toolchain. However, while that's only intended to be allowed in nightly builds, that restriction wasn't active in `test` -- until now. Starting with 1.70.0, stable and beta builds of Rust will no longer allow unstable `test` options, making them truly nightly-only as documented.