Skip to content

Commit

Permalink
Apply suggestions regarding Cargo
Browse files Browse the repository at this point in the history
Co-authored-by: Eric Huss <[email protected]>
  • Loading branch information
cuviper and ehuss authored May 31, 2023
1 parent ec18d5c commit de5a443
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion posts/2023-06-01-Rust-1.70.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`

Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit de5a443

Please sign in to comment.