Quickstart
Ten minutes from a clone to a running Tycho program. The tutorial is the guided first hour; this page is the shortest path to output.
1. Build
Tycho needs make and a C11 compiler — gcc, or clang 15 or newer.
$ git clone https://github.com/StefanVonRanda/tycho
$ cd tycho
$ make
That builds ./tychoc. Prebuilt binaries are on the releases page.
2. Write a program
Save this as sum.ty:
fn total(xs: [int]) -> int:
s := 0
for x in xs:
s += x
return s
fn main():
xs := [3, 1, 4, 1, 5]
println("sum = " + str(total(xs)))
sum = 14
3. Run it
$ ./tychoc sum.ty
$ ./sum
sum = 14
tychoc transpiles to C and invokes your C compiler. There is no free in the program: xs and s live in the scope that owns them and are released when main returns. That is the whole memory model; from C to arenas explains it from malloc.
Next
- Tutorial — structs, enums,
Result, generics, concurrency. - Language reference — every construct, with runnable examples.
- corelib — 89 packages, imported as
core:<name>. - Examples — a JSON pipeline, an HTTP client, a static-site generator.
- Performance — what the model costs and where it wins.