Hello World
Your First Program
Section titled “Your First Program”Create a file called hello.chuks:
println("Hello, World!")Run it:
chuks run hello.chuksOutput:
Hello, World!That’s it! Chuks programs run with or without a main() function or entry point class. Top-level statements execute sequentially, just like a scripting language.
A Bit More
Section titled “A Bit More”Let’s try something with variables and a function:
function greet(name: string): string { return `Hello, ${name}!`;}
const message = greet("Chuks")println(message)chuks run greet.chuksHello, Chuks!Build a Binary
Section titled “Build a Binary”You can also compile to a native executable using chuks build command:
chuks build hello.chuks./hello.chuks.binThis produces a standalone binary you can distribute without requiring the Chuks runtime.
Next Steps
Section titled “Next Steps”Ready to build something real? Create your first project.