top | item 45894888

cjsawk: A Self-Hosted Compiler for a Subset of C, JavaScript, and Awk

2 points| dithered_djinn | 3 months ago |youtube.com

1 comment

order

dithered_djinn|3 months ago

This talk describes the implementation of a self hosted C compiler that is implemented in a dialect of C that is simultaneously valid C, JavaScript, and AWK. This allows us to ship a C compiler in source form that can be built on many different platforms.

cjsawk itself is also capable of building a C99 compiler. In turn this allows us to bootstrap from source all the way up to GCC.

Web demo: https://cosinusoidally.github.io/tcc_simple/experiments/cjsa...

Project github repo: https://github.com/cosinusoidally/tcc_simple/tree/master/exp...

Slides: https://online.accuconference.org/wp-content/uploads/2025/10...