From c60caaf32899856316fd9cb19f74b20766bf95f8 Mon Sep 17 00:00:00 2001 From: "google-labs-stitch[bot]" <315546542+google-labs-stitch[bot]@users.noreply.github.com> Date: Sat, 21 Nov 2026 01:31:44 +0000 Subject: [PATCH] build(cargo): deny compiler and rustdoc warnings - Add .cargo/config.toml with -D warnings for rustc and rustdoc. - Add .cargo/config.toml to the repository map in AGENTS.md. - Document shell RUSTFLAGS and RUSTDOCFLAGS in AGENTS.md. --- .cargo/config.toml | 3 +++ AGENTS.md | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 .cargo/config.toml diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 0000000..2779ea3 --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,3 @@ +[build] +rustflags = ["-D", "warnings"] +rustdocflags = ["-D", "warnings"] diff --git a/AGENTS.md b/AGENTS.md index 8fa0481..80e1dd0 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -86,6 +86,8 @@ this file, rustdoc, code comments, TypeScript comments and commit messages. - `src/wasm.rs`: the wasm-bindgen and tsify bindings (`wasm` feature). - `src/index.ts`: the `loadTunelet` entry point. See also `package.json` and `tsconfig.json`. +- `.cargo/config.toml`: the Cargo flags (`-D warnings`) for `rustc` and + `rustdoc`. ## Build and verify @@ -106,7 +108,10 @@ npm run build ``` - Make sure that there are no new warnings. This includes broken - rustdoc links. + rustdoc links. `.cargo/config.toml` sets `-D warnings` for `rustc` + and `rustdoc`. A shell `RUSTFLAGS` or `RUSTDOCFLAGS` variable + replaces the flags in `.cargo/config.toml` for that tool. If you set + `RUSTFLAGS` or `RUSTDOCFLAGS` in the shell, include `-D warnings`. - The crate has no tests (`test = false`). Do not add tests or test support if the task does not tell you to. - To verify a DSP change, render PCM from a fixed input and seed before