Features Β· Quickstart Β· Examples Β· Docs
A minimal, dependency-free language that compiles to tiny, fast machine code.
- π High performance (comparable to C and Go)
- π Fast compilation (5-10x faster than most compilers)
- π¦ Lightweight executables (1 KB for simple programs)
- π Static analysis (integrated linter catches common mistakes)
- π‘οΈ Pointer safety (pointers cannot be nil)
- β»οΈ Resource safety (use-after-free is a compile error)
- π§ Simple syntax (control flow is easily understood)
- π¬ Friendly errors (clear and concise compiler messages)
- π General purpose (apps, servers, games, kernels, etc.)
- π§© Multiple architectures (x86-64 and arm64)
- π₯οΈ Multiple platforms (Linux, Mac and Windows)
- π Readable source (less than 1% of LLVM's code size)
- π§ Zero dependencies (no external tools or libraries)
git clone https://git.urbach.dev/cli/q
cd q
go build
ln -s $PWD/q ~/.local/bin/q examples/helloq build examples/helloCross-compile with -os:
q build examples/hello -os windowsq ssa examples/hello # SSA form
q asm examples/hello # Assembly outputimport io
main() {
io.write("Hello\n")
}echo() {
buffer := new(byte, 4096)
loop {
n, _ := io.read(buffer)
if n == 0 {
return
}
io.write(buffer[..n])
}
}fibonacci(n int) -> int {
if n <= 1 {
return n
}
return fibonacci(n - 1) + fibonacci(n - 2)
}fizzbuzz(x int) {
switch {
x % 15 == 0 { io.write("FizzBuzz") }
x % 5 == 0 { io.write("Buzz") }
x % 3 == 0 { io.write("Fizz") }
_ { io.write(x) }
}
}See more in the examples directory.
See the license documentation.
Β© 2025 Eduard Urbach