{"id":15404088,"url":"https://github.com/r7kamura/r8cc","last_synced_at":"2025-04-16T20:52:17.453Z","repository":{"id":66264708,"uuid":"255903295","full_name":"r7kamura/r8cc","owner":"r7kamura","description":"A toy C compiler written in Rust.","archived":false,"fork":false,"pushed_at":"2020-04-26T20:59:01.000Z","size":57,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T05:41:31.326Z","etag":null,"topics":["c-compiler"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/r7kamura.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-15T12:01:21.000Z","updated_at":"2024-10-29T10:19:24.000Z","dependencies_parsed_at":"2023-06-12T20:45:46.893Z","dependency_job_id":null,"html_url":"https://github.com/r7kamura/r8cc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r7kamura%2Fr8cc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r7kamura%2Fr8cc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r7kamura%2Fr8cc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r7kamura%2Fr8cc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/r7kamura","download_url":"https://codeload.github.com/r7kamura/r8cc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249275740,"owners_count":21242284,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c-compiler"],"created_at":"2024-10-01T16:11:32.490Z","updated_at":"2025-04-16T20:52:17.435Z","avatar_url":"https://github.com/r7kamura.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# r8cc\n\nA toy C compiler written in Rust.\n\n## Usage\n\n`cargo run` takes a program and outputs assembly code that returns the calculated result.\n\n```console\n$ cargo run\n    Finished dev [unoptimized + debuginfo] target(s) in 0.04s\n     Running `target/debug/r8cc`\nUsage: r8cc \u003cPROGRAM\u003e\n```\n\nCompile given C-like code to assembly code:\n\n```console\n$ cargo run -- \"int main() { return 1; }\"\n   Compiling r8cc v0.1.0 (/Users/r7kamura/src/github.com/r7kamura/r8cc)\n    Finished dev [unoptimized + debuginfo] target(s) in 0.47s\n     Running `target/debug/r8cc 'int main() { return 1; }'`\n.intel_syntax noprefix\n.data\n.global main\nmain:\n  push rbp\n  mov rbp, rsp\n  push 1\n  pop rax\n  mov rsp, rbp\n  pop rbp\n  ret\n```\n\nAssemble output by `cc`:\n\n```console\n$ cargo run -- \"int main() { return 1; }\" \u003e tmp.s\n    Finished dev [unoptimized + debuginfo] target(s) in 0.00s\n     Running `target/debug/r8cc 'int main() { return 1; }'`\n$ docker-compose run --rm base cc -o tmp tmp.s\n$ docker-compose run --rm base ./tmp\n$ echo $?\n1\n```\n\n## Naming\n\n*r8cc* is a successor of my [r7cc](https://github.com/r7kamura/r7cc).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr7kamura%2Fr8cc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fr7kamura%2Fr8cc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr7kamura%2Fr8cc/lists"}