Philip Herron efbe8cc4d9 Resolve the type from an ArrayIndexExpression
Adds new TypeVisitor to resolve Types from the AST via Visitor Pattern, so
the element type can be extracted.

Addresses: #27 #55
2020-12-01 17:50:50 +00:00
2020-11-30 12:41:59 +00:00
2020-11-26 00:16:41 +00:00
2020-11-19 00:16:30 +00:00
2020-10-30 00:16:29 +00:00
2020-09-25 00:16:27 +00:00
2020-10-12 00:16:25 +00:00
2020-10-21 00:16:36 +00:00
2020-11-12 00:16:39 +00:00
2020-11-25 09:34:01 +00:00
2020-07-31 00:16:26 +00:00
2020-09-25 00:16:27 +00:00
2020-11-26 00:16:41 +00:00
2020-11-27 00:16:31 +00:00
2020-11-26 00:16:41 +00:00
2020-11-26 00:16:41 +00:00
2020-10-02 00:16:27 +00:00
2020-10-12 00:16:25 +00:00
2020-11-19 00:16:30 +00:00
2020-05-30 00:16:27 +00:00
2020-11-26 00:16:41 +00:00
2020-05-30 00:16:27 +00:00
2020-05-30 00:16:27 +00:00
2020-11-26 00:16:41 +00:00
2020-05-30 00:16:27 +00:00
2020-05-30 00:16:27 +00:00
2020-01-15 14:29:53 +01:00
2020-11-26 00:16:41 +00:00
2020-11-30 15:09:38 +00:00

C/C++ CI Docker Build Docker Pulls

GCC Rust

This is a full alternative implementaion of the Rust language ontop of GCC. Please see the accompanying reporting repository: https://github.com/Rust-GCC/Reporting for status reports from Philip Herron and tast tracking overviews.

Development Enviroment

Fetch dependancies for ubuntu:

$ apt install build-essential libgmp3-dev libmpfr-dev libmpc-dev flex bison autogen gcc-multilib

Clone the repository

$ git clone git@github.com:Rust-GCC/gccrs.git

Compilation script. It is important to remember that GNU toolchain projects are designed to be built outside of its source directory this is why a build directory is created.

$ mkdir gccrs-build
$ cd gccrs-build
$ ../gccrs/configure --prefix=$HOME/gccrs-install --disable-bootstrap --enable-multilib --enable-languages=c,c++,rust
$ make

Running the compiler itself without make install we can simply imvoke the compiler proper:

$ gdb --args ./gcc/rust1 test1.rs -frust-dump-parse -dumpbase test.rs -mtune=generic -march=x86-64 -auxbase-strip test.s -O0 -version -fdump-tree-gimple -o test.s -L/lib/x86_64-linux-gnu -L/lib/../lib64 -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib64

Invoking the compiler driver we need to:

$ make install

Then invoke the compiler as expected:

$ gccrs -g -O2 -c test.rs -o test.o
$ gccrs -o test test.o

Testsuite

The test suite can be invoked via:

$ make check-rust

Test cases can be found within gcc/testsuite/rust.test please feel free to contriobute your specific test cases referencing any issues on github.

Docker image

There is a docker image hosted over on:

https://hub.docker.com/repository/docker/philberty/gccrs

Or you can build your own image:

$ docker build . -t gccrs-dev
$ docker run --rm -v "$PWD":/usr/src/myapp -w /usr/src/myapp \
    gccrs-dev:latest gccrs -g -O2 -c \
    gcc/testsuite/rust.test/compilable/type_infer1.rs -o type_infer1.o

Contributing

Please be aware this project is designed to be pushed upstream to GCC when we reach some milestones and this means we require contribtions to have copyright assignment in place. Please see: https://gcc.gnu.org/contribute.html

Not all contributions must be code, we would love to see new test cases or bugs and issues to be reported. Feel free to add any comments on open PRs

Community

We can be found on all usual Rust channels such as Zulip but we also have our own channels:

Description
No description provided
Readme 2.7 GiB
Languages
C++ 30.7%
C 30.1%
Ada 14.4%
D 6.1%
Go 5.7%
Other 12.5%