Your first run

Put something on screen. Create a file hello.hl: Run it: hale run compiles your program and runs it in one step — it's the same native code hale build…

Put something on screen.

Create a file hello.hl:

fn main() {
println("Hello from Hale.");
}

Run it:

Terminal window
hale run hello.hl
Hello from Hale.

hale run compiles your program and runs it in one step — it’s the same native code hale build produces, just executed immediately and not left on disk. When you want the artifact to keep and ship, build it:

Terminal window
hale build hello.hl
./hello

Same compiler, same output: run is the fast inner-loop shape, build is for the binary you deploy. There’s no separate interpreter, so anything that runs under build runs identically under run.

What’s here

Section titled “What’s here”

Comments are C-style:

// a line comment
/* a block comment */

That’s the whole surface you need to start. The next chapter introduces variables and the value types — the vocabulary every Hale program is built from.

hale run and imports. import "..." as ...; directives are resolved by hale run just as hale build resolves them, for a single file and for a directory (hale run ./dir, which takes the directory’s files as one program).

Build modes, diagnostics, and debugging

Section titled “Build modes, diagnostics, and debugging”

A few switches worth knowing from day one: