Announcement: Project to get some CPython C extensions running under IronPython
At Resolver Systems, we started building our core products with the view that most of our clients would want to use them to connect spreadsheet data and designs, Python code, and .NET objects. This was the right decision; lots of people do want to do just that, and we’ve been working with them so far.
However, as we’ve spoken to more potential clients over the last months, we’ve learned something new – that there’s a lot of interest out there in using a tool like Resolver One to plug together not just spreadsheets, Python and .NET, but also the existing CPython C extensions.
Solving the general problem – plugging an arbitrary C extension into IronPython – is a huge project, and we’re not even sure we could work out *how much work it is* without a lot of investigation. What we intend to do is to solve a specific problem, to integrate just one extension, and to use that project as a testbed to examine the possibilities for getting other extensions working – and perhaps, in the long term, solving the general problem.
We think that any solution like this will be valuable not just to us, but to the IronPython community as a whole. And so, we want to make it Open Source.
Right now, we’d particularly like to hear from people about the following:
- Who wants to get involved? We’re really keen on working with people on this.
- Which module should we go for? NumPy looks like a good start, as it gives us a start on getting SciPy working. But perhaps there are better choices.
- Should this be a new project, or should we be talking to other people about getting it into other projects?
- Which license? If we’re to work on it with a view to building it into Resolver One, then it will need to be commercial-software-friendly. Apart from that – we have no view.
- What is the best architecture? We’re thinking of this as being a bit of C# managed code to interface with the C extension, and a thin Python wrapper on top. The module’s existing C extension and Python code would “sandwich” this layer. Let us know if this is a silly idea :-)
- Is there anything else we should be thinking about to get this started?
[Update] We’ve started a Google Group to coordinate this effort; the first decision was to target NumPy as our initial C extension. If you’re interested in joining in, or just tracking the project, please do join the group!
[Update] Here’s the core page for the ongoing project, now called Ironclad.

October 26th, 2007 at 3:58 am
I think Numpy would be an interesting start, in that it is a sizeable project (hopefully not _too_ sizeable!), and if successful, will yield a _lot_ of added functionality, and not to mention _speed_ to computation-extensive tasks.
There may even be the possibility of utilizing some of the knowledge gained in the bottlenecks in the main code, or is that to remain pure .NET?
October 31st, 2007 at 11:07 pm
Duane,
Absolutely, we came to the same conclusion. We’re taking a look at it now – if you’re interested in joining in, or just in following our progress, we’ve set up a Google Group you can join: http://groups.google.com/group/c-extensions-for-ironpython
Regarding changes to the core Resolver One engine – we’re likely to move bits of it over to simpler CLR bytecode – C#, or even better, compiled RPython – before we move it to C.