Skip to content

Commit 4a9f0d5

Browse files
committed
Updated README.md to add more info to fellow Rustaceans.
1 parent b27c4a4 commit 4a9f0d5

File tree

1 file changed

+61
-6
lines changed

1 file changed

+61
-6
lines changed

README.md

Lines changed: 61 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,26 @@
11
![C/C++ CI](https://github.com/philberty/gccrs/workflows/C/C++%20CI/badge.svg)
22
# GCC Rust
33

4-
This is an implementation of rust following the gccgo style front-end.
4+
This is a full alternative implementaion of the Rust language ontop of GCC.
5+
Please see the accompanying reporting repository: https://github.com/Rust-GCC/Reporting for
6+
status reports from Philip Herron and tast tracking overviews.
57

6-
## Compilation for Development
8+
## Development Enviroment
79

810
Fetch dependancies for ubuntu:
911

1012
```bash
1113
$ apt install build-essential libgmp3-dev libmpfr-dev libmpc-dev flex bison autogen gcc-multilib
1214
```
1315

14-
Clone
16+
Clone the repository
1517

1618
```bash
17-
$ git clone https://github.com/philberty/gccrs
19+
$ git clone git@github.com:Rust-GCC/gccrs.git
1820
```
1921

20-
Dev Build
22+
Compilation script. It is important to remember that GNU toolchain projects are designed to be built outside of its source directory
23+
this is why a build directory is created.
2124

2225
```bash
2326
$ mkdir gccrs-build
@@ -26,8 +29,60 @@ $ ../gccrs/configure --prefix=$HOME/gccrs-install --disable-bootstrap --enable-m
2629
$ make
2730
```
2831

29-
Running the compiler itself - no need to make install
32+
Running the compiler itself without make install we can simply imvoke the compiler proper:
3033

3134
```
3235
$ 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
3336
```
37+
38+
Invoking the compiler driver we need to:
39+
40+
```
41+
$ make install
42+
```
43+
44+
Then invoke the compiler as expected:
45+
46+
```
47+
$ gccrs -g -O2 -c test.rs -o test.o
48+
$ gccrs -o test test.o
49+
```
50+
51+
## Testsuite
52+
53+
The test suite can be invoked via:
54+
55+
```
56+
$ make check-rust
57+
```
58+
59+
Test cases can be found within gcc/testsuite/rust.test please feel free to contriobute your specific
60+
test cases referencing any issues on github.
61+
62+
## Docker image
63+
64+
There is a docker image hosted over on:
65+
66+
https://hub.docker.com/repository/docker/philberty/gccrs
67+
68+
Or you can build your own image:
69+
70+
```
71+
$ docker build . -t gccrs-dev
72+
$ docker run --rm -v "$PWD":/usr/src/myapp -w /usr/src/myapp \
73+
gccrs-dev:latest gccrs -g -O2 -c \
74+
gcc/testsuite/rust.test/compilable/type_infer1.rs -o type_infer1.o
75+
```
76+
77+
## Contributing
78+
79+
Please be aware this project is designed to be pushed upstream to GCC when we reach some milestones and this means we require
80+
contribtions to have copyright assignment in place. Please see: https://gcc.gnu.org/contribute.html
81+
82+
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
83+
84+
We can be found on:
85+
86+
* Rust-lang Zulip: https://rust-lang.zulipchat.com/
87+
* GNU toolchain discord:
88+
* Mailing list: TODO

0 commit comments

Comments
 (0)