Skip to content
forked from ForNeVeR/Cesium

C compiler for the CLI platform

License

Notifications You must be signed in to change notification settings

Watch-Later/Cesium

 
 

Repository files navigation

Cesium Status Enfer

Cesium is a fully managed C compiler for CLI platform (.NET).

What? Cesium compiles standard C source code to a .NET assembly. No unmanaged/mixed mode (a-lá C++/CLI) code is expected to be generated; everything is fully managed (but unsafe).

Why? C programs are very useful in the modern world, and solve practical tasks. At the same time, deploying C code alongside .NET code may be tricky (especially if your application supports multiple platforms). Cesium is designed to resolve the problems of C code deployment, and lift it to the managed state (so it is crossplatform in the same way the underlying CIL code it is compiled to).

Implementation Status

  • C17 parser: just started
  • CIL code generator: just started
  • PDB support: none
  • C preprocessor: none
  • .NET SDK: none
  • Standard library: none

Documentation

Usage

$ dotnet run --project Cesium.Compiler -- <path to the input .c file> <path to the output assembly>

For example, this will generate an assembly executable by .NET 6, .NET Framework, or Mono:

$ dotnet run --project Cesium.Compiler -- Cesium.Samples/minimal.c out.exe
$ dotnet ./out.exe # run with .NET 6
$ ./out.exe # only on Windows, run with .NET Framework
$ mono ./out.exe # run with Mono

About

C compiler for the CLI platform

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 98.9%
  • Other 1.1%