This commit is contained in:
parent
96b9c1bf8d
commit
29c797fd5b
4 changed files with 17 additions and 54 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -6,4 +6,5 @@
|
||||||
!*.sum
|
!*.sum
|
||||||
!*.md
|
!*.md
|
||||||
!*.txt
|
!*.txt
|
||||||
|
!*.svg
|
||||||
!.gitignore
|
!.gitignore
|
1
docs/logo.svg
Normal file
1
docs/logo.svg
Normal 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:"Ubuntu Nerd Font";-inkscape-font-specification:"Ubuntu Nerd Font, Normal";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 |
|
@ -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
|
## ⚡️ Installation
|
||||||
- High performance
|
|
||||||
- Tiny executables
|
|
||||||
|
|
||||||
## Installation
|
|
||||||
|
|
||||||
Build:
|
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
git clone https://git.urbach.dev/cli/q
|
git clone https://git.urbach.dev/cli/q
|
||||||
|
@ -16,43 +13,26 @@ cd q
|
||||||
go build
|
go build
|
||||||
```
|
```
|
||||||
|
|
||||||
Symlink:
|
To symlink the compiler as `q`:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
ln -s $PWD/q ~/.local/bin/q
|
ln -s $PWD/q ~/.local/bin/q
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## 🚀 Usage
|
||||||
|
|
||||||
Build:
|
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
q build examples/hello
|
q build examples/hello
|
||||||
```
|
|
||||||
|
|
||||||
Run:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
./examples/hello/hello
|
./examples/hello/hello
|
||||||
```
|
```
|
||||||
|
|
||||||
## Tests
|
## 🚦 Tests
|
||||||
|
|
||||||
To run all tests:
|
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
go run gotest.tools/gotestsum@latest
|
go run gotest.tools/gotestsum@latest
|
||||||
```
|
```
|
||||||
|
|
||||||
Every package must pass its unit tests.
|
## 💻 Platforms
|
||||||
|
|
||||||
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 |
|
| | 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.
|
Those marked with a star are supported in theory but there are no developer machines to test them.
|
||||||
|
|
||||||
### Cross compilation
|
## ⚠️ Security
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
### PIE
|
### PIE
|
||||||
|
|
||||||
|
@ -92,16 +57,10 @@ Code and data are separated into different memory pages and loaded with differen
|
||||||
| Code | ✔️ | ✔️ | ❌ |
|
| Code | ✔️ | ✔️ | ❌ |
|
||||||
| Data | ✔️ | ❌ | ❌ |
|
| Data | ✔️ | ❌ | ❌ |
|
||||||
|
|
||||||
## Status
|
## 🧾 License
|
||||||
|
|
||||||
`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
|
|
||||||
|
|
||||||
Please see the [license documentation](https://urbach.dev/license).
|
Please see the [license documentation](https://urbach.dev/license).
|
||||||
|
|
||||||
## Copyright
|
## 🧔 Copyright
|
||||||
|
|
||||||
© 2025 Eduard Urbach
|
© 2025 Eduard Urbach
|
|
@ -5,6 +5,8 @@ Usage:
|
||||||
Commands:
|
Commands:
|
||||||
|
|
||||||
build [directory | file] build an executable
|
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
|
--verbose, -v show everything
|
||||||
|
|
||||||
run [directory | file] build and run the executable
|
run [directory | file] build and run the executable
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue