build(cargo): Update Rust toolchain to 1.90.0 (#4457)

* build(cargo): Define shared manifest properties workspace-wide

in order to allow workspace members to easily copy their values, rather
than copying the actual values manually between files. Prepare for a
future update of the Rust edition this way by defining the edition in
one central location.

* build(cargo): Share the license between all workspace members

and don't copy the actual license value manually between crates.

* build(cargo): Share the rust edition between workspace members

rather than manually defining the value per crate. There is no
apparent advantage in having different parts of the code use different
rust editions. It only makes the code inconsistent, which is not a goal
worth striving for.

* build(cargo): Share the crate version between workspace members

at least for those workspace members that are versioned in lockstep.

* refactor(session-manager): Migrate to Rust edition 2021

from edition 2018 in order to use a single unified Rust edition across
the entire workspace. Apparently the migration does not involve changes
to the actual code.

* refactor(plugin-manager): Migrate to Rust edition 2021

from edition 2018 in order to use a single unified Rust edition across
the entire workspace. Apparently the migration does not involve changes
to the actual code.

* build(zellij-utils): Remove the obsolete build script

which has contained nothing but comments for two years now. The initial
"workaround" has by now become the proper solution and the original
issue (see <https://github.com/zellij-org/zellij/pull/2711>) has never
been heard of since.

The real motivation for this change is the simple fact that this version
of prost-build pulled in a pretty old version of the `which` crate which
doesn't appear to build with Rust 1.89 (latest stable as of now).

* build(cargo): Update Rust toolchain to 1.89

which is the latest stable toolchain as of writing this and has support
for the 2024 Rust edition, unlike the previously used 1.84.

* fixup! build(zellij-utils): Remove the obsolete build script

* refactor: Make implicitly elided lifetimes explicit

in cases where a functions return type has an actual lifetime that
depends on a non `'static` argument.

* build(cargo): Update Rust toolchain to 1.90.0

which is the latest stable toolchain as of writing this. Compared to
1.89.0 this changes the default linker and should, hence, cut down
iteration times during development significantly.

* ci: Force configured rust toolchain version in release builds

for the tagged release assets. Previously the rust version was
unconditionally overwritten to be `stable` regardless of what
`rust-toolchain.toml` configured.

* docs(changelog): Add MR #4457

to list of unreleased changes.

* build: Read package version from workspace version value

since it no longer resides directly in the `package` object.
This commit is contained in:
har7an
2025-10-06 17:11:34 +00:00
committed by GitHub
parent 209d525c92
commit 80de7f462c
33 changed files with 70 additions and 115 deletions
-10
View File
@@ -38,19 +38,15 @@ jobs:
include:
- build: linux musl x64
os: ubuntu-latest
rust: stable
target: x86_64-unknown-linux-musl
- build: linux musl aarch64
os: ubuntu-latest
rust: stable
target: aarch64-unknown-linux-musl
- build: macos x64
os: macos-latest
rust: stable
target: x86_64-apple-darwin
- build: macos aarch64
os: macos-latest
rust: stable
target: aarch64-apple-darwin
steps:
- name: Set release tag
@@ -76,7 +72,6 @@ jobs:
- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ matrix.rust }}
target: "${{ matrix.target }},wasm32-wasip1"
cache: false
rustflags: ""
@@ -138,19 +133,15 @@ jobs:
include:
- build: linux musl x64
os: ubuntu-latest
rust: stable
target: x86_64-unknown-linux-musl
- build: linux musl aarch64
os: ubuntu-latest
rust: stable
target: aarch64-unknown-linux-musl
- build: macos x64
os: macos-latest
rust: stable
target: x86_64-apple-darwin
- build: macos aarch64
os: macos-latest
rust: stable
target: aarch64-apple-darwin
steps:
- name: Set release tag
@@ -176,7 +167,6 @@ jobs:
- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ matrix.rust }}
target: "${{ matrix.target }},wasm32-wasip1"
cache: false
rustflags: ""
+1
View File
@@ -11,6 +11,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
* fix: occasional status-bar pop-out after resurrecting a session (https://github.com/zellij-org/zellij/pull/4440)
* fix: properly serialize/resurrect layouts with one-line split panes (https://github.com/zellij-org/zellij/pull/4442)
* feat: allow attaching to remote Zellij sessions over https (eg. `zellij attach https://example.com/my-cool-session`) (https://github.com/zellij-org/zellij/pull/4460)
* build: Update Rust toolchain to 1.90.0 (https://github.com/zellij-org/zellij/pull/4457)
## [0.43.1] - 2025-08-08
* fix: pane rename backspace regression (https://github.com/zellij-org/zellij/pull/4346)
Generated
+1 -14
View File
@@ -487,7 +487,7 @@ dependencies = [
"lazy_static",
"lazycell",
"log",
"prettyplease 0.2.32",
"prettyplease",
"proc-macro2",
"quote",
"regex",
@@ -3210,16 +3210,6 @@ dependencies = [
"getopts",
]
[[package]]
name = "prettyplease"
version = "0.1.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6c8646e95016a7a6c4adea95bafa8a16baab64b583356217f2c85db4a39d9a86"
dependencies = [
"proc-macro2",
"syn 1.0.96",
]
[[package]]
name = "prettyplease"
version = "0.2.32"
@@ -3286,11 +3276,9 @@ dependencies = [
"log",
"multimap",
"petgraph",
"prettyplease 0.1.25",
"prost",
"prost-types",
"regex",
"syn 1.0.96",
"tempfile",
"which",
]
@@ -6000,7 +5988,6 @@ dependencies = [
"openssl-sys",
"percent-encoding",
"prost",
"prost-build",
"rusqlite",
"serde",
"serde_json",
+14 -6
View File
@@ -1,15 +1,15 @@
[package]
name = "zellij"
version = "0.44.0"
authors = ["Aram Drevekenin <[email protected]>"]
edition = "2021"
description = "A terminal workspace with batteries included"
license = "MIT"
repository = "https://github.com/zellij-org/zellij"
homepage = "https://zellij.dev"
include = ["src/**/*", "assets/layouts/*", "assets/config/*", "LICENSE.md", "README.md", "!**/*_test.*", "!**/tests/**/*"]
# NOTE: When updating this, modify `channel` in `rust-toolchain.toml` accordingly
rust-version = "1.84"
# See 'workspace.package' for concrete values
license.workspace = true
repository.workspace = true
edition.workspace = true
version.workspace = true
rust-version.workspace = true
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
@@ -59,6 +59,14 @@ members = [
".",
]
[workspace.package]
edition = "2021"
license = "MIT"
repository = "https://github.com/zellij-org/zellij"
version = "0.44.0"
# NOTE: When updating this, modify `channel` in `rust-toolchain.toml` accordingly
rust-version = "1.90"
[workspace.dependencies]
ansi_term = { version = "0.12.1", default-features = false }
anyhow = { version = "1.0.70", default-features = false, features = ["backtrace", "std"] }
+2 -2
View File
@@ -2,8 +2,8 @@
name = "about"
version = "0.1.0"
authors = ["Aram Drevekenin <[email protected]>"]
edition = "2021"
license = "MIT"
edition.workspace = true
license.workspace = true
[dependencies]
zellij-tile = { path = "../../zellij-tile" }
+2 -2
View File
@@ -2,8 +2,8 @@
name = "compact-bar"
version = "0.1.0"
authors = ["Alexander Kenji Berthold <[email protected]>" ]
edition = "2021"
license = "MIT"
edition.workspace = true
license.workspace = true
[dependencies]
colored = "2"
+4 -1
View File
@@ -4,7 +4,10 @@ use unicode_width::UnicodeWidthStr;
use zellij_tile::prelude::*;
use zellij_tile_utils::style;
fn cursors(focused_clients: &[ClientId], colors: MultiplayerColors) -> (Vec<ANSIString>, usize) {
fn cursors<'a>(
focused_clients: &'a [ClientId],
colors: MultiplayerColors,
) -> (Vec<ANSIString<'a>>, usize) {
// cursor section, text length
let mut len = 0;
let mut cursors = vec![];
+2 -2
View File
@@ -2,8 +2,8 @@
name = "configuration"
version = "0.1.0"
authors = ["Aram Drevekenin <[email protected]>"]
edition = "2021"
license = "MIT"
edition.workspace = true
license.workspace = true
[dependencies]
ansi_term = "0.12.1"
@@ -2,8 +2,8 @@
name = "fixture-plugin-for-tests"
version = "0.1.0"
authors = ["Aram Drevekenin <[email protected]>"]
edition = "2021"
license = "MIT"
edition.workspace = true
license.workspace = true
[dependencies]
serde = { version = "1.0", features = ["derive"] }
+2 -2
View File
@@ -2,8 +2,8 @@
name = "multiple-select"
version = "0.1.0"
authors = ["Aram Drevekenin <[email protected]>"]
edition = "2021"
license = "MIT"
edition.workspace = true
license.workspace = true
[dependencies]
zellij-tile = { path = "../../zellij-tile" }
+1 -1
View File
@@ -2,7 +2,7 @@
name = "plugin-manager"
version = "0.1.0"
authors = ["Aram Drevekenin <[email protected]>"]
edition = "2018"
edition.workspace = true
[dependencies]
uuid = { version = "1.7.0", features = ["v4"] }
+1 -1
View File
@@ -2,7 +2,7 @@
name = "session-manager"
version = "0.1.0"
authors = ["Aram Drevekenin <[email protected]>"]
edition = "2018"
edition.workspace = true
[dependencies]
ansi_term = "0.12.1"
+2 -2
View File
@@ -2,8 +2,8 @@
name = "share"
version = "0.1.0"
authors = ["Aram Drevekenin <[email protected]>"]
edition = "2021"
license = "MIT"
edition.workspace = true
license.workspace = true
[dependencies]
zellij-tile = { path = "../../zellij-tile" }
+1 -1
View File
@@ -80,7 +80,7 @@ impl<'a> MainScreen<'a> {
state
}
fn calculate_layout(&self, rows: usize, cols: usize) -> Layout {
fn calculate_layout<'b>(&'b self, rows: usize, cols: usize) -> Layout<'b> {
let usage = Usage::new(!self.token_list_is_empty);
let web_server_status_section = WebServerStatusSection::new(
self.web_server_started,
+2 -2
View File
@@ -2,8 +2,8 @@
name = "status-bar"
version = "0.1.0"
authors = ["Brooks J Rady <[email protected]>"]
edition = "2021"
license = "MIT"
edition.workspace = true
license.workspace = true
[dependencies]
colored = "2"
@@ -75,7 +75,7 @@ pub fn compact_layout_short(help: &ModeInfo) -> LinePart {
strings!(&bits)
}
fn add_keybinds(help: &ModeInfo) -> Vec<ANSIString> {
fn add_keybinds<'a>(help: &'a ModeInfo) -> Vec<ANSIString<'a>> {
let to_pane = action_key(
&help.get_mode_keybinds(),
&[Action::SwitchToMode {
@@ -65,7 +65,7 @@ pub fn edit_scrollbuffer_short(help: &ModeInfo) -> LinePart {
strings!(&bits)
}
fn add_keybinds(help: &ModeInfo) -> Vec<ANSIString> {
fn add_keybinds<'a>(help: &'a ModeInfo) -> Vec<ANSIString<'a>> {
let to_pane = action_key(
&help.get_mode_keybinds(),
&[Action::SwitchToMode {
@@ -44,7 +44,7 @@ pub fn floating_panes_mouse_short(help: &ModeInfo) -> LinePart {
strings!(&bits)
}
fn add_keybinds(help: &ModeInfo) -> Vec<ANSIString> {
fn add_keybinds<'a>(help: &'a ModeInfo) -> Vec<ANSIString<'a>> {
let to_pane = action_key(
&help.get_mode_keybinds(),
&[Action::SwitchToMode {
@@ -45,7 +45,7 @@ pub fn move_focus_hjkl_tab_switch_short(help: &ModeInfo) -> LinePart {
strings!(&bits)
}
fn add_keybinds(help: &ModeInfo) -> Vec<ANSIString> {
fn add_keybinds<'a>(help: &'a ModeInfo) -> Vec<ANSIString<'a>> {
let pane_keymap = help.get_keybinds_for_mode(InputMode::Pane);
let move_focus_keys = action_key_group(
&pane_keymap,
@@ -60,7 +60,7 @@ struct Keygroups<'a> {
resize: Vec<ANSIString<'a>>,
}
fn add_keybinds(help: &ModeInfo) -> Keygroups {
fn add_keybinds<'a>(help: &'a ModeInfo) -> Keygroups<'a> {
let normal_keymap = help.get_mode_keybinds();
let new_pane_keys = action_key(
&normal_keymap,
@@ -43,7 +43,7 @@ pub fn sync_tab_short(help: &ModeInfo) -> LinePart {
strings!(&bits)
}
fn add_keybinds(help: &ModeInfo) -> Vec<ANSIString> {
fn add_keybinds<'a>(help: &'a ModeInfo) -> Vec<ANSIString<'a>> {
let to_tab = action_key(
&help.get_mode_keybinds(),
&[Action::SwitchToMode {
+2 -2
View File
@@ -2,9 +2,9 @@
name = "strider"
version = "0.2.0"
authors = ["Brooks J Rady <[email protected]>"]
edition = "2021"
edition.workspace = true
description = "A simplified ranger clone written as a Zellij plugin"
license = "MIT"
license.workspace = true
[dependencies]
colored = "2.0.0"
+2 -2
View File
@@ -2,8 +2,8 @@
name = "tab-bar"
version = "0.1.0"
authors = ["Jonah Caplan <[email protected]>"]
edition = "2021"
license = "MIT"
edition.workspace = true
license.workspace = true
[dependencies]
colored = "2"
+3 -3
View File
@@ -4,10 +4,10 @@ use unicode_width::UnicodeWidthStr;
use zellij_tile::prelude::*;
use zellij_tile_utils::style;
fn cursors(
focused_clients: &[ClientId],
fn cursors<'a>(
focused_clients: &'a [ClientId],
multiplayer_colors: MultiplayerColors,
) -> (Vec<ANSIString>, usize) {
) -> (Vec<ANSIString<'a>>, usize) {
// cursor section, text length
let mut len = 0;
let mut cursors = vec![];
+1 -1
View File
@@ -1,7 +1,7 @@
# This file is updated by `update-toolchain.sh`
[toolchain]
# NOTE: When updating this, modify `rust-version` in `Cargo.toml` accordingly
channel = "1.84.0"
channel = "1.90.0"
components = ["rustfmt", "clippy"]
# NOTE: Change this with care, this is also used by the CI pipeline
targets = ["wasm32-wasip1", "x86_64-unknown-linux-musl"]
+1 -1
View File
@@ -1,7 +1,7 @@
[package]
name = "xtask"
version = "0.1.0"
edition = "2021"
edition.workspace = true
[dependencies]
+3 -1
View File
@@ -278,8 +278,10 @@ pub fn publish(sh: &Shell, flags: flags::Publish) -> anyhow::Result<()> {
.context(err_context)?;
// Version of the core crate
let version = manifest
.get("package")
.get("workspace")
.and_then(|workspace| workspace.get("package"))
.and_then(|package| package["version"].as_str())
.context("failed to read package version from manifest")
.context(err_context)?;
let mut skip_build = false;
+3 -3
View File
@@ -1,10 +1,10 @@
[package]
name = "zellij-client"
version = "0.44.0"
version.workspace = true
authors = ["Kunal Mohan <[email protected]>"]
edition = "2021"
edition.workspace = true
description = "The client-side library for Zellij"
license = "MIT"
license.workspace = true
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
+3 -3
View File
@@ -1,10 +1,10 @@
[package]
name = "zellij-server"
version = "0.44.0"
version.workspace = true
authors = ["Kunal Mohan <[email protected]>"]
edition = "2021"
edition.workspace = true
description = "The server-side library for Zellij"
license = "MIT"
license.workspace = true
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
+3 -3
View File
@@ -1,10 +1,10 @@
[package]
name = "zellij-tile-utils"
version = "0.44.0"
version.workspace = true
authors = ["denis <[email protected]>"]
edition = "2021"
edition.workspace = true
description = "A utility library for Zellij plugins"
license = "MIT"
license.workspace = true
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
+3 -3
View File
@@ -1,10 +1,10 @@
[package]
name = "zellij-tile"
version = "0.44.0"
version.workspace = true
authors = ["Brooks J Rady <[email protected]>"]
edition = "2021"
edition.workspace = true
description = "A small client-side library for writing Zellij plugins"
license = "MIT"
license.workspace = true
[dependencies]
clap = { workspace = true }
+3 -6
View File
@@ -1,10 +1,10 @@
[package]
name = "zellij-utils"
version = "0.44.0"
version.workspace = true
authors = ["Kunal Mohan <[email protected]>"]
edition = "2021"
edition.workspace = true
description = "A utility library for Zellij client and server"
license = "MIT"
license.workspace = true
include = ["src/**/*", "assets/"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
@@ -59,9 +59,6 @@ tokio = { workspace = true }
insta = { version = "1.6.0", features = ["backtrace"] }
expect-test = "1.4.1"
[build-dependencies]
prost-build = "0.11.9"
[features]
# If this feature is NOT set (default):
# - builtin plugins (status-bar, tab-bar, ...) are loaded directly from the application binary
-33
View File
@@ -1,33 +0,0 @@
// NOTE: This build script is currently out of order.
// Refer to [the PR introducing this change][1] to learn more about the reasons.
// TL;DR: The build script doesn't work during a `cargo publish --dry-run` and to ensure we can
// make a release, we decided to temporarily disable it.
//
// [1]: https://github.com/zellij-org/zellij/pull/2711#issuecomment-1695015818
//use prost_build;
//use std::fs;
fn main() {
//let mut prost_build = prost_build::Config::new();
//let out_dir = concat!(env!("CARGO_MANIFEST_DIR"), "/assets/prost");
//let out_dir = std::path::Path::new(out_dir);
//std::fs::create_dir_all(out_dir).unwrap();
//prost_build.out_dir(out_dir);
//prost_build.include_file("generated_plugin_api.rs");
//let mut proto_files = vec![];
//for entry in fs::read_dir("src/plugin_api").unwrap() {
// let entry_path = entry.unwrap().path();
// if entry_path.is_file() {
// if let Some(extension) = entry_path.extension() {
// if extension == "proto" {
// proto_files.push(entry_path.display().to_string())
// }
// }
// }
//}
//prost_build
// .compile_protos(&proto_files, &["src/plugin_api"])
// .unwrap();
}