
Compilers targeting C - a list of open source compilers that can generate C code - networked
https://github.com/dbohdan/compilers-targeting-c
======
cju
Some other missing compilers:

* Idris : [http://www.idris-lang.org/](http://www.idris-lang.org/)

* Ivory : [http://ivorylang.org/](http://ivorylang.org/)

* ATS : [http://www.ats-lang.org/](http://www.ats-lang.org/)

* Mbeddr : [http://mbeddr.com/](http://mbeddr.com/)

~~~
wyager
I did not know Idris targeted C!

Idris seems really great, but I can't use it for much because its standard
library is sorely lacking. If someone were to port over an equivalent of
Haskell's Base (including Network, Map, Seq, Vector, etc.) I would probably
start using it for real work.

------
jdudek
I wrote a JavaScript-to-C compiler: [https://github.com/jdudek/tatende-
js](https://github.com/jdudek/tatende-js). It supports a limited subset of the
language—just enough to compile itself.

It was my university project. It’s not really useful, but it was extremely fun
to work on.

------
reza_n
Varnish Cache VCL is compiled into C and dynamically linked in. See -C [0].

[0] [https://www.varnish-
cache.org/docs/trunk/reference/varnishd....](https://www.varnish-
cache.org/docs/trunk/reference/varnishd.html#options)

------
neopallium
There is also my SLua [1] compiler. It compiles Lua to C code.

1\. [https://github.com/Neopallium/slua](https://github.com/Neopallium/slua)

------
guide42
Zephir[0] compiles to C PHP extensions.

[0]: [http://zephir-lang.com/](http://zephir-lang.com/)

------
fsantanna
Céu is a Esterel-based deterministic/synchronous/concurrent language:

[http://www.ceu-lang.org](http://www.ceu-lang.org)

(I'm the author of Céu.)

------
catnaroek
~If I recall correctly~ The Ur/Web compiler also targets C:
[http://impredicative.com/ur/manual.pdf#subsection.12.24](http://impredicative.com/ur/manual.pdf#subsection.12.24)

------
TazeTSchnitzel
Some of these are interestingly domain-specfic.

Vala is essentially sugar for the GObject API. Zephir is the same for the Zend
Engine API.

------
trajing
Excuse me if I'm wrong, but isn't compiling to C instead of e.g. LLVM IR
generally considered bad practice unless you have a very good reason due to
all of C's undefined behavior?

~~~
hnbro
there are certainly arguments to be made about UB (though i don't think llvm
ir is free of it). on the other hand, llvm is ostensibly less portable and
it's infrastructure is a rather massive beast to work with.

