Giter Site home page Giter Site logo

cesium's Introduction

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 generated; everything is fully managed (but may be 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 cross-platform in the same way as the underlying CIL code it is compiled to).

Implementation Status

TL;DR: is it ready for use?

Unfortunately, not yet. You won't be able to use Cesium for anything useful today. Probably, you'll be able to start after the next milestone is implemented. Stay tuned!

Sneak Peek

Currently, Cesium is able to compile a "Hello, world" C17 example to a .NET assembly:

#include <stdio.h>

int main(int argc, char *argv[])
{
    puts("Hello, world!");
    return 42;
}

The next milestone is #61: sha1collisiondetection, which is 80% complete (note that the progress estimation is preliminary and may be changed in either direction at any moment).

Documentation

Usage

$ dotnet run --project Cesium.Compiler -- <path to the input .c file> --out <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 out.exe
$ dotnet ./out.exe # run with .NET 6
$ ./out.exe # only on Windows, run with .NET Framework
$ mono ./out.exe # run with Mono

Optional Parameters

  • --framework <framework>: specifies the target framework, defaults to Net
    • NetFramework for .NET Framework
    • NetStandard for .NET Standard
    • Net for .NET 5+
  • --arch <architecture-set>: specifies the target architecture set, defaults to Dynamic. Possible values are:
    • Dynamic (machine-independent),
    • Bit32 (for 32-bit CPUs),
    • Bit64 (for 64-bit CPUs).
  • --modulekind <moduleKind>: specifies the output module kind; by default, it is autodetected from the output file extension
    • Dll: gets detected from a .dll extension
    • Console: gets detected from an .exe extension
    • Windows: doesn't get detected, so it's only possible to select manually
    • NetModule: is a rudiment from Cecil, not supported

Implementation Dashboard

Have a question? Welcome to the discussions section!

Looking to contribute? Check open issues with the "help-wanted" label. Cesium is a big project which lives thanks to its contributors.

Not sure where to contribute? Check open issues with the "good first issue" label.

Take a look at the contributor guide.

If you're interested in certain project areas, check the per-area issue labels:

cesium's People

Contributors

abrahamferga avatar afernandezatariox avatar balikfromua avatar boundedchenn31 avatar davten avatar fantoom avatar fornever avatar fredikats avatar griboedoff avatar gsomix avatar impworks avatar kant2002 avatar kekyo avatar kolosovpetro avatar newlifer avatar reima avatar rstm-sf avatar zawodskoj avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.