Getting started
Install Ku first and confirm that ku --version runs.
Write your first program
Section titled “Write your first program”Create hello.ku with the same contents as the repository’s examples/hello.ku:
fn main() { println("Hello Ku")}fn main() is the entry point. println writes one line of text. Ku does not use let or let mut.
Check and run
Section titled “Check and run”From the file’s directory:
ku check hello.kuku run hello.kucheck checks lexical, syntax, and basic semantic errors without running the program. The expected standard output when running is:
Hello KuIf Ku is not on PATH, invoke the executable using its full installation path. The Windows executable is ku.exe.
Variables and functions
Section titled “Variables and functions”This basic syntax fragment can be placed inside main:
name = "Ku"count:int = 3println(name)println(count)The first assignment declares a variable. An explicit type uses name:type = value. print writes without an automatic newline; println adds one.
Build an executable
Section titled “Build an executable”The installation page lists the required build tools. For the default backend:
ku build hello.kuThe default backend packages an interpreter runner. Native C compilation requires a separate C compiler:
ku build --backend c hello.kuDefault output lives under .ku/build/<profile>/; use the precise path reported by the CLI. The two backends cover different features. Passing ku check does not prove a native build will succeed.
Note: ku build --native hello.ku without -o emits C source only, without linking. Use the --backend c command above for your first compiled program.
Create a project
Section titled “Create a project”Use a built in template when you need a package directory:
ku create HelloWorld --template basiccd HelloWorldku checkku runThe package entry is configured in ku.mod. ku create --list lists available templates. There are currently no ku test or ku fmt commands.
Continue with the language guide, troubleshooting, and backend support. The outputs here are expected examples and do not replace installation verification on your platform.