Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality. Learn more →
Top 23 C Compiler Projects
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
mir
A lightweight JIT compiler based on MIR (Medium Internal Representation) and C11 JIT compiler and interpreter based on MIR
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
-
wax
A tiny programming language that transpiles to C, C++, Java, TypeScript, Python, C#, Swift, Lua and WebAssembly 🚀
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
I wrote https://github.com/DoctorWkt/acwj. I'm working on a version with an IR so I can add some optimisations to it. I'd say, yes, have an IR :-)
Project mention: Autoconf makes me think we stopped evolving too soon | news.ycombinator.com | 2024-04-03A better solution is just to write a plain ass shell script that tests if various C snippets compile.
https://github.com/oilshell/oil/blob/master/configure
https://github.com/oilshell/oil/blob/master/build/detect-pwe...
Not an unholy mix of m4, shell, and C, all in the same file.
---
These are the same style as a the configure scripts that Fabrice Bellard wrote for tcc and QEMU.
They are plain ass shell scripts, because he actually understands the code he writes.
https://github.com/qemu/qemu/blob/master/configure
https://github.com/TinyCC/tinycc/blob/mob/configure
OCaml’s configure script is also “normal”.
You don’t have to copy and paste thousands of lines of GNU stuff that you don’t understand.
(copy of lobste.rs comment)
Project mention: A self-hosting and educational C optimizing compiler | news.ycombinator.com | 2024-01-07Yes, consider the case of shecc. It requires just a handful of C code lines to interpret directives set in the C preprocessor. Unlike relying on existing tools like cpp, as, or ld, shecc stands alone as a minimalist cross-compiler. This design could be particularly beneficial for students delving into the study of compiler construction. See https://github.com/sysprog21/shecc/blob/master/src/lexer.c#L...
amacc
Project mention: Felix: Statically typed, performant scripting language with native C++ embedding | news.ycombinator.com | 2023-12-28
Project mention: Flang: Fortran language front-end designed for LLVM | news.ycombinator.com | 2024-05-12
Project mention: Nature: Programming language to experience the joy of programming | news.ycombinator.com | 2023-10-13The primary channel for communication right now is https://github.com/nature-lang/nature , where you can engage and keep up-to-date through issues, discussions, and watching the repository.
Additionally, this is my first time hearing about the Mastodon platform, it looks really cool.
Project mention: Oasis – a small, statically-linked Linux system | news.ycombinator.com | 2024-01-26Michaelforney has also built croc [1], a qbe based C compiler. Really impressive!
[1]: https://github.com/michaelforney/cproc
Project mention: Wax compiler – a tiny language designed to transpile to other languages | news.ycombinator.com | 2024-04-19Here's a link to the language itself. Hasn't been updated in a couple years, unfortunately. Maybe getting some attention here could help.
https://github.com/LingDong-/wax
For AOT, the simplest approach, that actually produces the fastest native code, is to naively translate WASM opcodes to C.
This is for example what W2C2 does: https://github.com/turbolent/w2c2
> but they surely can't hope to compete with LLVM in terms of opimisation, can they?
This has been discussed more than once on Zig's discord server. Quoting Andrew and Matthew Lugg's discussion in #compiler-devel about pull 17892:
> mlugg: Shout-out to the people on Twitter and HN who are probably still saying "why would you try to compete with LLVM, LLVM is perfect and can do no wrong"
> andrewrk: worse, they're saying "LLVM is not great but it's the best mankind can achieve"
I think it's very appealing to have a project that focuses on fast build times and wants to seriously compete against LLVM in terms of the optimization pass pipeline, specially when you don't have a beefy computer. With that said, for the time being there are no optimizations made by Zig's own x86 backend (it neither does pass all behavior tests like it was pointed out in the talk, but it can build the Zig compiler itself and some other projects).
Cuik[1] is a project that was mentioned in the Q&A section which illustrates how a compiler can be fast and make optimised builds at the same time.
[1] https://github.com/RealNeGate/Cuik
C Compiler related posts
-
QBE – Compiler Back End
-
Flang: Fortran language front-end designed for LLVM
-
SmallerC – Simple C Compiler
-
Wax compiler – a tiny language designed to transpile to other languages
-
karpathy/llm.c
-
German state ditches Microsoft for Linux and LibreOffice
-
Autoconf makes me think we stopped evolving too soon
-
A note from our sponsor - InfluxDB
www.influxdata.com | 16 May 2024
Index
What are some of the best open-source Compiler projects in C? This list will help you:
Project | Stars | |
---|---|---|
1 | acwj | 9,934 |
2 | emojicode | 3,220 |
3 | mir | 2,194 |
4 | tinycc | 1,827 |
5 | ruby-packer | 1,557 |
6 | SmallerC | 1,334 |
7 | c3c | 1,297 |
8 | ring | 1,238 |
9 | shecc | 1,045 |
10 | amacc | 997 |
11 | umka-lang | 970 |
12 | libfsm | 913 |
13 | lacc | 847 |
14 | bic | 803 |
15 | felix | 792 |
16 | flang | 784 |
17 | nature | 736 |
18 | cproc | 681 |
19 | wax | 670 |
20 | w2c2 | 679 |
21 | Gwion | 524 |
22 | Cuik | 518 |
23 | MazuCC | 509 |
Sponsored