2 ms·
The C4 compiler [https://github.com/rswier/c4 https://github.com/rswier/c4] is a self-hosting compiler for a subset of the C programming language that produces
by dzdt 3y ago
The C4 compiler [https://github.com/rswier/c4 https://github.com/rswier/c4] is a self-hosting compiler for a subset of the C programming language that produces executable x86 code. You can understand and audit this code in a couple of hours (its 528 lines).
It could be an interesting exercise to bootstrap up from something like this to a working linux environment based solely on source code compilation : no binary inputs. Of course a full linux environment has way too much source code for one person or team to audit, but at least it rules out RoTT style binary compiler contamination.
- tedunangst 3y agoIt's an interpreter.