Skip to content

Latest commit

 

History

History
50 lines (32 loc) · 1.2 KB

README.md

File metadata and controls

50 lines (32 loc) · 1.2 KB

MiniC

MiniC is a very basic programming language using the Truffle DSL for the GraalVM.

Prerequisites

How to run

  • git clone https://github.com/schalkms/MiniC
  • mvn package
  • Execute ./mc examples/hello-world.minic to run a MiniC language source file
  • IDE Setup

Install MiniC into GraalVM

MiniC can be installed into GraalVM with the following commands.

mvn package
<<graalvm-path>>/bin/gu -F install <<MiniC-clone>>/component/mc-component.jar

Combining C and MiniC

examples/hello-minic.c shows an example which combines C and MiniC.

clang -g -O1 -c -emit-llvm -I<<graalvm-path>>/jre/languages/llvm examples/hello-minic.c
./<<graalvm-path>>/bin/lli --polyglot --jvm hello-minic.bc

Combining JavaScript and MiniC

examples/mini-server.js shows an example which combines JavaScript and MiniC.

<<graalvm-path>>/bin/node --polyglot --jvm examples/mini-server.js

node-minic

License

GNU General Public License v3.0

https://www.gnu.org/licenses/