项目作者: jonathanvdc

项目描述 :
A Flame-based EC# compiler
高级语言: C#
项目地址: git://github.com/jonathanvdc/ecsc.git
创建时间: 2016-04-15T14:52:06Z
项目社区:https://github.com/jonathanvdc/ecsc

开源协议:MIT License

下载


Build Status

Linux Windows
Build Status Build status

ecsc

ecsc is an Enhanced C# compiler that uses Flame as its back-end. It can be used to compile both C# and EC# source code files, and ships with the following features:

Caveat: ecsc is still a work-in-progress. It does not support a number of C# language features that everyone takes for granted nowadays, like nullable value types, lambdas and type argument inference. Furthermore, it can at times get the C# semantics wrong. Feel free to open an issue (or a pull request!) if you run into an issue like this.

Build instructions

First, clone the ecsc repository, and navigate to the ecsc folder.

  1. git clone https://github.com/jonathanvdc/ecsc
  2. cd ecsc

Next, update the NuGet packages, and compile the ecsc solution.
Visual Studio users should be able to open src/ecsc.sln, switch to ‘Release’ mode, and hit ‘Build Solution’.

If you’d rather use the command-line, that’s

  1. nuget restore src/ecsc.sln
  2. msbuild /p:Configuration=Release src/ecsc.sln

You should be all set now. You may also want to add ecsc to your PATH environment variable, but I’ll leave that up to you.

Using ecsc

ecsc should be pretty straightforward to use. Once you’ve installed ecsc and added it to your PATH environment variable, you can compile files like so:

  1. ecsc code.cs ecs-code.ecs -platform clr

Note the -platform clr option, which instructs ecsc to generate code for the CLR. This is almost always what you want. Also, source files must be specified first, before any other option. If you want to specify source files later on, you must use the -source option.

  1. ecsc -platform clr -source code.cs ecs-code.ecs

By default, ecsc will put your output file(s) in a folder called bin. If you want them to end up elsewhere, use the -o option.

  1. ecsc code.cs ecs-code.ecs -platform clr -o a.exe