Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/rust-cache/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ runs:
# whatever the runner image ships: the compiler these jobs build with
# exists only inside `nix develop`. The `toolchain` input is no help
# either, since it names a rustup toolchain and probes
# `rustc +<name> -vV`, and nothing installs 1.95.0 through rustup.
# `rustc +<name> -vV`, and nothing installs that channel through rustup.
#
# flake.lock pins that compiler, so hashing the flake identifies it more
# precisely than `rustc -vV` would, and rolls the cache when the dev
Expand Down
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ ignored = ["getrandom"]
# it to 1.95 (sysinfo 0.39), and moq-cli does too because it depends on that
# library. Those crates are applications; the point of the per-crate override
# is to keep the bump off the libraries others actually build on. The nix flake
# / rust-toolchain.toml pin the build toolchain to 1.95 (so the whole workspace
# including the relay compiles) rather than latest stable, which keeps the
# relay's ceiling from creeping up unnoticed.
# / rust-toolchain.toml pin the build toolchain to a fixed version rather than
# latest stable, which keeps the relay's ceiling from creeping up unnoticed.
# That pin sits above every MSRV here; rust-toolchain.toml says why.
rust-version = "1.91"

[workspace.dependencies]
Expand Down
10 changes: 6 additions & 4 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,12 @@

# Pinned build toolchain (not latest stable) so `nix develop` and CI
# compile against a fixed rustc and the relay's MSRV can't creep up
# unnoticed. Set to moq-relay's 1.95 (the highest crate MSRV in the
# workspace) so the whole workspace, including the relay, builds; the
# library crates declare a lower 1.91 floor (Cargo.toml rust-version).
rust-toolchain = pkgs.rust-bin.stable."1.95.0".default.override {
# unnoticed. The floor is 1.98, not the 1.95 relay MSRV: earlier rustc
# strips Mach-O debuginfo with an llvm-objcopy that leaves the LINKEDIT
# string pool 4-byte aligned, which macOS 27's dyld refuses to load, so
# release-profile proc macros and cdylibs are a coin flip there. The
# crates still declare their own lower floors (Cargo.toml rust-version).
rust-toolchain = pkgs.rust-bin.stable."1.98.1".default.override {
extensions = [
"rust-src"
"rust-analyzer"
Expand Down
11 changes: 5 additions & 6 deletions nix/overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@
{ crane }:
final: prev:
let
# Pin crane to the workspace MSRV (Cargo.toml rust-version /
# rust-toolchain.toml) so `nix build` uses the same toolchain as
# `nix develop` and release artifacts build with the version CI verifies.
# Without an explicit toolchain, crane falls back to `final.rustc`/
# `final.cargo`, which nixpkgs resolves to its own default Rust.
# Pin crane to the same build toolchain as rust-toolchain.toml / flake.nix so
# `nix build` uses what `nix develop` does and release artifacts build with
# the version CI verifies. Without an explicit toolchain, crane falls back to
# `final.rustc`/`final.cargo`, which nixpkgs resolves to its own default Rust.
#
rustToolchain = final.rust-bin.stable."1.95.0".default;
rustToolchain = final.rust-bin.stable."1.98.1".default;
craneLib = (crane.mkLib final).overrideToolchain rustToolchain;

# Helper function to get crate info from Cargo.toml
Expand Down
4 changes: 4 additions & 0 deletions rs/kio/src/waiter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -808,6 +808,10 @@ mod tests {
#[test]
fn park_retires_a_waiter_for_another_task() {
struct Nop;
// Not `Waker::noop()`, which clippy suggests: that is a singleton, so the two
// wakers below would name the same task and the assertion would pass without
// testing anything. What this needs is two wakers that do nothing and differ.
#[expect(clippy::manual_noop_waker, reason = "the two wakers must not be identical")]
impl std::task::Wake for Nop {
fn wake(self: Arc<Self>) {}
}
Expand Down
4 changes: 4 additions & 0 deletions rs/moq-relay/src/web.rs
Original file line number Diff line number Diff line change
Expand Up @@ -762,6 +762,8 @@ async fn admit_http(
}

/// Serve the announced broadcasts for a given prefix.
// The `Err` is axum's own `ErrorResponse`, so there is nothing here to box.
#[expect(clippy::result_large_err, reason = "the error type is axum's, not ours")]
async fn serve_announced(
path: Option<Path<String>>,
Query(query): Query<AuthQuery>,
Expand Down Expand Up @@ -799,6 +801,8 @@ async fn serve_announced(
}

/// Serve the given group for a given track
// The `Err` is axum's own `ErrorResponse`, so there is nothing here to box.
#[expect(clippy::result_large_err, reason = "the error type is axum's, not ours")]
async fn serve_fetch(
Path(path): Path<String>,
Query(params): Query<FetchParams>,
Expand Down
2 changes: 2 additions & 0 deletions rs/moq-relay/src/websocket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ use crate::{auth, web::MtlsPeer, web::WebState, web::landing_response};

// One axum extractor per fact the upgrade needs; there is no struct to fold them into.
#[allow(clippy::too_many_arguments)]
// The `Err` is axum's own `ErrorResponse`, so there is nothing here to box.
#[expect(clippy::result_large_err, reason = "the error type is axum's, not ours")]
pub(crate) async fn serve_ws(
ws: Result<WebSocketUpgrade, WebSocketUpgradeRejection>,
OriginalUri(uri): OriginalUri,
Expand Down
11 changes: 7 additions & 4 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
[toolchain]
# Pinned to the build toolchain: moq-relay's 1.95 (the highest crate MSRV), so
# the whole workspace compiles. NOT the 1.91 workspace library floor in
# Cargo.toml. Keep in sync with flake.nix / nix/overlay.nix.
channel = "1.95.0"
# Pinned to the build toolchain, NOT the 1.91 workspace library floor or the
# 1.95 relay MSRV in Cargo.toml. It has to be at least 1.98: below that, rustc
# strips Mach-O debuginfo with an llvm-objcopy that leaves the LINKEDIT string
# pool 4-byte aligned, and macOS 27's dyld refuses to load such an image. That
# makes every release-profile proc macro and cdylib (moq-ffi, moq-gst) a coin
# flip there. Keep in sync with flake.nix / nix/overlay.nix.
channel = "1.98.1"
components = ["rustfmt", "clippy"]
Loading