[Mono-list] PInvoke Discussions

Jay Freeman (saurik) saurik@saurik.com
Wed, 1 Aug 2001 02:32:22 -0500


Note that I am glossing over things (as my overall picture of everything in
this discussion is semi-glossed) and this e-mail might not end up to be as
useful as intended in the end (in which case just throw it away), just want
to put out the information I have (which is a passing on of information
rather than claiming it to be something that I am suggesting myself, albeit
glossed, hehe):

I'm attending (well, speaking at) what has turned out to be a rather small
conference, which has left a lot of time for side discussions with people.
I brought the P/Invoke issue up to Brad Merrill (a Microsoft engineer
working on the CLR), as well as some of the people from Project 7, (an ECMA
representative was semi-involved also), and the concensus among them is to
bite the bullet and _not_ attempt to construct some magic system that works
at some higher level (such as with attributes) that attempts to get the
managed code directly reusable between Unixes on different architectures.
Rather, to construct the wrapper library and then port that to each OS,
which seems to be the current concensus anyway among the Mono people (with
libmono) if I am correctly understanding some of the recent P/Invoke
discussions (not all of which I've had the time to read over the last few
days).  That, or to just have multiple versions of the C# code and to
abstract it out at that level, but the general idea being to end up with the
code itself needing to be ported between environments at some point (at
which point my assumption would be that the C case should be a lot more
easily portable, as the compiler can munge the types, autoconf can be used
to swap things in as necessary, etc.).

Sincerely,
Jay Freeman (saurik)
saurik@saurik.com