[Rust] Rust Basics

Posted on Sep 8, 2023
tl;dr: I hope my flame is eternal, to persevere through longings and hardships.

C1. Getting Started

1.1. Hello, world!

Writing code in rust and compiling with bash (WSL env)

// filename: main.rs
// `!` is an indication of macro
// entry point of Rust code is `main`, akin to c-type langs

fn main(){
    println!("Hello, world!");
}
$ rustc main.rs
$ ./main.rs
comments powered by Disqus