Skip to content

Commit 80433a8

Browse files
committed
Mark pages need a refresh
1 parent a272a69 commit 80433a8

16 files changed

Lines changed: 222 additions & 196 deletions

File tree

content/en/docs/c3.lifetimes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ slug: lifetimes
44
---
55

66
> [!caution]
7-
> This article is quite outdated!
7+
> This needs a refresh!
88
99
When we are dealing with references, we have to make sure that the referencing data stay alive until we stop using the references.
1010

content/en/docs/d3.modules.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ title: Modules
33
slug: modules
44
---
55

6+
> [!caution]
7+
> This needs a refresh!
8+
69
## 01. In the same file
710

811
Related code and data are grouped into a module and stored in the same file.

content/en/docs/d4.crates.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ title: Crates
33
slug: crates
44
---
55

6+
> [!caution]
7+
> This needs a refresh!
8+
69
💭 Crates are a bit similar to the packages in some other languages. Crates compile individually. If the crate has child file modules, those files will get merged with the crate file and compile as a single unit.
710

811
💭 A crate can produce an executable/ a binary or a library. `src/main.rs` is the crate root/ entry point for a binary crate and `src/lib.rs` is the entry point for a library crate.

content/en/docs/d5.workspaces.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ title: Workspaces
33
slug: workspaces
44
---
55

6+
> [!caution]
7+
> This needs a refresh!
8+
69
When the code base is getting larger, you might need to work with **multiple crates on the same project**. Rust supports this via Workspaces. You can **analyze (`cargo check`), build, run tests or generate docs for all crates** at once by running `cargo` commands from the project root.
710

811
⭐️ When working on multiple crates same time, there is a higher possibility of having shared dependencies on crates. To prevent downloading and compiling the same dependency multiple times, Rust uses a **shared build directory** under the project root, while running `cargo build` from the project root.

content/en/docs/d6.use.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ title: Use
33
slug: use
44
---
55

6+
> [!caution]
7+
> This needs a refresh!
8+
69
Let's see the main usages of the `use` keyword.
710

811

content/en/docs/d7.std-primitives-and-preludes.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ title: STD, Primitives and Preludes
33
slug: std-primitives-and-preludes
44
---
55

6+
> [!caution]
7+
> This needs a refresh!
8+
69
⭐️ In Rust, language elements are implemented by not only **`std` library** crate but also **compiler** as well. Examples,
710
- **[Primitives](https://doc.rust-lang.org/std/#primitives)**: Defined by the compiler and methods are implemented by `std` library directly on primitives.
811
- **[Standard Macros](https://doc.rust-lang.org/std/#macros)**: Defined by both compiler and `std`

content/en/docs/e1.smart-compiler.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ title: Smart Compiler
33
slug: smart-compiler
44
---
55

6+
> [!caution]
7+
> This needs a refresh!
8+
69
## Why Compiler?
710

811
The Rust compiler does the most significant job to prevent errors in Rust programs. It **analyzes the code at compile-time** and issues warnings, if the code does not follow memory management rules or lifetime annotations correctly.

docs/docs/crates/index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
<svg height="20" viewBox="0 -960 960 960" width="20"><path d="M216-144q-29.7.0-50.85-21.15T144-216v-528q0-29.7 21.15-50.85T216-816h528q29.7.0 50.85 21.15T816-744v528q0 29.7-21.15 50.85T744-144H216zm264-96h240v-480H480v480z"/></svg>
1212
On this section</button>
1313
<button class=btn>On this page
14-
<svg height="20" viewBox="0 -960 960 960" width="20"><path d="M349.5-298.29q10.5-10.29 10.5-25.5t-10.29-25.71-25.5-10.5-25.71 10.29-10.5 25.5 10.29 25.71 25.5 10.5 25.71-10.29zm0-156q10.5-10.29 10.5-25.5t-10.29-25.71-25.5-10.5-25.71 10.29-10.5 25.5 10.29 25.71 25.5 10.5 25.71-10.29zm0-156q10.5-10.29 10.5-25.5t-10.29-25.71-25.5-10.5-25.71 10.29-10.5 25.5 10.29 25.71 25.5 10.5 25.71-10.29zM468-288h168q15.3.0 25.65-10.29Q672-308.58 672-323.79t-10.35-25.71Q651.3-360 636-360H468q-15.3.0-25.65 10.29Q432-339.42 432-324.21t10.35 25.71Q452.7-288 468-288zm0-156h168q15.3.0 25.65-10.29Q672-464.58 672-479.79t-10.35-25.71T636-516H468q-15.3.0-25.65 10.29Q432-495.42 432-480.21t10.35 25.71Q452.7-444 468-444zm0-156h168q15.3.0 25.65-10.29Q672-620.58 672-635.79t-10.35-25.71Q651.3-672 636-672H468q-15.3.0-25.65 10.29Q432-651.42 432-636.21t10.35 25.71Q452.7-6e2 468-6e2zM216-144q-29.7.0-50.85-21.15T144-216v-528q0-29.7 21.15-50.85T216-816h528q29.7.0 50.85 21.15T816-744v528q0 29.7-21.15 50.85T744-144H216zm0-72h528v-528H216v528zm0-528v528-528z"/></svg></button></nav><header id=article-header><h1 style=view-transition-name:docscrates>Crates</h1></header><div id=article-body><p>💭 Crates are a bit similar to the packages in some other languages. Crates compile individually. If the crate has child file modules, those files will get merged with the crate file and compile as a single unit.</p><p>💭 A crate can produce an executable/ a binary or a library. <code>src/main.rs</code> is the crate root/ entry point for a binary crate and <code>src/lib.rs</code> is the entry point for a library crate.</p><h2 id=01-librs-on-executable-crate>01. lib.rs on executable crate</h2><p>💡 When writing binary crates, we can move the main functionalities to <code>src/lib.rs</code> and use it as a library from <code>src/main.rs</code>. This pattern is quite common on executable crates.</p><div class=highlight><pre tabindex=0 class=chroma><code class=language-rust data-lang=rust><span class=line><span class=cl><span class=c1>// # Think we run,
14+
<svg height="20" viewBox="0 -960 960 960" width="20"><path d="M349.5-298.29q10.5-10.29 10.5-25.5t-10.29-25.71-25.5-10.5-25.71 10.29-10.5 25.5 10.29 25.71 25.5 10.5 25.71-10.29zm0-156q10.5-10.29 10.5-25.5t-10.29-25.71-25.5-10.5-25.71 10.29-10.5 25.5 10.29 25.71 25.5 10.5 25.71-10.29zm0-156q10.5-10.29 10.5-25.5t-10.29-25.71-25.5-10.5-25.71 10.29-10.5 25.5 10.29 25.71 25.5 10.5 25.71-10.29zM468-288h168q15.3.0 25.65-10.29Q672-308.58 672-323.79t-10.35-25.71Q651.3-360 636-360H468q-15.3.0-25.65 10.29Q432-339.42 432-324.21t10.35 25.71Q452.7-288 468-288zm0-156h168q15.3.0 25.65-10.29Q672-464.58 672-479.79t-10.35-25.71T636-516H468q-15.3.0-25.65 10.29Q432-495.42 432-480.21t10.35 25.71Q452.7-444 468-444zm0-156h168q15.3.0 25.65-10.29Q672-620.58 672-635.79t-10.35-25.71Q651.3-672 636-672H468q-15.3.0-25.65 10.29Q432-651.42 432-636.21t10.35 25.71Q452.7-6e2 468-6e2zM216-144q-29.7.0-50.85-21.15T144-216v-528q0-29.7 21.15-50.85T216-816h528q29.7.0 50.85 21.15T816-744v528q0 29.7-21.15 50.85T744-144H216zm0-72h528v-528H216v528zm0-528v528-528z"/></svg></button></nav><header id=article-header><h1 style=view-transition-name:docscrates>Crates</h1></header><div id=article-body><div class="alert alert-caution"><div class=alert-header><svg height="20" viewBox="0 -960 960 960" width="20"><path d="M480-3e2q15 0 25.5-10.5T516-336t-10.5-25.5T480-372t-25.5 10.5T444-336t10.5 25.5T480-3e2zm25.5-142.5Q516-453 516-468v-168q0-15-10.5-25.5T480-672t-25.5 10.5T444-636v168q0 15 10.5 25.5T480-432t25.5-10.5zM371-144q-14 0-27-5t-24-16L165-321q-10-10-15.5-23.5T144-372v-217q0-14 5-27t16-24l155-155q11-11 24-16t27-5h218q14 0 27 5t24 16l155 155q11 11 16 24t5 27v218q0 14-5 27t-16 24L639-165q-10 10-23.5 15.5T588-144H371zm0-72h218l155-155v-218L588-744H371L216-589v218l155 155zm109-264z"/></svg>
15+
<span>Caution</span></div><div class=alert-body><p>This needs a refresh!</p></div></div><p>💭 Crates are a bit similar to the packages in some other languages. Crates compile individually. If the crate has child file modules, those files will get merged with the crate file and compile as a single unit.</p><p>💭 A crate can produce an executable/ a binary or a library. <code>src/main.rs</code> is the crate root/ entry point for a binary crate and <code>src/lib.rs</code> is the entry point for a library crate.</p><h2 id=01-librs-on-executable-crate>01. lib.rs on executable crate</h2><p>💡 When writing binary crates, we can move the main functionalities to <code>src/lib.rs</code> and use it as a library from <code>src/main.rs</code>. This pattern is quite common on executable crates.</p><div class=highlight><pre tabindex=0 class=chroma><code class=language-rust data-lang=rust><span class=line><span class=cl><span class=c1>// # Think we run,
1516
</span></span></span><span class=line><span class=cl><span class=n>cargo</span><span class=w> </span><span class=n>new</span><span class=w> </span><span class=n>greetings</span><span class=w>
1617
</span></span></span><span class=line><span class=cl><span class=n>touch</span><span class=w> </span><span class=n>greetings</span><span class=o>/</span><span class=n>src</span><span class=o>/</span><span class=n>lib</span><span class=p>.</span><span class=n>rs</span><span class=w>
1718
</span></span></span><span class=line><span class=cl><span class=w>

0 commit comments

Comments
 (0)