Home

Awesome

Compilers targeting C

The following is a list of open source compilers that can generate C (or in some cases, C++) code.

NameSupported languagesSupported targetsNotesLinks
AluminaAluminaCInspired by Rustweb repo
ATSATSCweb
AustralAustralCHas some similarities to Haskell and Adaweb repo doc
BaCon (Basic Converter)BasicCweb
bc9BasicBasicCCan generate C or C++ code. Runs only on Windows but can generate code for *nix. A fork of BCX that outputs valid ISO/ANSI C. Website archive.web
BiglooSchemeCScheme (R5RS)web
BlechBlechCA synchronous programming language for embedded reactive real-time-critical software.repo
bmx-ngBlitzMaxCA Monkey-derived BlitzMax to C transpiler.repo
CakelispCakelispC, C++Lisp-like programming languageweb repo doc
CarpCarp, LispCA statically typed lisp, without a GC, for real-time applications.repo
CforallCforall, CCExtends ISO C and outputs augmented C codeweb repo doc
ChapelChapelCweb
CHICKEN SchemeSchemeCScheme (R5RS)web
CiaoPrologCweb
CLiCCCommon LispCCompiles a large strict subset of Common Lisp + CLOS to C.repo
Critical Mass Modula-3Modula-3Crepo
CycloneSchemeCScheme (R7RS). Cheney on the M.T.A. with native threads.repo
CythonPythonCweb
CéuCéuCweb
eCeCCAn object-oriented superset of C with modules and generics.web
EiffelStudioEiffelCweb
Embeddable Common-LispCommon LispCANSI Common Lispweb
EmfrpEmfrpCA pure functional reactive programming language for small-scale embedded systems.repo
EmgoGoCCompiles a subset of Go for 32-bit microcontrollers through C.repo
EpicEpicCweb
Esotope Brainfuck CompilerBrainfuckCrepo
Euphoria to C TranslatorEuphoriaCweb
f2cFortran 77Cweb
FelixFelixC++repo
FreeBASICBasicCweb
futFusionC, C++, C#, D, Java, JavaScript, Python, Swift, TypeScript, OpenCLA language for making portable libraries with a syntax like C#.web
FutharkFutharkCPurely functional data-parallel language generating OpenCL Crepo
GambitSchemeCScheme (R5RS)web
GCLCommon LispCweb
GenieGenieCweb
GHCHaskellCC backend documentation page.web
GnuCOBOLCOBOLCCOBOL 2014 with extensionsweb
go2cppGoC++Designed to help port Go to C++repo
GoLiteGoLite, GoC++Transpiles a strict subset of Gorepo
HarbourxBase, CA-ClipperCxBase compatible with CA-Clipperrepo
HaxeHaxeC, C++web
IdrisIdrisCA pure functional programming language with dependent types.web
IvoryIvoryCA Haskell eDSL for safe systems programming.web
jhcHaskell 98CThe resulting code doesn't use a garbage collector.web
KitKitCA statically typed procedural language with manual MM, traits, pattern matching, and metaprogramming designed with game development in mind.web
Language84Language84Cweb
mmC, WebAssemblyIt targets webassembly but actually it compiles to C and then requires to trigger manually clang to get webassemblyweb repo
ManKai Common LispCommon LispCweb
matiecST, IL, SFCCA set of textual languages for PLC programming. (SFC: IEC 61131)repo
mbeddrmbeddrCA set of languages for embedded software engineering.web
MercuryMercuryCweb
MLtonStandard MLCweb
Monkey 2Monkey 2C++web
MrustcRustCrepo
NectarJSJavaScriptCThe primary target is WebAssembly. How to compile to C.repo
NeluaNeluaCA statically-typed meta-programmable systems programming language heavily inspired by Lua.web
NimNimC, C++, Objective Cweb
NitNitCweb
NN-512NN-512CGraph language. Generate C99 code for neural net inference.web
NuitkaPythonCweb
nullcnullcC, x86, VMIt is a C-like programming languagerepo doc
OBNCOberonCweb
ocamlccOCamlCCompiles OCaml bytecode to C.repo
oioiCC with traits. Compiles to code that can be directly used from plain C.repo
oocoocCweb
OpenDylanDylanCweb
p2cPascal, UCSD, Turbo Pascal, Modula-2C, C++Supports several Pascal dialects, including UCSD and Turbo Pascal, Modula-2.web
ParparVMJava bytecodeCUse for the Java to iOS portability part of the Codename One project.repo
perlccPerl 5Cweb
prometeoPythonCTranspiles subset of Pythonrepo doc
PtoCpascal, Turbo Pascal, Oregon Pascal, ISO Pascal, Sun Pascal, HP PascalC, C++Transpiles to readable coderepo
purescript-nativePureScriptC++repo
Py14PythonC++repo
PythranPythonC++repo
QuickJSJavaScriptCCompiles JavaScript (ES2020) to bytecode and embeds the bytecode in C.web
RagelRagelC, C++Compiles executable finite state machines from regular languages.web
RPerlRPerl, Perl.C++RPerl, a restricted subset of Perl. Unrelated to RPython.repo
RPythonRPython, Python.CRPython, a restricted subset of Python. Unrelated to RPerl.web
SatherSatherCweb
Scheme-to-CSchemeCExample nanopass compilerrepo
Seed7Seed7Cweb
ShedskinPythonC++repo
SLuaLuaCrepo
SystemTapSystemTapCSystemTap scripting language compiles kernel modules for monitoring Linux systems.web
ThinScriptThinScriptC, JavaScript, WebAssemblyA lower-level programming language inspired by TypeScript. ThinScript also compiles to JavaScript and WebAssembly.repo
TMPPyTMPPy, PythonC++Transpiles a subset of Pythonrepo doc
ts2cJavaScript, TypeScriptCCompiles a subset of JavaScript/TypeScript (ES3) to readable C89.repo
TSPTclCA typed subset of Tcl. An experimental JIT. Compiles procedures written in a statically typed subset of Tcl to C or Java to accelerate Tcl programs.repo
UbxBasicBasicC, C++A fork of BCX that adds Linux support in addition to Windows. Uses Glib.web
Ur/WebUr/WebCweb
VVCA no-GC systems language with modern features like sum types and immutability by default.repo
ValaValaCweb
VostokOberon-07C, Java, JavaScript, Oberonrepo
wasm2cWebAssemblyCConverts WASM files to C source and header.repo
wasmdecWebAssemblyCConverts WebAssembly binaries to C.repo
waxwaxC, C#, C++, Java, Lua, Python, Swift, TypeScript, WebAssemblyA language design for transpiling.web
YakshaYakshaCCompiles "Python like" programming language to C99. No Garbage collector (manual memory management). Builtin support for raylib & wasm4. Macro system is a lisp dialect (YakshaLisp)web repo doc
ZephirZephirCA language for writing PHP extensions.web
ZZZZ (Drunk Octopus)CA safe dialect of C for embedded systems inspired by Rust.repo

C macro languages

See also

Contributing

Your contributions are welcome! Please submit a pull request or create an issue to add a new compiler to the list.

License

CC0