Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Core
  3. IL2C

IL2C

Apache-2.0C#0.4.230

A translator that converts ECMA-335 CIL/MSIL bytecode into portable C99 source code for embedded systems and cross-platform use.

GitHubGitHub
449 stars39 forks0 contributors

What is IL2C?

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.

Target Audience

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.

Value Proposition

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.

Overview

IL2C - A translator for ECMA-335 CIL/MSIL to C language.

Use Cases

Best For

  • Running C# code on microcontrollers like Arduino or ESP32
  • Porting .NET applications to platforms without a .NET runtime
  • Embedded systems development with strict memory constraints
  • Cross-platform projects requiring C99 compatibility
  • Educational projects exploring CIL/MSIL translation
  • Integrating .NET logic with existing C libraries in resource-limited environments

Not Ideal For

  • Production systems requiring stable and fully-featured .NET runtime compatibility
  • Projects heavily dependent on advanced .NET features like async/await, LINQ, or dynamic reflection
  • Teams needing rapid development cycles without the complexity of a transpiler and manual C code management
  • Environments where a managed runtime with automatic garbage collection is preferred over low-level control

Pros & Cons

Pros

Readable C Output

Generates human-readable C99 code, as shown in the hello-world example, making performance analysis and debugging more transparent.

Minimal Memory Footprint

Targets kilobyte-scale memory usage for embedded systems without an OS, ideal for devices like Arduino and ESP32.

Broad Platform Portability

Requires only a C99 compiler and minimal runtime dependencies (heap, CAS instructions), supporting Win32, pthreads, and FreeRTOS.

Seamless C Interoperability

Supports .NET interop techniques like P/Invoke, enabling easy integration with existing C libraries without runtime overhead.

Cons

Experimental Status

The README explicitly states IL2C is 'experimental,' meaning it lacks production stability and may have unresolved bugs or breaking changes.

Incomplete .NET Support

Auto-generated lists for supported opcodes and runtime features indicate gaps, restricting use of some C# language constructs and standard libraries.

Complex Translation Overhead

Generated C code includes manual execution frames and garbage collection, adding setup complexity and potential performance trade-offs compared to native .NET.

Frequently Asked Questions

Quick Stats

Stars449
Forks39
Contributors0
Open Issues42
Last commit4 years ago
CreatedSince 2017

Tags

#embedded-systems#dotnet-ecosystem#transpiler#csharp#c#dotnet#interoperability#code-translation#translator#cross-platform#cil#c-language#fsharp#c99#intermediate-language

Included in

Core21.2k
Auto-fetched 19 hours ago

Related Projects

RoslynRoslyn

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.

Stars20,565
Forks4,293
Last commit1 day ago
FableFable

F# to JavaScript, TypeScript, Python, Rust, Erlang and Dart Compiler

Stars3,134
Forks329
Last commit1 day ago
PeachPiePeachPie

PeachPie - the PHP compiler and runtime for .NET and .NET Core

Stars2,485
Forks212
Last commit1 month ago
SpracheSprache

A tiny, friendly, C# parser construction library

Stars2,473
Forks214
Last commit2 years ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub