Skip to content

Commit

Permalink
Bump rust version to 1.75.0 (zellij-org#3039)
Browse files Browse the repository at this point in the history
* 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]: rust-lang/cargo#11252
[3]: rust-lang/cargo#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]: rust-lang/cargo#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]: rust-lang/rust#116505
[9]: rust-lang/rust#115822

* chore: Apply rustfmt.

* CHANGELOG: Add PR zellij-org#3039.
  • Loading branch information
har7an authored and xuanyuan300 committed Jan 23, 2024
1 parent dc29c9c commit e8f108d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
* 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)
* chore: bump Rust toolchain to 1.75.0 (https://github.com/zellij-org/zellij/pull/3039)

## [0.39.2] - 2023-11-29
* fix(cli): typo in cli help (https://github.com/zellij-org/zellij/pull/2906)
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file is updated by `update-toolchain.sh`
[toolchain]
channel = "1.67.0"
channel = "1.75.0"
components = ["rustfmt", "clippy", "rust-analysis"]
targets = ["wasm32-wasi", "x86_64-unknown-linux-musl"]
2 changes: 1 addition & 1 deletion zellij-utils/src/input/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,7 @@ impl Layout {
None => {
let home = find_default_config_dir();
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);
Expand Down

0 comments on commit e8f108d

Please sign in to comment.