https://github.com/jakubtomsu/vecc
wip
https://github.com/jakubtomsu/vecc
Last synced: about 2 months ago
JSON representation
wip
- Host: GitHub
- URL: https://github.com/jakubtomsu/vecc
- Owner: jakubtomsu
- Created: 2025-01-16T22:34:52.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-02-17T21:38:54.000Z (3 months ago)
- Last Synced: 2025-02-17T22:29:14.983Z (3 months ago)
- Language: Odin
- Size: 698 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-odin - VecC - oriented programming language with C codegen | [MIT](https://github.com/jakubtomsu/vecc/blob/main/LICENSE) | C codegen, SIMD (Libraries / Language Tooling)
README
# VecC compiler
An experimental compiler for a vector programming languge. Inspired by ISPC and shader programming.
> [!WARNING]
> This is NOT a finished programming language. Do not use for serious projects.https://pharr.org/matt/blog/2018/04/30/ispc-all
https://pharr.org/matt/blog/2018/04/21/ispc-volta-c-and-spmd
https://www.cs.cmu.edu/afs/cs/academic/class/15869-f11/www/lectures/07_gpucore.pdf
# Features
- procedural
- strong static type checking
- type hint system for inferring literal types
- constant folding
- array programming combined with SIMD and AoSoA
- type vectorization
- C codegen backend
- optional semicolons# Samples
One of the samples is a simple software-rendered game I released on [itch.io](https://jakubtomsu.itch.io/120plus)
> [!NOTE]
> Most samples currently work only on windowsTo see the samples in action, first:
```
cd samples
```then:
```
build
```
or
```
run
```Samples include:
- `hello_world`
- `game`
- `julia_set`
- `audio`
- `text`# TODO
- SIMD bytecode?
- exec mask vs active lane unordered array
- first parameter overloading and self call expressions
- combined vs underlying (native) vector types
- calling scalar procedures with vector parameters
- more vector "intrinsics" as language features, e.g. ISPC's `foreach_active`
- generate multiple versions of procedures based on the parameter vectorization
- polish auto-coversions between array/vector/scalar programming# Credits
Many parts of this compiler are inspired by [Blaise](https://github.com/gingerBill/blaise) and the [Odin](https://github.com/odin-lang/Odin) compiler.