Skip to main content

First program

Create a new project

kaede new hello_kaede
cd hello_kaede

Kaede creates a project with a Kaede.toml manifest, a src/ directory, and a starter main.kd file:

fun main() {
println("hello, world!")
}

The generated Kaede.toml:

[package]
name = "hello_kaede"
version = "0.1.0"

[build]
src = "src"
out = "build/hello_kaede"

kaede new sets build.out to build/<package.name> so the produced binary mirrors your package name.

Run it

kaede run

The run command builds the project and then runs the output binary (here build/hello_kaede). With the default scaffold, it prints:

hello, world!

If you want the steps separately:

kaede build
./build/hello_kaede

Project layout

The minimum project shape is:

hello_kaede/
├── Kaede.toml
└── src/
└── main.kd

Kaede.toml marks the project root. kaede build and kaede run require it in the working directory; the [build] section controls the source directory and the output binary path.

Rust interop scaffold

If you know you want Rust interop from the start, create the project with:

kaede new hello_kaede --rust

That gives you both Kaede sources and a rust/ crate that Kaede can import. The generated Kaede.toml additionally contains a [rust] section that records the crate path.

Next: read the language overview.