Empezar Enviar un sitio
Google Style Guides

Google Style Guides

google.github.ioDR 94 Accessible 300 views

Desarrollo y programación A collection of style guides for Google-originated open-source projects, including a detailed Rust Style Guide covering code organization, formatting, ownership, APIs, and error handling.

Editor's Review

For reference only
Google Style Guides page preview

This is Google's official Rust style guide, offering opinionated rules on crate structure, imports, ownership, API design, and error reporting. It stands out for its practical, rationale-driven guidance aimed at large-scale codebases rather than beginner tutorials. Best for experienced Rust develope

Site introduction

Google Style Guides is a documentation site hosting coding conventions for open-source projects originating at Google. Among its guides, the Rust Style Guide defines how Rust code should be organized, formatted, and designed to remain consistent and maintainable across large codebases.

The guide covers code organization such as preferring small crates and flat file layouts, formatting and aesthetics, ownership and borrowing with advice to avoid Rc and Arc where possible, and API design covering flexible references, iterators versus owned collections, and preferring enums over booleans. It also addresses error reporting and trait implementation practices.

It is intended for Rust developers, especially those working in teams or on production systems, who want authoritative conventions beyond the compiler’s defaults. Readers should already be comfortable with Rust syntax and concepts like ownership and traits.

Use it as a reference when setting up linting and formatting rules, reviewing code, or designing public APIs. Note that some rules are marked as Chrome-specific, so not every guideline applies universally. Overall, it is a concise, practical standard for writing idiomatic, scalable Rust.

Comments & Ratings

0

No comments yet. Be the first to review.

Write the first comment

Your email won't be made public; fields marked with * are required.

Rate this site

Click the stars to rate; rating is optional, and clicking the selected star again cancels it.