🌱 Programming language that quickly compiles to machine code. [rewrite in progress]
Find a file
Eduard Urbach 031edd2ffe
All checks were successful
/ test (push) Successful in 29s
Added support for unix scripts
2025-07-07 16:54:38 +02:00
docs Added support for unix scripts 2025-07-07 16:54:38 +02:00
examples Added support for unix scripts 2025-07-07 16:54:38 +02:00
lib Improved Windows x86-64 ABI support 2025-07-05 22:27:01 +02:00
src Added support for unix scripts 2025-07-07 16:54:38 +02:00
tests Added more tests 2025-07-05 12:14:34 +02:00
.gitignore Updated documentation 2025-07-05 17:14:39 +02:00
go.mod Implemented running executables in memory 2025-07-06 20:25:16 +02:00
go.sum Implemented compilation to SSA form 2025-06-23 00:17:05 +02:00
main.go Initial commit 2025-06-18 22:18:31 +02:00

q logo

The Q Programming Language

Note

q is under heavy development and not ready for production yet.

Feel free to get in touch if you are interested in helping out.

Features

  • High performance (ssa and asm optimizations)
  • Tiny executables ("Hello World" is ~500 bytes)
  • Fast compilation (5-10x faster than most)
  • Unix scripting (JIT compilation)
  • No dependencies (no llvm, no libc)

Installation

git clone https://git.urbach.dev/cli/q
cd q
go build

Usage

Quick test:

q run examples/hello

Build an executable:

q build examples/hello

Cross-compile for another OS:

q build examples/hello --os windows

Unix scripts

The compiler is actually so fast that it's possible to use q for scripting. Create a new file:

#!/usr/bin/env q

import io

main() {
	io.write("Hello\n")
}

Add permissions via chmod +x. The file can be executed from anywhere now. The machine code is run directly from memory if the OS supports it.

Tests

go run gotest.tools/gotestsum@latest

Platforms

arm64 x86-64
Linux ✔️ ✔️
Mac ✔️* ✔️
Windows ✔️* ✔️

Those marked with a star are supported in theory but there are no developer machines to test them.

Security

PIE

All executables are built as Position Independent Executables (PIE) supporting a dynamic base address.

Memory pages

Code and data are separated into different memory pages and loaded with different access permissions.

Read Execute Write
Code ✔️ ✔️
Data ✔️

License

Please see the license documentation.

© 2025 Eduard Urbach