Copyright © 2001, 2002 Southern Storm Software, Pty Ltd.
Permission to distribute unmodified copies of this work is hereby granted.
DotGNU Portable.NET is built in accordance with the requirements of the GNU Project and FreeDevelopers.
DotGNU Portable.NET is focused on compatibility with the ECMA specifications for CLI. There are other projects under the DotGNU meta-project to build other necessary pieces of infrastructure, and to explore non-CLI approaches to virtual machine implementation.
Note: It isn't possible to compile pnetlib with DotGNU Portable.NET's
C# compiler just yet. The compiler can perform a syntax check, but not
a full compile. A pre-compiled version of the library is distributed
with "pnet" as "
Treecc performs most of the housekeeping within the core of the compiler,
allowing the programmer to concentrate on the specifics of language
implementation. A fuller account of how treecc works can be found
at its Web site, http://www.southern-storm.com.au/treecc.html.
Other tools, such as Antlr, do have similar functionality, but we
found it more convenient to write our own tool. We needed something
that worked with C and which could perform a large amount of error-checking
on the abstract syntax tree definitions. No other tool provided the right
combination.
The purpose of this tool is not to compare DotGNU Portable.NET with
other systems. Rather, it is intended to identify areas of DotGNU
Portable.NET that may need further attention.
The
You may be tempted to run PNetMark against the Microsoft CLR. If you
do, you cannot tell the author of the benchmark, or anyone else for
that matter, what the results are. The following is an excerpt from
Microsoft's End User License Agreement (EULA) for their .NET Framework SDK:
The package also includes the infamous "Curse of Frogger" video
game, written in C# and utilising ncurses to provide display output.
If the IL program has command-line options, they can be supplied after
the name of the IL executable:
The "
You must first register "
To unregister "
If you prefer to start and stop services with "
If you pass a regular Windows executable to "
If your Wine installation is not on the
Wine also has facilities for registering itself with the Linux kernel to
run PE/COFF executables. Only one PE/COFF handler can be registered
at a time. It is important that "
The following are the most common command-line options for the
compiler:
While it is possible to bootstrap off Microsoft's engine and
compiler, there is an open legal question in doing this. We want
to avoid any "booby traps" that may exist in Microsoft licenses
that prevent the free development of DotGNU Portable.NET. It is
safer to avoid dependence upon Microsoft tools.
Writing the C# compiler in C means we are bootstrapping from gcc,
and not Microsoft's compiler, which should avoid any legal problems.
The second reason for writing the compiler in C is security.
Independent third parties can inspect the C# compiler source
for security problems, and then compile the code with their
(hopefully) trusted version of gcc to get a trusted C# compiler.
Writing the compiler in C# would introduce a tough trust problem:
you must trust that the bootstrapped binary version of the compiler
does not have any back doors. Inspecting the source code is not
sufficient to perform a full security audit.
However, nothing in DotGNU Portable.NET's cscc compiler prevents its reuse
in other compilers. As long as those compilers are themselves written
in C, and covered under the GNU General Public License.
Cscc is architected so that new languages can be easily added as
plug-ins. The plug-in converts source code into IL assembly code,
which cscc processes to produce the final executable. Plug-ins
can either do this conversion their own way, or reuse the existing
code to do most of the hard work for them.
The "
However it isn't quite as easy as it looks. The following script of
a hypothetical discussion provides a blow by blow account of why this
is so hard. This script is based in part on e-mails we have exchanged
with users in the past.
Why don't you add C# to the list of languages gcc supports?
Because it won't solve the problem that we need to solve.
Initially we need a C# compiler that can generate IL bytecode for
the .NET platform. Later, we may need a C# compiler that can
generate native code as well, but that is optional.
Putting a C# parser on the front of gcc would give us a native
compiler, but it won't give us an IL bytecode compiler.
So what? Add an IL bytecode backend to gcc, and you'll solve your
problem, and also be able to compile C, C++, Fortran, etc, to .NET.
This is not as easy as it looks. Gcc is divided into a number of
phases: parsing, semantic analysis, tree-to-RTL conversion, RTL
handling (including optimization), and final native code generation.
The hard part is RTL (Register Transfer Language). This part of
gcc is hard-wired to generate code for register-based CPU's such
as i386, PPC, Sparc, etc. RTL is not designed for generating code
for stack-based abstract machines such as IL.
Also, RTL loses a lot of the type and code structure information
that IL needs in the final output file. By the time RTL gets the
code, information about whether a value is an integer or an object
reference is mostly lost. Information about the class structure
of the code is lost. This information is critical for correct
compilation of C# to IL.
But hang on a second! Gcj, the Java back-end for gcc, does stack
machines! Why not do something like that?
Err ... no it doesn't. The Java bytecode stuff in gcj is not
organised as an RTL back-end.
When gcj compiles Java, it performs parsing and semantic analysis
in the front-end, like the other supported languages. Then the
parse tree is sent in one of two different directions.
If gcj is compiling to native, the parse tree is handed to the RTL
core of the compiler, and it takes over.
If gcj is compiling to bytecode, the parse tree is handed to a
completely separate code generator that knows about Java bytecode.
Because gcj does NOT implement a bytecode RTL back-end for gcc, it
cannot compile C, C++, etc down to bytecode. Java bytecode is a
special case that only works for the Java front-end.
But what about egcs-jvm? Doesn't it compile C to
Java bytecode?
It's a hack. The code that it generates is horrible, and does not
conform to the usual conventions that the JVM requires. If one
compiled Java code using this back-end, it wouldn't work with
normal Java code due to the differences in calling conventions
and what-not.
The biggest problem that the author of egcs-jvm he had was
trying to work around the register machine assumptions in the code.
The result wasn't pretty. He has said that it would be easier to
throw the JVM away and invent a register-based abstract machine
than try to make gcc generate efficient stack machine code.
Isn't there a gcc port to the Transputer, which is stack-based?
Yes there is, for an older version of gcc (2.7.2). The source can
be found here.
It appears to compile the code to a pseudo-register machine, and then
fixes up the code to be stack based afterwards. It takes advantage of
some register stack features in gcc that egcs-jvm didn't use.
The Transputer is still a traditional CPU despite being stack-based.
The gcc port puts pointer values into integer pseudo-registers, which would
violate the security requirements of IL.
The i386 gcc port uses a regular set of registers for integer/pointer
values, and a register stack for floating point values. The Transputer
port uses two register stacks: one for integer/pointer values, and
the other for floating point values. It may be possible to use three
register stacks for IL: one for integer values, another for pointer values,
and a third for floating point values.
However, this still may not give a useful result. This fixes the security
problems for the pseudo-registers, but it doesn't fix the security problems
for memory. RTL assumes that main memory is a flat, untyped, address space,
where any kind of value can be stored in any word. Partitioning main memory
into separate types may not be possible without a rewrite of RTL.
OK, so do something similar to gcj for C#. Use two code generators.
That would work right?
Yes it would, except for one small catch.
Because there are so many people who don't understand how gcc works,
they will assume that they can compile C and C++ to IL bytecode after
we release the C# patches.
Then they will discover that this isn't the case and will get
extremely angry that we didn't build what they thought we were
building. *sigh*
Now matter how we attack the problem, we will end up having to
write an IL bytecode backend for RTL, which is extremely difficult
because of the various assumptions in the code.
Realistically, someone with a great deal of gcc knowledge needs to
go into the gcc core, rip RTL completely out, throw it away, and
replace it with something that knows about both register machines
and stack machines.
Alternatively, someone could create a STL (Stack Transfer Language),
that passes all languages through a separate code generator that
knows about stack machines. Then we can write STL back-ends for
IL and JVM bytecode. Both gcj and DotGNU would benefit from this.
We're not buying it. It's not as hard as you think.
Fine. Prove us wrong. Download the gcc sources and have at it.
The Transputer port may be a good place to start to get ideas,
or it may not.
Our disassembler and assembler don't support round-tripping, although
they use similar formats. If someone wants to submit round-tripping
patches, then that would be great. But it isn't a high priority for us.
It is debatable whether round-tripping is useful in a Free Software
environment. Presumably you already have the original source for
the application, and can make the modifications there and recompile.
The output XML file uses the same format as the ECMA's "
The "
An obvious licensing question that many people have is why use the GPL
instead of the LGPL for this library? We aren't trying to restrict its
use by commercial entities.
However, there is a small catch with the LGPL and native methods.
A commercial entity could produce their own proprietry runtime engine
that has "enhanced" native method support of some kind. Under the
terms of the LGPL, they would be obligated to release the declaration
of the native method in the C# system library. For example:
Under the terms of the GPL, we can require that the source code to
native methods must also be available, or the library modification
is disallowed.
This is why we have decided to use the GPL with the linking exception
described above.
[Aside: by "native method" we mean any method that is implemented in
something other than IL bytecode. This includes PInvoke functions and
"internalcall" methods, among others.]
For small patches, Copyright will automatically revert to the primary
maintainer for the files or directories being patched. If you don't
want this to happen, then don't submit the patch.
For larger patches, you should explicitly assign the Copyright
to the primary maintainer, or FreeDevelopers, or the Free Software
Foundation. We prefer that you assign the Copyright to the maintainer
of the files you are patching, to prevent dilution of the Copyright
on those files. Should problems arise in the future, it is easier
to replace an entire file than edit the contents of a single file.
To assign the Copyright, include a notice in the patch comments as to
how you want the Copyright assigned. If you don't include such a
comment, we will need to contact you via e-mail to get your
permission.
The GNU Project has strict
guidelines about Copyright assignment. The goal is to have
a predictable Copyright on each GNU package, should legal action
ever need to be taken to defend the GPL. If you don't agree
to these guidelines, then don't submit the patch.
We could also use some assistance with documentation of the API's
within the current code base. Mostly this involves converting
the contents of the ".h" files in the "include" directory into
Texinfo-compatible documentation and examples.
The runtime engine and the C# compiler are also works in progress.
The code is well-commented with "
Even if it isn't on the core CLI parts of DotGNU Portable.NET, it may still
be interesting. There are number of people working on Java and JVM related
extensions, for example.
Also look at the "
The repository name for DotGNU Portable.NET is "
The working CVS version will always end in an odd number, and the
released version will always end in an even number. For example,
"0.1.3" is the working version that will lead up to the "0.1.4"
release version.
Version numbers typically jump to the next-higher level when
the last component reaches 9. e.g. "0.2.9" is the working version
for the "0.3.0" release version. Major version jumps may also
occur when major components have been completed.
This convention will be adopted across all DotGNU Portable.NET components:
"
Starting from version "0.1.4" of DotGNU Portable.NET, tags will be added
to the CVS tree whenever a release version is cut. The tag for version
"0.1.4" will be "r_0_1_4". Working versions will never have a tag.
Please include comments with your patch that explain what it is
for. Also include your full e-mail address, and any information
related to Copyright assignment (see "Who owns the Copyright on patches?").
The maintainers will decide on a case by case basis whether to
accept a patch. Submitting it does not guarantee inclusion.
The "
The "
Microsoft's .NET Framework SDK contains a lot more classes in its
base class libraries. Because we wish to be (more or less) compatible
with Microsoft's .NET offerings, we have to implement more than ECMA
specifies.
We generally follow the ECMA specifications to the letter, and only
deviate from them where they are missing information, or the information
conflicts with Microsoft's actual implementation.
The following is what Eben Moglen, the legal counsel for the
Free Software Foundation, has said about the Rotor license:
My advice is to tell people to code where possible from the ECMA
standard. Where (which is likely to be everywhere), ECMA is
insufficiently descriptive to create interoperable code, it is
acceptable to read the source of the Rotor implementation. Notes
taken in the course of reading that source should be made in
pseudocode, so that programmers do not copy snippets of the Rotor
source as aides to their memory. We want every line of code in our
projects to have come out of the original invention of one of our
coders, having been expressed in his or her own way. Ideas abstracted
from the Rotor implementation should always have been put in our
programmer's own "words," because copyright protects expressions, not
ideas.
-- Eben Moglen, 28 March 2002
Apparently there are switches that can be supplied to Visual Studio.NET
that force it to output pure-IL binaries. But even then, there will still
be dependencies on other Microsoft libraries. Your mileage may vary.
Some people have suggested interfacing "1.2. What is pnet?
The bulk of DotGNU Portable.NET is made up of the runtime engine,
the C# compiler, and a host of useful development tools. This
package is generally referred to as "pnet".1.2. What is pnetlib?
The C# system library was split off from the main source distribution
during the early phases of development. The main reason for this was
to enable other free software .NET efforts to reuse the code.samples/mscorlib.dll
". If you wish to
modify the library, you will need to use Microsoft's C# compiler.
This situation should be rectified soon.1.3. What is treecc?
Treecc is a aspect-oriented programming tool that we wrote to assist in
the development of cscc. It complements flex and bison by providing
support for abstract syntax tree creation and manipulation.1.4. What is PNetMark?
PNetMark is a benchmarking tool for Common Language Runtime (CLR)
environments. It is loosely based on the techniques used by the
CaffeineMark to benchmark Java.README
file within the PNetMark distribution contains
additional information on running the benchmark. It also contains
a description as to why you should never believe what benchmarks
tell you, especially when comparing different systems.
6. Performance or Benchmark Testing. You may not disclose the
results of any benchmark test of either the Server Software or
Client Software to any third party without Microsoft's prior
written approval.
Thus, you can run the benchmark if you like, but you must keep the
results to yourself. If you don't like this, then you will have to
take it up with Microsoft's lawyers.1.5. What is pnetcurses?
Pnetcurses is an example package, demonstrating how to wrap up an
existing system library (ncurses in this case) using the PInvoke
mechanism.1.6. What is cscctest?
The regression test suite for the C# compiler is distributed via
CVS as the module "cscctest
".1.7. What do all these acronyms mean? IL, CLI, CLR?
ilrun
"
program.2. Using the runtime engine
2.1. How do I run IL programs?
IL programs are executed using the "ilrun
program, as
follows:
The "ilrun hello.exe
.exe
" extension is not required: you can rename the
program to "hello
" if you wish.
Most IL programs will rely upon the "ilrun getenv.exe PATH
mscorlib.dll
" file
to provide library facilities. A pre-compiled version of this file
can be found in the "samples
" directory on the
"pnet
" distribution.mscorlib.dll
" file should either be placed in the
same directory as the program you are running, or in the system-wide
location "PREFIX/lib/cscc/lib
", where "PREFIX
"
is the directory where you installed DotGNU Portable.NET
(e.g. "/usr/local
").
2.2. Can I avoid typing "ilrun"?
If your operating system uses the Linux kernel, and you have root access,
then you can avoid typing "ilrun
" to execute programs
from the command-line.ilrun
" with the Linux
kernel, by executing the following command as root:
Then you can run programs as follows:
ilrun --register
This will also work if you rename "chmod +x hello.exe
./hello.exehello.exe
" to
"hello
", and then place it somewhere on your
PATH
.ilrun
", execute the following command
as root:
Note: registration will only work with the Linux kernel (versions 2.2
and later), and when you are logged in as root.ilrun --unregister
init.d
",
you can use the script "doc/init.d-pnet
". Copy it to
"/etc/init.d/pnet
". The script uses
"/usr/local/bin/ilrun
" to register the engine, and it is
designed for the Redhat distribution. Minor modifications may be required
for other install locations and distributions.2.3. I've registered "ilrun", but it is running the wrong version. Why?
When you register "ilrun
", it attempts to construct the
full path of the engine to pass to the kernel. Normally it does this
by searching the PATH
. You can specify an explicit
pathname as follows:
ilrun --register /usr/local/bin/ilrun
2.4. Can I use "ilrun" and Wine together?
Because IL programs have a similar format to regular PE/COFF Windows
executables, it is not always clear whether a program should be executed
with "ilrun
" or with "wine
".ilrun
", it will hand
off control to "wine
" to run the program. It uses the first
executable called "wine
" on the PATH
.PATH
, you can set the
WINE
environment variable to specify its location.ilrun
" be registered as the
primary PE/COFF handler, because Wine does not currently know how
to hand off IL programs to "ilrun
".3. C# compiler questions
3.1. How do I use the C# compiler?
The C# compiler is called "cscc
". It's command-line
syntax is very similar to that of gcc. For example, to compile
a simple program, you might use:
Most applications need the "cscc -o hello.exe hello.cs
mscorlib.dll
" file to
provide common library classes. See question 2.1
for a description of where to get this file and how to install it.
Note: the compiler is still a work in progress, so some language
features may not work as expected. Contact the authors if you
find any such problems.
-o file
file
".-Dname
name
" to
"true
".-Ldir
dir
" to the path to be searched for libraries.-lname
name.dll
" to the list of libraries to add to
the link line.-vv
3.2. Why not write the compiler tools in C#?
The main reason is the "chicken and egg" problem. We wouldn't be
able to run the compiler until the runtime engine and the
full C# system library is written, and they are still a work
in progress.3.3. The compiled pnetlib does not work. What is wrong?
The C# compiler is a work in progress, and it isn't yet capable of
compiling pnetlib to completion. Use the file "mscorlib.dll
"
in the "pnet/samples
" for the time being.3.4. If the compiler was written in C#, wouldn't reuse be easier?
Reuse is the stated reason for why the Mono project is writing all of their tools in C#. Should the Mono project
succeed at this goal, then their components should be directly reusable
by anyone running DotGNU Portable.NET.3.5. How do I write a compiler plug-in?
The "pnet/cscc/HACKING
" file describes the structure of
the C# compiler, and how to write a plug-in for a new language if
you want to reuse the existing code.pnet/doc/pnettools.texi
" file describes the
command-line syntax that you must support if you want to write your
own plug-in from scratch, without using any of the existing code.3.6. I've heard that you can compile C# to the JVM. Is that correct?
Yes. The cscc compiler is architected so that it can compile to either
IL or JVM bytecode. Adding other output formats would be quite easy.3.7. Why don't you use gcc as the basis for your C# compiler?
A common question that arises is why we aren't using gcc to compile
C# code to IL. Strategically, we would like to be able to reuse all
of the good work that has gone into gcc. The DotGNU Project currently
has an open request for someone to volunteer to modify gcc to generate
IL bytecode.4. Other tools
4.1. How do I assemble .il files?
If you have an IL assembly source file, you can convert it into an IL
binary using the "ilasm
" program. For example:
The assembler supports the format described in the ECMA specifications.
ilasm -o hello.exe hello.il
4.2. How do I disassemble IL binaries?
If you have an IL binary, such as a ".exe
" or a
".dll
" assembly, you can convert it back into IL
assembly source as follows:
ildasm hello.exe >hello.il
4.3. Does your disassembler and assembler support round-tripping?
"Round-tripping" is a feature of Microsoft's disassembler and assembler
that allows a program to be disassembled, modified in some fashion,
and then re-assembled, without having access to the original source.4.4. How do I convert resources?
The "resgen
" program can be used to convert string resources
between a variety of formats: text resources, IL binary resources,
XML resources, and GNU gettext resources (".po
").
For example:
This converts the text resources in "resgen hello.txt hello.resources
hello.txt
" into
IL binary resources in the file "hello.resources
".4.5. How do I extract documentation from C# sources?
The "csdoc
" program is very similar to the C# compiler,
"cscc
", except that it outputs XML documentation files
instead of IL binaries. For example:
The tools must partially compile the input source to collect up the
information that it requires. Therefore, it is usually best to ensure
that your program compiles with "csdoc -o hello.xml hello.cs
cscc
" before attempting
to use "csdoc
".All.xml
"
file. You can use the programs "csdoc2html
" and
"csdoc2texi
" to convert the XML file into HTML and Texinfo,
respectively.4.6. Can I build applications without "make"?
Some people don't like "make
" for some reason. They prefer
simpler build tools. The "csant
" program takes an XML
file as input, which describes what to build, and then runs the C#
compiler to build the requested targets.csant
" program is similar to, but not quite as powerful as
NAnt (http://nant.sourceforce.net/).
But because "csant
" is written in C, it can be very useful
for bootstrapping C# applications without the aid of a CLR.4.7. What other tools do you have?
We are always adding new utilities as we need them. The following
is a sampling:
csdoc2html
csdoc2texi
csdoc2stub
csdocvalil
ilalink
ilcheck
ilrun
, against an
IL binary to determine if all internalcall methods in the
binary have been properly implemented by the engine.ildiff
ilfind
ilnative
ilsize
ilverify
5. Copyright issues
5.1. Why isn't the C# library LGPL?
The license on the C# library, "pnetlib
", is distributed
under a modified GPL license:
The source code for the library is distributed under the terms of the
GNU General Public License, with the following exception: if you link
this library against your own program, then you do not need to release
the source code for that program. However, any changes that you make
to the library itself, or to any native methods upon which the library
relies, must be re-distributed in accordance with the terms of the GPL.
We call this the "GPL plus linking exception", which is also used by
the GNU Classpath project.
But would they be obligated to release the source code to the native
method's implementation under the terms of the LGPL? Because it is in
a separate program (their runtime engine), it isn't strictly part of
the library. The result would be a C# library that is useless without
their proprietry native method implementation. This state of affairs
is undesirable.extern int enhanced_method(string arg1, int arg2);
5.2. Who owns the Copyright on patches?
The DotGNU Project is working
on guidelines for explicit Copyright assignment. When they have
been finalised, they will replace the guidelines below.6. How can I help?
6.1. What areas need the most help?
The biggest area that needs to be tackled is the C# library,
pnetlib.
Pick a class, any class, implement it, and send us the changes.
See the question on "Standards" for information on obtaining
the ECMA class library documentation.TODO
" in all of the
places where there is still stuff to be done.6.2. What is the latest status of pnetlib?
The latest status of pnetlib can be viewed at the following Web page:
http://www.dotgnu.org/pnetlib-status/
This page is updated periodically based on the compiled pnetlib binaries.6.3. What else is there?
If you find an interesting problem to work on in the DotGNU Portable.NET
codebase, then work on it for a bit, and send us the patches. If it is
the kind of code we're looking for, we'll discuss further collaboration.HACKING
" files in the "pnet
and "pnetlib
" distributions. These provide the most
up to date information on how to help out.6.4. Do you have a mailing list for developers?
All discussion of DotGNU Portable.NET happens on the
"developers@dotgnu.org
" mailing list. See
http://www.dotgnu.org/
for subscription details.7. CVS, versions, patches, etc
7.1. How do I access the source via CVS?
All of the DotGNU Portable.NET code is available via CVS from
Savannah, http://savannah.gnu.org/.
The main project Web page is at
http://savannah.gnu.org/projects/dotgnu-pnet/, and the CVS instructions are at
http://savannah.gnu.org/cvs/?group_id=353.dotgnu-pnet
",
and it contains four modules: "pnet
", "pnetlib
",
"treecc
", and "cscctest
".7.2. What is with the version numbers?
Versions 0.1.2 and prior used a version numbering scheme that Rhys
Weatherley concocted out of thin air. After the move to the Savannah
CVS repository, the following conventions were adopted:pnet
", "pnetlib
", and "treecc
".7.3. I have a patch. What should I do now?
The best way to submit the patch is through the patch manager on
Savannah. That will allow us to track it.HACKING
" files describe how to make a patch file
that is easy for the maintainers to apply.7.4. What coding conventions should I follow?
The DotGNU Portable.NET code currently using the following
coding conventions:
If you are submitting patches to an existing file, then use the
same conventions as currently exist in that file. If you are
writing a completely new source file, then you may use your own
coding conventions, but we would prefer consistency with the above.if(condition)
{
...
}HACKING
" files describe other coding conventions
that may apply.8. Standards
8.1. Where are the ECMA standards?
The latest versions of the ECMA standards for the Common Language
Infrastructure (CLI) and the C# languages can be found at ECMA's
Web site:
http://www.ecma.ch/ecma1/STAND/ECMA-334.htm (C#)
If you wish to contribute to the C# library, you will need the
following file:
http://www.ecma.ch/ecma1/STAND/ECMA-335.htm (CLI)
ftp://ftp.ecma.ch/ecma-st/Ecma-335-xml.zip
Unpack this zip file and then use the "csdoc2html
" program
to convert the XML file into HTML, so that you can view its contents
more easily.8.2. Why do you have more classes than ECMA specifies?
ECMA specifies the bare minimum necessary to get a Common Language
Runtime (CLR) to work. However, this bare minimum is not very useful
for realistic C# applications.9. Other .NET efforts
9.1. What is Mono?
The Mono project that is
run by Ximian has many of
the same goals as DotGNU Portable.NET. See their Web site
for further details.9.2. What is the relationship with Mono?
We will probably be using some of Mono's upper-level C# libraries,
and may co-operate with Mono to improve those libraries. For various
technical reasons, Mono's lower-level C# library "corlib" will not work
with DotGNU Portable.NET's runtime engine, and so we still need
"pnetlib".9.3. What is OCL?
Intel have written a C# class library, which they call the Open CLI
Library (OCL). A unique feature of this library is that its interfaces
have been automatically generated from the ECMA specifications, whereas
DotGNU Portable.NET and Mono have mostly copied the interfaces by hand.
The library can be obtained at the following site:
http://ocl.sourceforge.net/
9.4. What is Rotor?
Microsoft have released their own "Shared Source" CLI, called Rotor.
More information on this can be found at MSDN:
http://msdn.microsoft.com/
Technically, the license on Rotor is neither Free Software nor Open Source.
The license is definitely not compatible with the GNU General Public
License, and so none of the Rotor code can be used in the DotGNU Portable.NET
project.9.5. Can I look at the Rotor code?
If you don't have a good reason, we suggest that contributors to
DotGNU Portable.NET don't make a habit of looking at the Rotor code.
It should only be used if all other options have been exhausted for
determining how some feature should operate.
The key provision in the license is:
You may use any information in intangible form that you remember after
accessing the Software. However, this right does not grant you a
license to any of Microsoft's copyrights or patents for anything you
might create using such information.
This is pretty clear (they're becoming rather good at drafting "shared
source" licenses; I'm beginning to feel stylistically challenged). It
means that they don't claim any right to control knowledge you may
gain from reading their code, but you can't copy their code or
practice any of their patent claims. The patent issue is unaffected
by the reading of their code, from our point of view. On the
copyright side, our responsibility is the same as it would be under
any other circumstances: we must write all our code from scratch,
copying nothing contained in their Rotor code. If there is no copying
there is no infringement under their license.9.6. What other free software and open source .NET efforts are there?
We are not aware of any other projects that are tackling the
entire .NET platform at present, but there are some that are tackling
tools such as decompilers, IDE's, etc. Mono's FAQ contains an up
to date list.10. Other random questions
10.1. Can I use ASP.NET with DotGNU Portable.NET?
At the moment, no. ASP.NET is a huge collection of libraries and
Web server hooks. It will take time to build all of the necessary
infrastructure to do this. If you want to volunteer to help out
on this, then that would be great.10.2. Why doesn't my C++ application work that I built with Visual Studio.NET?
Usually, the C++ applications that are output by Visual Studio.NET are
not pure IL binaries. They contain x86 native code, and depend on all
kinds of Microsoft-specific libraries. Such applications will never
work with a pure-IL engine such as "ilrun
".ilrun
" to
Wine so as to pick up many of the Windows dependencies. This may work,
but we need someone to volunteer to do it first.