Updated documentation
All checks were successful
/ test (push) Successful in 15s

This commit is contained in:
Eduard Urbach 2025-07-05 17:02:53 +02:00
parent 96b9c1bf8d
commit 29c797fd5b
Signed by: akyoto
GPG key ID: 49226B848C78F6C8
4 changed files with 17 additions and 54 deletions

1
.gitignore vendored
View file

@ -6,4 +6,5 @@
!*.sum
!*.md
!*.txt
!*.svg
!.gitignore

1
docs/logo.svg Normal file
View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="830" height="210"><g aria-label="q" style="font-style:normal;font-weight:400;font-size:72px;line-height:1;font-variant-ligatures:normal;text-align:center;text-anchor:middle"><path fill="#fcfcfc" d="M334.481 27.627c-38.878 0-70.48 31.603-70.48 70.668 0 38.88 31.603 70.288 70.48 70.288 38.876 0 70.669-31.407 70.669-70.287 0-39.066-31.793-70.669-70.669-70.669zm0 115.484c-24.899 0-45.008-19.916-45.008-44.815 0-24.895 20.109-45.197 45.007-45.197 24.896 0 45.198 20.302 45.198 45.197 0 24.899-20.302 44.815-45.198 44.815z" class="c1"/><path fill="#b8db9f" d="M380.444 169.731c0-7.085 5.745-12.638 12.639-12.638 7.088 0 12.833 5.553 12.833 12.638 0 6.896-5.745 12.642-12.833 12.642-6.894 0-12.64-5.745-12.64-12.642z" class="c3"/></g><text xml:space="preserve" x="437.567" y="69.2" style="font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:16px;font-family:&quot;Ubuntu Nerd Font&quot;;-inkscape-font-specification:&quot;Ubuntu Nerd Font, Normal&quot;;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:start;writing-mode:lr-tb;direction:ltr;text-anchor:start;fill:#fff;fill-opacity:1"><tspan x="437.567" y="69.2">fast compilation</tspan><tspan x="437.567" y="109.2">high performance</tspan><tspan x="437.567" y="149.2">tiny executables</tspan></text></svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

@ -1,14 +1,11 @@
# q
<p align="center"><img alt="q logo" src="logo.svg"></p>
A programming language including compiler, assembler and linker with the following goals:
> [!NOTE]
> `q` is under heavy development and not ready for production yet.
>
> Feel free to [get in touch](https://urbach.dev/contact) if you are interested in helping out.
- Fast compilation
- High performance
- Tiny executables
## Installation
Build:
## ⚡️ Installation
```shell
git clone https://git.urbach.dev/cli/q
@ -16,43 +13,26 @@ cd q
go build
```
Symlink:
To symlink the compiler as `q`:
```shell
ln -s $PWD/q ~/.local/bin/q
```
## Usage
Build:
## 🚀 Usage
```shell
q build examples/hello
```
Run:
```shell
./examples/hello/hello
```
## Tests
To run all tests:
## 🚦 Tests
```shell
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
## 💻 Platforms
| | arm64 | x86-64 |
| ------- | ------ | ------ |
@ -62,22 +42,7 @@ Integration tests that test the output of the produced executables are located i
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:
```shell
q build examples/hello --os linux
q build examples/hello --os mac
q build examples/hello --os windows
```
```shell
q build examples/hello --arch x86
q build examples/hello --arch arm
```
## Security
## ⚠️ Security
### PIE
@ -92,16 +57,10 @@ Code and data are separated into different memory pages and loaded with differen
| Code | ✔️ | ✔️ | ❌ |
| Data | ✔️ | ❌ | ❌ |
## Status
`q` is under heavy development and not ready for production yet.
Feel free to [get in touch](https://urbach.dev/contact) if you are interested in helping out.
## License
## 🧾 License
Please see the [license documentation](https://urbach.dev/license).
## Copyright
## 🧔 Copyright
© 2025 Eduard Urbach

View file

@ -5,6 +5,8 @@ Usage:
Commands:
build [directory | file] build an executable
--arch [arch] cross-compile for ISA: [x86|arm]
--os [os] cross-compile for OS: [linux|mac|windows]
--verbose, -v show everything
run [directory | file] build and run the executable