diff --git a/src/SUMMARY.md b/src/SUMMARY.md index 86b4588f..42272f76 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -36,7 +36,7 @@ - [Blocks and Scopes](control-flow-basics/blocks-and-scopes.md) - [Functions](control-flow-basics/functions.md) - [Macros](control-flow-basics/macros.md) - - [Exercise: Collatz conjecture](control-flow-basics/exercise.md) + - [Exercise: Collatz Sequence](control-flow-basics/exercise.md) - [Solution](control-flow-basics/solution.md) # Day 1: Afternoon @@ -82,7 +82,7 @@ - [Solution](methods-and-traits/solution.md) - [Generics](generics.md) - [Generic Functions](generics/generic-functions.md) - - [Generic Data types](generics/generic-data.md) + - [Generic Data Types](generics/generic-data.md) - [Trait Bounds](generics/trait-bounds.md) - [`impl Trait`](generics/impl-trait.md) - [Exercise: Generic `min`](generics/exercise.md) @@ -121,7 +121,7 @@ - [Review of Program Memory](memory-management/review.md) - [Approaches to Memory Management](memory-management/approaches.md) - [Ownership](memory-management/ownership.md) - - [Move semantics](memory-management/move.md) + - [Move Semantics](memory-management/move.md) - [`Clone`](memory-management/clone.md) - [Copy Types](memory-management/copy-types.md) - [`Drop`](memory-management/drop.md) @@ -175,7 +175,7 @@ - [Useful Crates](testing/useful-crates.md) - [GoogleTest](testing/googletest.md) - [Mocking](testing/mocking.md) - - [Compiler lints and Clippy](testing/lints.md) + - [Compiler Lints and Clippy](testing/lints.md) - [Exercise: Luhn Algorithm](testing/exercise.md) - [Solution](testing/solution.md) @@ -184,7 +184,7 @@ - [Welcome](welcome-day-4-afternoon.md) - [Error Handling](error-handling.md) - [Panics](error-handling/panics.md) - - [Try operator](error-handling/try.md) + - [Try Operator](error-handling/try.md) - [Try Conversions](error-handling/try-conversions.md) - [`Error` Trait](error-handling/error.md) - [`thiserror` and `anyhow`](error-handling/thiserror-and-anyhow.md) @@ -245,39 +245,39 @@ - [Welcome](chromium.md) - [Setup](chromium/setup.md) -- [Comparing Chromium and Cargo ecosystems](chromium/cargo.md) +- [Comparing Chromium and Cargo Ecosystems](chromium/cargo.md) - [Policy](chromium/policy.md) - [Build Rules](chromium/build-rules.md) - - [Unsafe code](chromium/build-rules/unsafe.md) - - [Depending on Rust code from Chromium C++](chromium/build-rules/depending.md) - - [Visual Studio code](chromium/build-rules/vscode.md) + - [Unsafe Code](chromium/build-rules/unsafe.md) + - [Depending on Rust Code from Chromium C++](chromium/build-rules/depending.md) + - [Visual Studio Code](chromium/build-rules/vscode.md) - [Exercise](exercises/chromium/build-rules.md) - [Testing](chromium/testing.md) - - [`rust_gtest_interop` library](chromium/testing/rust-gtest-interop.md) - - [GN rules for Rust tests](chromium/testing/build-gn.md) + - [`rust_gtest_interop` Library](chromium/testing/rust-gtest-interop.md) + - [GN Rules for Rust Tests](chromium/testing/build-gn.md) - [Exercise](exercises/chromium/testing.md) - [Interoperability with C++](chromium/interoperability-with-cpp.md) - - [Example bindings](chromium/interoperability-with-cpp/example-bindings.md) + - [Example Bindings](chromium/interoperability-with-cpp/example-bindings.md) - [Limitations of CXX](chromium/interoperability-with-cpp/limitations-of-cxx.md) - - [CXX error handling](chromium/interoperability-with-cpp/error-handling.md) - - [Error handling: QR example](chromium/interoperability-with-cpp/error-handling-qr.md) - - [Error handling: PNG example](chromium/interoperability-with-cpp/error-handling-png.md) + - [CXX Error Handling](chromium/interoperability-with-cpp/error-handling.md) + - [Error Handling: QR Example](chromium/interoperability-with-cpp/error-handling-qr.md) + - [Error Handling: PNG Example](chromium/interoperability-with-cpp/error-handling-png.md) - [Using CXX in Chromium](chromium/interoperability-with-cpp/using-cxx-in-chromium.md) - [Exercise](exercises/chromium/interoperability-with-cpp.md) -- [Adding third party crates](chromium/adding-third-party-crates.md) +- [Adding Third Party Crates](chromium/adding-third-party-crates.md) - [Configuring Cargo.toml](chromium/adding-third-party-crates/configuring-cargo-toml.md) - - [Configuring gnrt_config.toml](chromium/adding-third-party-crates/configuring-gnrt-config-toml.md) - - [Downloading crates](chromium/adding-third-party-crates/downloading-crates.md) - - [Generating gn build rules](chromium/adding-third-party-crates/generating-gn-build-rules.md) - - [Resolving problems](chromium/adding-third-party-crates/resolving-problems.md) - - [Build scripts which generate code](chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md) - - [Build scripts which build C++ or take arbitrary actions](chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md) - - [Depending on a crate](chromium/adding-third-party-crates/depending-on-a-crate.md) - - [Reviews and audits](chromium/adding-third-party-crates/reviews-and-audits.md) - - [Checking into Chromium source code](chromium/adding-third-party-crates/checking-in.md) - - [Keeping crates up to date](chromium/adding-third-party-crates/keeping-up-to-date.md) + - [Configuring `gnrt_config.toml`](chromium/adding-third-party-crates/configuring-gnrt-config-toml.md) + - [Downloading Crates](chromium/adding-third-party-crates/downloading-crates.md) + - [Generating `gn` Build Rules](chromium/adding-third-party-crates/generating-gn-build-rules.md) + - [Resolving Problems](chromium/adding-third-party-crates/resolving-problems.md) + - [Build Scripts Which Generate Code](chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md) + - [Build Scripts Which Build C++ or Take Arbitrary Actions](chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md) + - [Depending on a Crate](chromium/adding-third-party-crates/depending-on-a-crate.md) + - [Reviews and Audits](chromium/adding-third-party-crates/reviews-and-audits.md) + - [Checking into Chromium Source Code](chromium/adding-third-party-crates/checking-in.md) + - [Keeping Crates Up to Date](chromium/adding-third-party-crates/keeping-up-to-date.md) - [Exercise](exercises/chromium/third-party.md) -- [Bringing it together - Exercise](exercises/chromium/bringing-it-together.md) +- [Bringing It Together - Exercise](exercises/chromium/bringing-it-together.md) - [Exercise Solutions](exercises/chromium/solutions.md) diff --git a/src/chromium/adding-third-party-crates.md b/src/chromium/adding-third-party-crates.md index b4668108..f2f57eea 100644 --- a/src/chromium/adding-third-party-crates.md +++ b/src/chromium/adding-third-party-crates.md @@ -1,4 +1,4 @@ -# Adding third party crates +# Adding Third Party Crates Rust libraries are called "crates" and are found at [crates.io][0]. It's *very easy* for Rust crates to depend upon one another. So they do! diff --git a/src/chromium/adding-third-party-crates/checking-in.md b/src/chromium/adding-third-party-crates/checking-in.md index e9fd9f21..a7515faa 100644 --- a/src/chromium/adding-third-party-crates/checking-in.md +++ b/src/chromium/adding-third-party-crates/checking-in.md @@ -1,4 +1,4 @@ -# Checking crates into Chromium source code +# Checking Crates into Chromium Source Code `git status` should reveal: * Crate code in `//third_party/rust/chromium_crates_io` diff --git a/src/chromium/adding-third-party-crates/depending-on-a-crate.md b/src/chromium/adding-third-party-crates/depending-on-a-crate.md index a8e3439b..03c81bbe 100644 --- a/src/chromium/adding-third-party-crates/depending-on-a-crate.md +++ b/src/chromium/adding-third-party-crates/depending-on-a-crate.md @@ -1,4 +1,4 @@ -# Depending on a crate +# Depending on a Crate Once you've added a third-party crate and generated build rules, depending on a crate is simple. Find your `rust_static_library` target, diff --git a/src/chromium/adding-third-party-crates/downloading-crates.md b/src/chromium/adding-third-party-crates/downloading-crates.md index 634be87a..64ad69a4 100644 --- a/src/chromium/adding-third-party-crates/downloading-crates.md +++ b/src/chromium/adding-third-party-crates/downloading-crates.md @@ -1,4 +1,4 @@ -# Downloading crates +# Downloading Crates A tool called `gnrt` knows how to download crates and how to generate `BUILD.gn` rules. diff --git a/src/chromium/adding-third-party-crates/generating-gn-build-rules.md b/src/chromium/adding-third-party-crates/generating-gn-build-rules.md index a8c26f05..f81092f5 100644 --- a/src/chromium/adding-third-party-crates/generating-gn-build-rules.md +++ b/src/chromium/adding-third-party-crates/generating-gn-build-rules.md @@ -1,4 +1,4 @@ -# Generating `gn` build rules +# Generating `gn` Build Rules Once you've downloaded the crate, generate the `BUILD.gn` files like this: diff --git a/src/chromium/adding-third-party-crates/keeping-up-to-date.md b/src/chromium/adding-third-party-crates/keeping-up-to-date.md index 92b2c186..9d6cce2f 100644 --- a/src/chromium/adding-third-party-crates/keeping-up-to-date.md +++ b/src/chromium/adding-third-party-crates/keeping-up-to-date.md @@ -1,4 +1,4 @@ -# Keeping crates up to date +# Keeping Crates Up to Date As the OWNER of any third party Chromium dependency, you are [expected to keep it up to date with any security fixes][0]. It is hoped diff --git a/src/chromium/adding-third-party-crates/resolving-problems.md b/src/chromium/adding-third-party-crates/resolving-problems.md index 88e23fe2..5d81ce60 100644 --- a/src/chromium/adding-third-party-crates/resolving-problems.md +++ b/src/chromium/adding-third-party-crates/resolving-problems.md @@ -1,4 +1,4 @@ -# Resolving problems +# Resolving Problems If your build fails, it may be because of a `build.rs`: programs which do arbitrary things at build time. This is fundamentally at odds with the design of `gn` diff --git a/src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md b/src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md index b59b46da..b2d95ed9 100644 --- a/src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md +++ b/src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md @@ -1,4 +1,4 @@ -# Build scripts which generate code +# Build Scripts Which Generate Code If `ninja` complains about missing files, check the `build.rs` to see if it writes source code files. diff --git a/src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md b/src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md index 56944154..ed9adcc9 100644 --- a/src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md +++ b/src/chromium/adding-third-party-crates/resolving-problems/build-scripts-which-take-arbitrary-actions.md @@ -1,4 +1,4 @@ -# Build scripts which build C++ or take arbitrary actions +# Build Scripts Which Build C++ or Take Arbitrary Actions Some crates use the [`cc`][1] crate to build and link C/C++ libraries. Other crates parse C/C++ using [`bindgen`][2] within their build scripts. diff --git a/src/chromium/adding-third-party-crates/reviews-and-audits.md b/src/chromium/adding-third-party-crates/reviews-and-audits.md index d7e89f1a..26b9252c 100644 --- a/src/chromium/adding-third-party-crates/reviews-and-audits.md +++ b/src/chromium/adding-third-party-crates/reviews-and-audits.md @@ -1,4 +1,4 @@ -# Auditing third party crates +# Auditing Third Party Crates Adding new libraries is subject to Chromium's standard [policies][0], but of course also subject to security review. As you may be bringing in not just a single diff --git a/src/chromium/build-rules/depending.md b/src/chromium/build-rules/depending.md index d530576e..e2dba5fa 100644 --- a/src/chromium/build-rules/depending.md +++ b/src/chromium/build-rules/depending.md @@ -1,4 +1,4 @@ -# Depending on Rust code from Chromium C++ +# Depending on Rust Code from Chromium C++ Simply add the above target to the `deps` of some Chromium C++ target. diff --git a/src/chromium/build-rules/unsafe.md b/src/chromium/build-rules/unsafe.md index 6e62afc6..85cf28a7 100644 --- a/src/chromium/build-rules/unsafe.md +++ b/src/chromium/build-rules/unsafe.md @@ -1,4 +1,4 @@ -# Including `unsafe` Rust code +# Including `unsafe` Rust Code Unsafe Rust code is forbidden in `rust_static_library` by default --- it won't compile. If you need unsafe Rust code, add `allow_unsafe = true` to the diff --git a/src/chromium/build-rules/vscode.md b/src/chromium/build-rules/vscode.md index 9f819e2d..b5d68d7a 100644 --- a/src/chromium/build-rules/vscode.md +++ b/src/chromium/build-rules/vscode.md @@ -1,4 +1,4 @@ -# Visual Studio code +# Visual Studio Code Types are elided in Rust code, which makes a good IDE even more useful than for C++. Visual Studio code works well for Rust in Chromium. To use it, diff --git a/src/chromium/cargo.md b/src/chromium/cargo.md index 6883b650..84607274 100644 --- a/src/chromium/cargo.md +++ b/src/chromium/cargo.md @@ -1,4 +1,4 @@ -# Comparing Chromium and Cargo ecosystems +# Comparing Chromium and Cargo Ecosystems Rust community typically uses `cargo` and libraries from [crates.io][2]. Chromium is built using `gn` and `ninja` and a curated set of dependencies. diff --git a/src/chromium/interoperability-with-cpp/error-handling-png.md b/src/chromium/interoperability-with-cpp/error-handling-png.md index 16d524c8..c8f350cd 100644 --- a/src/chromium/interoperability-with-cpp/error-handling-png.md +++ b/src/chromium/interoperability-with-cpp/error-handling-png.md @@ -1,4 +1,4 @@ -# CXX error handling: PNG example +# CXX Error Handling: PNG Example A prototype of a PNG decoder illustrates what can be done when the successful result cannot be passed across the FFI boundary: diff --git a/src/chromium/interoperability-with-cpp/error-handling-qr.md b/src/chromium/interoperability-with-cpp/error-handling-qr.md index 30505d06..d7418507 100644 --- a/src/chromium/interoperability-with-cpp/error-handling-qr.md +++ b/src/chromium/interoperability-with-cpp/error-handling-qr.md @@ -1,4 +1,4 @@ -# CXX error handling: QR example +# CXX Error Handling: QR Example The QR code generator is [an example][0] where a boolean is used to communicate success vs failure, and where the successful result can be passed across the FFI diff --git a/src/chromium/interoperability-with-cpp/error-handling.md b/src/chromium/interoperability-with-cpp/error-handling.md index 0db811ab..3f7fe229 100644 --- a/src/chromium/interoperability-with-cpp/error-handling.md +++ b/src/chromium/interoperability-with-cpp/error-handling.md @@ -1,4 +1,4 @@ -# CXX error handling +# CXX Error Handling CXX's [support for `Result`][0] relies on C++ exceptions, so we can't use that in Chromium. Alternatives: diff --git a/src/chromium/interoperability-with-cpp/example-bindings.md b/src/chromium/interoperability-with-cpp/example-bindings.md index c07fd19d..cf0a01ec 100644 --- a/src/chromium/interoperability-with-cpp/example-bindings.md +++ b/src/chromium/interoperability-with-cpp/example-bindings.md @@ -1,4 +1,4 @@ -# Example bindings +# Example Bindings CXX requires that the whole C++/Rust boundary is declared in `cxx::bridge` modules inside `.rs` source code. diff --git a/src/chromium/testing/build-gn.md b/src/chromium/testing/build-gn.md index 8aca2308..65c91cfd 100644 --- a/src/chromium/testing/build-gn.md +++ b/src/chromium/testing/build-gn.md @@ -1,4 +1,4 @@ -# GN rules for Rust tests +# GN Rules for Rust Tests The simplest way to build Rust `gtest` tests is to add them to an existing test binary that already contains tests authored in C++. For example: diff --git a/src/chromium/testing/rust-gtest-interop.md b/src/chromium/testing/rust-gtest-interop.md index 80075a18..e2a942d6 100644 --- a/src/chromium/testing/rust-gtest-interop.md +++ b/src/chromium/testing/rust-gtest-interop.md @@ -1,4 +1,4 @@ -# `rust_gtest_interop` library +# `rust_gtest_interop` Library The [`rust_gtest_interop`][0] library provides a way to: diff --git a/src/exercises/chromium/bringing-it-together.md b/src/exercises/chromium/bringing-it-together.md index 04253e36..77b61be0 100644 --- a/src/exercises/chromium/bringing-it-together.md +++ b/src/exercises/chromium/bringing-it-together.md @@ -1,9 +1,9 @@ -# Bringing it together --- Exercise +# Bringing It Together --- Exercise In this exercise, you're going to add a whole new Chromium feature, bringing together everything you already learned. -## The brief from Product Management +## The Brief from Product Management A community of pixies has been discovered living in a remote rainforest. It's important that we get Chromium for Pixies delivered to them as soon