1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2024-12-15 06:20:32 +02:00
Commit Graph

1430 Commits

Author SHA1 Message Date
Dustin J. Mitchell
fbd79e36e7
Remove incorrect comment about moving arrays (#1547)
Fixes #1546.
2023-12-01 13:37:37 -05:00
Lukasz Anforowicz
584c957d69
Fix spelling of CXX and Cargo (mostly in the Chromium part). (#1549) 2023-12-01 10:21:47 -08:00
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
Andriy Redko
dc92a2b9ba
uk: Cleaning up Ukrainian cloud-translate translations (day 1) (#1494)
uk: Cleaning up Ukrainian cloud-translate translations (day 1)

Signed-off-by: Andriy Redko <drreta@gmail.com>
2023-11-30 14:27:42 +00: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
bb58ec91d2
Remove NOTES.txt (#1517)
I forgot to remove this in #1073 before merging.
2023-11-29 17:21:12 +01:00
Martin Geisler
3997a7d874
Handle a missing "Fundamentals" course (#1509)
We need to work with translations which haven't yet been updated to use
frontmatter.
2023-11-29 11:11:22 -05: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
Martin Geisler
4744079253
Run translation tests to completion (#1506)
This makes it easier to find and fix all problems in one iteration when
something changes with the translation tooling.
2023-11-29 10:45:42 +01:00
S. Nizar
e1300e675b
Update rust-ecosystem.md to fix typo (#1504) 2023-11-29 09:11:30 +00:00
dependabot[bot]
0324fc44c8
build(deps): bump openssl from 0.10.59 to 0.10.60 (#1503)
Bumps [openssl](https://github.com/sfackler/rust-openssl) from 0.10.59
to 0.10.60.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/sfackler/rust-openssl/releases">openssl's
releases</a>.</em></p>
<blockquote>
<h2>openssl-v0.10.60</h2>
<h2>What's Changed</h2>
<ul>
<li>Correct off-by-one in minimum output buffer size computation by <a
href="https://github.com/alex"><code>@​alex</code></a> in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2088">sfackler/rust-openssl#2088</a></li>
<li>Expose a few more (bad) ciphers in cipher::Cipher by <a
href="https://github.com/alex"><code>@​alex</code></a> in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2084">sfackler/rust-openssl#2084</a></li>
<li>add temp key bindings by <a
href="https://github.com/jmayclin"><code>@​jmayclin</code></a> in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2076">sfackler/rust-openssl#2076</a></li>
<li>Expose ChaCha20 on LibreSSL by <a
href="https://github.com/alex"><code>@​alex</code></a> in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2093">sfackler/rust-openssl#2093</a></li>
<li>Revert &quot;Correct off-by-one in minimum output buffer size
computation&quot; by <a
href="https://github.com/alex"><code>@​alex</code></a> in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2090">sfackler/rust-openssl#2090</a></li>
<li>Added <code>update_unchecked</code> to <code>symm::Crypter</code> by
<a href="https://github.com/alex"><code>@​alex</code></a> in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2100">sfackler/rust-openssl#2100</a></li>
<li>fixes <a
href="https://redirect.github.com/sfackler/rust-openssl/issues/2096">#2096</a>
-- deprecate <code>X509StoreRef::objects</code>, it is unsound by <a
href="https://github.com/alex"><code>@​alex</code></a> in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2099">sfackler/rust-openssl#2099</a></li>
<li>Don't leak when overwriting ex data by <a
href="https://github.com/sfackler"><code>@​sfackler</code></a> in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2102">sfackler/rust-openssl#2102</a></li>
<li>Release openssl v0.10.60 and openssl-sys v0.9.96 by <a
href="https://github.com/alex"><code>@​alex</code></a> in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2104">sfackler/rust-openssl#2104</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.59...openssl-v0.10.60">https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.59...openssl-v0.10.60</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="8f4b97ae06"><code>8f4b97a</code></a>
Merge pull request <a
href="https://redirect.github.com/sfackler/rust-openssl/issues/2104">#2104</a>
from alex/bump-for-release</li>
<li><a
href="df66283bbc"><code>df66283</code></a>
Release openssl v0.10.60 and openssl-sys v0.9.96</li>
<li><a
href="1a09dc8c94"><code>1a09dc8</code></a>
Merge pull request <a
href="https://redirect.github.com/sfackler/rust-openssl/issues/2102">#2102</a>
from sfackler/ex-leak</li>
<li><a
href="b0a1da5ee9"><code>b0a1da5</code></a>
Merge branch 'master' into ex-leak</li>
<li><a
href="f456b60936"><code>f456b60</code></a>
Merge pull request <a
href="https://redirect.github.com/sfackler/rust-openssl/issues/2099">#2099</a>
from alex/deprecate-store-ref-objects</li>
<li><a
href="a8413b8b54"><code>a8413b8</code></a>
Merge pull request <a
href="https://redirect.github.com/sfackler/rust-openssl/issues/2100">#2100</a>
from alex/symm-update-unchecked</li>
<li><a
href="a92c237941"><code>a92c237</code></a>
clippy</li>
<li><a
href="e839496d9e"><code>e839496</code></a>
Don't leak when overwriting ex data</li>
<li><a
href="602d38dca7"><code>602d38d</code></a>
Added <code>update_unchecked</code> to <code>symm::Crypter</code></li>
<li><a
href="cf9681a55c"><code>cf9681a</code></a>
fixes <a
href="https://redirect.github.com/sfackler/rust-openssl/issues/2096">#2096</a>
-- deprecate <code>X509StoreRef::objects</code>, it is unsound</li>
<li>Additional commits viewable in <a
href="https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.59...openssl-v0.10.60">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=openssl&package-manager=cargo&previous-version=0.10.59&new-version=0.10.60)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/google/comprehensive-rust/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-29 10:01:30 +01: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
6de9413ac3
da: translate a number of tiny/trivial messages (#1489) 2023-11-28 19:45:24 +01: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
Andriy Redko
5a7b4d568b
uk: Cleaning up Ukrainian cloud-translate translations (intro section) (#1478)
Covers the intro section (part of
https://github.com/google/comprehensive-rust/issues/836)

Signed-off-by: Andriy Redko <drreta@gmail.com>
2023-11-21 11:22:40 +00:00
Martin Geisler
ec70069806
Skip calling “apt update” in GH actions (#1490)
We are currently getting an error when we run “apt update”:

    Reading package lists...
E: Repository 'https://packages.microsoft.com/ubuntu/22.04/prod jammy
InRelease' changed its 'Origin' value from 'microsoft-ubuntu-jammy-prod
jammy' to 'Pulp 3'
E: Repository 'https://packages.microsoft.com/ubuntu/22.04/prod jammy
InRelease' changed its 'Label' value from 'microsoft-ubuntu-jammy-prod
jammy' to ''
    Error: Process completed with exit code 100.

I’m not sure why we get this, but updating should not be necessary in
the first place: the Ubuntu images already come with an up-to-date list
of packages.
2023-11-20 17:33:14 +01: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
Elliot Brandwein
6624c5874f
Reset state to inline-open when speaker note popup is closed (#1441)
Partially addresses #182.

---------

Co-authored-by: Elliot Brandwein <ebrandwein@google.com>
2023-11-16 11:49:24 +00:00
Martin Geisler
13c4963fab
da: Run through mdbook-i18n-normalize 0.3.0 (#1461)
This splits translated code blocks into individual messages, thus
preserving the translation after #1460.

This removes ~6k unnecessary lines from the PO file.
2023-11-16 11:45:52 +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
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
35beb8d916
pt-BR: remove translated variable names (#1472)
With #1460 merged, we took away the possibility of translating variable,
struct, and function names in the code snippets.

This broke the Brazilian Portuguese translation because it _does_
translate those things quite frequently! This PR reverts the
translations back to the English original.

I tried to also update the surrounding messages to use the English
words: so when a slide talked about a `nome` variable before, it now
uses `name` instead. We don’t have automated tests for this, so I hope I
did this correctly.
2023-11-13 11:31:37 +01:00
Kanta Yamaoka (山岡幹太)
9f84e62e56
Add kantasv to CODEOWNERS (#1474)
This adds myself to CODEOWNERS. My main focus is translation, but I'd
like to add me for the future maintenance within the projcect, such as
github actions and tools. Thanks!
2023-11-13 11:31:21 +01:00
RazvanSt
32060afdd1
Adding Romanian translation (#1449)
Initial commit for the Romanian translation.

Part of #1451.
2023-11-12 14:28:26 +01:00
Enes Aydın
0cceaae872
tr: Translating titles and introductory texts into Turkish (#1423)
Turkish Translation.

Part of #500
2023-11-12 14:10:37 +01:00
Qinglin
c8470ea6ba
zh-CN: Fix wrong anchors for zh-CN pages (#1456) 2023-11-11 16:25:06 +01:00
Martin Geisler
031cb4fb89
Update to mdbook-i18n-helpers 0.3.0 (#1460)
This version has much improved support for the translation of code
blocks. See https://github.com/google/mdbook-i18n-helpers/issues/95 for
details.

Most PO files won’t need any update since most of them don’t translate
the comments in the code blocks. Those that do, can run
`mdbook-i18n-normalize` when they feel like it.
2023-11-11 16:10:13 +01:00
Henri F
25c8bb0135
pt-BR: Normalize .po file with mdbook-i18n-helpers 0.3.0 (#1467)
#317 #1460
2023-11-10 11:45:13 -08:00