Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Rust Front-end to GCC
C Java C++ Ada Go FORTRAN Other
branch: master
Failed to load latest commit information.
INSTALL
boehm-gc boehm-gc/
config Support slim LTO bootstrap
contrib remove score-* support
fixincludes fixincludes/
gcc
gnattools gnattools/
include PR debug/63239 Add DWARF representation for C++11 deleted member func…
intl Latest updates from FSF 4.7 branch
libada 2014-08-12 Joel Sherrill <joel.sherrill@oarcorp.com>
libatomic 2014-08-19 Yaakov Selkowitz <yselkowi@redhat.com>
libbacktrace * mmap.c (backtrace_free): If freeing a large aligned block of
libcilkrts libcilkrts/
libcpp 2014-10-03 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
libdecnumber PR c/59871
libffi * src/powerpc/linux64.S: Emit .note.GNU-stack even when
libgcc
libgfortran * f95-lang.c (gfc_init_builtin_functions): Add more floating-point
libgo PR go/60406
libgomp * testsuite/libgomp.c/affinity-1.c: Include <sys/wait.h>.
libgrust GCC RUST:
libiberty gcc/cp/
libitm * testsuite/libitm.c/memcpy-1.c: Declare getpagesize.
libjava 2014-05-20 Sebastian Huber <sebastian.huber@embedded-brains.de>
libobjc 2014-07-27 Alan Modra <amodra@gmail.com>
libquadmath PR libquadmath/55821
libsanitizer
libssp * ssp.c (fail): Avoid -Wformat-security warning.
libstdc++-v3 2014-10-09 Ville Voutilainen <ville.voutilainen@gmail.com>
libvtv Fix up ChangeLog entries (name, e-mail, formatting, otherwise).
lto-plugin Properly set gcc_build_dir for in-tree build
maintainer-scripts 2014-08-14 Richard Biener <rguenther@suse.de>
zlib Add --enable-host-shared configuration option
.dir-locals.el * .dir-locals.el: Add.
.gitignore Ignore gcc_update output
.travis.yml RUST: update travis
ABOUT-NLS top:
COPYING 2005-07-14 Kelley Cook <kcook@gcc.gnu.org>
COPYING.LIB
COPYING.RUNTIME Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception.
COPYING3 * COPYING_v3: New file. Contains version 3 of the GNU General Public …
COPYING3.LIB * COPYING_v3: New file. Contains version 3 of the GNU General Public …
ChangeLog Add aarch64 to list of targets that support gold.
ChangeLog.tree-ssa Merge tree-ssa-20020619-branch into mainline.
MAINTAINERS 2014-10-8 Felix Yang <felix.yang@huawei.com>
Makefile.def Merge remote-tracking branch 'gcc/gccgo' into dev
Makefile.in Merge remote-tracking branch 'gcc/gccgo'
Makefile.tpl Support slim LTO bootstrap
README.gcc GCC Rust:
README.org RUST: travis fix
compile Update automake-provided files in the toplevel.
config-ml.in * config-ml.in: Robustify ac_configure_args parsing.
config.guess * config.sub, config.guess: Import from upstream.
config.rpath Remove freebsd1 from libtool.m4 macros and config.rpath.
config.sub Import config.sub from upstream. No changes to config.guess.
configure Merge remote-tracking branch 'gcc/gccgo'
configure.ac Merge remote-tracking branch 'gcc/gccgo'
depcomp Update automake-provided files in the toplevel.
install-sh Update automake-provided files in the toplevel.
libtool-ldflags PR sanitizer/56781
libtool.m4 * libtool.m4 (_LT_ENABLE_LOCK <ld -m flags>): Remove non-canonical
ltgcc.m4
ltmain.sh Ensure libgcc_s unwinder is always used on 64-bit Solaris 10+/x86 (PR…
ltoptions.m4 Sync from git Libtool and regenerate.
ltsugar.m4 * libtool.m4: Update to libtool 2.2.6.
ltversion.m4 Sync from git Libtool and regenerate.
lt~obsolete.m4 Sync from git Libtool and regenerate.
missing Update automake-provided files in the toplevel.
mkdep merge with /cvs/src
mkinstalldirs Update automake-provided files in the toplevel.
move-if-change Import move-if-change script from gnulib.
symlink-tree 2005-07-14 Kelley Cook <kcook@gcc.gnu.org>
travis-build.sh
ylwrap Update automake-provided files in the toplevel.

README.org

Rust Front-End to GCC

This is an implementation of Rust ontop of GCC.

https://travis-ci.org/redbrain/gccrs.png?branch=master

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!

$ apt-get install bison flex build-essential libgmp-dev libmpfr-dev libmpc-dev

Then to compile:

$ 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 \
  --enable-languages=rust \
  --disable-multilib \
  --disable-bootstrap
$ make
$ sudo make install
$ export PATH=/opt/gccrs/bin
$ export LD_LIBRARY_PATH=/opt/gccrs/lib:$LD_LIBRARY_PATH
$ cd -

Usage

For my development sessions i generally pass:

$ gccrs -g -O2 -frust-dump-dot helloworld.rs -o helloworld
$ ./helloworld

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

Something went wrong with that request. Please try again.