Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maekawatoshiki/rucc
rucc is a tiny toy C compiler in Rust.
https://github.com/maekawatoshiki/rucc
c compiler rust
Last synced: about 6 hours ago
JSON representation
rucc is a tiny toy C compiler in Rust.
- Host: GitHub
- URL: https://github.com/maekawatoshiki/rucc
- Owner: maekawatoshiki
- License: mit
- Created: 2017-04-12T08:59:33.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-09-18T15:17:58.000Z (over 1 year ago)
- Last Synced: 2024-12-19T00:09:18.691Z (8 days ago)
- Topics: c, compiler, rust
- Language: Rust
- Homepage:
- Size: 441 KB
- Stars: 182
- Watchers: 7
- Forks: 16
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# RUCC
[![](https://circleci.com/gh/maekawatoshiki/rucc/tree/master.svg?style=shield&circle-token=12276a02aa21f18324f9be74cbb922227b7c8551)](https://circleci.com/gh/maekawatoshiki/rucc)
[![codecov](https://codecov.io/gh/maekawatoshiki/rucc/branch/master/graph/badge.svg)](https://codecov.io/gh/maekawatoshiki/rucc)
[![](http://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)rucc is a small toy C compiler implemented in Rust.
# REQUIREMENTS
- latest Rust (recommend [rustup](https://www.rustup.rs/))
- LLVM 10.0
```sh
# ubuntu, or debian...
$ apt-get install llvm-10 llvm-10-dev
```# RUN
First, do test
```sh
$ cargo test
```After the test exits successfully, you can try rucc easily with ``./rucc.sh``!
```sh
$ # slow (use binary created by `cargo build`)
$ ./rucc.sh [filename (*.c)]$ # fast (use binary created by `cargo build --release`)
$ ./rucc.sh [filename (*.c)] --release
```# FORK AND PULL REQUEST LIFECYCLE
1. fork https://github.com/maekawatoshiki/rucc repository
2. clone your repository on local pc```sh
$ git clone [email protected]:youraccount/rucc.git
$ cd rucc
```3. add maekawatoshiki upstream repository & fetch & confirm
```sh
$ git remote add upstream [email protected]:maekawatoshiki/rucc.git
$ git fetch upstream
$ git branch -a* master
remotes/origin/HEAD -> origin/master
remotes/origin/master
remotes/upstream/master
```4. fetch & marge upstream
```sh
$ git fetch upstream
$ git merge upstream/master
```5. pullrequest on GitHub
# REFERENCES
I'm using [8cc](https://github.com/rui314/8cc) as reference.