Docs/your first program
YOUR FIRST PROGRAM

Hello, native world.

Create a project, write CHUD, and run an actual executable.

01. Create a project.

POWERSHELL
chud new HelloCHUD
cd HelloCHUD
Project structure
HelloCHUD/
├── chud.toml
├── src/
│   └── Program.chud
└── README.md

chud new creates real source and configuration files. It refuses to overwrite an existing directory. Add --empty for an entry point without console output.

02. Make it CHUD.

Open src/Program.chud. The generated console template already contains a small, complete application:

src/Program.chud
chud CHUD.App;

use CHUD.Core;

public func Main() -> int
{
    CHUD.Print("Hello from CHUD!");
    return 0;
}

public func Main() -> int is the entry point. CHUD.Print writes a value and a newline. Returning zero signals success.

03. Build it. Run it.

POWERSHELL
chud build
chud run

chud run compiles your current project before executing it. If compilation fails, it stops instead of running an old binary.

Expected application output
Hello from CHUD!

Build files live under .chud/debug/. Try chud run --release for an optimized build.

Keep going.

Try a mutable binding, add a function, or open your project folder in CHUD Studio.

Covers the implemented 0.1.0-alpha subset · Windows x64

Search language syntax, setup, Studio, and more.

CHUD DOCUMENTATION↑ ↓ to navigate · Enter to open