MiniC is a very basic programming language using the Truffle DSL for the GraalVM.
- JDK 8
- Maven3
- An installed and configured GraalVM http://www.graalvm.org/docs/getting-started/
git clone https://github.com/schalkms/MiniC
mvn package
- Execute
./mc examples/hello-world.minic
to run a MiniC language source file - IDE Setup
MiniC can be installed into GraalVM with the following commands.
mvn package
<<graalvm-path>>/bin/gu -F install <<MiniC-clone>>/component/mc-component.jar
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
examples/mini-server.js
shows an example which combines JavaScript and MiniC.
<<graalvm-path>>/bin/node --polyglot --jvm examples/mini-server.js
GNU General Public License v3.0