{"id":50055978,"url":"https://github.com/code-yeongyu/c99inrust","last_synced_at":"2026-05-21T13:14:21.300Z","repository":{"id":358588581,"uuid":"1241981248","full_name":"code-yeongyu/c99inrust","owner":"code-yeongyu","description":"Strict Rust C99 compiler foundation aimed at official Doom source milestones","archived":false,"fork":false,"pushed_at":"2026-05-18T05:10:57.000Z","size":71,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-18T05:49:28.065Z","etag":null,"topics":["c99","compiler","doom","no-dependencies","rust"],"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/code-yeongyu.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-18T02:54:21.000Z","updated_at":"2026-05-18T02:54:35.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/code-yeongyu/c99inrust","commit_stats":null,"previous_names":["code-yeongyu/c99inrust"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/code-yeongyu/c99inrust","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-yeongyu%2Fc99inrust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-yeongyu%2Fc99inrust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-yeongyu%2Fc99inrust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-yeongyu%2Fc99inrust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/code-yeongyu","download_url":"https://codeload.github.com/code-yeongyu/c99inrust/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-yeongyu%2Fc99inrust/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33301826,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-21T12:23:38.849Z","status":"ssl_error","status_checked_at":"2026-05-21T12:22:11.673Z","response_time":62,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["c99","compiler","doom","no-dependencies","rust"],"created_at":"2026-05-21T13:14:18.466Z","updated_at":"2026-05-21T13:14:21.286Z","avatar_url":"https://github.com/code-yeongyu.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# c99inrust\n\n`c99inrust` is a strict Rust C99 compiler project aimed at compiling the\nofficial public Doom source release from id Software.\n\nWritten using [`../omo`](https://github.com/code-yeongyu/oh-my-openagent).\n\n## Status\n\nThis repository currently ships a verified C99-compiler vertical slice aimed at\nthe official public Doom source tree:\n\n| Surface | Status |\n| ------- | ------ |\n| Lexer | comments, identifiers, C keywords, integer/string/char literals, punctuators |\n| Preprocessor | local/system includes, `-D`, `#if/#elif/#ifdef/#ifndef/#undef`, object/function-like macros, line splicing |\n| Parser | Doom-shaped C declarations, typedefs, structs/unions/enums, pointers, arrays, control flow, calls, expressions, and supported C99 function bodies |\n| IR | scoped locals/globals, pointer referents, struct fields, arrays, calls, sizeof, control flow, and Doom-specific libc/X11 surface lowering |\n| Codegen | native macOS ARM64 assembly, native executable build via host `cc`, plus x86_64 Linux assembly used for official Doom linking |\n| Doom | all 62 official `linuxdoom-1.10` C translation units compile to assembly, link into a Linux/X11 executable, open a viewable X11 window under Xvfb, accept scripted keyboard input, move the player under live state sampling, and survive until the QA timeout |\n\nFull C99, human-verified Doom playability, all-world architecture coverage,\nand general Clang-beating optimization are still active milestones. The current\nbenchmark slice beats local Apple Clang for compile-to-assembly time,\none-command binary build time, runtime, and basic assembly-shape counters; see\n`docs/qa/2026-05-18-rust-slop-performance.md`.\n\nThe full-spec track is enforced through a Clang-oracle test harness: supported\nC99 snippets must compile with `c99inrust`, compile with the host C compiler in\n`-std=c99` mode, and produce the same observable exit code before the supported\nsurface can grow. The current oracle suite contains 486 stdout/exit-code\ndifferential tests.\n\n## Install\n\n```bash\ncargo build --release\n```\n\nNo Rust dependencies are used.\n\n## Use\n\n```bash\nc99inrust lex examples/answer.c\nc99inrust preprocess -I include examples/answer.c\nc99inrust compile -S examples/answer.c -o answer.s\ncc answer.s -o answer\n./answer\nc99inrust build examples/answer.c -o answer\n./answer\n```\n\nThe current compile slice accepts:\n\n```c\nint answer(void) { return 40; }\nint main(void) { int total = 0; for (int i = 0; i \u003c 2; i = i + 1) { total = total + answer(); } return total - 38; }\n```\n\n## Official Doom Target\n\nThe public source target is [`id-Software/DOOM`](https://github.com/id-Software/DOOM).\nThe release is Linux-oriented, requires real Doom data such as `doom1.wad`, and\nuses X11/Xext-era platform code.\n\nAudit a checkout:\n\n```bash\ngit clone https://github.com/id-Software/DOOM /tmp/DOOM\ncargo run -- doom-audit /tmp/DOOM\n```\n\n`doom-audit` checks that the input checkout has the expected 62-unit\n`linuxdoom-1.10` source shape and prints recorded QA evidence with\n`recorded-*` prefixes. It does not run the compile/link/movement smoke itself;\nuse the smoke scripts below for live verification.\n\nCurrent Doom-facing compiler evidence: `preprocess + lex + parse-check` runs\nacross all 124 official `linuxdoom-1.10` C/header files with `NORMALUNIX` and\n`LINUX` defined, `compile -S` emits x86_64 Linux assembly for all 62 official\nDoom C translation units, and those assembly files link into a Linux/X11 ELF\nwith system `gcc`. The latest CI no-IWAD compile/link gate on commit\n`aa552e1` in GitHub Actions run `26221421290` produced\n`compile_ok=62 compile_fail=0`, `link_status=0`, and an x86_64 Linux/X11 ELF\nwith BuildID `a4c76544195d76bfd3c3ece7aae487aab3b8fe45`. The latest\nautomated Xvfb movement smoke on commit `2eb3f12` produced\n`compile_ok=62 compile_fail=0`, `link_status=0`, `display_status=0`,\n`window_status=0`, `input_status=0`, `movement_status=0`, and `run_status=124`\nafter dispatching `Up` to a viewable `320x200` Doom window. Live memory samples\nshowed the player coordinates change from `69206016,-236978176` to\n`69194790,-209582386` while the player mobj stayed linked to\n`P_MobjThinker`. This proves visible-window startup, scripted keyboard delivery,\nkeyboard-driven player movement, and survival to the QA timeout; it is still not\na human playthrough claim.\n\nRepeat the current Doom smoke on a machine with Docker, the public Doom\ncheckout, and a legal IWAD:\n\n```bash\ncargo build\ntools/doom-link-scan.sh /tmp/c99inrust-doom-src /tmp/c99inrust-doom-link-scan\ntools/doom-smoke.sh /tmp/c99inrust-doom-src /path/to/doom1.wad /tmp/c99inrust-doom-smoke\ntools/doom-input-smoke.sh /tmp/c99inrust-doom-src /path/to/doom1.wad /tmp/c99inrust-doom-input-smoke\ntools/doom-movement-smoke.sh /tmp/c99inrust-doom-src /path/to/doom1.wad /tmp/c99inrust-doom-movement-smoke\nDOOM_MANUAL_RUN=0 tools/doom-manual-play.sh /tmp/c99inrust-doom-src /path/to/doom1.wad /tmp/c99inrust-doom-manual-play\n```\n\nThe link scan is also a CI gate and does not require an IWAD: it proves that all\n62 official C translation units compile to x86_64 Linux assembly and link into a\nLinux/X11 ELF.\n\nThe latest manual harness build-only run on commit `20120f6` compiled all 62\nofficial C files, linked the Doom binary, wrote `manual-transcript.txt`, and\nstopped deliberately with `manual_run=skipped` because `DOOM_MANUAL_RUN=0` was\nset. A completed human-visible X11 playthrough transcript is still the\nremaining manual evidence gap; validate one with\n`tools/doom-validate-manual-transcript.sh` before claiming manual playability,\nor set `DOOM_MANUAL_VALIDATE=1` on the manual harness run.\n\n## Development\n\n```bash\ncargo fmt --all -- --check\ncargo clippy --all-targets --all-features -- -D warnings -W clippy::pedantic -W clippy::nursery -W clippy::cargo\ncargo test --all-targets --all-features\ncargo nextest run --all-targets --all-features\ncargo machete\ncargo deny check\ncargo audit\ntools/check-rust-no-excuses.sh src tests\n```\n\nManual QA must run the CLI in tmux without `tmux kill-server`.\n\n## License\n\nMIT.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-yeongyu%2Fc99inrust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcode-yeongyu%2Fc99inrust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-yeongyu%2Fc99inrust/lists"}