Rust 1.95: rust-toolchain.toml, the workspace rust-version and the gateway image; the lints 1.95 adds

gpui-kit (every gpui-pre 0.3.x) calls std::hint::cold_path, stable since
1.95.0, so the client moves from 1.94 to 1.95 before the GPUI front end
can build (docs/design/gpui-spikes.md, "Rust 1.95 or newer"). rustc 1.95.0
(59807616e 2026-04-14), cargo 1.95.0, clippy and rustfmt of the same
release were used.

rust-toolchain.toml and the workspace's rust-version say 1.95;
crates/voelin-gateway/Dockerfile builds from rust:1.95-bookworm (cargo
refuses a 1.94 image once rust-version is 1.95). docs/building.md names
the Rust version for a local build; docs/ci.md says a channel change in
rust-toolchain.toml is all the runner needs (they named no version
before).

Clippy of 1.95 adds `collapsible_match` for an `if` that is a match arm's
only statement, `unnecessary_sort_by` and `manual_checked_ops`; they
flagged seven spots in four crates, none a behaviour change:
- voelin-media capture::forward: a let-else instead of a match whose arm
  holds one `if`;
- voelin-media ffmpeg::sys: `sort_by_key` with `Reverse` (two places);
- voelin-media studio:📷 `checked_div` for the frame interval;
- voelin-stream peer and session: the condition in a local before the
  `if` (a guard would carry a side effect: `remove`);
- voelinctl engine and session: the same.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
faumarayandClaude Sonnet 5.5 committed 2026-10-27 06:00:40 +03:00
1 parent 296664ffa9
commit 5ce5c0db82
13 files changed
+35 -21

No files matched your search

+5
View File
@@ -69,6 +69,11 @@ User-visible changes of the apps and the `tsgw` gateway. The format follows
### Changed ### Changed
- The build needs Rust 1.95 (`rust-toolchain.toml` and the workspace's
`rust-version`; 1.95.0 was used to check it), up from 1.94: the GPUI
front end, which is being built, depends on a library that calls a function
stable since 1.95. Nothing changes in the apps; the gateway's Docker image
builds from `rust:1.95-bookworm`.
- The key store now keeps the device key when signing out of an account, - The key store now keeps the device key when signing out of an account,
unbound, whether it was in use before the account or was made for it; "Forget unbound, whether it was in use before the account or was made for it; "Forget
this device's identity" is the only way a key is deleted. The identity store this device's identity" is the only way a key is deleted. The identity store
+1 -1
View File
@@ -48,7 +48,7 @@ default-members = [
[workspace.package] [workspace.package]
edition = "2024" edition = "2024"
rust-version = "1.94" rust-version = "1.95"
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"
repository = "https://github.com/Faumaray/Voelin" repository = "https://github.com/Faumaray/Voelin"
publish = false publish = false
+1 -1
View File
@@ -9,7 +9,7 @@
# -e TSGW_QUERY_PASSWORD=… -p 7788:7788 tsgw # -e TSGW_QUERY_PASSWORD=… -p 7788:7788 tsgw
# Logs: docker logs -f tsgw (more: -e TSGW_LOG_LEVEL=debug; also to a file in # Logs: docker logs -f tsgw (more: -e TSGW_LOG_LEVEL=debug; also to a file in
# the volume: -e TSGW_LOG_FILE=logs/tsgw.log). See docs/gateway-admin.md. # the volume: -e TSGW_LOG_FILE=logs/tsgw.log). See docs/gateway-admin.md.
FROM rust:1.94-bookworm AS build FROM rust:1.95-bookworm AS build
WORKDIR /src WORKDIR /src
RUN apt-get update && apt-get install -y --no-install-recommends cmake git libasound2-dev openssh-client && rm -rf /var/lib/apt/lists/* RUN apt-get update && apt-get install -y --no-install-recommends cmake git libasound2-dev openssh-client && rm -rf /var/lib/apt/lists/*
# voelin-identity comes from the private VoelinProtocol repository, fetched # voelin-identity comes from the private VoelinProtocol repository, fetched
+7 -7
View File
@@ -279,14 +279,14 @@ impl FrameSink for QueueSink {
pub fn forward(mut frames: FrameReceiver<VideoFrame>, mut sink: Box<dyn FrameSink>) -> Result<()> { pub fn forward(mut frames: FrameReceiver<VideoFrame>, mut sink: Box<dyn FrameSink>) -> Result<()> {
std::thread::Builder::new().name("voelin-capture-forward".into()).spawn(move || { std::thread::Builder::new().name("voelin-capture-forward".into()).spawn(move || {
loop { loop {
match frames.recv_timeout(Duration::from_millis(100)) { let Some(frame) = frames.recv_timeout(Duration::from_millis(100)) else {
Some(frame) => { if frames.is_closed() {
if sink.wants(frame.timestamp) && !sink.frame(frame.view()) { break;
break;
}
} }
None if frames.is_closed() => break, continue;
None => {} };
if sink.wants(frame.timestamp) && !sink.frame(frame.view()) {
break;
} }
} }
})?; })?;
+2 -2
View File
@@ -446,7 +446,7 @@ fn files_in(dir: &Path, base: &str) -> Vec<PathBuf> {
matches.then(|| (major_of(&name).unwrap_or(0), e.path())) matches.then(|| (major_of(&name).unwrap_or(0), e.path()))
}) })
.collect(); .collect();
found.sort_by(|a, b| b.0.cmp(&a.0)); found.sort_by_key(|entry| std::cmp::Reverse(entry.0));
found.into_iter().map(|(_, p)| p).collect() found.into_iter().map(|(_, p)| p).collect()
} }
@@ -466,7 +466,7 @@ fn ldconfig(base: &str) -> Vec<PathBuf> {
name.starts_with(&prefix).then(|| (major_of(name).unwrap_or(0), PathBuf::from(path))) name.starts_with(&prefix).then(|| (major_of(name).unwrap_or(0), PathBuf::from(path)))
}) })
.collect(); .collect();
found.sort_by(|a, b| b.0.cmp(&a.0)); found.sort_by_key(|entry| std::cmp::Reverse(entry.0));
found.into_iter().map(|(_, p)| p).collect() found.into_iter().map(|(_, p)| p).collect()
} }
+2 -2
View File
@@ -603,8 +603,8 @@ mod v4l2 {
// Seconds per frame; a stepwise range starts with its smallest // Seconds per frame; a stepwise range starts with its smallest
// interval, which is the highest rate. // interval, which is the highest rate.
let (num, den) = (entry.interval[0], entry.interval[1]); let (num, den) = (entry.interval[0], entry.interval[1]);
if num > 0 { if let Some(rate) = den.checked_div(num) {
best = best.max(den / num); best = best.max(rate);
} }
if entry.type_ != FRMIVAL_DISCRETE { if entry.type_ != FRMIVAL_DISCRETE {
break; break;
+2 -1
View File
@@ -1075,7 +1075,8 @@ impl Task {
} }
Event::IceConnectionStateChange(IceConnectionState::Disconnected) => return false, Event::IceConnectionStateChange(IceConnectionState::Disconnected) => return false,
Event::MediaAdded(m) => { Event::MediaAdded(m) => {
if !self.mids.iter().any(|(mid, _)| *mid == m.mid) { let known = self.mids.iter().any(|(mid, _)| *mid == m.mid);
if !known {
self.mids.push((m.mid, m.kind)); self.mids.push((m.mid, m.kind));
} }
} }
+2 -1
View File
@@ -801,7 +801,8 @@ impl StreamerSession {
} }
StreamNotification::JoinRequest { viewer, remove: true, .. } StreamNotification::JoinRequest { viewer, remove: true, .. }
| StreamNotification::ViewerLeft { viewer, .. } => { | StreamNotification::ViewerLeft { viewer, .. } => {
if self.viewers.remove(&viewer.0).is_some() { let was_viewer = self.viewers.remove(&viewer.0).is_some();
if was_viewer {
self.emit_viewers(out); self.emit_viewers(out);
self.update_targets(out); self.update_targets(out);
} }
+5
View File
@@ -119,6 +119,11 @@ the proxy is on localhost. If the proxy inspects TLS, set
## Locally without Docker ## Locally without Docker
- **Rust:** 1.95, the channel `rust-toolchain.toml` pins; `rustup` installs it
on the first `cargo` run in the checkout. The workspace's `rust-version` is
1.95 too, the oldest Rust the GPUI front end's libraries build with (they
call `std::hint::cold_path`, stable since 1.95.0), so a distribution's older
`rustc` does not build the workspace.
- **Linux:** the packages from the table above need - **Linux:** the packages from the table above need
`sudo apt install libasound2-dev libfontconfig1-dev libxkbcommon-dev libvpx-dev libdav1d-dev libpipewire-0.3-dev libspa-0.2-dev libclang-dev cmake dpkg-dev patchelf`, `sudo apt install libasound2-dev libfontconfig1-dev libxkbcommon-dev libvpx-dev libdav1d-dev libpipewire-0.3-dev libspa-0.2-dev libclang-dev cmake dpkg-dev patchelf`,
then `cargo build --release --locked -p voelin-ui -p voelin-gateway` then `cargo build --release --locked -p voelin-ui -p voelin-gateway`
+3 -3
View File
@@ -89,9 +89,9 @@ the separate `release.yml` workflow below.
The workflow shares the repository's local system-dependencies action with The workflow shares the repository's local system-dependencies action with
GitHub CI and bootstraps rustup if absent, then installs the toolchain and GitHub CI and bootstraps rustup if absent, then installs the toolchain and
components pinned in `rust-toolchain.toml`. Checkout uses a fully qualified components pinned in `rust-toolchain.toml` (1.95: a channel change there is all
GitHub action URL rather than depending on the instance's action-source the runner needs). Checkout uses a fully qualified GitHub action URL rather
configuration. than depending on the instance's action-source configuration.
No GitHub cache/artifact service or reusable-workflow support is required. No GitHub cache/artifact service or reusable-workflow support is required.
The job does not need a Docker socket mounted inside its container; the The job does not need a Docker socket mounted inside its container; the
+1 -1
View File
@@ -1,3 +1,3 @@
[toolchain] [toolchain]
channel = "1.94" channel = "1.95"
components = ["rustfmt", "clippy"] components = ["rustfmt", "clippy"]
+2 -1
View File
@@ -434,7 +434,8 @@ impl Roundtrip {
GatewayUpdate::Reaction { message_id, added: true, .. } GatewayUpdate::Reaction { message_id, added: true, .. }
if self.step == Step::React && *message_id == self.remote => if self.step == Step::React && *message_id == self.remote =>
{ {
if self.reacted_row { let reacted = self.reacted_row;
if reacted {
self.next(engine, Step::Topic); self.next(engine, Step::Topic);
} }
} }
+2 -1
View File
@@ -324,7 +324,8 @@ async fn listen(
let end = pump(con, deadline, |con, item| { let end = pump(con, deadline, |con, item| {
match item { match item {
StreamItem::BookEvents(events) => { StreamItem::BookEvents(events) => {
if print_events(con.get_state()?, &events, json, expect)? { let done = print_events(con.get_state()?, &events, json, expect)?;
if done {
return Ok(Flow::Stop); return Ok(Flow::Stop);
} }
} }