Hello World with Rust

Posted by I. B. Gd Pramana A. Putra, 12 Mar 22, last updated 17 Jul 22

This is a Rust code snippet/Kotlin program to print “Hello World” output. In this code snippet, we will create a simple program that displays “Hello World” once we executed the program.

“Hello World” is a simple computer program that outputs a simple line of a message “Hello World”, because it’s simplicity, it is often used to illustrate the basic syntax of a programming language. It is also often the first program written by people learning to Rust code.

Here’s an example code snippet / program code to display the Hello World message in Rust programming language:

fn main() {
    println!("Hello World!");


The Rust Hello World code above will produce the following result:

Hello World!

You can also read others Hello World syntax codes in various programming languages by reading the “Hello World!” in 20+ Programming Languages.

I love sharing code snippets as most of the time, a quick code example is what we're looking for instead of long-written articles. If you think my code snippets are helpful and save you a lot of time, please consider buying me a cup of coffee :)

Support me via · paypal · buymeacoffee · ko-fi · trakteer
Contributed Snippets
Answer & Responses
    No comments yet

Wanna write a response?

You have to login before write a comment to this post.