All Projects → RealNeGate → Cuik

RealNeGate / Cuik

Licence: MIT license
A Modern C11 compiler (STILL EARLY)

Programming Languages

c
50402 projects - #5 most used programming language
C++
36643 projects - #6 most used programming language

Projects that are alternatives of or similar to Cuik

the-c-programming-language-2nd-edition-solutions
Solutions to the exercises in the book "The C Programming Language" (2nd edition) by Brian W. Kernighan and Dennis M. Ritchie. This book is also referred to as K&R.
Stars: ✭ 245 (+140.2%)
Mutual labels:  c-language
async2.h
Stackful Async Subroutines for C. Brings async 2 C
Stars: ✭ 87 (-14.71%)
Mutual labels:  c-language
rb tree
Red-black tree C implementation
Stars: ✭ 33 (-67.65%)
Mutual labels:  c-language
physfs-old
UNOFFICIAL Git mirror of PhysicsFS Mercurial repository. The official repository has also moved to GitHub; this one will no longer be updated. Official website:
Stars: ✭ 53 (-48.04%)
Mutual labels:  c-language
C-Programming
C Programming Experiments
Stars: ✭ 25 (-75.49%)
Mutual labels:  c-language
Fstar
A Proof-oriented Programming Language
Stars: ✭ 2,171 (+2028.43%)
Mutual labels:  c-language
Learn-to-program-with-C AR
ترجمة لدرس تعلّم البرمجة بلغة السي الخاص بموقع OpenClassrooms
Stars: ✭ 51 (-50%)
Mutual labels:  c-language
Plotty
C language compiler from scratch for a custom architecture, with virtual machine and all
Stars: ✭ 33 (-67.65%)
Mutual labels:  c-language
pkcs11-tools
A set of tools to manage objects on PKCS#11 crypotographic tokens. Compatible with any PKCS#11 library, including NSS.
Stars: ✭ 70 (-31.37%)
Mutual labels:  c-language
stress
Single-purpose tools to stress resources
Stars: ✭ 24 (-76.47%)
Mutual labels:  c-language
mescc
Mike's Enhanced Small C Compiler for Z80 and CP/M.
Stars: ✭ 23 (-77.45%)
Mutual labels:  c-language
30-seconds-of-c
🔌Curated collection of useful C Programming tutorials, snippets, and projects that you can understand in 30 seconds or less.
Stars: ✭ 29 (-71.57%)
Mutual labels:  c-language

Cuik (pronounced 'Quick')

warning: unfinished and buggy... also it doesn't compile on Linux or OSX currently, i'll get around to it

The plan is a modern C11 compiler which can mostly work with Clang, GCC, and MSVC while also introducing some new ideas.

Why write a C compiler?

  • To improve the compile times on debug builds without sacrificing features like I would with TCC.
  • To test out my upcoming (and currently private) compiler backend.
  • To add some extensions to improve the workflow of C programmers.
  • Because I can.

How to install?

Mac & Linux aren't ready yet but i'll be moving forward to those platforms in the upcoming months

You will need Git, Python, a C compiler (not msvc but gcc and clang should work fine) and on windows you'll need MSVC (i use link.exe for now... sorry, i'll remove the linker dependency soon)

git clone https://github.com/RealNeGate/Cuik
cd Cuik/main
python build.py

How am I doing?

mostly aight, thanks for asking.

What are some cool new things?

One of my favorite new features are the live compiler (essentially an offline Godbolt but within a terminal) and the out of order declarations.

What architectures will you support?

I'll be starting with x64 but I plan on having Aarch64 support soon enough, it's mostly a matter of user-demand what other platforms I add though I probably won't be supporting anything with a segmented address space because I don't want to implement it.

What OSes will you support?

Ideally the essentials like Windows, Linux and MacOS but currently MacOS isn't setup and Linux has basic support (no live compiler)

Will it have optimizations?

It will eventually have a smart but non-aggressive optimizer but that's still a work in progress

What C extensions will you have?

I'll be supporting all the normal extensions such as:

  • pragma once
  • builtin bitmath (popcount, ffs, clz, ctz, etc)
  • __builtin_trap, __builtin_expect
  • x86 SIMD intrinsics
  • typeof
  • case ranges
  • computed goto

And some possibly novel extensions such as:

What's left?

It can currently compile programs using the subset of C it currently supports but it's still missing some essential details before it compiles any basic C program such as:

  • More tests
  • Bug fixes
  • Self hosting
  • Thread local
  • Atomics (halfway there)
  • MSVC extensions
  • GNU extensions
  • Proper Mac/Linux support

File structure

In case you care to look around here's what the folders mean:

# this is where the main driver goes (it does "mostly" normal CC command line interactions)
main/

# Actual library (can be used separate of the main driver)
libCuik/

# not [ciabatta](https://github.com/flysand7/ciabatta) but the freestanding includes like stddef.h along with some helpers
crt/

# random crap
logo/
tests/
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].