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
20082026
-
…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) -
…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
comment by mati365 · 2025-10-21 · in Pasta/80 is a simple Pascal cross compiler targeting the Z80 microprocessor -
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 -
You can compile C using JavaScript and target DOS if you are hard core enough. https://github.com/Mati365/ts-c-compiler
comment by mati365 · 2024-10-08 · in Show HN: Compiling C in the browser using WebAssembly -
Lmao, I was first: https://github.com/Mati365/ts-c-compiler
comment by mati365 · 2024-09-18 · in Compile and Run C in JavaScript -
…(and C compiler), written in TypeScript, does the same despite being painfully slow and useless. https://github.com/Mati365/ts-c-compiler
comment by mati365 · 2024-04-27 · in Clang’s -O0 output: branch displacement and size increase -
…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
comment by mati365 · 2024-02-04 · in TCC RISC-V Compiler Runs in the Web Browser (Thanks to Zig Compiler) -
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 -
…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
comment by mati365 · 2023-11-07 · in A C Compiler that fits in the 512 byte boot sector of an x86 machine -
Recently I made C compiler for such old CPUs. GH: https://github.com/Mati365/ts-c-compiler
comment by mati365 · 2023-10-31 · in Building and programming a 16-bit Intel x86 breadboard computer [video] -
…binary and runs it. The worst thing were register allocator, designing IR code and assembler. [1] https://github.com/Mati365/ts-c-compiler
comment by mati365 · 2023-09-04 · in Writing a C compiler in 500 lines of Python -
…that compiles code to basic X86 16bit instructions which can be directly booted into real mode. [1] https://github.com/Mati365/ts-c-compiler
comment by mati365 · 2023-07-24 · in C89 compiler produces printable executables from C code [pdf] (2017) -
…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)