Skip to content

Instantly share code, notes, and snippets.

@e10101
Created August 31, 2024 10:34
Show Gist options
  • Save e10101/73df05ca59316f07c62cd7c99dca8670 to your computer and use it in GitHub Desktop.
Save e10101/73df05ca59316f07c62cd7c99dca8670 to your computer and use it in GitHub Desktop.
Learn Gist

Hello World!

# Create a new Rust project
cargo new learn_rust

# Change directory to the new folder
cd learn_rust

In the created project's src/main.rs file, type following codes:

fn main() {
    println!("Hello, world!");
}

Then run your code with the Run button from VSCode's rust-analyzer extension, or using follow command:

cargo run --bin learn_rust
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment