Echo is a small compiled language with glyph-led statements.
A glyph opens each statement and names its role: $ binds, ~ changes, ? branches, * loops, ^ returns. xo checks a program, runs it, and builds a native binary through one LLVM pipeline.
Echo 2026 is the public edition. The Rust toolchain ships as alpha prerelease tags on GitHub, so forms and std APIs can still change. The repository is MIT licensed.
/ std/io
$ xs = [1, 2, 3]
~ sum = 0
* x : xs {
~ sum = sum + x
}
io.print("sum={sum}")xo run output
sum=6
The first character of a statement tells you what it does. The rest of the line is an ordinary expression, so a block reads from its left edge.
A function returns a value with ^ or an error with !. A match with | handles both, and options follow the same shape.
xo run compiles and runs a file. xo run --jit executes the same LLVM output in process, and xo build writes a native executable. On Linux, --static builds a fully static binary and --image wraps it in a scratch OCI image.
std/ ships packages for files, processes, TCP and HTTP, JSON, CSV, compression, and crypto. Tasks spawn with + and join with -.
Programs and their output
Each snippet is a file in the examples directory of the repository. The output beside it comes from xo run.
half returns a value with ^ or an error with !. The match arms $ and ! receive each case.
result_match.echo/ std/io
/ std/str
$ half = (n) {
? n % 2 != 0 {
! "odd"
}
^ n / 2
}
| half(10) {
$ v {
io.print(str.from_int(v))
}
! e {
io.print(e)
}
}
| half(7) {
$ v {
io.print(str.from_int(v))
}
! e {
io.print(e)
}
}xo run output
5
odd
Functions are values. apply receives double as a parameter and calls it.
first_class_fn.echo/ std/io
/ std/str
$ double = (n) {
^ n + n
}
$ apply = (f, x) {
^ f(x)
}
io.print(str.from_int(apply(double, 21)))xo run output
42
% declares a struct. A match on a struct value picks the arm by its type.
match_type.echo/ std/io
/ std/str
% circle {
~ r
}
% rect {
~ w
~ h
}
$ shape = circle { r: 5 }
| shape {
% circle {
io.print(str.from_int(shape.r))
}
% rect {
io.print(str.from_int(shape.w))
}
: {
io.print("other")
}
}xo run output
5
Start
Build xo and write a first program.
- Install Install the current xo prerelease, or build from a checkout.
- First program Minimal runnable shape and the xo check, run, and build commands.
- Project setup Create an entry file and a local workflow.
- Book Why each construct exists, when to use it, and how to read a program.
Language
Statement forms for the Echo 2026 edition.
- Leaders Statement leader forms. A glyph marks the role of each statement.
- Binds and functions Immutable, mutable, and const binds. Functions are values.
- Values and operators Literal forms, operator precedence, equality, and copy.
- Collections and ranges Lists, products, indexing, and inclusive ranges.
- Control If, loops, match, break, and continue.
- Result and option Produce and match result and option shapes.
- Strings Pure and rich string forms.
- Modules and std Imports, exports, and the std/ import policy.
- Structs % shape, @ members, and the method receiver.
- Tasks Spawn work, capture values, and join task handles.
Packages
Userland modules imported as std/ paths.
- Standard library Userland modules for I/O, strings, files, process, JSON, encoding, crypto, collections, and networking.
- API reference Index of public exports across shipped std modules.
Spec
Public language law and the machine-checked suite.
- Echo 2026 Edition home for the current public language.
- Language Spec Spec table of contents mapped to the Reference and the suite.