From d95c1d66f06299fd51c1ba04e4ca0934c1017890 Mon Sep 17 00:00:00 2001 From: Ruslan Semagin <53819609+pixel365@users.noreply.github.com> Date: Fri, 31 May 2024 17:36:12 +0300 Subject: [PATCH] feat: add useful links for Rust (#5781) --- .../rust/content/105-traits-generics/100-trait-def.md | 6 +++++- .../content/105-traits-generics/102-advanced-generics.md | 7 ++++++- .../roadmaps/rust/content/105-traits-generics/index.md | 6 +++++- .../rust/content/109-async-programming/100-tokio.md | 7 ++++++- .../rust/content/109-async-programming/101-async-std.md | 6 +++++- .../rust/content/109-async-programming/102-smol.md | 6 +++++- .../roadmaps/rust/content/110-networking/100-reqwest.md | 6 +++++- src/data/roadmaps/rust/content/110-networking/101-hyper.md | 7 ++++++- src/data/roadmaps/rust/content/110-networking/102-quinn.md | 6 +++++- 9 files changed, 48 insertions(+), 9 deletions(-) diff --git a/src/data/roadmaps/rust/content/105-traits-generics/100-trait-def.md b/src/data/roadmaps/rust/content/105-traits-generics/100-trait-def.md index 95592beb6..97fc85fdd 100644 --- a/src/data/roadmaps/rust/content/105-traits-generics/100-trait-def.md +++ b/src/data/roadmaps/rust/content/105-traits-generics/100-trait-def.md @@ -1,3 +1,7 @@ # Trait Definitions and Implementations -A `trait` definition in Rust is a way to define a set of behaviors necessary for a certain type. It is essentially an interface that types can implement. The `trait` def is created using the `trait` keyword followed by its name and the set of methods it includes enclosed in curly brackets. These methods are defined under the trait with their signature but without their implementation. Once a trait is defined, it can be implemented for any data type. Note that the type that this trait applies to is represented by the keyword `Self`. For example, `trait GetName { fn get_name(&self) -> String; }` defines a trait `GetName` with a method `get_name`. This trait can then be implemented for any type that needs the behaviour `get_name`. \ No newline at end of file +A `trait` definition in Rust is a way to define a set of behaviors necessary for a certain type. It is essentially an interface that types can implement. The `trait` def is created using the `trait` keyword followed by its name and the set of methods it includes enclosed in curly brackets. These methods are defined under the trait with their signature but without their implementation. Once a trait is defined, it can be implemented for any data type. Note that the type that this trait applies to is represented by the keyword `Self`. For example, `trait GetName { fn get_name(&self) -> String; }` defines a trait `GetName` with a method `get_name`. This trait can then be implemented for any type that needs the behaviour `get_name`. + +Visit the following resources to learn more: + +- [Rust by Example: Traits](https://doc.rust-lang.org/rust-by-example/trait.html) diff --git a/src/data/roadmaps/rust/content/105-traits-generics/102-advanced-generics.md b/src/data/roadmaps/rust/content/105-traits-generics/102-advanced-generics.md index 201a81a26..e2a51b71d 100644 --- a/src/data/roadmaps/rust/content/105-traits-generics/102-advanced-generics.md +++ b/src/data/roadmaps/rust/content/105-traits-generics/102-advanced-generics.md @@ -1,3 +1,8 @@ # Advanced Generics and Type-level Programming -Advanced generics in Rust offer a powerful set of tools for creating reusable and efficient code. The `where` syntax in generics can be used to specify trait and lifetime bounds, creating a more expressive declaration and avoiding numerous `T: Trait` inline annotations. Additionally, the `` syntax allows for using dynamically sized types in generics. Advanced generics also allow for defining methods that apply to a subset of variations of generic types using an associated type. Furthermore, this allows for operator overloading through the use of associated types in traits, enhancing flexibility while retaining strong typing. Another advanced use of generics is 'higher kinded types', allowing a type constructor to take another type constructor as a parameter. This is the system Rust uses for handling `Option`, `Result`, and other similar types. \ No newline at end of file +Advanced generics in Rust offer a powerful set of tools for creating reusable and efficient code. The `where` syntax in generics can be used to specify trait and lifetime bounds, creating a more expressive declaration and avoiding numerous `T: Trait` inline annotations. Additionally, the `` syntax allows for using dynamically sized types in generics. Advanced generics also allow for defining methods that apply to a subset of variations of generic types using an associated type. Furthermore, this allows for operator overloading through the use of associated types in traits, enhancing flexibility while retaining strong typing. Another advanced use of generics is 'higher kinded types', allowing a type constructor to take another type constructor as a parameter. This is the system Rust uses for handling `Option`, `Result`, and other similar types. + +Visit the following resources to learn more: + +- [Book: Generics](https://doc.rust-lang.org/book/ch10-01-syntax.html) +- [Rust by Example: Generics](https://doc.rust-lang.org/rust-by-example/generics.html) diff --git a/src/data/roadmaps/rust/content/105-traits-generics/index.md b/src/data/roadmaps/rust/content/105-traits-generics/index.md index 10ac6391f..6c07c5ac5 100644 --- a/src/data/roadmaps/rust/content/105-traits-generics/index.md +++ b/src/data/roadmaps/rust/content/105-traits-generics/index.md @@ -1,3 +1,7 @@ # Traits and Generics -Traits generics are a notable feature in Rust that pertain to defining shared behavior across data types. With them, you can specify placeholder types in trait definitions, letting you abstract over a range of possibilities. They're a means for defining shared behavior -- abstracting over functionality that types can have in common. You can apply traits to generics to constrain the types passed to the generic, hence permitting trait methods to be called on those types. You identify a generic parameter's type by the trait it implements, making it possible to use generic types in the trait methods. In essence, Rust achieves polymorphism through utilizing traits on generics. \ No newline at end of file +Traits generics are a notable feature in Rust that pertain to defining shared behavior across data types. With them, you can specify placeholder types in trait definitions, letting you abstract over a range of possibilities. They're a means for defining shared behavior -- abstracting over functionality that types can have in common. You can apply traits to generics to constrain the types passed to the generic, hence permitting trait methods to be called on those types. You identify a generic parameter's type by the trait it implements, making it possible to use generic types in the trait methods. In essence, Rust achieves polymorphism through utilizing traits on generics. + +Visit the following resources to learn more: + +- [Book: Generic Types, Traits, and Lifetimes](https://doc.rust-lang.org/book/ch10-00-generics.html) diff --git a/src/data/roadmaps/rust/content/109-async-programming/100-tokio.md b/src/data/roadmaps/rust/content/109-async-programming/100-tokio.md index f5d606dce..7d50ce258 100644 --- a/src/data/roadmaps/rust/content/109-async-programming/100-tokio.md +++ b/src/data/roadmaps/rust/content/109-async-programming/100-tokio.md @@ -1,3 +1,8 @@ # Tokio -Tokio, a Rust framework for developing applications, is used primarily for asynchronous programming that enables you to write asynchronous inputs/output, networking, and other features. Its primary function is to deliver high-performance, reliable, and easy-to-use asynchronous event-driven platform. It is built on the futures library and uses the async/await syntax of Rust for readability purposes. Tokio's 'runtime' provides I/O driver functions, scheduling and timers offering a foundation for asynchronous programming. It is designed to handle a high volume of network connections concurrently, making it ideal for building network applications. \ No newline at end of file +Tokio, a Rust framework for developing applications, is used primarily for asynchronous programming that enables you to write asynchronous inputs/output, networking, and other features. Its primary function is to deliver high-performance, reliable, and easy-to-use asynchronous event-driven platform. It is built on the futures library and uses the async/await syntax of Rust for readability purposes. Tokio's 'runtime' provides I/O driver functions, scheduling and timers offering a foundation for asynchronous programming. It is designed to handle a high volume of network connections concurrently, making it ideal for building network applications. + +Visit the following resources to learn more: + +- [Official Website](https://tokio.rs/) +- [Docs.rs: Tokio](https://docs.rs/tokio/latest/tokio/) diff --git a/src/data/roadmaps/rust/content/109-async-programming/101-async-std.md b/src/data/roadmaps/rust/content/109-async-programming/101-async-std.md index bf650c9a1..a57596be0 100644 --- a/src/data/roadmaps/rust/content/109-async-programming/101-async-std.md +++ b/src/data/roadmaps/rust/content/109-async-programming/101-async-std.md @@ -1,3 +1,7 @@ # async-std -`async-std` is a Rust library that provides an asynchronous version of the standard library. With the goal of being a drop-in replacement for Rust's standard library, it brings asynchronous programming directly into Rust's native system library, std. The most essential part inside `async-std` is an asynchronous runtime which includes IO and task scheduling. It lets you write asynchronous code that looks like synchronous code without having to worry about using future combinators or remembering to check if futures are ready. This significantly simplifies Rust's asynchronous programming model. \ No newline at end of file +`async-std` is a Rust library that provides an asynchronous version of the standard library. With the goal of being a drop-in replacement for Rust's standard library, it brings asynchronous programming directly into Rust's native system library, std. The most essential part inside `async-std` is an asynchronous runtime which includes IO and task scheduling. It lets you write asynchronous code that looks like synchronous code without having to worry about using future combinators or remembering to check if futures are ready. This significantly simplifies Rust's asynchronous programming model. + +Visit the following resources to learn more: + +- [Docs.rs: async-std](https://docs.rs/async-std/latest/async_std/) diff --git a/src/data/roadmaps/rust/content/109-async-programming/102-smol.md b/src/data/roadmaps/rust/content/109-async-programming/102-smol.md index 7d126fc6c..6113d0818 100644 --- a/src/data/roadmaps/rust/content/109-async-programming/102-smol.md +++ b/src/data/roadmaps/rust/content/109-async-programming/102-smol.md @@ -1,3 +1,7 @@ # smol -`smol` is a small, fast, and modern async runtime for Rust programming language. It is built on top of async-std and tokio. With very few lines of code, it allows users to perform tasks such as creating async functions, waiting on a future, creating a timer, among others. Although it is feature-rich, smol keeps its API minimal and clean, making it the go-to choice for many developers working with Rust. It supports async/.await natively and is highly efficient due to its superior scheduling capabilities. \ No newline at end of file +`smol` is a small, fast, and modern async runtime for Rust programming language. It is built on top of async-std and tokio. With very few lines of code, it allows users to perform tasks such as creating async functions, waiting on a future, creating a timer, among others. Although it is feature-rich, smol keeps its API minimal and clean, making it the go-to choice for many developers working with Rust. It supports async/.await natively and is highly efficient due to its superior scheduling capabilities. + +Visit the following resources to learn more: + +- [Docs.rs: smol](https://docs.rs/smol/latest/smol/) diff --git a/src/data/roadmaps/rust/content/110-networking/100-reqwest.md b/src/data/roadmaps/rust/content/110-networking/100-reqwest.md index 59174086e..a093fa907 100644 --- a/src/data/roadmaps/rust/content/110-networking/100-reqwest.md +++ b/src/data/roadmaps/rust/content/110-networking/100-reqwest.md @@ -1,3 +1,7 @@ # reqwest -`Reqwest` is a Rust library which is designed to make HTTP requests easy and effortless. It offers a mix of convenience methods for both synchronous and asynchronous requests,GET,POST and other HTTP methods. It also supports JSON content and is built on `hyper` for HTTP and `tokio` for asynchronous I/O. This means you can take advantage of the powerful asynchronous features of Rust such as Futures and async/await. Furthermore, `Reqwest` takes care of many tedious aspects of HTTP for you, such as handling cookies and encoding/decoding different formats. \ No newline at end of file +`Reqwest` is a Rust library which is designed to make HTTP requests easy and effortless. It offers a mix of convenience methods for both synchronous and asynchronous requests,GET,POST and other HTTP methods. It also supports JSON content and is built on `hyper` for HTTP and `tokio` for asynchronous I/O. This means you can take advantage of the powerful asynchronous features of Rust such as Futures and async/await. Furthermore, `Reqwest` takes care of many tedious aspects of HTTP for you, such as handling cookies and encoding/decoding different formats. + +Visit the following resources to learn more: + +- [Docs.rs: Reqwest](https://docs.rs/reqwest/latest/reqwest/) diff --git a/src/data/roadmaps/rust/content/110-networking/101-hyper.md b/src/data/roadmaps/rust/content/110-networking/101-hyper.md index f456bc8dd..768a60909 100644 --- a/src/data/roadmaps/rust/content/110-networking/101-hyper.md +++ b/src/data/roadmaps/rust/content/110-networking/101-hyper.md @@ -1,3 +1,8 @@ # hyper -"Hyper" is a fast, safe and concurrent HTTP client and server written in Rust. It uses a non-blocking I/O model for efficient execution, leverages the Tokio platform for event-driven, asynchronous I/O, and includes support for HTTP/2. It has a modular design, allowing you to choose the features you need. Hyper also features a server-side framework for building your own HTTP applications. For security and speed, it comes with native support for HTTP/1 and HTTP/2, and automatically negotiates these protocols. Most importantly, it is designed from the ground up to take advantage of Rust's memory safety and concurrency features. \ No newline at end of file +"Hyper" is a fast, safe and concurrent HTTP client and server written in Rust. It uses a non-blocking I/O model for efficient execution, leverages the Tokio platform for event-driven, asynchronous I/O, and includes support for HTTP/2. It has a modular design, allowing you to choose the features you need. Hyper also features a server-side framework for building your own HTTP applications. For security and speed, it comes with native support for HTTP/1 and HTTP/2, and automatically negotiates these protocols. Most importantly, it is designed from the ground up to take advantage of Rust's memory safety and concurrency features. + +Visit the following resources to learn more: + +- [Official Website](https://hyper.rs/) +- [Docs.rs: Hyper](https://docs.rs/hyper/latest/hyper/) diff --git a/src/data/roadmaps/rust/content/110-networking/102-quinn.md b/src/data/roadmaps/rust/content/110-networking/102-quinn.md index d35993e2e..f946614d0 100644 --- a/src/data/roadmaps/rust/content/110-networking/102-quinn.md +++ b/src/data/roadmaps/rust/content/110-networking/102-quinn.md @@ -1,3 +1,7 @@ # quinn -`Quinn` is a Rust networking library providing high-level access to the QUIC protocol. It is built on top of the `tokio` runtime and implements the QUIC transport protocol as specified by the IETF. It provides an async, futures-based API for working with QUIC connections and streams. It is designed to offer high performance with robustness and flexibility, supporting both client and server roles. The QUIC protocol itself is a multiplexed and secure transport protocol positioned as a modern alternative to TCP, offering better performance for many networking applications. \ No newline at end of file +`Quinn` is a Rust networking library providing high-level access to the QUIC protocol. It is built on top of the `tokio` runtime and implements the QUIC transport protocol as specified by the IETF. It provides an async, futures-based API for working with QUIC connections and streams. It is designed to offer high performance with robustness and flexibility, supporting both client and server roles. The QUIC protocol itself is a multiplexed and secure transport protocol positioned as a modern alternative to TCP, offering better performance for many networking applications. + +Visit the following resources to learn more: + +- [Docs.rs: quinn](https://docs.rs/quinn/latest/quinn/)