Skip to content

Latest commit

 

History

53 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

16 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages