comprehensive-rust

(★ 33,320)

This is the Rust course used by the Android team at Google. It provides you the material to quickly teach Rust.

File Explorer

  • .bazelrc
  • .bazelversion
  • .gitattributes
  • .gitignore
  • book.toml
  • BUILD.bazel
  • Cargo.lock
  • Cargo.toml
  • CONTRIBUTING.md
  • dprint.json
  • GEMINI.md
  • LICENSE
  • LICENSE-CC-BY
  • MODULE.bazel
  • MODULE.bazel.lock
  • README.md
  • REPO.bazel
  • rustfmt.toml
  • STYLE.md
  • TRANSLATIONS.md

# Installation Guide

rust
Prerequisites

Setup Steps

git clone https://github.com/google/comprehensive-rust/

Clone the repository.

cd comprehensive-rust

Navigate to the project directory.

cargo xtask install-tools

Install tools required by the project.

Video Guides

Rust Training at Scale | Rust Global @ RustConf 2024

Key Commands

cargo xtask install-tools

Install all the tools the project depends on.

cargo xtask serve

Start a web server with the course.

cargo xtask rust-tests

Test the included Rust snippets.

cargo xtask build

Create a static version of the course in the book/ directory.

On Windows, you need to enable symlinks and Developer Mode.

# Use via CDN

jsDelivr

jsDelivr serves any public GitHub repository as a CDN with zero setup. Pick a version and a file to get a ready-to-paste link and snippet.

Command Glossary

Commands referenced in this DOCs, explained below.

🔍

cargo

View Details ▼

Manage Rust projects and their module dependencies (crates).
Some subcommands such as `build` have their own usage documentation.

cargo search {{search_string}}

Search for crates:

cargo install {{crate_name}}

Install a binary crate:

cargo install --list

List installed binary crates:

🔍

git clone

View Details ▼

Clone an existing repository.

git clone {{remote_repository_location}} {{path/to/directory}}

Clone an existing repository into a new directory (the default directory is the repository name):

git clone --recursive {{remote_repository_location}}

Clone an existing repository and its submodules:

git clone {{[-n|--no-checkout]}} {{remote_repository_location}}

Clone only the `.git` directory of an existing repository:

🔍

git config

View Details ▼

Manage custom configuration options for Git repositories.
These configurations can be local (for the current repository) or global (for the current user).

git config --global {{user.name|user.email}} "{{Your Name|[email protected]}}"

Globally set your name or email (this information is required to commit to a repository and will be included in all commits):

git config --{{local|global|system}} {{[-l|--list]}} --show-origin

List local, global, or system configuration entries and show their file location:

git config --global {{alias.unstage}} "reset HEAD --"

Set the global value of a given configuration entry (in this case an alias):

# Project Badges

// repository documentation