Hello World

Write your first Sounio program

Hello World

Let’s write your first Sounio program.

Creating the File

Create a new file called hello.sio:

fn main() with IO {
    print("Hello, World!")
}

Understanding the Code

  • fn main() - The entry point of every Sounio program
  • with IO - Declares that this function performs IO effects
  • print(...) - Outputs text to the console

Running the Program

sounio run hello.sio

Output:

Hello, World!

Adding Variables

fn main() with IO {
    let name = "Sounio"
    let year = 2026

    print("Welcome to " + name + "!")
    print("Established in " + year.to_string())
}

Next Steps

Now that you’ve written your first program, learn about: