From ae538650b980ae5d3286cf52c0a614a39f9ad234 Mon Sep 17 00:00:00 2001 From: DeFiDude <59237470+DeFiDude@users.noreply.github.com> Date: Thu, 8 Oct 2026 23:00:30 -0600 Subject: [PATCH] build: qualify Rust 1.89 hosts while preserving MCU compatibility --- .github/workflows/ci.yml | 34 +++++-- CHANGELOG.md | 3 + Cargo.toml | 2 +- README.md | 6 +- api/snapshots/manifest-contract.json | 6 +- clippy.toml | 2 +- crates/lxst-codec2/Cargo.toml | 2 +- crates/lxst-codec2/clippy.toml | 2 + crates/lxst-embedded/Cargo.toml | 2 +- crates/lxst-embedded/clippy.toml | 2 + crates/lxst-telephony/src/lib.rs | 99 +++++++++---------- .../tests/python_telephone_live_interop.rs | 8 +- tools/check-source-release.py | 10 +- 13 files changed, 103 insertions(+), 75 deletions(-) create mode 100644 crates/lxst-codec2/clippy.toml create mode 100644 crates/lxst-embedded/clippy.toml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d97784d..68ecb03 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ permissions: env: RSLXST_RSRETICULUM_VERSION: 1.3.0 - RSLXST_RSRETICULUM_COMMIT: 5edb8f22f5d8e6b2bd7392dc06e255ead96576fb + RSLXST_RSRETICULUM_COMMIT: cac8151fd8207ada9775310fe2b3c9c7340a7ecd RSLXST_PYTHON_LXST_COMMIT: 1194c9011fe6402edc7aebe7ffe9650ea3b1afee RSLXST_PYTHON_RNS_COMMIT: b48b96e61676504e0a4e527b33b9a0b4495c6872 @@ -150,8 +150,28 @@ jobs: - run: cargo test --workspace --locked working-directory: rsLXST + embedded-msrv: + name: Embedded Rust 1.87 MSRV + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 + with: + path: rsLXST + - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 + with: + repository: ${{ github.repository_owner }}/rsReticulum + ref: ${{ env.RSLXST_RSRETICULUM_COMMIT }} + path: rsReticulum + - uses: dtolnay/rust-toolchain@6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772 + with: + toolchain: 1.87.0 + - name: Check no_std MCU libraries at their independent compiler floor + working-directory: rsLXST + run: cargo check -p lxst-codec2 -p lxst-embedded --lib --locked + msrv: - name: Rust 1.87 MSRV + name: Rust 1.89 MSRV runs-on: ubuntu-latest timeout-minutes: 30 steps: @@ -175,7 +195,7 @@ jobs: path: upstream/Reticulum - uses: dtolnay/rust-toolchain@6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772 with: - toolchain: 1.87.0 + toolchain: 1.89.0 components: clippy - uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2 with: @@ -209,16 +229,16 @@ jobs: toolchain: stable - os: ubuntu-latest target: aarch64-linux-android - toolchain: 1.87.0 + toolchain: 1.89.0 - os: ubuntu-latest target: armv7-linux-androideabi - toolchain: 1.87.0 + toolchain: 1.89.0 - os: ubuntu-latest target: x86_64-linux-android - toolchain: 1.87.0 + toolchain: 1.89.0 - os: macos-latest target: aarch64-apple-ios - toolchain: 1.87.0 + toolchain: 1.89.0 steps: - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5 with: diff --git a/CHANGELOG.md b/CHANGELOG.md index 835c92f..0acb66d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,9 @@ ### Build and compatibility +- Raised the host source-build minimum to Rust 1.89 and qualified the corresponding protocol dependency update. +- Kept the standalone `lxst-codec2` and `lxst-embedded` minimum at Rust 1.87, with an independent MCU library check. + - Restricted rsReticulum compatibility to the 1.3 patch line and updated the pinned source. Codec dependencies and telephony APIs are unchanged. diff --git a/Cargo.toml b/Cargo.toml index 816ac91..23224c8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ members = [ version = "0.2.0" edition = "2024" license = "AGPL-3.0-or-later" -rust-version = "1.87" +rust-version = "1.89" publish = false [workspace.dependencies] diff --git a/README.md b/README.md index 31976a7..348f67e 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ **Rust LXST telephony and media streaming for Reticulum.** [![License: AGPL-3.0-or-later](https://img.shields.io/badge/license-AGPL--3.0--or--later-blue.svg)](LICENSE) -[![Rust 1.87+](https://img.shields.io/badge/rust-1.87%2B-orange.svg)](https://www.rust-lang.org) +[![Rust 1.89+](https://img.shields.io/badge/rust-1.89%2B-orange.svg)](https://www.rust-lang.org) [![LXST 0.4.5](https://img.shields.io/badge/target-LXST%200.4.5-success.svg)](https://github.com/markqvist/LXST) [![Status](https://img.shields.io/badge/status-library-yellow.svg)](#feature-status) @@ -292,3 +292,7 @@ Third-party components retain their own licenses. The locked production dependency inventory, including the exact upstream BSD-3-Clause Opus package, checksum, source commit, and preserved notice, is documented in [THIRD_PARTY_LICENSES.md](THIRD_PARTY_LICENSES.md). + +The host workspace requires Rust 1.89 or later. The standalone `lxst-codec2` +and `lxst-embedded` libraries retain Rust 1.87 compatibility for MCU consumers; +CI checks that independent minimum without the host-only development tests. diff --git a/api/snapshots/manifest-contract.json b/api/snapshots/manifest-contract.json index bf03fd0..bf7e4b1 100644 --- a/api/snapshots/manifest-contract.json +++ b/api/snapshots/manifest-contract.json @@ -37,7 +37,7 @@ { "name": "lxst-core", "version": "0.2.0", - "rustVersion": "1.87", + "rustVersion": "1.89", "edition": "2024", "features": {}, "targets": [ @@ -147,7 +147,7 @@ { "name": "lxst-rns", "version": "0.2.0", - "rustVersion": "1.87", + "rustVersion": "1.89", "edition": "2024", "features": {}, "targets": [ @@ -250,7 +250,7 @@ { "name": "lxst-telephony", "version": "0.2.0", - "rustVersion": "1.87", + "rustVersion": "1.89", "edition": "2024", "features": {}, "targets": [ diff --git a/clippy.toml b/clippy.toml index f783ce5..0b4252c 100644 --- a/clippy.toml +++ b/clippy.toml @@ -1,2 +1,2 @@ # Keep Clippy suggestions aligned with the public MSRV in Cargo.toml. -msrv = "1.87" +msrv = "1.89" diff --git a/crates/lxst-codec2/Cargo.toml b/crates/lxst-codec2/Cargo.toml index 429e253..d61924a 100644 --- a/crates/lxst-codec2/Cargo.toml +++ b/crates/lxst-codec2/Cargo.toml @@ -2,7 +2,7 @@ name = "lxst-codec2" version.workspace = true edition.workspace = true -rust-version.workspace = true +rust-version = "1.87" publish.workspace = true license = "LGPL-2.1-only AND MIT AND BSD-3-Clause" description = "Bounded no_std Codec2 speech backend for LXST" diff --git a/crates/lxst-codec2/clippy.toml b/crates/lxst-codec2/clippy.toml new file mode 100644 index 0000000..57fed27 --- /dev/null +++ b/crates/lxst-codec2/clippy.toml @@ -0,0 +1,2 @@ +# Keep lint suggestions compatible with the standalone MCU compiler floor. +msrv = "1.87" diff --git a/crates/lxst-embedded/Cargo.toml b/crates/lxst-embedded/Cargo.toml index f064629..ba59e8b 100644 --- a/crates/lxst-embedded/Cargo.toml +++ b/crates/lxst-embedded/Cargo.toml @@ -3,7 +3,7 @@ name = "lxst-embedded" version.workspace = true edition.workspace = true license.workspace = true -rust-version.workspace = true +rust-version = "1.87" publish.workspace = true description = "Bounded no_std LXST framing and authenticated PTT session policy" diff --git a/crates/lxst-embedded/clippy.toml b/crates/lxst-embedded/clippy.toml new file mode 100644 index 0000000..57fed27 --- /dev/null +++ b/crates/lxst-embedded/clippy.toml @@ -0,0 +1,2 @@ +# Keep lint suggestions compatible with the standalone MCU compiler floor. +msrv = "1.87" diff --git a/crates/lxst-telephony/src/lib.rs b/crates/lxst-telephony/src/lib.rs index 22e1a72..56f7e92 100644 --- a/crates/lxst-telephony/src/lib.rs +++ b/crates/lxst-telephony/src/lib.rs @@ -1093,35 +1093,33 @@ impl TelephonyServiceMedia { } if self.opus_transmit_stream.as_ref().is_some_and(|stream| { stream.link_id != active.link_id || Some(stream.profile) != active.profile - }) { - if let Some(stream) = self.opus_transmit_stream.take() { - let reason = if stream.link_id == active.link_id { - OpusTransmitStreamStopReason::ProfileChanged - } else { - OpusTransmitStreamStopReason::CallEnded - }; - events.push(TelephonyServiceEvent::OpusTransmitStreamStopped { - link_id: stream.link_id, - profile: stream.profile, - reason, - }); - } + }) && let Some(stream) = self.opus_transmit_stream.take() + { + let reason = if stream.link_id == active.link_id { + OpusTransmitStreamStopReason::ProfileChanged + } else { + OpusTransmitStreamStopReason::CallEnded + }; + events.push(TelephonyServiceEvent::OpusTransmitStreamStopped { + link_id: stream.link_id, + profile: stream.profile, + reason, + }); } if self.opus_receive_stream.as_ref().is_some_and(|stream| { stream.link_id != active.link_id || Some(stream.profile) != active.profile - }) { - if let Some(stream) = self.opus_receive_stream.take() { - let reason = if stream.link_id == active.link_id { - OpusReceiveStreamStopReason::ProfileChanged - } else { - OpusReceiveStreamStopReason::CallEnded - }; - events.push(TelephonyServiceEvent::OpusReceiveStreamStopped { - link_id: stream.link_id, - profile: stream.profile, - reason, - }); - } + }) && let Some(stream) = self.opus_receive_stream.take() + { + let reason = if stream.link_id == active.link_id { + OpusReceiveStreamStopReason::ProfileChanged + } else { + OpusReceiveStreamStopReason::CallEnded + }; + events.push(TelephonyServiceEvent::OpusReceiveStreamStopped { + link_id: stream.link_id, + profile: stream.profile, + reason, + }); } events } @@ -1751,11 +1749,11 @@ impl TelephonyService { return true; }; - if !frames.is_empty() { - if let Err(err) = self.send_opus_frames(profile, frames).await { - self.media.opus_transmit_stream = None; - return emit_service_error(self.event_tx.clone(), err).await; - } + if !frames.is_empty() + && let Err(err) = self.send_opus_frames(profile, frames).await + { + self.media.opus_transmit_stream = None; + return emit_service_error(self.event_tx.clone(), err).await; } if source_closed { @@ -2011,10 +2009,10 @@ impl TelephonyService { return false; } } - if let Some(event) = media_received { - if !emit_service_event(self.event_tx.clone(), event).await { - return false; - } + if let Some(event) = media_received + && !emit_service_event(self.event_tx.clone(), event).await + { + return false; } for event in opus_received_events { if !emit_service_event(self.event_tx.clone(), event).await { @@ -2132,14 +2130,12 @@ impl TelephonyService { dropped, }); } - if sink_closed { - if let Some(stream) = self.media.opus_receive_stream.take() { - events.push(TelephonyServiceEvent::OpusReceiveStreamStopped { - link_id: stream.link_id, - profile: stream.profile, - reason: OpusReceiveStreamStopReason::SinkClosed, - }); - } + if sink_closed && let Some(stream) = self.media.opus_receive_stream.take() { + events.push(TelephonyServiceEvent::OpusReceiveStreamStopped { + link_id: stream.link_id, + profile: stream.profile, + reason: OpusReceiveStreamStopReason::SinkClosed, + }); } events } @@ -2245,8 +2241,8 @@ impl TelephonyService { .map(|interval| now + interval); } - if let Some(effects) = effects { - if !emit_service_event( + if let Some(effects) = effects + && !emit_service_event( self.event_tx.clone(), TelephonyServiceEvent::Drive(TelephonyDriveStep { step: TelephonyStep::commands(commands), @@ -2254,9 +2250,8 @@ impl TelephonyService { }), ) .await - { - return false; - } + { + return false; } true } @@ -2892,10 +2887,10 @@ impl TelephonyRnsEndpoint { ); let queued = self.queue_prepared_control(link_id, LinkEndpointRole::Initiator, prepared); - if queued.is_ok() { - if let Some(state) = self.outgoing_links.get_mut(&link_id) { - state.link.record_tx_keepalive(1); - } + if queued.is_ok() + && let Some(state) = self.outgoing_links.get_mut(&link_id) + { + state.link.record_tx_keepalive(1); } if queued.is_err() { let _ = self.close_outgoing_link_locally(link_id); diff --git a/crates/lxst-telephony/tests/python_telephone_live_interop.rs b/crates/lxst-telephony/tests/python_telephone_live_interop.rs index 0ecfa6e..ae3fa01 100644 --- a/crates/lxst-telephony/tests/python_telephone_live_interop.rs +++ b/crates/lxst-telephony/tests/python_telephone_live_interop.rs @@ -561,10 +561,10 @@ async fn drive_until_active_status( .try_drive_ready(core) .expect("drive Rust Telephone endpoint"); - if let Some(call) = core.snapshot().active_call { - if call.status == status { - return call; - } + if let Some(call) = core.snapshot().active_call + && call.status == status + { + return call; } assert!( diff --git a/tools/check-source-release.py b/tools/check-source-release.py index 8786bac..abce3c0 100644 --- a/tools/check-source-release.py +++ b/tools/check-source-release.py @@ -12,9 +12,10 @@ import sys ROOT = Path(__file__).resolve().parents[1] EXPECTED_PACKAGES = {"lxst-core", "lxst-codec2", "lxst-embedded", "lxst-rns", "lxst-telephony"} -EXPECTED_MSRV = "1.87" +EXPECTED_MSRV = "1.89" +EMBEDDED_MSRV = {"lxst-codec2": "1.87", "lxst-embedded": "1.87"} EXPECTED_RETICULUM_VERSION = "1.3.0" -EXPECTED_RETICULUM_COMMIT = "5edb8f22f5d8e6b2bd7392dc06e255ead96576fb" +EXPECTED_RETICULUM_COMMIT = "cac8151fd8207ada9775310fe2b3c9c7340a7ecd" EXPECTED_OPUS_DEPENDENCY = ( 'opus-rs = { version = "=0.1.29", default-features = false, ' 'features = ["heap"] }' @@ -48,9 +49,10 @@ reticulum_requirements: set[str] = set() for name, package in sorted(packages.items()): if package["publish"] != []: fail(f"{name} must declare publish = false") - if package["rust_version"] != EXPECTED_MSRV: + expected_msrv = EMBEDDED_MSRV.get(name, EXPECTED_MSRV) + if package["rust_version"] != expected_msrv: fail( - f"{name} must declare Rust {EXPECTED_MSRV} " + f"{name} must declare Rust {expected_msrv} " f"(found {package['rust_version']!r})" ) for dependency in package["dependencies"]: