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