Skip to content

TaKO8Ki/qcc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

qcc

A toy C compiler written in Rust

$ docker run --rm -it --user "$(id -u)":"$(id -g)" -v "$PWD":/usr/src/myapp -w /usr/src/myapp rust ./test.sh
$ cat fib.c
int main()
{
    return fib(9);
}

int fib(int x)
{
    if (x <= 1)
        return 1;
    return fib(x - 1) + fib(x - 2);
}

$ ./target/release/qcc fib.c
$ cc -o tmp tmp.s
$ ./tmp
$ echo $?
55

Reference

https://github.com/rui314/chibicc

About

[WIP] A toy C compiler written in Rust

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published