1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-03-25 15:38:01 +02:00

857 Commits

Author SHA1 Message Date
Martin Geisler
53baee82e3
Re-apply formatting to SUMMARY.md (#1429)
With the latest version of mdbook-i18n-helpers, we now have support for
formatting in the `SUMMARY.md` file. This allows us to revert the
changes made in #130 when we first introduced the translation support.

This also aligns a few headings to match the heading in the outline.
While this isn’t strictly necessary, it removes a bit of work for the
translators.
2023-12-01 13:20:28 -05:00
Lukasz Anforowicz
9d21d5648d
Use std::string_view (not just const char*) as an analogy of &str. (#1518) 2023-12-01 10:17:27 -05:00
Martin Geisler
f837afa034
Explain that mocking.md has AOSP recommendations (#1545)
A follow-up to #1532.
2023-12-01 10:10:27 -05:00
Martin Geisler
d0bab8302c
Add slide to show the Mockall crate in action (#1532)
As more and more Android teams start using Rust, the question of "How to do mocking?" has come up more frequently. Right now, we don't have a good answer to those teams, AOSP doesn't have any mocking framework available. That will change soon with the import of Mockall and this slide is part of the supporting documentation that we can point teams to.
2023-12-01 09:36:06 -05:00
Ning Chen
3f7b6d4ad7
Fix adb push command (#1542)
```
$ adb push "$ANDROID_PRODUCT_OUT/system/bin/hello_rust /data/local/tmp"
adb: push requires <source> and <destination> arguments
```

---------

Co-authored-by: Martin Geisler <mgeisler@google.com>
2023-12-01 10:05:46 +00:00
Lukasz Anforowicz
1ab68d6ac1
Chromium: minor tweaks in reviews-and-audits.md. (#1540) 2023-12-01 09:34:04 +01:00
Lukasz Anforowicz
547de2b161
Chromium: Expand speaker notes for Rust Analyzer demo (#1537) 2023-12-01 09:25:29 +01:00
Lukasz Anforowicz
f3e045ddf4
Chromium: Enumerate automation benefits of cxx + other minor tweaks. (#1524) 2023-12-01 09:24:59 +01:00
Lukasz Anforowicz
c7fb26fe0e
Chromium: Revise cargo.md, focusing on when to prefer cargo over gn. (#1520) 2023-12-01 09:23:58 +01:00
Lukasz Anforowicz
02d0b5d01a
Chromium: fix path of String::from_utf16 (#1541) 2023-12-01 09:21:20 +01:00
Martin Geisler
97e130271d
Fix Markdown in build-rules.md (#1530)
The mixing of HTML and Markdown breaks our translation pipeline: we see
the HTML and fail to parse things correctly.

This might be https://github.com/google/mdbook-i18n-helpers/issues/97,
but I'm not 100% sure.

The fix is to make put the HTML on its own line: then the Markdown is
parsed again inside.

Fixes #1527.
2023-11-30 06:55:03 -08:00
J.Lunz
1ba88ba72e
Fix Fibonacci numbers example (#1529)
The exercise has n <= 2 for the base case, but it is n < 2 in the
solution.
You currently get fib(n) = 10946 for n = 20, but it should be 6765.
2023-11-30 09:46:13 -05:00
Martin Geisler
9905b21c26
Fix ANCHOR_END in exercise.rs (#1531)
This fixes the duplicated content.

Fixes #1525.
Fixes #1526.
2023-11-30 09:34:41 -05:00
Dustin J. Mitchell
a73c830e45
Add course and session markers for deep-dives (#1521)
This doesn't add any timing information. The authors of each deep-dive
can do that separately.

Fixes #1510.
2023-11-30 09:26:21 -05:00
Martin Geisler
8862ab6530
Add slide on GoogleTest (#1528)
We expect Android engineers to start using this crate going forward.
2023-11-30 14:57:00 +01:00
Ning Chen
ca0bfedac6
Update setup.md (#1519)
```
$ lunch aosp_cf_x86_64_phone-userdebug

Invalid lunch combo: aosp_cf_x86_64_phone-userdebug
Valid combos must be of the form <product>-<release>-<variant>
```
2023-11-30 13:36:42 +00:00
Dustin J. Mitchell
6d19292f16
Comprehensive Rust v2 (#1073)
I've taken some work by @fw-immunant and others on the new organization
of the course and condensed it into a form amenable to a text editor and
some computational analysis. You can see the inputs in `course.py` but
the interesting bits are the output: `outline.md` and `slides.md`.

The idea is to break the course into more, smaller segments with
exercises at the ends and breaks in between. So `outline.md` lists the
segments, their duration, and sums those durations up per-day. It shows
we're about an hour too long right now! There are more details of the
segments in `slides.md`, or you can see mostly the same stuff in
`course.py`.

This now contains all of the content from the v1 course, ensuring both
that we've covered everything and that we'll have somewhere to redirect
every page.

Fixes #1082.
Fixes #1465.

---------

Co-authored-by: Nicole LeGare <dlegare.1001@gmail.com>
Co-authored-by: Martin Geisler <mgeisler@google.com>
2023-11-29 16:39:24 +01:00
Adrian Taylor
ea204774b6
Bring Chromium patching instructions up to date. (#1508)
Patching is now automatic.
2023-11-29 15:41:52 +01:00
Adrian Taylor
5cec89045b
Thank creator of uwu crate. (#1505) 2023-11-29 15:38:19 +01:00
S. Nizar
e1300e675b
Update rust-ecosystem.md to fix typo (#1504) 2023-11-29 09:11:30 +00:00
Adrian Taylor
1feda6f267
Add speaker notes for cargo comparison. (#1498)
Co-authored-by: Martin Geisler <martin@geisler.net>
2023-11-28 20:36:24 +00:00
gurchetansingh
d2aab63d15
More speaker notes about Android (#1501)
Helps with https://github.com/google/comprehensive-rust/issues/1083
2023-11-28 19:19:04 +00:00
Martin Geisler
aebb0bc856
Replace hyphens (-) with em-dashes () (#1500)
The new Chromium class likes — like me! — to use dashes in the writing!
However, I believe it should use an em-dash instead of the hyphen.

Luckily this is easy: we have enabled “typographic quotes” in `mdbook`,
which also handles the conversion of `---` to `—` in the generated HTML.
So I normalized the single existing em-dash to a triple-dash to make it
more consistent (and hopefully make it easier for translators to
consistently enter these characters).
2023-11-28 19:41:09 +01:00
Bram Bonné
d39740f91d
Fix link to uwuify crate (#1499) 2023-11-28 13:37:06 +00:00
Adrian Taylor
7f469fb2c7
Add Chromium section (#1479)
This is a contribution of a Chromium section for Comprehensive Rust.

---------

Co-authored-by: Nicole L <dlegare.1001@gmail.com>
Co-authored-by: Martin Geisler <martin@geisler.net>
2023-11-27 18:21:19 +00:00
Martin Geisler
5a22a5f026
Remove unused "Summary" heading (#1485)
The first heading is not actually used, it just takes up space here and
in the PO files.
2023-11-20 16:53:13 +01:00
Martin Geisler
8b863c0446
Update Rust dependencies (#1487)
This fixes a low-criticality vulnerability in `atty` (on Windows):

  https://github.com/advisories/GHSA-g98v-hv3f-hcfr

I only updated the dependencies here which didn’t require code changes.
2023-11-20 09:26:19 -05:00
Enes Aydın
34f0cfb770
Revert minimum wrong example (#1483)
Reverted as a result of discussion in #1475 

@mgeisler
2023-11-19 11:40:57 +01:00
Anurag Sisodiya
5ffcac5bfd
Filled missing glossary terms with their explanations (#1473)
Changes Made
This Pull Request addresses issue #1466 and includes the following
changes:
Added Glossary Terms: Filled in missing glossary terms with their
respective explanations.

Context
The glossary is a crucial reference for understanding key terms in the
project. This PR enhances its completeness and readability by adding
missing terms and improving the overall formatting.

Related Issues

Fixes #1466.
2023-11-15 09:23:51 +00:00
Nicole L
d6bb75ab7b
Revert "Update other-resources.md" (#1477)
Reverts google/comprehensive-rust#1452, as the learning resource added
there is not fully free content.
2023-11-13 09:28:22 -08:00
Martin Geisler
b7832d7856
Update glossary.md (#1455)
Expand a few random entries of the glossary. This is just to remind
people that the glossary exists and that we should work on making it
complete.

Part of #1466.
2023-11-10 14:15:32 +00:00
Dustin J. Mitchell
42d69b7e5d
Update link for sudo bug (#1462)
Thanks to @LuisMorenoSerrano. Fixes #1459.
2023-11-09 10:33:53 -08:00
spoloxs
67d53d29a6
Update Android.bp files (#895)
Remove the `prefer_rlib` flags from all `Android.bp` files.

Solves issue #371
2023-11-08 16:56:29 -08:00
Vencyr Laurence Imbo Amores
039bc4f35c
Update other-resources.md (#1452)
Added Rust Primer and CodeCrafters.
2023-11-08 15:56:12 -08:00
Nicole L
ca61ca4f57
Add CXX tutorial (#1392)
Add a number of slides that cover most of CXX's functionality and
demonstrate how it can be used.

Fixes #823.

---------

Co-authored-by: Martin Geisler <mgeisler@google.com>
2023-11-06 16:34:29 -08:00
Martin Geisler
3c159d8af0
Add instructions for how to use build_all.sh (#1434) 2023-10-31 09:00:02 +01:00
justanotheranonymoususer
17f61463f5
Update converting-error-types.md (#1428) 2023-10-25 11:02:34 -04:00
Martin Geisler
e6e4d50eef
Be more precise about printing in compound-types.md (#1421)
Fixes #1412.
2023-10-24 11:32:34 +02:00
justanotheranonymoususer
77c55ef10e
Update hashmap.md (#1420)
Remove extra space
2023-10-24 08:01:21 +02:00
Chayim Refael Friedman
3ba21370bb
Simpler character counting (#1419)
`str.chars().map(|_| 1).sum()` is just `str.chars().count()`.
2023-10-23 20:36:26 +00:00
Gourav
ecd2bc863e
Updated about nc and telnet in task.md (#1382)
Updated about `nc` and `telnet` with their documentation link provided
as well
Closes issue #1349
2023-10-23 18:10:26 +00:00
Henri F
88edcd02e7
Adds Chinese Traditional to the language drop-down (#1411)
Graduates the Chinese Traditional translation to the language drop-down
selector.
Part of Chinese (Traditional) translation #684.

File stats (Rust Fundamentals):

```
msggrep -v --location=src/{exercises/,}{android,bare-metal,concurrency,async}{.md,"/*","/*/*","/*/*/*"} po/zh-CN.po | msgfmt -o /dev/null --statistics -

1315 translated messages, 146 fuzzy translations, 149 untranslated messages.
```
2023-10-23 09:20:15 -07:00
Martin Geisler
cf798ae50e
Fix malformed SUMMARY.md entries (#1410)
These extra `)` were ignored by the `mdbook` parser, but they began
showing up in my testing of
https://github.com/google/mdbook-i18n-helpers/pull/100.
2023-10-23 09:26:15 -04:00
Qinglin
b155ffd40c
Adds nodmp as a zh-CN translator (#1409) 2023-10-22 15:04:01 -07:00
justanotheranonymoususer
0c128d9357
Update std.md (#1405)
Fix typo
2023-10-22 16:29:35 +02:00
justanotheranonymoususer
1dfb82c085
Update structs.md (#1403)
Fix markdown
2023-10-22 16:24:04 +02:00
justanotheranonymoususer
c3abb35837
Update tuple-structs.md (#1404)
Fix markdown
2023-10-22 16:13:39 +02:00
justanotheranonymoususer
0022898ada
Update pattern-matching.md (#1374)
Typo
2023-10-18 08:40:13 +02:00
justanotheranonymoususer
b8b274165c
Update luhn.rs (#1376)
Fix semicolon

I'm only learning Rust but I think it makes more sense
2023-10-18 03:53:14 +00:00
M1DOR1
c01b5ca6ed
Simplify solution to Luhn exercise (#1296)
Maybe we can use bool double and make the code easier to read and
comprehend
2023-10-17 13:35:34 +00:00