diff --git a/website/src/content/docs/index.mdx b/website/src/content/docs/index.mdx index 42f3da3..e11a1b3 100644 --- a/website/src/content/docs/index.mdx +++ b/website/src/content/docs/index.mdx @@ -6,15 +6,16 @@ head: - tag: title content: "Google Rust Style Guide Kit: rustfmt, Clippy and AGENTS.md Configs" hero: - tagline: Drop-in rustfmt, clippy and cargo-deny configuration, AGENTS.md for coding agents, and a human review guide for Google's Rust style guide. Adopt it in five minutes. + tagline: Drop-in rustfmt, clippy and cargo-deny configuration, AGENTS.md for coding agents, and a human review guide for Google's Rust style guide. Hand one prompt to your coding agent, or set it up yourself in five minutes. image: file: ../../assets/logo.svg actions: + - text: Set up with your agent + link: /Google-Rust-Style-Guide/#try-it-now + icon: rocket - text: Quick start link: /Google-Rust-Style-Guide/quick-start/ icon: right-arrow - - text: What gets enforced - link: /Google-Rust-Style-Guide/coverage/ variant: minimal - text: GitHub link: https://github.com/DaniAkash/Google-Rust-Style-Guide @@ -22,10 +23,42 @@ hero: variant: minimal --- -import { Aside, Card, CardGrid, LinkCard } from '@astrojs/starlight/components'; +import { Aside, Badge, Card, CardGrid, LinkCard, Steps, TabItem, Tabs } from '@astrojs/starlight/components'; ## Try it now + + + +
+ + + +**One prompt, zero config work.** Your coding agent downloads the configs, turns on the lints, runs fmt, clippy and cargo-deny, and fixes your code until everything is green. + + + +1. **Copy the prompt** + + ```text title="Prompt" wrap + Apply the Google Rust Style Guide kit to this repository. + Follow the instructions at + https://daniakash.github.io/Google-Rust-Style-Guide/_llms-txt/for-coding-agents.txt + Then run cargo +nightly fmt, cargo clippy --workspace --all-targets -- -D warnings, + and cargo deny check bans, and fix what they report without editing the lint configuration. + ``` + +2. **Paste it into your agent** from your project root. Works with Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot and any agent that can run commands. + +3. **Review the diff.** Expect new config files, lint tables in `Cargo.toml`, and fixes in your code. The lint configuration itself should match the [downloaded files](/Google-Rust-Style-Guide/config/cargo-lints/) exactly. + + + +
+ +
+ + Run this in a single-crate Cargo project. It adds five files, turns on the lints, and shows you what the guide flags. Existing files are never overwritten. ```sh title="Terminal" @@ -39,6 +72,9 @@ cargo clippy --all-targets Using a workspace, or want each step explained? The [quick start](/Google-Rust-Style-Guide/quick-start/) walks through it in four steps with the expected output. + +
+ ## Every rule has exactly one home [Google's Rust style guide](https://google.github.io/styleguide/rustguide.html) mixes mechanical rules with design judgment. The kit gives each rule to the cheapest layer that can hold it. diff --git a/website/src/styles/theme.css b/website/src/styles/theme.css index 2786d5c..e507b31 100644 --- a/website/src/styles/theme.css +++ b/website/src/styles/theme.css @@ -15,3 +15,20 @@ starlight-file-tree .comment { color: var(--sl-color-gray-2); } + +/* Homepage: a quiet card frames the recommended agent path; the badge carries the accent. */ +.agent-panel { + border: 1px solid var(--sl-color-gray-5); + border-radius: 0.75rem; + padding: 1.25rem 1.5rem; +} + +.agent-panel > :first-child { + margin-top: 0; +} + +@media (max-width: 50rem) { + .agent-panel { + padding: 1rem; + } +}