A translator that converts ECMA-335 CIL/MSIL bytecode into portable C99 source code for embedded systems and cross-platform use.
IL2C is a translator that converts ECMA-335 Common Intermediate Language (CIL/MSIL) bytecode into standard C source code. It allows code written in .NET languages like C# to run on platforms lacking a .NET runtime, particularly embedded systems with limited resources. The tool focuses on generating human-readable C99-compliant output while maintaining interoperability with existing C libraries.
Developers working on embedded systems, IoT devices, or cross-platform projects who want to use C# or other .NET languages but need lightweight, portable C output. It also appeals to those interested in compiler design or .NET runtime internals.
IL2C offers a unique blend of .NET language productivity with the portability and low footprint of C, enabling deployment on everything from Arduino to custom embedded hardware without a full .NET runtime. Its focus on readable generated code and minimal dependencies sets it apart from heavier alternatives.
IL2C - A translator for ECMA-335 CIL/MSIL to C language.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Generates human-readable C99 code, as shown in the hello-world example, making performance analysis and debugging more transparent.
Targets kilobyte-scale memory usage for embedded systems without an OS, ideal for devices like Arduino and ESP32.
Requires only a C99 compiler and minimal runtime dependencies (heap, CAS instructions), supporting Win32, pthreads, and FreeRTOS.
Supports .NET interop techniques like P/Invoke, enabling easy integration with existing C libraries without runtime overhead.
The README explicitly states IL2C is 'experimental,' meaning it lacks production stability and may have unresolved bugs or breaking changes.
Auto-generated lists for supported opcodes and runtime features indicate gaps, restricting use of some C# language constructs and standard libraries.
Generated C code includes manual execution frames and garbage collection, adding setup complexity and potential performance trade-offs compared to native .NET.