feat: add useful links for Rust (#5781)

feat/mobile
Ruslan Semagin 6 months ago committed by Kamran Ahmed
parent 4a2130d7d0
commit d95c1d66f0
  1. 4
      src/data/roadmaps/rust/content/105-traits-generics/100-trait-def.md
  2. 5
      src/data/roadmaps/rust/content/105-traits-generics/102-advanced-generics.md
  3. 4
      src/data/roadmaps/rust/content/105-traits-generics/index.md
  4. 5
      src/data/roadmaps/rust/content/109-async-programming/100-tokio.md
  5. 4
      src/data/roadmaps/rust/content/109-async-programming/101-async-std.md
  6. 4
      src/data/roadmaps/rust/content/109-async-programming/102-smol.md
  7. 4
      src/data/roadmaps/rust/content/110-networking/100-reqwest.md
  8. 5
      src/data/roadmaps/rust/content/110-networking/101-hyper.md
  9. 4
      src/data/roadmaps/rust/content/110-networking/102-quinn.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`.
Visit the following resources to learn more:
- [Rust by Example: Traits](https://doc.rust-lang.org/rust-by-example/trait.html)

@ -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 `<T: ?Sized>` 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<T>`, `Result<T, E>`, 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)

@ -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.
Visit the following resources to learn more:
- [Book: Generic Types, Traits, and Lifetimes](https://doc.rust-lang.org/book/ch10-00-generics.html)

@ -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.
Visit the following resources to learn more:
- [Official Website](https://tokio.rs/)
- [Docs.rs: Tokio](https://docs.rs/tokio/latest/tokio/)

@ -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.
Visit the following resources to learn more:
- [Docs.rs: async-std](https://docs.rs/async-std/latest/async_std/)

@ -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.
Visit the following resources to learn more:
- [Docs.rs: smol](https://docs.rs/smol/latest/smol/)

@ -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.
Visit the following resources to learn more:
- [Docs.rs: Reqwest](https://docs.rs/reqwest/latest/reqwest/)

@ -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.
Visit the following resources to learn more:
- [Official Website](https://hyper.rs/)
- [Docs.rs: Hyper](https://docs.rs/hyper/latest/hyper/)

@ -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.
Visit the following resources to learn more:
- [Docs.rs: quinn](https://docs.rs/quinn/latest/quinn/)

Loading…
Cancel
Save