alt.hn

5/31/2026 at 3:46:32 PM

Chibil: A C compiler targeting .NET IL

https://github.com/MichalStrehovsky/chibil

by algorithmsRcool

5/31/2026 at 5:53:40 PM

This is a c compiler (chibicc) ported to c#, and updated to emit .net IL ie bytecode.

by le-mark

5/31/2026 at 5:27:48 PM

The CLR model has always had support for instruction to support the C/C++ language, compile plugins or similar once and load/run on multiple platforms should be possible.

However, iirc there might've been some issues with libraries making the cl /clr code unportable (don't quote me on that though), starting from scratch might yield a better result if one just wants to run C code everywhere.

by whizzter

5/31/2026 at 5:09:51 PM

Note that Microsoft "cl /clr" also does this. It's a bit of a niche use case.

by pjc50

5/31/2026 at 5:28:06 PM

The creator of lcc also published a paper "lcc.NET: targeting the .NET Common Intermediate Language from Standard C" (2004).

<https://drh.github.io/documents/msil-spe.pdf>

One problem with lcc has always been that it's distributed as source available with restrictions and has never been available under a FOSS license.

by cxr