From 7391c5b7a406f9c8825afe24ecd2f5f6b9f6984f Mon Sep 17 00:00:00 2001 From: agent Date: Thu, 8 Oct 2026 17:41:22 -0400 Subject: [PATCH] ci: build the default graph on Rust 1.98, not 1.91 `cuprate-daemon` is a default feature, so `cargo test --locked` in the Pi CI job compiles `tapes`. That crate calls `VecDeque::pop_front_if`, stable only since 1.93. `rust:1.91-bookworm` dies with `error[E0658]: use of unstable library feature 'vec_deque_pop_if'` after the rest of the graph has already built. The Android workflows were already on 1.98 for this; ci.yml and release.yml were left on 1.91 when the feature was off, and that is no longer true. `rust-version` moves with the image. cargo checks it before features, so a 1.91 compiler must be refused up front instead of fifteen minutes into `tapes`. `--no-default-features` would still compile on 1.91; the declared floor is the default build's floor, which is what CI and `cargo build` run. --- .forgejo/workflows/android-ci.yml | 12 ++++-------- .forgejo/workflows/android-release.yml | 5 ++--- .forgejo/workflows/ci.yml | 10 +++++++++- .forgejo/workflows/fuzz.yml | 5 ++++- .forgejo/workflows/release.yml | 4 +++- Cargo.toml | 8 +++++++- README.md | 8 +++++--- android/CUPRATE_DAEMON.md | 15 +++++++-------- android/README.md | 4 ++-- crates/onionwire-sdk/Cargo.toml | 5 ++++- docs/ARTI_UPGRADE.md | 8 +++++--- scripts/arti-watch.py | 2 +- 12 files changed, 53 insertions(+), 33 deletions(-) diff --git a/.forgejo/workflows/android-ci.yml b/.forgejo/workflows/android-ci.yml index d080d17..5032ff1 100644 --- a/.forgejo/workflows/android-ci.yml +++ b/.forgejo/workflows/android-ci.yml @@ -70,14 +70,10 @@ env: ONIONWIRE_ANDROID_ABI: arm64-v8a ANDROID_IMAGE: debian:bookworm ANDROID_CMDLINE_TOOLS_URL: https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip - # Not the workspace MSRV (`rust-version = "1.91"`, and `ci.yml` stays on it): the - # cuprated graph needs more. `tapes` (a Cuprate dependency) calls - # `VecDeque::pop_front_if`, stable only from **1.93**, so 1.91 dies with - # `error[E0658]: use of unstable library feature 'vec_deque_pop_if'` — 15 minutes - # into the Android job, after 400-odd crates, in a dependency this repo cannot - # patch. 1.98 is the stable release this graph is built and tested with on the dev - # machine. Bumping `ci.yml` too is a separate decision (it would move the MSRV for - # the whole workspace) and is not this workflow's to make. + # Same floor as ci.yml and release.yml (`rust:1.98-bookworm`). The cuprated + # graph needs >= 1.93 (`tapes` calls `VecDeque::pop_front_if`); 1.91 dies with + # `error[E0658]: use of unstable library feature 'vec_deque_pop_if'`. 1.98 is + # the stable release this graph is built and tested with. RUST_TOOLCHAIN: "1.98" DOCKER_STATIC_URL: https://download.docker.com/linux/static/stable/x86_64/docker-27.5.1.tgz # Distinct container prefix: run ids are per-workflow, so this workflow and diff --git a/.forgejo/workflows/android-release.yml b/.forgejo/workflows/android-release.yml index dd2a132..4894a8e 100644 --- a/.forgejo/workflows/android-release.yml +++ b/.forgejo/workflows/android-release.yml @@ -61,9 +61,8 @@ env: ONIONWIRE_REQUIRE_RELEASE_KEY: "true" ANDROID_IMAGE: debian:bookworm ANDROID_CMDLINE_TOOLS_URL: https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip - # Same as android-ci.yml: the cuprated graph needs >= 1.93 (`tapes` uses - # `VecDeque::pop_front_if`), and 1.98 is what this graph is built with. The - # workspace MSRV in Cargo.toml is untouched; `ci.yml` and `release.yml` keep 1.91. + # Same floor as ci.yml (`rust:1.98-bookworm`): the cuprated graph needs >= 1.93 + # (`tapes` uses `VecDeque::pop_front_if`), and 1.98 is what this graph is built with. RUST_TOOLCHAIN: "1.98" DOCKER_STATIC_URL: https://download.docker.com/linux/static/stable/x86_64/docker-27.5.1.tgz BUILD_CONTAINER: onionwire-android-${{ github.run_id }} diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index 526b314..1052092 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -51,7 +51,15 @@ concurrency: env: CARGO_TERM_COLOR: never - RUST_IMAGE: rust:1.91-bookworm + # Not 1.91. `cuprate-daemon` is a default feature, so `cargo test --locked` + # compiles `tapes`, which calls `VecDeque::pop_front_if` (stable since 1.93). + # On `rust:1.91-bookworm` that is `error[E0658]: use of unstable library + # feature 'vec_deque_pop_if'`, after the job has already built the rest of + # the graph. 1.98 is the release this graph is built with on the dev machine + # and in the Android workflows. `--no-default-features` still builds on 1.91 + # (Arti 0.46's floor); the default build does not, so the image follows the + # default build. + RUST_IMAGE: rust:1.98-bookworm CARGO_REGISTRY_VOLUME: onionwire-cargo-registry CARGO_TARGET_VOLUME: onionwire-target-ci BUILD_CONTAINER: onionwire-ci-${{ github.run_id }} diff --git a/.forgejo/workflows/fuzz.yml b/.forgejo/workflows/fuzz.yml index ec02d91..ba63eee 100644 --- a/.forgejo/workflows/fuzz.yml +++ b/.forgejo/workflows/fuzz.yml @@ -30,7 +30,10 @@ concurrency: env: CARGO_TERM_COLOR: never - RUST_IMAGE: rust:1.91-bookworm + # Base image only: the job switches to nightly before it compiles. Kept on + # the same tag as ci.yml so a step that forgets `+nightly` does not die in + # `tapes` on 1.91 (`VecDeque::pop_front_if`). + RUST_IMAGE: rust:1.98-bookworm # The build needs a release profile + debug=line-tables-only, so it must not # thrash the test/sdk target volumes and needs its own registry cache. FUZZ_REGISTRY_VOLUME: onionwire-cargo-registry-fuzz diff --git a/.forgejo/workflows/release.yml b/.forgejo/workflows/release.yml index ae06aff..eb9b91d 100644 --- a/.forgejo/workflows/release.yml +++ b/.forgejo/workflows/release.yml @@ -45,7 +45,9 @@ concurrency: env: CARGO_TERM_COLOR: never - RUST_IMAGE: rust:1.91-bookworm + # Same floor as ci.yml: the release binary has `cuprate-daemon` on by default, + # and `tapes` does not build on 1.91 (`VecDeque::pop_front_if`, stable in 1.93). + RUST_IMAGE: rust:1.98-bookworm # Not baking pkg-config/libssl-dev into a custom image on this card — # dind PVC would make that the durable fix for the apt loop. Filed separately. CARGO_REGISTRY_VOLUME: onionwire-cargo-registry diff --git a/Cargo.toml b/Cargo.toml index d9bcf62..2ae4aff 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,13 @@ name = "onionwire" version = "0.2.1" edition = "2024" -rust-version = "1.91" +# 1.98, not 1.91. Arti 0.46 builds on 1.91, but the default feature set includes +# `cuprate-daemon`, and `tapes` (a Cuprate dep this repo cannot patch) calls +# `VecDeque::pop_front_if`, stable only from 1.93. 1.98 is the release CI and +# the Android workflows actually build that graph with. `--no-default-features` +# does not need it; `cargo` checks `rust-version` before features, so the +# declared floor is the default build's floor. +rust-version = "1.98" description = "Lean Tor messenger: Arti in-process, identity=pubkey, onion=locator. No XMPP." license = "MIT" publish = false diff --git a/README.md b/README.md index 873d78e..28c2b56 100644 --- a/README.md +++ b/README.md @@ -80,13 +80,15 @@ format (` onionwire-`). ### Option B — build from source -Needs [Rust](https://rustup.rs/) **1.91+** (`edition = "2024"`; `Cargo.toml` -`rust-version = "1.91"`; Arti 0.46 requires 1.91). Do not install `tor`. +Needs [Rust](https://rustup.rs/) **1.98+** (`edition = "2024"`; `Cargo.toml` +`rust-version = "1.98"`). Arti 0.46 itself builds on 1.91, but the default +feature set includes the in-process chain daemon, and that graph does not +(`tapes` calls `VecDeque::pop_front_if`, stable since 1.93). Do not install `tor`. ```bash curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh source "$HOME/.cargo/env" -rustc --version # must be 1.91 or newer +rustc --version # must be 1.98 or newer ``` ```bash diff --git a/android/CUPRATE_DAEMON.md b/android/CUPRATE_DAEMON.md index 8689f2a..18b3fcd 100644 --- a/android/CUPRATE_DAEMON.md +++ b/android/CUPRATE_DAEMON.md @@ -85,15 +85,14 @@ else: is `cmake` not installed?* — surfacing as Gradle's "cargo finished with non-zero exit value 101", which reads like a Rust error and is not one. `android-ci.yml` and `android-release.yml` both install it. -5. **The Rust toolchain must be >= 1.93**, not the workspace MSRV of 1.91. - `tapes`, a Cuprate dependency this repo cannot patch, calls - `VecDeque::pop_front_if`, which is stable only from 1.93. On 1.91 the Android job - compiles ~400 crates and then dies with +5. **The Rust toolchain must be >= 1.93.** `tapes`, a Cuprate dependency this + repo cannot patch, calls `VecDeque::pop_front_if`, which is stable only from + 1.93. On 1.91 a job compiles ~400 crates and then dies with `error[E0658]: use of unstable library feature 'vec_deque_pop_if'`. - `android-ci.yml` and `android-release.yml` pin `RUST_TOOLCHAIN: "1.98"` (the - stable release this graph is built and tested with); `ci.yml`, `release.yml` and - the `rust-version = "1.91"` MSRV are untouched, because the feature-off workspace - does not need the bump and moving the MSRV is a separate decision. + `ci.yml`, `release.yml`, `android-ci.yml` and `android-release.yml` all pin + 1.98 (the stable release this graph is built and tested with), and + `Cargo.toml` `rust-version` is `"1.98"` for the same reason: `cuprate-daemon` + is a default feature, so the default build is the floor. `:sdk:preBuild` also runs `verifyDynamicLibc`: `libonionwire_sdk.so` must have `libc.so` in `DT_NEEDED`. Linking the NDK's static `libc.a` instead null-derefs diff --git a/android/README.md b/android/README.md index c96aaa4..caa9440 100644 --- a/android/README.md +++ b/android/README.md @@ -340,8 +340,8 @@ publishing. `scripts/build-android-local.sh` remains the offline fallback; it does not create tags. The Android job image / bookworm-container story is the same as `android-ci.yml`. -The cuprated graph is built with `RUST_TOOLCHAIN=1.98` here (workspace MSRV -stays 1.91). Job timeout is **90** minutes on `android-release.yml` and **120** +The cuprated graph is built with Rust 1.98 here, the same floor as `ci.yml` +(`rust-version = "1.98"`). Job timeout is **90** minutes on `android-release.yml` and **120** on `android-ci.yml`. ## Layout diff --git a/crates/onionwire-sdk/Cargo.toml b/crates/onionwire-sdk/Cargo.toml index 5f209ec..9c36942 100644 --- a/crates/onionwire-sdk/Cargo.toml +++ b/crates/onionwire-sdk/Cargo.toml @@ -2,7 +2,10 @@ name = "onionwire-sdk" version = "0.1.0" edition = "2024" -rust-version = "1.91" +# Follows the root crate. The SDK builds onionwire with `default-features = +# false` (no `cuprate-daemon`), which would still compile on 1.91, but cargo +# checks the path dependency's `rust-version` anyway, and that floor is 1.98. +rust-version = "1.98" description = "OnionWire Android/Kotlin SDK: in-process Arti onion transport, Noise IK, identity = ed25519 pubkey." license = "MIT" publish = false diff --git a/docs/ARTI_UPGRADE.md b/docs/ARTI_UPGRADE.md index bdb6c0f..defc59e 100644 --- a/docs/ARTI_UPGRADE.md +++ b/docs/ARTI_UPGRADE.md @@ -37,8 +37,10 @@ runtime. ## Toolchain floor -**rustc 1.91+.** `Cargo.toml` sets `edition = "2024"` and `rust-version = "1.91"`; -the Arti 0.46 crates require 1.91. CI builds inside `rust:1.91-bookworm` +**rustc 1.98+.** `Cargo.toml` sets `edition = "2024"` and `rust-version = "1.98"`. +Arti 0.46 itself requires only 1.91; the higher floor is the default +`cuprate-daemon` feature (`tapes` calls `VecDeque::pop_front_if`, stable since +1.93). CI builds inside `rust:1.98-bookworm` (`RUST_IMAGE` in `.forgejo/workflows/ci.yml` and `release.yml`). A bump may raise the floor. Take the actual MSRV from the upstream release @@ -46,7 +48,7 @@ notes / the crate's own `rust-version`, then raise it in the same PR: * `rust-version` in `Cargo.toml`, * `RUST_IMAGE` in `.forgejo/workflows/ci.yml` **and** `.forgejo/workflows/release.yml`, -* the "Rust 1.91+" line in `README.md`. +* the "Rust 1.98+" line in `README.md`. ## How this gets noticed diff --git a/scripts/arti-watch.py b/scripts/arti-watch.py index c7de9ab..e404964 100644 --- a/scripts/arti-watch.py +++ b/scripts/arti-watch.py @@ -177,7 +177,7 @@ not bump this one alone. Procedure, toolchain floor, and the tests a bump must pass: [`docs/ARTI_UPGRADE.md`](../blob/main/docs/ARTI_UPGRADE.md). Rust toolchain floor -is rustc 1.91+ (Arti 0.46); a bump may raise it. +is rustc 1.98+ (the default build includes `cuprate-daemon`; Arti 0.46 itself is 1.91); a bump may raise it. The watcher does **not** subscribe to Tor Project security announcements, and it cannot see a yanked crate or a vulnerability that ships without a version bump.