SaaSHub helps you find the best software and product alternatives Learn more →
Top 23 C Compiler Projects
-
-
CodeRabbit
CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
-
-
And branches [1] of C are still spawning and gaining traction, because C++ is perceived as overkill.
[1]: https://github.com/c3lang/c3c
-
mir
A lightweight JIT compiler based on MIR (Medium Internal Representation) and C11 JIT compiler and interpreter based on MIR
-
Project mention: Autoconf makes me think we stopped evolving too soon | news.ycombinator.com | 2024-04-03
A 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)
-
Aibika (https://rubygems.org/gems/aibika)
Ignored RubyEncoder because it's commercial
DragonRuby is a whole toolkit, so I am not sure if it offers a quick cli to bundle a ruby script with its gems.
I tried rb2exe (https://rubygems.org/gems/rb2exe) but it required exactly Ruby version 2.2.2 (docker pull txt3rob/ruby-2.2.2-docker)
ruby2exe (https://rubygems.org/gems/ruby2exe) didn't work and looks abandoned
enclose-io/ruby (https://github.com/enclose-io/ruby) doesn't offer installation through RubyGems, same with Ruby-packer (https://github.com/pmq20/ruby-packer), so not going to try it
Portable-ruby (https://github.com/Homebrew/homebrew-portable-ruby) is just a project where you download a folder which has portable Ruby in it, nothing else. It does not bundle your script with it
RubyMotion costs, so I ignored it
Using TruffleRuby had a bit more steps and was complex, so I skipped it
MRuby did work, but not with the gems I was using, so I had to rely on their own libraries (https://mruby.org/libraries)
Crystal did work on simpler scripts but I had to adjust the code a bit to make it valid for the Crystal compiler.
-
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
-
-
Project mention: A self-hosting and educational C optimizing compiler | news.ycombinator.com | 2024-01-07
Yes, 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...
-
-
-
Project mention: Wc2: Investigates optimizing 'wc', the Unix word count program | news.ycombinator.com | 2024-06-20
-
-
-
Project mention: Flang: Fortran language front-end designed for LLVM | news.ycombinator.com | 2024-05-12
-
Project mention: Felix: Statically typed, performant scripting language with native C++ embedding | news.ycombinator.com | 2023-12-28
-
wax
A tiny programming language that transpiles to C, C++, Java, TypeScript, Python, C#, Swift, Lua and WebAssembly 🚀
-
-
Project mention: Oasis – a small, statically-linked Linux system | news.ycombinator.com | 2024-01-26
Michaelforney has also built croc [1], a qbe based C compiler. Really impressive!
[1]: https://github.com/michaelforney/cproc
-
-
Project mention: Interview with C3 language creator, Christoffer Lerno [video] | news.ycombinator.com | 2024-09-23
I discovered C3 from Lerno himself when he was participating in C2's development [1], 6 years ago already; Goodness gracious, time literally flies!
https://github.com/c2lang/c2compiler
-
> 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
-
Project mention: Cwerg: C-like language that can be implemented in 10kLOC | news.ycombinator.com | 2024-03-21
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
C Compiler discussion
C Compiler related posts
-
Making memcpy(NULL, NULL, 0) well-defined
-
The Acton Programming Language
-
The Acton Programming Language
-
Removing global state from LLD, the LLVM linker
-
CIL: C Intermediate Language
-
C3 – The Ergonomic, Safe and Familiar Evolution of C
-
macOS Sequoia is certified to Unix 03
-
A note from our sponsor - SaaSHub
www.saashub.com | 12 Dec 2024
Index
What are some of the best open-source Compiler projects in C? This list will help you:
Project | Stars | |
---|---|---|
1 | acwj | 10,630 |
2 | emojicode | 3,261 |
3 | c3c | 3,059 |
4 | mir | 2,328 |
5 | tinycc | 2,075 |
6 | ruby-packer | 1,562 |
7 | SmallerC | 1,419 |
8 | ring | 1,281 |
9 | shecc | 1,143 |
10 | umka-lang | 1,080 |
11 | amacc | 1,013 |
12 | libfsm | 942 |
13 | lacc | 894 |
14 | bic | 815 |
15 | flang | 807 |
16 | felix | 807 |
17 | wax | 798 |
18 | nature | 743 |
19 | cproc | 733 |
20 | w2c2 | 721 |
21 | c2compiler | 703 |
22 | Cuik | 666 |
23 | cake | 555 |