Bump rust version to 1.75.0 (#3039)

* rust-toolchain: Bump toolchain version to 1.69.0

which, compared to the previous 1.67.0, has the following impacts on
`zellij`:

- [Turn off debuginfo for build deps][2]: Increases build time (on my
  machine) from ~230 s in 1.67.0 to ~250 s now, *which is unexpected*

This version also changes [handling of the `default-features` flag][3]
when specifying dependencies in `Cargo.toml`. If a dependent crate
requires `default-features = true` on a crate that is required as
`default-features = false` further up the dependency tree, the `true`
setting "wins". We only specify `default-features = false` for three
crates total:

- `names`: This is used only by us
- `surf`: This is used only by us
- `vte`: This is also required by `strip-ansi-escapes`, but that has
  `default-features = false` as well

How this affects our transitive dependencies is unknown at this point.

[2]: https://github.com/rust-lang/cargo/pull/11252/
[3]: https://github.com/rust-lang/cargo/pull/11409/

* rust-toolchain: Bump toolchain version to 1.70.0

which, compared to the previous 1.69.0, as the following impacts on
`zellij`:

1. [Enable sparse registry checkout for crates.io by default][1]

This drastically increases the time to first build on a fresh rust
installation/a rust installation with a clean cargo registry cache.
Previously it took about 75s to populate the deps/cache (with `cargo
fetch --locked` and ~100 MBit/s network), whereas now the same process
takes ~10 s.

2. [The `OnceCell` type is now part of std][2]

In theory, this would allow us to cut a dependency from `zellij-utils`,
but the `once_cell` crate is pulled in by another 16 deps, so there's no
point in attempting it right now.

Build times and binary sizes are unaffected by this change compared to
the previous 1.69.0 toolchain.

[1]: https://github.com/rust-lang/cargo/pull/11791/
[2]: https://doc.rust-lang.org/stable/std/cell/struct.OnceCell.html

* rust-toolchain: Bump toolchain version to 1.75.0

which, compared to the previous 1.70.0, has the following impacts on
`zellij`:

1. [cross-crate inlining][8]

This should increase application performance, as functions can now be
inlined across crates.

2. [`async fn` in traits][9]

This would allow us to drop the `async_trait` dependency, but it is
currently still required by 3 other dependencies.

Build time in debug mode (on my own PC) is cut down from 256s to 189s
(for a clean build). Build time in release mode is cut down from 473s to
391s (for a clean build). Binary sizes only change minimally (825 MB ->
807 MB in debug, 29 MB -> 30 MB in release).

[8]: https://github.com/rust-lang/rust/pull/116505
[9]: https://github.com/rust-lang/rust/pull/115822/

* chore: Apply rustfmt.

* CHANGELOG: Add PR #3039.
This commit is contained in:
har7an 2024-01-08 16:56:01 +00:00 committed by GitHub
parent b3397ccbd0
commit f6d57295a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 2 deletions

View file

@ -11,6 +11,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
* fix(plugins): display errors properly (https://github.com/zellij-org/zellij/pull/2975) * fix(plugins): display errors properly (https://github.com/zellij-org/zellij/pull/2975)
* feat(terminal): implement synchronized renders (https://github.com/zellij-org/zellij/pull/2977) * feat(terminal): implement synchronized renders (https://github.com/zellij-org/zellij/pull/2977)
* perf(plugins): improve plugin download & load feature (https://github.com/zellij-org/zellij/pull/3001) * perf(plugins): improve plugin download & load feature (https://github.com/zellij-org/zellij/pull/3001)
* chore: bump Rust toolchain to 1.75.0 (https://github.com/zellij-org/zellij/pull/3039)
## [0.39.2] - 2023-11-29 ## [0.39.2] - 2023-11-29
* fix(cli): typo in cli help (https://github.com/zellij-org/zellij/pull/2906) * fix(cli): typo in cli help (https://github.com/zellij-org/zellij/pull/2906)

View file

@ -1,5 +1,5 @@
# This file is updated by `update-toolchain.sh` # This file is updated by `update-toolchain.sh`
[toolchain] [toolchain]
channel = "1.67.0" channel = "1.75.0"
components = ["rustfmt", "clippy", "rust-analysis"] components = ["rustfmt", "clippy", "rust-analysis"]
targets = ["wasm32-wasi", "x86_64-unknown-linux-musl"] targets = ["wasm32-wasi", "x86_64-unknown-linux-musl"]

View file

@ -883,7 +883,7 @@ impl Layout {
None => { None => {
let home = find_default_config_dir(); let home = find_default_config_dir();
let Some(home) = home else { let Some(home) = home else {
return Layout::stringified_from_default_assets(layout) return Layout::stringified_from_default_assets(layout);
}; };
let layout_path = &home.join(layout); let layout_path = &home.join(layout);