1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-12-01 09:16:39 +02:00
Commit Graph

15 Commits

Author SHA1 Message Date
Dmitri Gribenko
4671b3455b docs(style): Reorganize code block and formatting sections (#2928)
- Consolidates all guidance related to code block mechanics under a new
top-level heading, "Code Blocks Mechanics".
- Moves the "Rust Code Formatting" guidance to be a subsection under
this new heading.
- The rest of the former "Rust Code" section is now directly under
"Course Slides".

This restructuring improves the logical flow of the style guide by
grouping all code-related formatting and tooling conventions into a
single, easy-to-find section.
2025-09-24 10:25:01 +02:00
Dmitri Gribenko
a6e18b6866 docs(style): Add Live, Interactive Instruction principle (#2927)
Adds a new pedagogical principle to STYLE.md to formalize the course's
core philosophy of live, interactive instruction.

This principle clarifies the expectation that instructors will interact
with code snippets live, use compiler errors as a teaching tool, and
engage with audience questions dynamically.
2025-09-24 10:08:40 +02:00
Dmitri Gribenko
3cbcd7e0b5 docs(style): Add mdbook and mdbook-course conventions (#2926)
Adds a new section to STYLE.md to document mandatory conventions for
using `mdbook` and the custom `mdbook-course` preprocessor.

This section mandates the use of YAML frontmatter, outline helpers, and
file includes for exercises, and links to the `mdbook-course` README for
more detailed technical explanations.
2025-09-24 10:08:28 +02:00
Dmitri Gribenko
a77ea82cde feat(docs): Centralize code block style guide (#2922)
- Moves the canonical documentation for code block annotations and
language identifiers into STYLE.md.
- Removes the redundant, partial documentation from GEMINI.md.
- Updates GEMINI.md to instruct the AI assistant to always refer to
STYLE.md for guidance.

This change makes STYLE.md the single source of truth for all markdown
and code style conventions, ensuring consistency for both human and AI
contributors.
2025-09-23 20:17:00 +02:00
Dmitri Gribenko
36c07e30b6 docs: Clarify speaker note style for instructors (#2917)
The previous STYLE.md advised against using speaker notes as a 'script'
but didn't provide clear examples of what that meant. This could be
interpreted by LLMs as disallowing any kind of instructor prompt.

This change clarifies the guideline by:

1. Distinguishing between long-form, verbatim 'scripts' (bad) and short,
actionable 'teaching prompts' (good).

2. Providing concrete 'good' and 'bad' examples to make the distinction
unambiguous for future contributors.
2025-09-22 11:44:49 +02:00
Dmitri Gribenko
4d755f67cc docs(style): Add guideline for code block annotations (#2920) 2025-09-22 11:25:16 +02:00
Dmitri Gribenko
9e9786bafd docs(style): Overhaul STYLE.md with course philosophy and principles (#2919)
Make STYLE.md a comprehensive guide for contributors by incorporating
the core,
public-facing principles from the internal design document. This ensures
that a
ll contributions align with the course's pedagogical goals and
structure.

The key additions and changes include:

- **Add "Course Philosophy and Design" Section:**
  - Define the target audience (experienced SWEs new to Rust).
  - State the course goals (solid foundation in a bounded time).
  - Codify the core pedagogical principles:
    - Build on a Foundation
    - Provide a Working Mental Model (The "No Magic" Rule)
    - Use a Spiral Approach

- **Define Course Structure and Pacing:**
- Add a "Pacing and Structure" section explaining the 5-hour daily
schedule and the `minutes` frontmatter convention.
- Add a "Course Structure" section detailing the distinction between the
time-bounded "Fundamentals" course and optional "deep dives".
- Clarify the high bar for adding new content to the Fundamentals
course.

- **Add Guidelines for Course Content:**
- Add an "Exercises" section with principles for creating focused,
time-bounded exercises.
- Add an "Interactive Code Snippets" section explaining the importance
of live, editable code blocks.
- Add a "Pedagogical Flow" section advising a concrete-to-abstract
progression.

- **Refine Existing Sections:**
- Update "Speaker Notes" to clarify their role in guiding the
instructor's live-coding sessions.
- Remove redundant text from "Language and Tone" that is now covered in
the new philosophy section.
2025-09-22 10:34:22 +02:00
Martin Geisler
ad9440d20c Add a GEMINI.md file with instructions for the CLI (#2895)
I’ve been playing with the `gemini` CLI tool
recently (https://google-gemini.github.io/gemini-cli/) and learned that
it will read instructions from it’s own kind of README.

So I asked it to generate one and use it as a basis for this file. I
took the liberty to expand the style guide a little at the same time to
incorporate that instructions I gave Gemini while generating the [many
language fixing PRs][1].

[1]:
https://github.com/google/comprehensive-rust/pulls?q=author%3Amgeisler+%22improve+language%22

---------

Co-authored-by: Dmitri Gribenko <gribozavr@gmail.com>
2025-09-06 18:57:53 +00:00
Manichand Kondapaka
0761f936ca Add a dev theme to help with slide aspect ratio (#1842)
Added a dev theme to help with slide aspect ratio while updating content
or for reviewing PRs.

Fixes #1796.

---------

Co-authored-by: Dustin J. Mitchell <djmitche@google.com>
Co-authored-by: Martin Geisler <martin@geisler.net>
2024-03-05 10:33:42 +00:00
Henri F
54ea54cd4e Add guidance that variable names shouldn't be translated to STYLE.md (#1480) 2023-11-15 10:25:46 -08:00
Martin Geisler
f94daaea73 Add “More to Explore” sections (#1369)
From a discussion in #1313.
2023-10-16 15:42:07 +02:00
Martin Geisler
6827f62151 Remove hints about preserving reference links (#1138)
With mdbook-i18n-helpers 0.2, reference links are automatically turned
into inline links in the PO files. This means that translators no longer
have to deal with link references in one message and link definitions in
another.
2023-08-30 09:21:43 +02:00
Martin Geisler
10f03e370d Fix dprint comments in STYLE.md (#1092)
From #1091, thanks!
2023-08-21 12:26:13 -04:00
Martin Geisler
aaca44f62b Format files with dprint (#711)
The dprint formatter is a flexible system which will use sandboxed
WebAssembly formatters to format our code (mostly: it calls out to
`rustfmt` for Rust code).

A particularly interesting feature is that dprint can format Rust code
blocks in the Markdown files. However, before we turn that on, we need
to have a way to normalize the Markdown text as it is extracted[1].
That is so that the word put into the translations is kept after the
reformatting.

[1]: https://github.com/google/mdbook-i18n-helpers/issues/19
2023-05-30 17:04:19 +02:00
Martin Geisler
84650b2af1 Add a style guide (#591)
This is an attempt at documenting some things to do and don’t do when
updating the course text or a translation.

Fixes #560.
2023-05-04 12:20:22 +02:00