DuoCode Cross Compiler
DuoCode Cross Compiler
Written by Alex Denham   
Thursday, 19 March 2015

DuoCode lets you cross compile C# code into JavaScript. Although it will be a commercial product developers are invited to apply for beta invitations and a public beta version is expected shortly.

DuoCode is integrated with the Visual Studio IDE and uses Microsoft’s .NET compiler platform (formerly known as Roslyn) to analyze the C# code.

Roslyn is used for the code-parsing, syntactic tree (AST) generation, and contextual analysis. The code is then handed over to DuoCode for code translation and the generation of the JavaScript code and source maps.

 

duocsh

duocodewide

 

duojs1

 

According to the DuoCode development team, while JavaScript is ideal for writing applications that run in the browser, it’s not always possible (or viable) to rewrite significant parts of core business logic in JavaScript, continuing:

“There have been many attempts over the years to create languages that translate to JavaScript (TypeScript, CoffeeScript, to name a few), but none really provide the raw power and tooling, available to C# developers. Until now!”

DuoCode uses the Roslyn compiler, now known as the .NET Compiler Platform. The developers say this allows DuoCode to:

 “fully ‘understand’ C# and all of its features (including the new C# 6 language features), and accurately convert them to corresponding JavaScript.”

They say that DuoCode supports things like Generics, Reflection, LINQ and dynamic, while providing full Visual Studio support for IntelliSense, syntax highlighting, and even debugging your original C# code in your browser.

 

duocodecube

 

The above image is from a brower-based demo that was written in C# to compiled to JavaScript using DuoCode. Click on the image to go to  duoco.de/samples/webgl/index. Pressing F12 lets you see the source code and if you enable source-maps in your browser you can debug the C# code directly.

DuoCode will be commercial and not open source, and is aimed at companies who have large quantities of pre-existing C# projects that they want to reuse in JavaScript. The beta version can be used until June 30, 2015.

More Information

DuoCode

Hello DuoCode - translating C# to JavaScript!

Related Articles

Microsoft Moves To Roslyn 

 

To be informed about new articles on I Programmer, install the I Programmer Toolbar, subscribe to the RSS feed, follow us on, Twitter, FacebookGoogle+ or Linkedin,  or sign up for our weekly newsletter.

 

Banner


Google SLING: An Open Source Natural Language Parser
17/11/2017

Google Research has just released an open source project that might be of interest if you are into natural language processing. SLING is a combination of recurrent neural networks and frame based pars [ ... ]



DeepMind's AlphaZero Triumphs At Chess
07/12/2017

DeepMind's latest program, AlphaZero, has used reinforcement learning from playing against itself to master the game of chess. Given the important role that chess has occupied in computer science, thi [ ... ]


More News

 

 
 

 

blog comments powered by Disqus

 

 

 

Last Updated ( Thursday, 19 March 2015 )
 
 

   
Banner
Banner
RSS feed of news items only
I Programmer News
Copyright © 2017 i-programmer.info. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.