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 {
println("Hello, Sounio!")
}
Understanding the Code
fn main()- The entry point of every Sounio programwith IO- Declares that this function performs IO (recommended; the spec requires explicit effects)println(...)- Outputs a value to the console
Running the Program
souc run hello.sio
Output:
Hello, Sounio!
Adding Variables
fn main() with IO {
let name = "Sounio"
let year = 2026
print("Welcome to ")
println(name)
print("Established in ")
println(year)
}
Next Steps
Now that you’ve written your first program, learn about: