35 lines
2.8 KiB
Markdown
35 lines
2.8 KiB
Markdown
---
|
|
name: reference_guru5070_rust_toolchain
|
|
description: GURU-5070 has the full local Rust toolchain (cargo + MSVC + protoc) — build/clippy/test the guru-connect workspace LOCALLY instead of the build host; set PROTOC first
|
|
metadata:
|
|
type: reference
|
|
---
|
|
|
|
As of 2026-05-30, GURU-5070 has the full Rust dev toolchain installed, so GuruConnect can be
|
|
built/linted/tested locally — **no more build-host (172.16.3.30) round-trips just for `cargo fmt`/clippy.**
|
|
|
|
- **cargo/rustc/clippy/rustfmt:** `C:\Users\guru\.cargo\bin\` (rustup; cargo 1.96, rustfmt 1.9, clippy 0.1.96).
|
|
- **MSVC C++ Build Tools:** VS2022 BuildTools (VCTools workload) — provides the `x86_64-pc-windows-msvc` linker.
|
|
- **protoc:** 35.0 via winget. The build.rs prost codegen needs it — **set the env var first:**
|
|
`$env:PROTOC = "C:\Users\guru\AppData\Local\Microsoft\WinGet\Packages\Google.Protobuf_Microsoft.Winget.Source_8wekyb3d8bbwe\bin\protoc.exe"` (also set persistently as a User env var).
|
|
- Default target is `x86_64-pc-windows-msvc` (per the repo `.cargo/config.toml`), so this machine builds BOTH
|
|
the server AND the Windows agent — better coverage than the Linux build host, which can't compile the agent.
|
|
- **Local gates that mirror CI** (run from the guru-connect dir with PROTOC set):
|
|
`cargo fmt --all`, `cargo clippy --workspace --all-targets --all-features -- -D warnings`,
|
|
`cargo test --workspace`, `cargo build --workspace`. Local rustfmt agrees with CI (verified — no skew).
|
|
- **CI gap to know:** CI only runs clippy on the **Linux server** build; the Windows **agent** crate is never
|
|
clippy-checked in CI (let 77 errors accumulate, cleaned up 2026-05-30). Todo to add agent clippy to the
|
|
build-agent (Pluto) job. So: clippy the agent LOCALLY before committing.
|
|
|
|
**How to apply:** when a Coding Agent works on GuruConnect Rust, have it self-verify with the local toolchain
|
|
(set PROTOC, run the four gates, iterate to green) and commit CI-green code — don't delegate fmt/clippy to the
|
|
build host. See [[project_guruconnect_v2_direction]].
|
|
|
|
**CI fmt gate — don't omit it from agent briefs (incident 2026-05-31):** the CI `Build Server (Linux)` job runs
|
|
`cargo fmt --check` as a hard gate FIRST (before build/test). SPEC-004 Task 2 + Task 4 (commits ffca7f0, 4e80573)
|
|
went red on Linux CI even though the Coding Agents reported "clippy clean, tests pass" — because the briefs listed
|
|
only `cargo check` + `clippy` + `test` and NOT `cargo fmt --check`, so rustfmt drift slipped through (compactly-
|
|
written new test code). Fixed with a `cargo fmt` follow-up commit (cef1928). **Every Coding-Agent brief that
|
|
touches GuruConnect Rust MUST list `cargo fmt --check` (server: `cd server && cargo fmt --check`) as a required
|
|
gate alongside clippy/test** — a clippy-clean, test-green change can still fail CI on formatting.
|