🌱 Programming language that quickly compiles to machine code. [rewrite in progress]
Find a file
Eduard Urbach 96b9c1bf8d
All checks were successful
/ test (push) Successful in 17s
Updated documentation
2025-07-05 15:30:13 +02:00
docs Updated documentation 2025-07-05 15:30:13 +02:00
examples/hello Added hello example 2025-06-18 23:05:20 +02:00
lib Added write syscall for Mac on arm64 2025-07-05 14:24:41 +02:00
src Added ABI definitions 2025-07-05 11:33:53 +02:00
tests Added more tests 2025-07-05 12:14:34 +02:00
.gitignore Initial commit 2025-06-18 22:18:31 +02:00
go.mod Implemented compilation to SSA form 2025-06-23 00:17:05 +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

A programming language including compiler, assembler and linker with the following goals:

  • Fast compilation
  • High performance
  • Tiny executables

Installation

Build:

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

Symlink:

ln -s $PWD/q ~/.local/bin/q

Usage

Build:

q build examples/hello

Run:

./examples/hello/hello

Tests

To run all tests:

go run gotest.tools/gotestsum@latest

Every package must pass its unit tests.

The code coverage should ideally be around 80-100% for each package.

Integration tests that test the output of the produced executables are located in the dedicated tests directory.

Platforms

Matrix

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

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

Cross compilation

Compilation for a different target is supported out of the box:

q build examples/hello --os linux
q build examples/hello --os mac
q build examples/hello --os windows
q build examples/hello --arch x86
q build examples/hello --arch arm

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 ✔️

Status

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

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

License

Please see the license documentation.

© 2025 Eduard Urbach