[Mono-list] Mono port to other OS

Paolo Molaro lupus at ximian.com
Tue Aug 9 13:03:07 EDT 2005


On 08/09/05 Thomas Krause wrote:
> Assuming I would want to port Mono to another OS platform, what would I need
> to do / implement exactly?

Depends which OS you're talking about and whether the jit already works
on the same kind of cpu.

> I know that the SSCLI (Rotor) from Microsoft has a PAL (Platform Adaption
> Layer), which is basically a set of API functions that you need to implement
> to port it to another OS, does Mono has something similar?

Yes, it's called io-layer and it's in the mono/io-layer directory in
the mono svn module.

When porting mono, two things are important:
*) if the jit has been ported to the wanted cpu
*) if the os supports a correct implementation of POSIX/pthreads

If both conditions are true, you'll likely need only small tweaks to the
configure files and maybe the signal handling mechanism, this means just
a few days of work.
If the jit has not been ported to the cpu, the effort could require
from 2 to 6 months, depending on the weirdnesses of the instruction set.
If the OS doesn't support pthreads, you will need to implement the
io-layer interfaces (basically the small thread-related subset of the
win32 API).
If the OS doesn't support POSIX and the standard libc calls, you'll
likely have to make changes in many places.

> As you see I'm new to the Mono source code and so I don't have a good
> overview about it yet. Is there something like an overview for developers,
> where I can see the general structure of the project, the purposes of the
> different source files, etc.?

The toplevel README file in the mono module has the directory structure
explained. The docs/ directory contains some files that may be useful,
too.

> Or is there a good book about Mono that covers
> the internals?

Nobody had the time to write it yet: it would be a very worthwhile
project.

lupus

-- 
-----------------------------------------------------------------
lupus at debian.org                                     debian/rules
lupus at ximian.com                             Monkeys do it better


More information about the Mono-list mailing list