Ruby shining on .Net Down Under

14.08.2006
Developers in Australia are working on a Ruby compiler that converts Ruby source code into Microsoft's Common Intermediate Language (CIL) for execution on Microsoft's .Net Framework 2.0 platform.

Created at the Queensland University of Technology, in Brisbane, Australia, the Gardens Point Ruby.Net compiler (http://plas.fit.qut.edu.au/Ruby.NET/)is being released via an open source-style license.' It is a true .Net compiler, as opposed to an interpreter or a Ruby-.Net bridge, said Wayne Kelly, a project leader and senior lecturer at the university. The compiler provides access to .Net facilities and libraries and an API for developing Windows forms applications is included. Currently available in a beta release, a general release with full language and built-in class support is planned by the end of the year.

"The .Net platform was designed to support many different programming languages so that developers could choose to use their favorite source language while still providing high levels of interoperability between components implemented in different languages," Kelly said in an email response to questions. "All of these languages also are able to make use of a large collection of libraries used, for example, to connect to databases, process XML, help implement web applications, etc."

"So, to existing .Net programmers, the Gardens Point Ruby compiler adds Ruby to the set of languages they can make use of to develop .Net applications. Ruby is an increasingly popular language with many fanatic users," Kelly said.

"The fact that .Net is managed, and so provides sandboxed type security, is also very important in some security-critical scenarios - for example implementing SQL Server stored procedures using fully verifiable .Net code," Kelly said. "This is why we aim to generate only fully verifiable managed code - with no native invokes to untrusted code."

A wider research goal of the project is to investigate support for dynamic languages on mainstream managed execution environments and to consider how interoperability can be achieved with other dynamic languages such as Python. Thus far, developers have not optimized performance of the system to support interoperability with .Net programs written in other languages, according to the Web page on the compiler. But that will be a goal once semantic compatibility with the standard Ruby interpreter is achieved.