DEV Community

vasanthkumar
vasanthkumar

Posted on • Updated on

Hello, World! in Rust

Hi devs,
Welcome to my Blog-A-Thon. I just thought of writing a blog a day, for the rest of the month. So, quick decisions. I will write whatever that comes to my mind. The idea is to develop the habit of writing, no matter how shitty the writing is!. Please bear with me.

About Today's work:

I need to connect to clients Virtual Desktop Infrastructure (VDI) for work. Usually, it doesn't work properly and will take some time to respond to our inputs. Today also falls into same category. I just worked for 3hrs(I forgot to mention, I need to be in War Room Call in MS Teams from 9 AM to 7PM) properly and remaining hours to just frustrate why VDI is slow as hell. I helped my colleagues with some code(Finally, one positive thing). I don't why but I like solving user stories of others than mine(:sick). I am stopping it there.

Rust

I am a front-end React Developer. I like writing JavaScript ( yeah , you heard it right!) but hate when I need to spend so much time messing my code and UI design with CSS ( padding, margin, display, position, font-weight, button:hover). I am longing to switch to backend from so many days. Not only backend but just be away with CSS for some time, at-least outside the work. So, I made up my mind to learn Rust,, just like that.

I am using Ubuntu OS and Rust,Cargo were installed almost a year back;

Cargo

Cargo is a package manage they say. I don't know anything completely. As I am from JavaScript world,I assumed it similar to Node Package Manager. Some say it is and I don't know what the other says and don't wanna know for now!!

I am following and may follow this Rust book to learn Rust initially.

Hello, World!

I created the new Rust project withcargo new project. It created project folder with Cargo.toml and src/main.rs .

and inside src/main.rs, there is already something written inside it. It is

fn main() {
    println!("Hello, world!");
}
Enter fullscreen mode Exit fullscreen mode

I opened the src/rust.rs file and closed it again. I didn't any line of code to it. I ran cargo run. It compiled and logged Hello, world! on the terminal. So, my rust code is just running cargo commands instead of anything. Yeah, I liked it. Need to see weather I will like it or hate it.

I started following the second chapter Guessing Game, will write about it tomorrow. Its already 10:47PM now, need to wake up early!!!

I want to code a TO DO app by the end of this week with rust.


Aug 1, 2023
10:50 PM
Visakhapatnam
Vasanth Kumar Cheepurupalli

Top comments (0)