clejacquet / c2asmjs

A compiler that turns C code into LLVM intermediate language code. This LLVM code can then be compiled to ASM JS code readable by the browser thanks to Emscripten compiler. This project has been built using Rex & Racc, the equivalent of the famous Lex & Yacc compilation libraries in Ruby

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

c2asmjs

Install

gem install rake
gem install rexical
gem install racc

Build

rake build

Compile

rake compile[<filename>]

Run

rake run[<filename>]

For running samples/sample1.c: rake run[samples/sample1.c]

Test

rake test[<filename>]

All tests

rake tests

Clean

rake clean

About

A compiler that turns C code into LLVM intermediate language code. This LLVM code can then be compiled to ASM JS code readable by the browser thanks to Emscripten compiler. This project has been built using Rex & Racc, the equivalent of the famous Lex & Yacc compilation libraries in Ruby


Languages

Language:JavaScript 93.4%Language:Ruby 3.8%Language:LLVM 2.0%Language:C 0.4%Language:REXX 0.2%Language:HTML 0.2%Language:Makefile 0.0%Language:Shell 0.0%