Is Roslyn cross platform?

C#MonoRoslyn

C# Problem Overview


I've been looking at Roslyn for quite some time now, and I'm curious and excited about it. One thing I noticed is that they mentioned that the compiler is re-written in managed code. This raises the question of whether Roslyn is able to run on non-.NET virtual machines, such as Mono.

I would really love to embed C# scripting using Roslyn in my video games, and to use many of their other features in my applications, but I'm wondering if using Roslyn will break the ability for it to run on Mono.

Has anyone tried running Roslyn on Mono? Is it possible? Why or why not?

To clarify, I'm interested in both whether the managed assembly can run on Mono, and whether it can generate assemblies that mono can run.

C# Solutions


Solution 1 - C#

Despite it being the furthest thing from Eric's mind, Roslyn has been released as true Open Source (Apache 2.0) and is in fact now cross-platform.

Miguel de Icaza of Xamarin showed it running on Mono at BUILD.

When Roslyn releases, it will become part of Mono. They are already maintaining a branch at the Mono Git repo.

Solution 2 - C#

As @Govert has already mentioned in a comment, if you want to embed C# scripting capabilities you should simply use the Mono-equivalent library/tool: Mono-Csharp. (Especially because, even if Roslyn could run on Mono, its licence may dictate that you're not allowed to.)

This tool in the Mono world has existed much earlier than Roslyn BTW, and is open source. Here you have even a Microsoft employee blogging about it and uploading it to Nuget:

http://blog.davidebbo.com/2012/02/quick-fun-with-monos-csharp-compiler-as.html

I hope your game will kick ass!

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionmirhagkView Question on Stackoverflow
Solution 1 - C#JustinView Answer on Stackoverflow
Solution 2 - C#knocteView Answer on Stackoverflow