Skip to content

Hello, World! Script

Bean Pringles edited this page Dec 11, 2025 · 1 revision

First, you would create a non-returning function called main (main runs first)

fn main() {}

Then, because you are using IO, you would import the stdio library.

import stdio

fn main() {}

Finally, inside the main function, you would add a print statement that prints "Hello, World!"

import stdio

fn main() {
    print("Hello, World")
}

This would have the output:

Hello, World!

This is what it would look like in C:

#include <stdio.h>

void main() {
    printf("Hello, World!");
}

Clone this wiki locally