Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 40 additions & 4 deletions website/src/content/docs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,59 @@ 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
icon: external
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

<Tabs syncKey="setup-path">
<TabItem label="Let your agent do it" icon="rocket">

<div class="agent-panel">

<Badge text="Recommended" size="medium" />

**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.

<Steps>

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.

</Steps>

</div>

</TabItem>
<TabItem label="Do it yourself" icon="seti:rust">

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"
Expand All @@ -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.

</TabItem>
</Tabs>

## 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.
Expand Down
17 changes: 17 additions & 0 deletions website/src/styles/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Loading