interplane.Get Omega
Read in your language

aien-edge

aien-dev/aien-edge

Brought by drakestapleton

GitHub aien-dev/aien-edge#20 (code only)

closed derived fa42fcc420f14725 #20

Imported from GitHub aien-dev/aien-edge#20 (code only)

GitHub's metadata for this pull request is unavailable: its state is DERIVED from the commits (merged: the head is reachable from this project's main; open: GitHub kept a merge ref; else closed).

Base cf3369b10a167f028e705456626088ae2c1307d5 · Head 2a322ee603196ea3c3ddf0a237561be2170d82fd

Apply it

git checkout -b patch-fa42fcc420f14725 cf3369b10a167f028e705456626088ae2c1307d5
curl -fsSL https://interplane.io/drakestapleton/aien-edge/patches/fa42fcc420f14725.patch | git am

Raw patch (mbox) · Diff

Provenance

This proposal is imported from GitHub; it is not signed by its author. Its import statement and source record:

github-import 1
aien-dev/aien-edge
20
2a322ee603196ea3c3ddf0a237561be2170d82fd
{"kind":"github-import","owner":"aien-dev","repo":"aien-edge","number":20,"url":"https://github.com/aien-dev/aien-edge/pull/20","export_sha256":"967c79e26a893657b5cdaa45efd442be5dbd2ecfe68e25f9a8c1b5da4d60d452","imported_utc":"2026-11-18T16:40:34Z","metadata":"unavailable","state_derived":true}

Changes

diff --git a/.github/workflows/msrv.yml b/.github/workflows/msrv.yml
new file mode 100644
index 0000000..3578195
--- /dev/null
+++ b/.github/workflows/msrv.yml
@@ -0,0 +1,28 @@
+name: msrv
+
+on:
+  push:
+    branches: [main]
+  pull_request:
+
+permissions:
+  contents: read
+
+jobs:
+  msrv:
+    name: build and test on the MSRV
+    runs-on: ubuntu-24.04-arm
+    steps:
+      - uses: actions/checkout@v4
+      - name: rust-version in Cargo.toml matches rust-toolchain.toml
+        run: |
+          msrv=$(sed -n 's/^rust-version = "\(.*\)"$/\1/p' Cargo.toml)
+          pin=$(sed -n 's/^channel = "\(.*\)"$/\1/p' rust-toolchain.toml)
+          echo "Cargo.toml rust-version=$msrv rust-toolchain.toml channel=$pin"
+          case "$pin" in "$msrv"|"$msrv".*) ;; *) echo "mismatch"; exit 1 ;; esac
+      - name: install the pinned toolchain
+        run: rustup toolchain install "$(sed -n 's/^channel = "\(.*\)"$/\1/p' rust-toolchain.toml)" --profile minimal --component clippy
+      - run: rustc --version && cargo --version
+      - run: cargo build --locked
+      - run: cargo test --locked
+      - run: cargo clippy --release --locked -- -D warnings
diff --git a/AGENTS.md b/AGENTS.md
index bc47235..3c586d6 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -20,7 +20,7 @@ cd aien-edge
 cargo build --release   # writes target/release/aien-edge
 ```
 
-Needs a stable Rust toolchain. `Cargo.lock` is committed. aarch64 builds run on a 64-bit Raspberry Pi OS.
+Needs Rust 1.88 or newer: `rust-version = "1.88"` in `Cargo.toml`, and `rust-toolchain.toml` pins 1.88.0 so rustup selects it here. 1.88 is the oldest release that builds the locked dependencies (`time` 0.3.55 needs 1.88; several crates use edition 2024). When a dependency update raises that floor, raise `rust-version`, the `rust-toolchain.toml` channel and this line together. `Cargo.lock` is committed. aarch64 builds run on a 64-bit Raspberry Pi OS.
 
 ## Configuration
 
@@ -42,7 +42,7 @@ target/release/aien-edge <config.toml>  # serves until stopped; SIGHUP reloads e
 
 - Running the binary opens network listeners. For a local run use a config without `[tls]`, a non-privileged `http_listen`, and a `[[site]]` root that holds a built site with `index.html`.
 - Deploying (`README.md`, "Deploy on the Pi") needs a Raspberry Pi with systemd, sudo, ports 80 and 443 forwarded to it, and DNS pointing at it. `deploy/aien-edge.service` runs it with `DynamicUser=yes`, `CAP_NET_BIND_SERVICE` only and a read-only `/srv/sites`.
-- There are no CI workflows in this repository. Run the three cargo commands above before opening a pull request.
+- `.github/workflows/msrv.yml` checks that `rust-version` matches the `rust-toolchain.toml` channel, then runs `cargo build`, `cargo test` and `cargo clippy --release -- -D warnings` with `--locked` on that toolchain for every pull request and push to `main`. Run the three cargo commands above before opening a pull request.
 
 ## Conventions
 
diff --git a/Cargo.toml b/Cargo.toml
index a3184e0..b8d06cf 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -2,6 +2,7 @@
 name = "aien-edge"
 version = "0.1.0"
 edition = "2021"
+rust-version = "1.88"
 description = "Native Rust edge server for AIEN static sites: in-memory precompressed assets, virtual hosts, and automatic Let's Encrypt TLS"
 license = "AGPL-3.0-or-later"
 authors = ["Drake Stapleton <aien@aienos.com>"]
diff --git a/README.md b/README.md
index 9c02c0c..a5fece9 100644
--- a/README.md
+++ b/README.md
@@ -47,6 +47,8 @@ Not measured on a Pi.
 
 ## Build and test
 
+Needs Rust 1.88 or newer (`rust-version` in `Cargo.toml`). `rust-toolchain.toml` pins 1.88.0, so rustup uses that release in this directory. The `msrv` workflow builds, tests and lints on it with `--locked` for every pull request.
+
 ```bash
 cargo test
 cargo clippy --release -- -D warnings
diff --git a/rust-toolchain.toml b/rust-toolchain.toml
new file mode 100644
index 0000000..6e2f168
--- /dev/null
+++ b/rust-toolchain.toml
@@ -0,0 +1,8 @@
+[toolchain]
+# Pinned to the minimum supported Rust version, which must equal
+# `rust-version` in Cargo.toml. 1.88 is the oldest release that builds the
+# locked dependency set (time 0.3.55 requires 1.88; zeroize, blake3 and
+# others use edition 2024, which needs 1.85).
+channel = "1.88.0"
+profile = "minimal"
+components = ["clippy"]