No description
  • D 61.4%
  • Rust 38.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-03-24 20:11:32 +05:30
collect smart pointers 2026-03-10 22:31:19 +05:30
collection rust collections and strings and modules 2026-01-16 01:12:17 +05:30
custom-package rust module and packages demo; 2026-01-10 16:08:10 +05:30
enum-demo enums demo in rust 2026-01-01 20:01:22 +05:30
error-handling error handling 2026-01-18 20:06:59 +05:30
functions chore: add functions, control flow statements, variables 2025-11-25 22:17:10 +05:30
futures futures demo 2026-03-24 20:11:32 +05:30
generics generics and traits 2026-01-28 22:29:37 +05:30
grep feat: implement simple grep(from docs) project 2026-02-13 21:13:45 +05:30
guessing-game chore: add functions, control flow statements, variables 2025-11-25 22:17:10 +05:30
hashmap error handling 2026-01-18 20:06:59 +05:30
lifetimes lifetimes struct example 2026-01-29 11:34:23 +05:30
modules-demo rust collections and strings and modules 2026-01-16 01:12:17 +05:30
problems chore: some more examples 2025-11-27 22:27:51 +05:30
sp futures demo 2026-03-24 20:11:32 +05:30
src generics and traits 2026-01-28 22:29:37 +05:30
strings rust collections and strings and modules 2026-01-16 01:12:17 +05:30
struct-demo enums demo in rust 2026-01-01 20:01:22 +05:30
thread some more smart pointers like RefCell, Rc, Arc and threads 2026-03-14 17:33:28 +05:30
trait-demo generics and traits 2026-01-28 22:29:37 +05:30
variables chore: some more examples 2025-11-27 22:27:51 +05:30
.gitignore rust initial learnings 2025-11-21 00:03:33 +05:30
Cargo.lock rust initial learnings 2025-11-21 00:03:33 +05:30
Cargo.toml futures demo 2026-03-24 20:11:32 +05:30
README.md readme update 2025-11-21 20:19:31 +05:30

Rust

Unfortunately am into this rust thing now.. there is no going back, lets learn this mf.

Intro | notes to me

Rust is a compiled programming language like go | C | C++, to add more in rust memory management is manual unlike go | java | js etcc, where you will get automatic GC on ur runtime. In Rust there is a in house tool called cargo, which is the dependency manager, similar to npm in js, cargo new project creates a new project with directories src/main.rs, cargo.toml files, cargo.toml files contains the project information like project_name, dependencies needed etc.

  • cargo build - builds your program and puts the executable under target/debuge/*.
  • cargo check - builds your program and checks if there are any issues, but it won't produce any binary/executable so its fast compared to build.
  • cargo run - builds and produce an executable and also runs the executable for us, similar to go run main.go
fn hello_world() {
    println!("Hello World!");
}

fn main() {
    hello_world();
}

Above is the basic Hello world program in rust, as you can see in rust function is declared using fn keyword, one interesting thing i found is instead of normal println here we are calling println!, the ! means we are calling a macro(kinda c macro) not a normal function.

Crate

Crates in rust are kinda of dependencies/npm packages in binary or library, that we can use in our application, these can be downloaded using cargo(package manager).