Hacker GitHub

← All repos

Mati365/ts-c-compiler

View on GitHub ↗ ★ 413 TypeScript

⚙️ C99-compatible multipass compiler written in TypeScript with GCC extensions support. Features a handcrafted left-recursive parser, custom IR, SSA-based optimizer, and a full frontend/backend pipeline. Compiles to x86 machine code with integrated assembler and emulator.

16 mentions on Hacker News by 3 people: 3 stories, 13 comments · first 2023-03-13 · latest 2026-02-07

Mentions per year 16 mentions · busiest year 2024 (7)
20082026
  1. …and showed off your skills. It's a shame that the AI era has terribly devalued these projects. [1] https://github.com/Mati365/ts-c-compiler
    comment by mati365 · 2026-02-07 · in SectorC: A C Compiler in 512 bytes (2023)
  2. …huge respect for the people who coded for those chips. It’s super hard but also very rewarding. [1] https://github.com/Mati365/ts-c-compiler
  3. So it's possible to port C compiler to PDF. Compiler is already done https://github.com/Mati365/ts-c-compiler . We can run DOS in PDF basically..
    comment by mati365 · 2025-01-09 · in Show HN: Tetris in a PDF
  4. You can compile C using JavaScript and target DOS if you are hard core enough. https://github.com/Mati365/ts-c-compiler
  5. Lmao, I was first: https://github.com/Mati365/ts-c-compiler
    comment by mati365 · 2024-09-18 · in Compile and Run C in JavaScript
  6. …(and C compiler), written in TypeScript, does the same despite being painfully slow and useless. https://github.com/Mati365/ts-c-compiler
  7. …in TypeScript [1]. Maybe it is not super fast but at least adding new backends is much easier. [1] https://github.com/Mati365/ts-c-compiler
  8. Recently I made C multipass compiler (and asembler) in typescript for such old x86 CPUs https://github.com/Mati365/ts-c-compiler
    comment by mati365 · 2023-12-10 · in Write your own retro compiler
  9. …I'm working on C + Assembler Compiler to prototype and run such 512B games / apps for retro CPUs. https://github.com/Mati365/ts-c-compiler
  10. Recently I made C compiler for such old CPUs. GH: https://github.com/Mati365/ts-c-compiler
  11. …binary and runs it. The worst thing were register allocator, designing IR code and assembler. [1] https://github.com/Mati365/ts-c-compiler
  12. …that compiles code to basic X86 16bit instructions which can be directly booted into real mode. [1] https://github.com/Mati365/ts-c-compiler
  13. …to be done to compile and print simple Hello World is astronomically huge (as the satisfaction) [1] https://github.com/Mati365/ts-c-compiler
    comment by mati365 · 2023-03-13 · in Tiny-C Compiler (2001)