Skip to content

Commit

Permalink
update projects
Browse files Browse the repository at this point in the history
  • Loading branch information
rakurame96 committed Jul 21, 2024
1 parent adc7f87 commit 1c09fc9
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 4 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ A small selection of other guides and tutorial for Rust:
- [Collection of traits which describe functionality of cryptographic primitives](https://github.com/RustCrypto/traits/tree/master)
- [Algorithms and Data Structures of all kinds written in Rust](https://github.com/alexfertel/rust-algorithms)
- [The Little Book of Rust Macros](https://danielkeep.github.io/tlborm/book/README.html)
- [Gray-Scott with Rust](https://grayscott-with-rust-grasland-5e6591fc7054976525da4f6c87122ea76c.pages.in2p3.fr/)
- [Gray-Scott with Rust - Writing High Performance Computing (HPC) in Rust!](https://grayscott-with-rust-grasland-5e6591fc7054976525da4f6c87122ea76c.pages.in2p3.fr/)


## Online Articles
Expand All @@ -77,7 +77,7 @@ A small selection of other guides and tutorial for Rust:
- [The missing parts in Cargo](https://weihanglo.tw/posts/2024/the-missing-parts-in-cargo/)
- [Build with Naz : Box and Pin exploration in Rust](https://developerlife.com/2024/07/16/pin-box-dynamic-duo/)

## YouTube Videos to look for
## YouTube Videos to look for (what I watched until now)
- [All Rust features explained](https://www.youtube.com/watch?v=784JWR4oxOI)
- [Visualizing memory layout of Rust's data types](https://www.youtube.com/watch?v=7_o-YRxf_cc)
- ["Intro to Monads for Rustaceans" (July 2022)](https://www.youtube.com/watch?v=4Ky8kvDcshg)
Expand All @@ -86,6 +86,7 @@ A small selection of other guides and tutorial for Rust:
- [Understanding Rust Closures aka. Anonymous Functions 🦀 💻](https://www.youtube.com/watch?v=qXNUHfpalts)
- [Rust Match Expressions and Patterns 🦀](https://www.youtube.com/watch?v=pf8eQwWkTaY)
- [Decrusting the serde crate](https://www.youtube.com/watch?v=BI_bHCGRgMY)
- [How Rust's println! macro really works](https://www.youtube.com/watch?v=WB0l1_YbHok)

## Rust Books Recommendation
- Claus Matzinger • Learn Rust Programming • https://amzn.to/3PeN0Fx
Expand All @@ -97,7 +98,7 @@ A small selection of other guides and tutorial for Rust:
- Ken Youens-Clark • Command-Line Rust • https://amzn.to/3PQZ539
- Kevin Hoffman • Programming WebAssembly with Rust • https://amzn.to/3x3brhe
- [Practical Cryptography for Developers](https://cryptobook.nakov.com/)
- [Explained from First Principles - Number Theory](https://explained-from-first-principles.com/number-theory/)
- [Explained from First Principles - Number Theory](https://explained-from-first-principles.com/number-theory/)
- [Cryptography in Rust for Hackers](https://cryptographyinrustforhackers.com/index.html)

Please see the [Little Book of Rust Books](https://lborb.github.io/book/) for even more Rust books.
Expand Down
4 changes: 4 additions & 0 deletions inpyjama-30-days-of-rust/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ cargo new restaurant --lib --vcs none
rustfmt <.\file_name.rs>
```

```shell
cargo expand --lib --tests
```

> **_NOTE: Ruslings Commands_**
Commands available to you in watch mode:
* `hint` - prints the current exercise's hint
Expand Down
2 changes: 1 addition & 1 deletion projects/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
resolver = "2"

members = [
"guessing-game", "strsplit", "uds-simulator/uds-simulator",
"guessing-game", "macro_rules", "strsplit", "uds-simulator/uds-simulator", "vec_macro",
]
6 changes: 6 additions & 0 deletions projects/macro_rules/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[package]
name = "macro_rules"
version = "0.1.0"
edition = "2021"

[dependencies]
32 changes: 32 additions & 0 deletions projects/macro_rules/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
use std::io::Write;

macro_rules! my_println {
($x: expr) => {
let _ = writeln!(std::io::stdout(), "{}", $x);
};
}

macro_rules! my_println_with_args {
($($args:tt)*) => {
let _ = writeln!(std::io::stdout(), "{}", format_args!($($args)*));
};
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn it_works() {
let name = "Rakuram";
// assert_eq!(result, 4);
my_println!("Hello!");
my_println_with_args!("Hello, {}!", name);
}

// #[test]
// fn it_doesnot_works() {
// let result = square!(2);
// assert_eq!(result, 6);
// }
}

0 comments on commit 1c09fc9

Please sign in to comment.