From a2412a8fbc5d11de0cdcf6e52a15b77850936829 Mon Sep 17 00:00:00 2001 From: "google-labs-stitch[bot]" <315546542+google-labs-stitch[bot]@users.noreply.github.com> Date: Wed, 25 Nov 2026 04:12:45 +0000 Subject: [PATCH 1/2] ci: deny compiler and rustdoc warnings in scripts and docs - Pass -D warnings to cargo rustdoc in check:wasm in package.json - Set RUSTFLAGS to -D warnings on cargo build in ci.yml - Use cargo rustc with -D warnings in AGENTS.md and README.md - Use cargo rustdoc with -D warnings in README.md - Remove the redundant RUSTDOCFLAGS prefix in AGENTS.md --- .github/workflows/ci.yml | 2 ++ AGENTS.md | 4 ++-- README.md | 8 ++++---- package.json | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2562d00..bd74493 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,6 +50,8 @@ jobs: - run: cargo fmt --check - run: cargo clippy --locked --lib -- -D warnings - run: cargo build --locked --release + env: + RUSTFLAGS: "-D warnings" - run: cargo doc --locked --no-deps env: RUSTDOCFLAGS: "-D warnings" diff --git a/AGENTS.md b/AGENTS.md index 4bc6d47..816b57c 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -91,7 +91,7 @@ this file, rustdoc, code comments, TypeScript comments and commit messages. ## Build and verify ```sh -cargo build --locked --release +cargo rustc --locked --lib --release -- -D warnings cargo fmt --check cargo clippy --locked --lib -- -D warnings RUSTDOCFLAGS="-D warnings" cargo doc --locked --no-deps @@ -107,7 +107,7 @@ If you change the Wasm or TypeScript code, also run these commands. ```sh npm ci -RUSTDOCFLAGS="-D warnings" npm run check:wasm +npm run check:wasm npm run verify:pack ``` diff --git a/README.md b/README.md index 83a8f47..763b2f6 100644 --- a/README.md +++ b/README.md @@ -350,7 +350,7 @@ reset semantics. Read it on [docs.rs](https://docs.rs/tunelet), or run this command: ```sh -cargo doc --locked --no-deps --open +cargo rustdoc --locked --lib --open -- -D warnings ``` ## WebAssembly and TypeScript @@ -526,10 +526,10 @@ To build the crate and check the format, the lints and the documentation, run these commands: ```sh -cargo build --locked --release +cargo rustc --locked --lib --release -- -D warnings cargo fmt --check cargo clippy --locked --lib -- -D warnings -cargo doc --locked --no-deps +cargo rustdoc --locked --lib -- -D warnings ``` To check the `wasm` feature for `wasm32-unknown-unknown` with Cargo, run @@ -538,7 +538,7 @@ these commands: ```sh rustup target add wasm32-unknown-unknown cargo clippy --locked --lib --target wasm32-unknown-unknown --features wasm -- -D warnings -cargo doc --locked --no-deps --target wasm32-unknown-unknown --features wasm +cargo rustdoc --locked --lib --target wasm32-unknown-unknown --features wasm -- -D warnings ``` Native Rust builds and these Wasm checks use Cargo and do not need Node.js diff --git a/package.json b/package.json index 8c201f6..df5353a 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "build": "npm run build:wasm && npm run build:ts", "build:wasm": "wasm-pack build --target web --out-dir pkg --release --no-pack --features wasm --locked && node --input-type=module -e \"import fs from 'node:fs'; fs.rmSync('pkg/.gitignore', { force: true })\"", "build:ts": "tsc", - "check:wasm": "cargo clippy --locked --lib --target wasm32-unknown-unknown --features wasm -- -D warnings && cargo doc --locked --no-deps --target wasm32-unknown-unknown --features wasm", + "check:wasm": "cargo clippy --locked --lib --target wasm32-unknown-unknown --features wasm -- -D warnings && cargo rustdoc --locked --lib --target wasm32-unknown-unknown --features wasm -- -D warnings", "prepack": "npm run build", "verify:pack": "node scripts/verify-pack.mjs" }, From 7f339d4b0c70320086c21fc330bf743938e1c61c Mon Sep 17 00:00:00 2001 From: "google-labs-stitch[bot]" <315546542+google-labs-stitch[bot]@users.noreply.github.com> Date: Wed, 25 Nov 2026 09:03:40 +0000 Subject: [PATCH 2/2] ci: keep cargo doc --open and remove extra RUSTDOCFLAGS - Keep cargo doc --locked --no-deps --open in README.md - Remove the redundant RUSTDOCFLAGS on check:wasm in ci.yml --- .github/workflows/ci.yml | 2 -- README.md | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 55a9a98..a0e1f86 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -58,6 +58,4 @@ jobs: - run: cargo package --locked - run: npm ci - run: npm run check:wasm - env: - RUSTDOCFLAGS: "-D warnings" - run: npm run verify:pack diff --git a/README.md b/README.md index add936b..20be088 100644 --- a/README.md +++ b/README.md @@ -352,7 +352,7 @@ reset semantics. Read it on [docs.rs](https://docs.rs/tunelet), or run this command: ```sh -cargo rustdoc --locked --lib --open -- -D warnings +cargo doc --locked --no-deps --open ``` ## WebAssembly and TypeScript