diff --git a/src/categories/asynchronous/futures.md b/src/categories/asynchronous/futures.md index 36c73353..dbbe47af 100644 --- a/src/categories/asynchronous/futures.md +++ b/src/categories/asynchronous/futures.md @@ -2,7 +2,7 @@ {{#include futures.incl.md}} -[![futures][c-futures-badge]][c-futures] [![futures-crates.io][c-futures-crate-badge]][c-futures-crates.io] [![cat-asynchronous][cat-asynchronous-badge]][cat-asynchronous] +[![futures][c-futures-badge]][c-futures] [![futures-crates.io][c-futures-crates.io-badge]][c-futures-crates.io] [![cat-asynchronous][cat-asynchronous-badge]][cat-asynchronous] The [`{{i:futures}}`][c-futures]⮳ crate provides a number of core abstractions for writing {{i:asynchronous code}}. diff --git a/src/categories/asynchronous/index.md b/src/categories/asynchronous/index.md index ef274849..2e962578 100644 --- a/src/categories/asynchronous/index.md +++ b/src/categories/asynchronous/index.md @@ -60,10 +60,10 @@ In most cases, prefer the [`{{i:Tokio}}`](tokio.md) {{i:runtime}} - see [The Sta Alternatives to the Tokio async ecosystem include: -- [![async-std][c-async-std-badge]][async-std] [async-std][async-std-crates.io]⮳: async version of the Rust standard library. No longer maintained? -- [![smol][c-smol-badge]][c-smol] [Smol][smol-crates.io]⮳ -- [![embassy][c-embassy-badge]][c-embassy] [Embassy][embassy-website]⮳ [![embassy-github][c-embassy-github-badge]][embassy-github] for embedded systems. -- [![mio][c-mio-badge]][c-mio] [Mio][mio-crates.io]⮳ is a fast, low-level I/O library for Rust focusing on non-blocking APIs and event notification for building high performance I/O apps with as little overhead as possible over the OS abstractions. It is part of the Tokio ecosystem. +- [![async-std][c-async-std-badge]][c-async-std] [async-std][c-async-std-crates.io]⮳: async version of the Rust standard library. No longer maintained? +- [![smol][c-smol-badge]][c-smol] [Smol][c-smol-crates.io]⮳ +- [![embassy][c-embassy-badge]][c-embassy] [Embassy][c-embassy-website]⮳ [![embassy-github][c-embassy-github-badge]][c-embassy-github] for embedded systems. +- [![mio][c-mio-badge]][c-mio] [Mio][c-mio-crates.io]⮳ is a fast, low-level I/O library for Rust focusing on non-blocking APIs and event notification for building high performance I/O apps with as little overhead as possible over the OS abstractions. It is part of the Tokio ecosystem. {{#include refs.incl.md}} {{#include ../../refs/link-refs.md}} diff --git a/src/categories/command-line-interface/ansi_terminal.md b/src/categories/command-line-interface/ansi_terminal.md index 62886533..605d6785 100644 --- a/src/categories/command-line-interface/ansi_terminal.md +++ b/src/categories/command-line-interface/ansi_terminal.md @@ -6,7 +6,7 @@ This program depicts the use of [`{{i:ansi_term}}`][c-ansi-term-crates.io]⮳ crate and how it is used for controlling colours and formatting, such as blue bold text or yellow underlined text, on {{i:ANSI terminals}}. -There are two main data structures in [`{{i:ansi_term}}`][c-ansi-term-crates.io]⮳: [`{{i:ANSIString}}`][c-ansi_term::ANSIString]⮳ and [`{{i:Style}}`][ansi_term:Style]⮳. A `{{i:Style}}` holds stylistic information: colors, whether the text should be bold, or blinking, or whatever. There are also Colour variants that represent simple foreground colour styles. An [`{{i:ANSIString}}`][c-ansi_term::ANSIString]⮳ is a string paired with a [`{{i:Style}}`][c-ansi_term::Style]⮳. +There are two main data structures in [`{{i:ansi_term}}`][c-ansi-term-crates.io]⮳: [`{{i:ANSIString}}`][c-ansi_term::ANSIString]⮳ and [`{{i:Style}}`][c-ansi_term:Style]⮳. A `{{i:Style}}` holds stylistic information: colors, whether the text should be bold, or blinking, or whatever. There are also Colour variants that represent simple foreground colour styles. An [`{{i:ANSIString}}`][c-ansi_term::ANSIString]⮳ is a string paired with a [`{{i:Style}}`][c-ansi_term::Style]⮳. **Note:** British English uses *Colour* instead of *Color*. diff --git a/src/categories/command-line-interface/arguments.md b/src/categories/command-line-interface/arguments.md index 310a6a16..88e614b3 100644 --- a/src/categories/command-line-interface/arguments.md +++ b/src/categories/command-line-interface/arguments.md @@ -4,11 +4,11 @@ ## Using clap's builder API -[![clap][c-clap-badge]][c-clap] [![clap-examples][clap-examples-badge]][clap-examples] [![clap-github][clap-github-badge]][clap-github] [![cat-command-line-interface][cat-command-line-interface-badge]][cat-command-line-interface] +[![clap][c-clap-badge]][c-clap] [![clap-examples][c-clap-examples-badge]][c-clap-examples] [![clap-github][c-clap-github-badge]][c-clap-github] [![cat-command-line-interface][cat-command-line-interface-badge]][cat-command-line-interface] This application describes the structure of its command-line interface using [`{{i:clap}}`][c-clap]⮳'s builder style. The [documentation][c-clap]⮳ gives two other possible ways to instantiate an application. -In the builder style, `with_name` is the unique identifier that `value_of` will use to retrieve the value passed. The [`{{i:short}}`][clap::Arg::short]⮳ and [`{{i:long}}`][clap::Arg::long]⮳ options control the {{i:flag}} the user will be expected to type; short flags look like `-f` and long flags look like `--file`. +In the builder style, `with_name` is the unique identifier that `value_of` will use to retrieve the value passed. The [`{{i:short}}`][c-clap::Arg::short]⮳ and [`{{i:long}}`][c-clap::Arg::long]⮳ options control the {{i:flag}} the user will be expected to type; short flags look like `-f` and long flags look like `--file`. ```rust,editable {{#include ../../../deps/tests/clap-basic.rs}} diff --git a/src/categories/command-line-interface/index.md b/src/categories/command-line-interface/index.md index 32d92ab7..b37af32e 100644 --- a/src/categories/command-line-interface/index.md +++ b/src/categories/command-line-interface/index.md @@ -14,7 +14,7 @@ Techniques to help create {{i:command line interfaces}}, such as {{i:argument pa [![tui-rs][c-tui-rs-badge]][c-tui-rs] -[![r3bl-tuify][c-r3bl-tuify-badge]][c-r3bl-tuify] [![r3bl_tuify-crates.io][c-r3bl_tuify-crate-badge]][c-r3bl_tuify-crates.io]⮳ [![blog-tuify][c-tuify-blog-badge]][blog-tuify]⮳ +[![r3bl-tuify][c-r3bl-tuify-badge]][c-r3bl-tuify] [![r3bl_tuify-crates.io][c-r3bl_tuify-crates.io-badge]][c-r3bl_tuify-crates.io]⮳ [![blog-tuify][blog-tuify-badge]][blog-tuify]⮳ {{#include refs.incl.md}} {{#include ../../refs/link-refs.md}} diff --git a/src/categories/command-line-utilities/index.md b/src/categories/command-line-utilities/index.md index 7804fb98..67f8d53f 100644 --- a/src/categories/command-line-utilities/index.md +++ b/src/categories/command-line-utilities/index.md @@ -6,7 +6,7 @@ [My terminal became more Rusty Community][blog-rusty-terminal]⮳ -[![open-rs-github][c-open-rs-github-badge]][open-rs-github] +[![open-rs-github][c-open-rs-github-badge]][c-open-rs-github] [![starship-github][c-starship-github-badge]][c-starship-github] @@ -41,7 +41,7 @@ apt install lsd ## `gping` -Ping, but with a graph [`{{i:gping}}`][c-gping] +Ping, but with a graph [`{{i:gping}}`][c-gping-github] ```sh apt install gping diff --git a/src/categories/compilers/cross_compilation.incl.md b/src/categories/compilers/cross_compilation.incl.md index 9efa1990..0e744286 100644 --- a/src/categories/compilers/cross_compilation.incl.md +++ b/src/categories/compilers/cross_compilation.incl.md @@ -1,3 +1,3 @@ | Recipe | Crates | Categories | |---|---|---| -| [Cross][ex-cross] | [![cross-github][cross-github-badge]][cross-github] | [![cat-compilers][cat-compilers-badge]][cat-compilers] | +| [Cross][ex-cross] | [![cross-github][c-cross-github-badge]][c-cross-github] | [![cat-compilers][cat-compilers-badge]][cat-compilers] | diff --git a/src/categories/compilers/cross_compilation.md b/src/categories/compilers/cross_compilation.md index ab3a5235..9b12c7d4 100644 --- a/src/categories/compilers/cross_compilation.md +++ b/src/categories/compilers/cross_compilation.md @@ -4,9 +4,9 @@ ## Cross -[![cross-github][cross-github-badge]][cross-github] [![cat-compilers][cat-compilers-badge]][cat-compilers] +[![cross-github][c-cross-github-badge]][c-cross-github] [![cat-compilers][cat-compilers-badge]][cat-compilers] -[`{{i:cross}}`][cross-github]⮳ builds your Rust project for different target operating systems and architectures. It requires [`{{i:rustup}}`][rustup-website]⮳ and [`{{i:Docker}}`][c-docker]⮳ or [`{{i:Podman}}`][podman-website]⮳. +[`{{i:cross}}`][c-cross-github]⮳ builds your Rust project for different target operating systems and architectures. It requires [`{{i:rustup}}`][rustup-website]⮳ and [`{{i:Docker}}`][docker-website]⮳ or [`{{i:Podman}}`][podman-website]⮳. ```sh cargo install cross --git https://github.com/cross-rs/cross diff --git a/src/categories/concurrency/message_passing.incl.md b/src/categories/concurrency/message_passing.incl.md index 30297213..9f60f04a 100644 --- a/src/categories/concurrency/message_passing.incl.md +++ b/src/categories/concurrency/message_passing.incl.md @@ -4,8 +4,8 @@ | [Create a parallel data pipeline][ex-crossbeam-pipeline] | [![crossbeam][c-crossbeam-badge]][c-crossbeam] | [![cat-concurrency][cat-concurrency-badge]][cat-concurrency] | | [Pass data between two threads][ex-crossbeam-spsc] | [![crossbeam][c-crossbeam-badge]][c-crossbeam] | [![cat-concurrency][cat-concurrency-badge]][cat-concurrency] | | [Maintain global mutable state][ex-global-mut-state] | [![lazy-static][c-lazy-static-badge]][c-lazy-static] | [![cat-rust-patterns][cat-rust-patterns-badge]][cat-rust-patterns] | -| [Calculate SHA1 sum of *.iso files concurrently][ex-threadpool-walk] | [![threadpool][c-threadpool-badge]][c-threadpool] [![walkdir][c-walkdir-badge]][c-walkdir] [![num-cpus][c-num-cpus-badge]][num-cpus] [![ring][c-ring-badge]][c-ring] | [![cat-concurrency][cat-concurrency-badge]][cat-concurrency] [![cat-filesystem][cat-filesystem-badge]][cat-filesystem] | -| [Draw fractal dispatching work to a thread pool][ex-threadpool-fractal] | [![threadpool][c-threadpool-badge]][c-threadpool] [![num][c-num-badge]][c-num] [![num-cpus][c-num-cpus-badge]][num-cpus] [![image][c-image-badge]][c-image] | [![cat-concurrency][cat-concurrency-badge]][cat-concurrency][![cat-science][cat-science-badge]][cat-science][![cat-rendering][cat-rendering-badge]][cat-rendering] | +| [Calculate SHA1 sum of *.iso files concurrently][ex-threadpool-walk] | [![threadpool][c-threadpool-badge]][c-threadpool] [![walkdir][c-walkdir-badge]][c-walkdir] [![num-cpus][c-num-cpus-badge]][c-num-cpus] [![ring][c-ring-badge]][c-ring] | [![cat-concurrency][cat-concurrency-badge]][cat-concurrency] [![cat-filesystem][cat-filesystem-badge]][cat-filesystem] | +| [Draw fractal dispatching work to a thread pool][ex-threadpool-fractal] | [![threadpool][c-threadpool-badge]][c-threadpool] [![num][c-num-badge]][c-num] [![num-cpus][c-num-cpus-badge]][c-num-cpus] [![image][c-image-badge]][c-image] | [![cat-concurrency][cat-concurrency-badge]][cat-concurrency][![cat-science][cat-science-badge]][cat-science][![cat-rendering][cat-rendering-badge]][cat-rendering] | | [Mutate the elements of an array in parallel][ex-rayon-iter-mut] | [![rayon][c-rayon-badge]][c-rayon] | [![cat-concurrency][cat-concurrency-badge]][cat-concurrency] | | [Test in parallel if any or all elements of a collection match a given predicate][ex-rayon-any-all] | [![rayon][c-rayon-badge]][c-rayon] | [![cat-concurrency][cat-concurrency-badge]][cat-concurrency] | | [Search items using given predicate in parallel][ex-rayon-parallel-search] | [![rayon][c-rayon-badge]][c-rayon] | [![cat-concurrency][cat-concurrency-badge]][cat-concurrency] | diff --git a/src/categories/concurrency/message_passing.md b/src/categories/concurrency/message_passing.md index ea622496..954d57d5 100644 --- a/src/categories/concurrency/message_passing.md +++ b/src/categories/concurrency/message_passing.md @@ -16,7 +16,7 @@ Message passing in [`{{i:async}}`][book-rust-reference-async]⮳ programming is ## Crossbeam_channel -[![crossbeam-channel][crossbeam-channel-badge]][crossbeam-channel] [![cat-concurrency][cat-concurrency-badge]][cat-concurrency] +[![crossbeam-channel][c-crossbeam-channel-badge]][c-crossbeam-channel] [![cat-concurrency][cat-concurrency-badge]][cat-concurrency] Multi-producer {{i:multi-consumer channels}} for message passing. diff --git a/src/categories/concurrency/multithreading.incl.md b/src/categories/concurrency/multithreading.incl.md index 30297213..9f60f04a 100644 --- a/src/categories/concurrency/multithreading.incl.md +++ b/src/categories/concurrency/multithreading.incl.md @@ -4,8 +4,8 @@ | [Create a parallel data pipeline][ex-crossbeam-pipeline] | [![crossbeam][c-crossbeam-badge]][c-crossbeam] | [![cat-concurrency][cat-concurrency-badge]][cat-concurrency] | | [Pass data between two threads][ex-crossbeam-spsc] | [![crossbeam][c-crossbeam-badge]][c-crossbeam] | [![cat-concurrency][cat-concurrency-badge]][cat-concurrency] | | [Maintain global mutable state][ex-global-mut-state] | [![lazy-static][c-lazy-static-badge]][c-lazy-static] | [![cat-rust-patterns][cat-rust-patterns-badge]][cat-rust-patterns] | -| [Calculate SHA1 sum of *.iso files concurrently][ex-threadpool-walk] | [![threadpool][c-threadpool-badge]][c-threadpool] [![walkdir][c-walkdir-badge]][c-walkdir] [![num-cpus][c-num-cpus-badge]][num-cpus] [![ring][c-ring-badge]][c-ring] | [![cat-concurrency][cat-concurrency-badge]][cat-concurrency] [![cat-filesystem][cat-filesystem-badge]][cat-filesystem] | -| [Draw fractal dispatching work to a thread pool][ex-threadpool-fractal] | [![threadpool][c-threadpool-badge]][c-threadpool] [![num][c-num-badge]][c-num] [![num-cpus][c-num-cpus-badge]][num-cpus] [![image][c-image-badge]][c-image] | [![cat-concurrency][cat-concurrency-badge]][cat-concurrency][![cat-science][cat-science-badge]][cat-science][![cat-rendering][cat-rendering-badge]][cat-rendering] | +| [Calculate SHA1 sum of *.iso files concurrently][ex-threadpool-walk] | [![threadpool][c-threadpool-badge]][c-threadpool] [![walkdir][c-walkdir-badge]][c-walkdir] [![num-cpus][c-num-cpus-badge]][c-num-cpus] [![ring][c-ring-badge]][c-ring] | [![cat-concurrency][cat-concurrency-badge]][cat-concurrency] [![cat-filesystem][cat-filesystem-badge]][cat-filesystem] | +| [Draw fractal dispatching work to a thread pool][ex-threadpool-fractal] | [![threadpool][c-threadpool-badge]][c-threadpool] [![num][c-num-badge]][c-num] [![num-cpus][c-num-cpus-badge]][c-num-cpus] [![image][c-image-badge]][c-image] | [![cat-concurrency][cat-concurrency-badge]][cat-concurrency][![cat-science][cat-science-badge]][cat-science][![cat-rendering][cat-rendering-badge]][cat-rendering] | | [Mutate the elements of an array in parallel][ex-rayon-iter-mut] | [![rayon][c-rayon-badge]][c-rayon] | [![cat-concurrency][cat-concurrency-badge]][cat-concurrency] | | [Test in parallel if any or all elements of a collection match a given predicate][ex-rayon-any-all] | [![rayon][c-rayon-badge]][c-rayon] | [![cat-concurrency][cat-concurrency-badge]][cat-concurrency] | | [Search items using given predicate in parallel][ex-rayon-parallel-search] | [![rayon][c-rayon-badge]][c-rayon] | [![cat-concurrency][cat-concurrency-badge]][cat-concurrency] | diff --git a/src/categories/concurrency/shared_state/index.md b/src/categories/concurrency/shared_state/index.md index 6218eef3..b8538f90 100644 --- a/src/categories/concurrency/shared_state/index.md +++ b/src/categories/concurrency/shared_state/index.md @@ -20,7 +20,7 @@ Allow access to data from one thread at a time. ## Parking Lot -[![parking-lot][c-parking-lot-badge]][c-parking-lot] [![parking-lot-crates.io][c-parking-lot-crate-badge]][c-parking-lot-crates.io] [![cat-concurrency][cat-concurrency-badge]][cat-concurrency] +[![parking-lot][c-parking-lot-badge]][c-parking-lot] [![parking-lot-crates.io][c-parking-lot-crates.io-badge]][c-parking-lot-crates.io] [![cat-concurrency][cat-concurrency-badge]][cat-concurrency] [`{{i:Parking Lot}}`][c-parking-lot]⮳ provides implementations of [`{{i:Mutex}}`][c-parking_lot::Mutex]⮳, [`{{i:RwLock}}`][c-parking_lot::RwLock]⮳, [`{{i:Condvar}}`][c-parking_lot::Condvar]⮳ and [`{{i:Once}}`][c-parking_lot::Once]⮳ that are smaller, faster and more flexible than those in the Rust standard library. It also provides a [`{{i:ReentrantMutex}}`][c-parking_lot::ReentrantMutex]⮳ type. diff --git a/src/categories/concurrency/threads.incl.md b/src/categories/concurrency/threads.incl.md index 30297213..9f60f04a 100644 --- a/src/categories/concurrency/threads.incl.md +++ b/src/categories/concurrency/threads.incl.md @@ -4,8 +4,8 @@ | [Create a parallel data pipeline][ex-crossbeam-pipeline] | [![crossbeam][c-crossbeam-badge]][c-crossbeam] | [![cat-concurrency][cat-concurrency-badge]][cat-concurrency] | | [Pass data between two threads][ex-crossbeam-spsc] | [![crossbeam][c-crossbeam-badge]][c-crossbeam] | [![cat-concurrency][cat-concurrency-badge]][cat-concurrency] | | [Maintain global mutable state][ex-global-mut-state] | [![lazy-static][c-lazy-static-badge]][c-lazy-static] | [![cat-rust-patterns][cat-rust-patterns-badge]][cat-rust-patterns] | -| [Calculate SHA1 sum of *.iso files concurrently][ex-threadpool-walk] | [![threadpool][c-threadpool-badge]][c-threadpool] [![walkdir][c-walkdir-badge]][c-walkdir] [![num-cpus][c-num-cpus-badge]][num-cpus] [![ring][c-ring-badge]][c-ring] | [![cat-concurrency][cat-concurrency-badge]][cat-concurrency] [![cat-filesystem][cat-filesystem-badge]][cat-filesystem] | -| [Draw fractal dispatching work to a thread pool][ex-threadpool-fractal] | [![threadpool][c-threadpool-badge]][c-threadpool] [![num][c-num-badge]][c-num] [![num-cpus][c-num-cpus-badge]][num-cpus] [![image][c-image-badge]][c-image] | [![cat-concurrency][cat-concurrency-badge]][cat-concurrency][![cat-science][cat-science-badge]][cat-science][![cat-rendering][cat-rendering-badge]][cat-rendering] | +| [Calculate SHA1 sum of *.iso files concurrently][ex-threadpool-walk] | [![threadpool][c-threadpool-badge]][c-threadpool] [![walkdir][c-walkdir-badge]][c-walkdir] [![num-cpus][c-num-cpus-badge]][c-num-cpus] [![ring][c-ring-badge]][c-ring] | [![cat-concurrency][cat-concurrency-badge]][cat-concurrency] [![cat-filesystem][cat-filesystem-badge]][cat-filesystem] | +| [Draw fractal dispatching work to a thread pool][ex-threadpool-fractal] | [![threadpool][c-threadpool-badge]][c-threadpool] [![num][c-num-badge]][c-num] [![num-cpus][c-num-cpus-badge]][c-num-cpus] [![image][c-image-badge]][c-image] | [![cat-concurrency][cat-concurrency-badge]][cat-concurrency][![cat-science][cat-science-badge]][cat-science][![cat-rendering][cat-rendering-badge]][cat-rendering] | | [Mutate the elements of an array in parallel][ex-rayon-iter-mut] | [![rayon][c-rayon-badge]][c-rayon] | [![cat-concurrency][cat-concurrency-badge]][cat-concurrency] | | [Test in parallel if any or all elements of a collection match a given predicate][ex-rayon-any-all] | [![rayon][c-rayon-badge]][c-rayon] | [![cat-concurrency][cat-concurrency-badge]][cat-concurrency] | | [Search items using given predicate in parallel][ex-rayon-parallel-search] | [![rayon][c-rayon-badge]][c-rayon] | [![cat-concurrency][cat-concurrency-badge]][cat-concurrency] | diff --git a/src/categories/concurrency/threads.md b/src/categories/concurrency/threads.md index 9a930f7d..fd74f4fa 100644 --- a/src/categories/concurrency/threads.md +++ b/src/categories/concurrency/threads.md @@ -18,7 +18,7 @@ This example splits the array in half and performs the work in separate threads. [![crossbeam][c-crossbeam-badge]][c-crossbeam] [![cat-concurrency][cat-concurrency-badge]][cat-concurrency] -This example uses the [`{{i:crossbeam}}`][c-crossbeam]⮳ and [`{{i:crossbeam-channel}}`][crossbeam-channel]⮳ crates to create a {{i:parallel pipeline}}, similar to that described in the ZeroMQ [guide][zero-mq-guide]⮳. There is a data source and a data sink, with data being processed by two worker threads in parallel on its way from the source to the sink. +This example uses the [`{{i:crossbeam}}`][c-crossbeam]⮳ and [`{{i:crossbeam-channel}}`][c-crossbeam-channel]⮳ crates to create a {{i:parallel pipeline}}, similar to that described in the ZeroMQ [guide][zero-mq-guide-website]⮳. There is a data source and a data sink, with data being processed by two worker threads in parallel on its way from the source to the sink. We use bounded channels with a capacity of one using [`{{i:crossbeam_channel::bounded}}`][c-crossbeam_channel::bounded]⮳. The producer must be on its own thread because it produces messages faster than the workers can process them (since they sleep for half a second) - this means the producer blocks on the call to @@ -35,7 +35,7 @@ Reading from the channels via the iterator [![crossbeam][c-crossbeam-badge]][c-crossbeam] [![cat-concurrency][cat-concurrency-badge]][cat-concurrency] -This example demonstrates the use of [`{{i:crossbeam-channel}}`][crossbeam-channel]⮳ in a {{i:single producer, single consumer}} (SPSC) setting. We build off the [`{{i:crossbeam spawn}}`][ex-crossbeam-spawn]⮳ example by using [`{{i:crossbeam::scope}}`][c-crossbeam::scope]⮳ and [`{{i:Scope::spawn}}`][c-crossbeam::thread::Scope::spawn]⮳ to manage the producer thread. Data is exchanged between the two threads using a [`{{i:crossbeam_channel::unbounded}}`][c-crossbeam::scope]⮳ channel, meaning there is no limit to the number of storable {{i:messages}}. The producer thread sleeps for half a second in between messages. +This example demonstrates the use of [`{{i:crossbeam-channel}}`][c-crossbeam-channel]⮳ in a {{i:single producer, single consumer}} (SPSC) setting. We build off the [`{{i:crossbeam spawn}}`][ex-crossbeam-spawn]⮳ example by using [`{{i:crossbeam::scope}}`][c-crossbeam::scope]⮳ and [`{{i:Scope::spawn}}`][c-crossbeam::thread::Scope::spawn]⮳ to manage the producer thread. Data is exchanged between the two threads using a [`{{i:crossbeam_channel::unbounded}}`][c-crossbeam::scope]⮳ channel, meaning there is no limit to the number of storable {{i:messages}}. The producer thread sleeps for half a second in between messages. ```rust,editable {{#include ../../../deps/tests/crossbeam-spsc.rs}} @@ -55,7 +55,7 @@ Declare global state using [`{{i:lazy static}}`][c-lazy-static]. [`{{i:lazy stat [![threadpool][c-threadpool-badge]][c-threadpool] [![num-cpus][c-num-cpus-badge]][c-num-cpus] [![walkdir][c-walkdir-badge]][c-walkdir] [![ring][c-ring-badge]][c-ring] [![cat-concurrency][cat-concurrency-badge]][cat-concurrency][![cat-filesystem][cat-filesystem-badge]][cat-filesystem] -This example calculates the {{i:SHA256}} for every file with iso extension in the current directory. A {{i:threadpool}} generates threads equal to the number of cores present in the system found with [`{{i:num-cpus::get}}`][num-cpus::get]⮳. [`{{i:Walkdir::new}}`][c-walkdir::Walkdir::new]⮳ iterates the current directory and calls [`{{i:execute}}`][c-walkdir::Walkdir::new]⮳ to perform the operations of reading and computing SHA256 hash. +This example calculates the {{i:SHA256}} for every file with iso extension in the current directory. A {{i:threadpool}} generates threads equal to the number of cores present in the system found with [`{{i:num-cpus::get}}`][c-num-cpus::get]⮳. [`{{i:Walkdir::new}}`][c-walkdir::Walkdir::new]⮳ iterates the current directory and calls [`{{i:execute}}`][c-walkdir::Walkdir::new]⮳ to perform the operations of reading and computing SHA256 hash. ```rust,editable,no_run {{#include ../../../deps/tests/threadpool-walk.rs}} @@ -70,7 +70,7 @@ This example generates an image by drawing a fractal from the [Julia set][julia- [![julia-set]( https://cloud.githubusercontent.com/assets/221000/26546700/9be34e80-446b-11e7-81dc-dd9871614ea1.png )]( https://cloud.githubusercontent.com/assets/221000/26546700/9be34e80-446b-11e7-81dc-dd9871614ea1.png ) Allocate memory for output image of given width and height with [`{{i:ImageBuffer::new}}`][c-image::ImageBuffer::new]⮳. -[`{{i:Rgb::from_channels}}`][c-image::Rgb::from_channels]⮳ calculates RGB pixel values. Create [`{{i:ThreadPool}}`][c-threadpool::ThreadPool]⮳ with thread count equal to number of cores with [`{{i:num-cpus::get}}`][num-cpus::get]⮳. +[`{{i:Rgb::from_channels}}`][c-image::Rgb::from_channels]⮳ calculates RGB pixel values. Create [`{{i:ThreadPool}}`][c-threadpool::ThreadPool]⮳ with thread count equal to number of cores with [`{{i:num-cpus::get}}`][c-num-cpus::get]⮳. [`{{i:ThreadPool::execute}}`][c-threadpool::ThreadPool::execute]⮳ receives each pixel as a separate job. [`{{i:mpsc::channel}}`][c-mpsc::channel]⮳ receives the jobs and [`{{i:Receiver::recv}}`][c-std::sync::mpsc::Receiver::recv]⮳ retrieves them. diff --git a/src/categories/date-and-time/parse.md b/src/categories/date-and-time/parse.md index 215f6fa8..b24f3068 100644 --- a/src/categories/date-and-time/parse.md +++ b/src/categories/date-and-time/parse.md @@ -6,7 +6,7 @@ [![chrono][c-chrono-badge]][c-chrono] [![cat-date-and-time][cat-date-and-time-badge]][cat-date-and-time] -Gets the current UTC [`{{i:DateTime}}`][c-chrono::DateTime]⮳ and its {{i:hour/minute/second}} via [`{{i:Timelike}}`][chrono::Timelike]⮳ and its {{i:year/month/day/weekday}} via [`{{i:Datelike}}`][c-chrono::Datelike]⮳ +Gets the current UTC [`{{i:DateTime}}`][c-chrono::DateTime]⮳ and its {{i:hour/minute/second}} via [`{{i:Timelike}}`][c-chrono::Timelike]⮳ and its {{i:year/month/day/weekday}} via [`{{i:Datelike}}`][c-chrono::Datelike]⮳ ```rust,editable {{#include ../../../deps/tests/current.rs}} @@ -45,7 +45,7 @@ Parses a [`{{i:DateTime}}`][c-chrono::DateTime]⮳ struct from strings represent [`{{i:DateTime::parse_from_rfc2822}}`][c-chrono::DateTime::parse_from_rfc2822]⮳ [`{{i:DateTime::parse_from_rfc3339}}`][c-chrono::DateTime::parse_from_rfc2822]⮳ and [`{{i:DateTime::parse_from_str}}`][c-chrono::DateTime::parse_from_str]⮳ respectively. -Escape sequences that are available for the [`{{i:DateTime::parse_from_str}}`][c-chrono::DateTime::parse_from_str]⮳ can be found at [`{{i:chrono::format::strftime}}`][chrono::format::strftime]⮳. Note that the [`{{i:DateTime::parse_from_str}}`][c-chrono::DateTime::parse_from_str]⮳ requires that such a {{i:DateTime}} struct must be creatable that it uniquely identifies a date and a time. For parsing dates and times without {{i:timezones}} use [`{{i:NaiveDate}}`][c-chrono::naive::NaiveDate]⮳ [`{{i:NaiveTime}}`][c-chrono::naive::NaiveTime]⮳ and [`{{i:NaiveDateTime}}`][c-chrono::naive::NaiveDateTime]⮳. +Escape sequences that are available for the [`{{i:DateTime::parse_from_str}}`][c-chrono::DateTime::parse_from_str]⮳ can be found at [`{{i:chrono::format::strftime}}`][c-chrono::format::strftime]⮳. Note that the [`{{i:DateTime::parse_from_str}}`][c-chrono::DateTime::parse_from_str]⮳ requires that such a {{i:DateTime}} struct must be creatable that it uniquely identifies a date and a time. For parsing dates and times without {{i:timezones}} use [`{{i:NaiveDate}}`][c-chrono::naive::NaiveDate]⮳ [`{{i:NaiveTime}}`][c-chrono::naive::NaiveTime]⮳ and [`{{i:NaiveDateTime}}`][c-chrono::naive::NaiveDateTime]⮳. ```rust,editable {{#include ../../../deps/tests/string.rs}} diff --git a/src/categories/development-tools/cargo/index.md b/src/categories/development-tools/cargo/index.md index 3979fcee..2c54961f 100644 --- a/src/categories/development-tools/cargo/index.md +++ b/src/categories/development-tools/cargo/index.md @@ -84,7 +84,7 @@ Details in ⮳. @@ -10,8 +10,8 @@ To add or edit the book, simply update or add a `.md` file in the appropriate [` - Make sure to format your code (`just fmtall` or `cargo +nightly fmt --all`), check it compiles (`just buildall` or `cargo build --all-targets`), lint it (`just clippyall` or `cargo clippy --all-targets`), and test it (`just testall` or `cargo test --test ` for an individual example). You may also `cargo run --example `. - Include your {{i:code example}} in the Markdown via `{{# include /path/to/file.rs}}` within pairs of triple backticks. - You may write very short {{i:examples}} directly in the Markdown (but they won't be be formatted / linted automatically). -- `rust` language code blocks in the Markdown will automatically get a _play_ button, which will execute the code in the [{{i:Rust Playground}}][rust-playground]⮳ and display the output just below the code block. Adding the `mdbook-runnable` attribute forces the _play_ button to be displayed when [`{{i:ignore}}`][rust-code-block-attributes]⮳ is set. -- The {{i:Rust playground}} only supports the top 100 most downloaded libraries and libraries used by the Rust Cookbook. [`{{i:noplayground}}`][rust-code-block-attributes]⮳ removes the play button if a code block does not work on the playground. +- `rust` language code blocks in the Markdown will automatically get a _play_ button, which will execute the code in the [{{i:Rust Playground}}][rust-playground-website]⮳ and display the output just below the code block. Adding the `mdbook-runnable` attribute forces the _play_ button to be displayed when [`{{i:ignore}}`][book-rust-code-block-attributes]⮳ is set. +- The {{i:Rust playground}} only supports the top 100 most downloaded libraries and libraries used by the Rust Cookbook. [`{{i:noplayground}}`][book-rust-code-block-attributes]⮳ removes the play button if a code block does not work on the playground. - Example projects that are too complex to be inserted in the book itself (e.g. that include multiple modules) should be added as separate folders below `xmpl`. Use `cargo new` or `cargo init` to create packages as usual. Insert a link to the appropriate GitHub page in the markdown. Verify the markdown is properly rendered using `just serve` or `mdbook serve --open`. Pushing a commit to the `main` branch on GitHub will trigger a GitHub Action workflow that checks formatting / linting, builds / tests all examples, then deploys the book to GitHub Pages. diff --git a/src/contributing/index.md b/src/contributing/index.md index 4fce9227..12fa36d7 100644 --- a/src/contributing/index.md +++ b/src/contributing/index.md @@ -6,7 +6,7 @@ It is also intended to be easy for (new) Rust programmers to contribute to and g Feel free to submit an issue or a {{i:pull request}} to the [repo][rust-howto-github]⮳. Draft pages are kept in [this folder][rust-howto-drafts]⮳. An informal (and very long) list of subjects we would like to cover is kept in the [topics of interest](topics_of_interest.md)⮳ page. -Embedded examples should be ideally _runnable_ on the [Rust playground][rust-playground]⮳ or at least directly copy-pasteable into Rust code. +Embedded examples should be ideally _runnable_ on the [Rust playground][rust-playground-website]⮳ or at least directly copy-pasteable into Rust code. This book's long-term goal is the coverage of the 'most commonly used' Rust crates, as defined by [`{{i:blessed.rs}}`][blessed-rs-website]⮳, the most downloaded libraries in [`{{i:crates.io}}`][crates.io]⮳, and 'high quality crates' per [`{{i:lib.rs}}`][lib-rs]⮳ [statistics][lib-rs-stats]⮳. Review [{{i:key crates}}](../key_crates.md) for topic ideas. @@ -18,12 +18,12 @@ Please read [CONTRIBUTING.md][rust-howto-contributing] for more details. [Rust Howto's TODO][rust-howto-todo-github]⮳ -[![rust-howto-contributing][c-rust-howto-contributing-badge]][rust-howto-contributing] +[![rust-howto-contributing][rust-howto-contributing-badge]][rust-howto-contributing] -[![rust-howto-drafts][c-rust-howto-drafts-badge]][rust-howto-drafts] +[![rust-howto-drafts][rust-howto-drafts-badge]][rust-howto-drafts] -[![rust-howto-github][c-rust-howto-github-badge]][rust-howto-github] +[![rust-howto-github][rust-howto-github-badge]][rust-howto-github] -[![rust-howto-todo-github][c-rust-howto-todo-github-badge]][rust-howto-todo-github] +[![rust-howto-todo-github][rust-howto-todo-github-badge]][rust-howto-todo-github] {{#include ../refs/link-refs.md}} diff --git a/src/crates.md b/src/crates.md index 60044f7f..c8b6f0d1 100644 --- a/src/crates.md +++ b/src/crates.md @@ -4,7 +4,7 @@ Crates mentioned in this book, by alphabetic order. ## A -[![actix-web][c-actix-web-badge]][c-actix-web] [![ansi-term][c-ansi-term-badge]][c-ansi-term] [![anyhow][c-anyhow-badge]][c-anyhow] [![approx][c-approx-badge]][c-approx] [![arrow-rs][c-arrow-rs-badge]][c-arrow-rs] [![async-channel][c-async-channel-badge]][async-channel] [![async-std][c-async-std-badge]][async-std] [![async-stream][c-async-stream-badge]][c-async-stream] [![async-trait][c-async-trait-badge]][c-async-trait] +[![actix-web][c-actix-web-badge]][c-actix-web] [![ansi-term][c-ansi-term-badge]][c-ansi-term] [![anyhow][c-anyhow-badge]][c-anyhow] [![approx][c-approx-badge]][c-approx] [![arrow-rs][c-arrow-rs-badge]][c-arrow-rs] [![async-channel][c-async-channel-badge]][c-async-channel] [![async-std][c-async-std-badge]][c-async-std] [![async-stream][c-async-stream-badge]][c-async-stream] [![async-trait][c-async-trait-badge]][c-async-trait] ## B @@ -12,7 +12,7 @@ Crates mentioned in this book, by alphabetic order. ## C -[![cc][c-cc-badge]][c-cc] [![chrono][c-chrono-badge]][c-chrono] [![clap][c-clap-badge]][c-clap] [![config][c-config-badge]][c-config] [![confy][c-confy-badge]][c-confy] [![crossbeam][c-crossbeam-badge]][c-crossbeam] [![crossbeam-channel][c-crossbeam-channel-badge]][crossbeam-channel] [![crux][c-crux-badge]][c-crux] [![csv][c-csv-badge]][c-csv] +[![cc][c-cc-badge]][c-cc] [![chrono][c-chrono-badge]][c-chrono] [![clap][c-clap-badge]][c-clap] [![config][c-config-badge]][c-config] [![confy][c-confy-badge]][c-confy] [![crossbeam][c-crossbeam-badge]][c-crossbeam] [![crossbeam-channel][c-crossbeam-channel-badge]][c-crossbeam-channel] [![crux][c-crux-badge]][c-crux] [![csv][c-csv-badge]][c-csv] ## D @@ -28,7 +28,7 @@ Crates mentioned in this book, by alphabetic order. ## G - K -[![glob][c-glob-badge]][c-glob] [![hyper][c-hyper-badge]][c-hyper] [![iced-rs][c-iced-rs-badge]][iced-rs] [![image][c-image-badge]][c-image] +[![glob][c-glob-badge]][c-glob] [![hyper][c-hyper-badge]][c-hyper] [![iced-rs][c-iced-rs-badge]][c-iced-rs] [![image][c-image-badge]][c-image] ## L diff --git a/src/key_crates.md b/src/key_crates.md index 77067b13..4106b128 100644 --- a/src/key_crates.md +++ b/src/key_crates.md @@ -11,6 +11,6 @@ Consult the following sites for crate recommendations: or older resources, such as: - [Rust starter pack][rust-starter-pack]⮳ -- [![stdx][c-stdx-badge]][c-stdx] +- [![stdx][c-stdx-github-badge]][c-stdx-github] {{#include refs/link-refs.md}} diff --git a/src/lang/macros.md b/src/lang/macros.md index 405bd7ec..9274ba95 100644 --- a/src/lang/macros.md +++ b/src/lang/macros.md @@ -12,15 +12,15 @@ The [Little Book of Rust Macros][book-rust-macros]⮳ ## Key crates -[![paste][c-paste-badge]][c-paste] [![paste-github][c-paste-github-badge]][paste-github] +[![paste][c-paste-badge]][c-paste] [![paste-github][c-paste-github-badge]][c-paste-github] [`{{i:Paste}}`][c-paste]⮳ provides a flexible way to paste together identifiers in a macro, including using pasted identifiers to define new items. -[![proc-macro2][c-proc-macro2-badge]][proc-macro2] [![proc-macro2-github][c-proc-macro2-github-badge]][proc-macro2-github] [![proc-macro-workshop][c-proc-macro-workshop-badge]][proc-macro-workshop] +[![proc-macro2][c-proc-macro2-badge]][c-proc-macro2] [![proc-macro2-github][c-proc-macro2-github-badge]][c-proc-macro2-github] [![proc-macro-workshop][proc-macro-workshop-badge]][proc-macro-workshop] -[`{{i:proc-macro2}}`][proc-macro2]⮳ [![proc-macro2-github][c-proc-macro2-github-badge]][proc-macro2-github] bring proc-macro-like functionality to other contexts like build.rs and main.rs and makes procedural macros unit testable. +[`{{i:proc-macro2}}`][c-proc-macro2]⮳ [![proc-macro2-github][c-proc-macro2-github-badge]][c-proc-macro2-github] bring proc-macro-like functionality to other contexts like build.rs and main.rs and makes procedural macros unit testable. -[![syn][c-syn-badge]][c-syn] [![syn-github][c-syn-github-badge]][syn-github] +[![syn][c-syn-badge]][c-syn] [![syn-github][c-syn-github-badge]][c-syn-github] [`{{i:Syn}}`][c-Syn]⮳ is a parsing library for parsing a stream of Rust tokens into a syntax tree of Rust source code. @@ -34,8 +34,8 @@ The [Little Book of Rust Macros][book-rust-macros]⮳ ## See also -[![proc-macro-workshop][c-proc-macro-workshop-badge]][proc-macro-workshop] +[![proc-macro-workshop][proc-macro-workshop-badge]][proc-macro-workshop] -[![watt][c-watt-badge]][c-watt] [![watt-github][c-watt-github-badge]][watt-github] +[![watt][c-watt-badge]][c-watt] [![watt-github][c-watt-github-badge]][c-watt-github] {{#include ../refs/link-refs.md}} diff --git a/src/lang/modules.md b/src/lang/modules.md index 0c98ec5b..487dcdd2 100644 --- a/src/lang/modules.md +++ b/src/lang/modules.md @@ -18,7 +18,7 @@ In Rust, all items (functions, methods, structs, enums, modules, and constants) Items in a parent module can’t use the {{i:private items}} inside child modules, but items in child modules can use the items in their ancestor modules. -[![book-rust-by-example-visibility-rules][c-book-rust-by-example-visibility-rules-badge]][book-rust-by-example-visibility-rules] +[![book-rust-by-example-visibility-rules][book-rust-by-example-visibility-rules-badge]][book-rust-by-example-visibility-rules] [A clear explanation of Rust’s module system][rust-module-system-website]⮳ @@ -26,7 +26,7 @@ Items in a parent module can’t use the {{i:private items}} inside child module Create a shortcut to a path with the [`{{i:use}}`][book-rust-reference-use]⮳ keyword once, and then use the shorter name everywhere else in the scope. -[![book-rust-by-example-use][c-book-rust-by-example-use-badge]][book-rust-by-example-use] +[![book-rust-by-example-use][book-rust-by-example-use-badge]][book-rust-by-example-use] ```rust,editable {{#include ../../deps/tests/modules.rs}} diff --git a/src/lang/trait_objects.md b/src/lang/trait_objects.md index 0b6a6f83..cc7947a3 100644 --- a/src/lang/trait_objects.md +++ b/src/lang/trait_objects.md @@ -8,7 +8,7 @@ A type like `&ClickCallback` or `Box` where `ClickCallback` i {{#include ../../deps/tests/trait_objects.rs}} ``` -The set of traits after [`{{i:dyn}}`][c-dyn] is made up of an [object-safe-reference][book-rust-reference-object-safe]⮳ base trait plus any number of {{i:autotraits}} (one of [`{{i:Send}}`][c-std::marker::Send]⮳, [`{{i:Sync}}`][c-std::marker::Sync]⮳, [`{{i:Unpin}}`][c-std::marker::Unpin]⮳, [`{{i:UnwindSafe}}`][c-std::panic::UnwindSafe]⮳, and [`{{i:RefUnwindSafe}}`][c-std::panic::RefUnwindSafe]⮳ - see [special traits][book-rust-reference-special-traits]⮳). +The set of traits after [`{{i:dyn}}`][keyword-dyn] is made up of an [object-safe-reference][book-rust-reference-object-safe]⮳ base trait plus any number of {{i:autotraits}} (one of [`{{i:Send}}`][c-std::marker::Send]⮳, [`{{i:Sync}}`][c-std::marker::Sync]⮳, [`{{i:Unpin}}`][c-std::marker::Unpin]⮳, [`{{i:UnwindSafe}}`][c-std::panic::UnwindSafe]⮳, and [`{{i:RefUnwindSafe}}`][c-std::panic::RefUnwindSafe]⮳ - see [special traits][book-rust-reference-special-traits]⮳). ```rust,editable,ignore dyn Trait diff --git a/src/other/cross_platform/index.md b/src/other/cross_platform/index.md index afda8f1b..857ac3a9 100644 --- a/src/other/cross_platform/index.md +++ b/src/other/cross_platform/index.md @@ -4,9 +4,9 @@ ## Crux -[![crux][c-crux-badge]][c-crux] [![crux-github][crux-github-badge]][crux-github] +[![crux][c-crux-badge]][c-crux] [![crux-github][c-crux-github-badge]][c-crux-github] -[`{{i:Crux}}`][c-Crux]⮳ is an experimental approach to building {{i:cross-platform}} applications. +[`{{i:Crux}}`][c-crux]⮳ is an experimental approach to building {{i:cross-platform}} applications. It splits the application into two distinct parts, a Core built in Rust, which drives as much of the business logic as possible, and a Shell, built in the platform native language (Swift, Kotlin, TypeScript), which provides all interfaces with the external world, including the human user, and acts as a platform on which the core runs. diff --git a/src/refs/crate-refs.md b/src/refs/crate-refs.md index 2917759e..f1d17d08 100644 --- a/src/refs/crate-refs.md +++ b/src/refs/crate-refs.md @@ -645,6 +645,7 @@ [c-percent_encoding::percent_decode]: https://docs.rs/percent-encoding/latest/percent_encoding/fn.percent_decode.html [c-percent_encoding::utf8_percent_encode]: https://docs.rs/percent-encoding/latest/percent_encoding/fn.utf8_percent_encode.html [c-polars-badge]: https://img.shields.io/crates/v/polars?label=polars +[c-polars-book-badge]: https://img.shields.io/badge/polars_book-coral [c-polars-book]: https://pola-rs.github.io/polars-book/ [c-polars-crates.io-badge]: https://img.shields.io/badge/crates.io-polars-crimson [c-polars-crates.io]: https://crates.io/crates/polars @@ -691,6 +692,7 @@ [c-r3bl-tuify-lib.rs-badge]: https://img.shields.io/badge/lib.rs-r3bl__tuify-yellow [c-r3bl-tuify-lib.rs]: https://lib.rs/crates/r3bl-tuify [c-r3bl-tuify]: https://docs.rs/r3bl_tuify/ +[c-r3bl_tuify-crates.io-badge]: https://img.shields.io/badge/crates.io-r3bl__tuify-crimson [c-r3bl_tuify-crates.io]: https://crates.io/crates/r3bl_tuify [c-rand-badge]: https://img.shields.io/crates/v/rand?label=rand [c-rand-crates.io-badge]: https://img.shields.io/badge/crates.io-rand-crimson @@ -831,7 +833,7 @@ [c-rust-cache-github]: https://github.com/marketplace/actions/rust-cache [c-rust-gpu-github-badge]: https://img.shields.io/badge/rust--gpu-steelblue?logo=github [c-rust-gpu-github]: https://github.com/EmbarkStudios/rust-gpu -[c-rust-tokio-template-github-badge]: https://img.shields.io/badge/rust--tokio--template-steelblue?logo=github + [c-rustfmt-config]: https://rust-lang.github.io/rustfmt/ [c-rustfmt-github-badge]: https://img.shields.io/badge/rustfmt-steelblue?logo=github [c-rustfmt-github]: https://github.com/rust-lang/rustfmt @@ -852,7 +854,7 @@ [c-same-file::is_same_file]: https://docs.rs/same-file/latest/same_file/fn.is_same_file.html [c-same-file]: https://docs.rs/same_file/ [c-sea-orm-badge]: https://img.shields.io/crates/v/sea_orm?label=sea_orm -[c-sea-orm-cookbook-badge]: https://img.shields.io/badge/sea_orm_cookbook-coral +[c-sea-orm-cookbook-badge]: https://img.shields.io/badge/sea__orm_cookbook-coral [c-sea-orm-cookbook]: https://www.sea-ql.org/sea-orm-cookbook/000-sea-orm-cookbook.html [c-sea-orm-crates.io-badge]: https://img.shields.io/badge/crates.io-sea__orm-crimson [c-sea-orm-crates.io]: https://crates.io/crates/sea-orm diff --git a/src/refs/other-refs.md b/src/refs/other-refs.md index 9398aa40..08ae18cd 100644 --- a/src/refs/other-refs.md +++ b/src/refs/other-refs.md @@ -190,11 +190,11 @@ [dev-container-cli-github]: https://github.com/devcontainers/cli [dev-container-extension]: https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers [docker-cache-github]: https://github.com/ScribeMD/docker-cache -[docker-desktop]: https://www.docker.com/products/docker-desktop/ +[docker-desktop-website]: https://www.docker.com/products/docker-desktop/ [docker-getting-started]: https://docs.docker.com/go/get-started-sharing/ [docker-github-action]: https://docs.docker.com/build/ci/github-actions/ [docker-rust-guide]: https://docs.docker.com/language/rust/ -[docker]: https://www.docker.com/ +[docker-website]: https://www.docker.com/ [dockerfile]: https://docs.docker.com/reference/dockerfile/ [docs-rs]: https://docs.rs/ [github-api-rate-limiting]: https://docs.github.com/en/rest/using-the-rest-api/rate-limits-for-the-rest-api?apiVersion=2022-11-28 @@ -296,6 +296,7 @@ [rust-quizz]: https://dtolnay.github.io/rust-quiz/ [rust-starter-pack-badge]: https://img.shields.io/badge/Rust_starter_pack-tan [rust-starter-pack]: https://opheron.github.io/rust-starter-pack/ +[rust-tokio-template-github-badge]: https://img.shields.io/badge/rust--tokio--template-steelblue?logo=github [rust-tokio-template-github]: https://github.com/Finomnis/rust-tokio-template/tree/main [rust-tools-badge]: https://img.shields.io/badge/Rust_tools-tan [rust-tools]: https://www.rust-lang.org/tools diff --git a/src/standard_library/smart_pointers.md b/src/standard_library/smart_pointers.md index 34347560..5012f961 100644 --- a/src/standard_library/smart_pointers.md +++ b/src/standard_library/smart_pointers.md @@ -8,7 +8,7 @@ ## Box -[![book-rust-box][c-book-rust-box-badge]][book-rust-box] [![std][c-std-badge]][c-std] +[![book-rust-box][book-rust-box-badge]][book-rust-box] [![std][c-std-badge]][c-std] `Box` allow you to store data on the {{i:heap}} rather than the {{i:stack}}. What remains on the stack is the pointer to the heap data.