Rust Front End

This is an implementation of Rust ontop of GCC.

Building

Building gccrs is fairly confsing to most people who haven't built GCC before:

YOU CANNOT build GCC within the same directory of the sources!

#+BEGIN_SRC bash $ apt-get install bison flex build-essential libgmp-dev libmpfr-dev libmpc-dev #+END_SRC

Then to compile:

#+BEGIN_SRC bash $ git clone https://github.com/redbrain/gccrs.git # or the gcc offical branch

$ cd gccrs $ ./contrib/download_prerequisites # optional if you havent gmp/mpfr/mpc

$ mkdir gccpy-build $ cd gccpy-build $ ../configure --prefix=/opt/gccrs \

$ make $ sudo make install $ export PATH=/opt/gccrs/bin $ export LD_LIBRARY_PATH=/opt/gccrs/lib:$LD_LIBRARY_PATH $ cd - #+END_SRC

Usage

For my development sessions i generally pass:

#+BEGIN_SRC bash $ gccrs -g -O2 -frust-dump-dot helloworld.rs -o helloworld $ ./helloworld #+END_SRC

Options:

-frust-dump-dot Dumps out the textural output of the DOT IL

-fdump-tree-gimple Dumps the textural output of the code generated for the GCC middle-end.

Remember you can use all the normal GCC compiler options it works as if you were compiling C with GCC all target specific options will work etc.

Status

Very early and out of date

None: RustFrontEnd (last edited 2015-07-17 16:21:47 by PhilipHerron)