| |
 |
|
Return to main project page.
Gardens Point Ruby.NET Compiler (Beta 0.8.1)
Requirements
Disclaimer
This is a Beta release ...
- It is knowingly incomplete, contains bugs and should definitely not be used for
any production purposes.
- It has not been optimized in the slightest, so no performance conclusions should
be drawn from it.
Downloads
Installation Instructions
- It is recommended that all users download and run the installer listed above. Windows
Vista users will need to ensure that the installer runs as Administrator.
The installer:
- Creates a Ruby.NET application directory (by default in your Program Files directory)
containing Ruby.exe and RubyCompiler.exe.
- Installs the Ruby.NET runtime libraries into the global assembly cache.
- Inserts build targets and tasks into the
msbuild extensions directory.
- Creates file associations for
.rb and .rbproj files.
- Optionally registers the Visual Studio integegration package and installs VS templates
and menus.
- Creates a programs menu shortcut to Visual Studio 2005 using an "experimental hive"
as
used by Ruby.NET
- [Optional] To control the set of directories searched when dynamically loading Ruby
libraries (eg
c:\Ruby-1.8.4\lib) you can either:
- [Recommended] Set the
$RUBYLIB environment variable.
- Use the
-I command line option to Ruby.exe.
- [Optional] No standard Ruby library code is provided in this distribution. If required,
it can be downloaded from http://www.ruby-lang.org.
Usage
with Visual Studio ...
- Start Visual Studio using the"experimental hive" used by Ruby.NET. You can do this
either from the Ruby.NET entry in your Programs Menu, or by typing
devenv /rootsuffix Exp in a Visual Studio command line prompt.
- Create a Ruby.NET project (either Console Application or Class Library).
- You can add new or existing ruby source files to the project.
- One of the source files needs to be designated the "Main" file. You can set the
Main file by right clicking on a file in the Solution explorer and selecting "Set
as Main". In a project containing more than one source files, all source files are
compiled into the assembly but only the Main file is automatically executed. Other
source files in the assembly can be manually invoked from the Main source file by
standard ruby load or require calls. When loading files, Ruby.NET will automatically
use precompiled assembly dlls if they are appropriately named, in the appropriate directory
and are newer that any corresponding Ruby source files.
- Ruby projects can be built, executed and debugged in Visual Studio in the fashion.
with Command line tools ...
- The command line tools are located by default in
C:\Program Files\Ruby.NET\bin.
You may wish to add this to your $PATH.
- We now have two front-ends to our compiler:
RubyCompiler.exe takes a similar set of command line options as the C# compiler
and can be used to compile multiple Ruby source files into a single assembly. Use
RubyCompiler /help to see details of command line options.
-
eg:
> RubyCompiler.exe test.rb
> RubyCompiler.exe /out:outfile.dll /target:library /debug:none file1.rb file2.rb
Ruby.exe takes approximately the same set of command line options as the
C Ruby interpreter and transparently compiles, loads and executes a Ruby source
file without writing any assemblies to disk. Use Ruby.exe -help to
see details of command line options.
-
eg:
> Ruby.exe test.rb
> Ruby.exe -i.bak -pe 'sub(/^[0-9]+$/){42}' datafile
Bug Reporting and Feedback
This is a preliminary beta release. It is knowingly incomplete and contains many
bugs. We therefore ask that you do not submit bug reports at this stage.
At a later date, when we claim to fully implement the language we will challenge
the community to prove us wrong and to submit bug reports.
We are however, interested now in your feedback on our general approach. In particular
we'd like to know if there are any fundamental design choices we have made that
will ultimately prevent us from achieving some aspect of correct Ruby semantics.
For example, representing local variables as data members of activation frame objects.
We will shortly be releasing a detailed design document to facilitate this discussion.
Comments and questions can be posted on:
http://groups.google.com/group/RubyDOTNET
|