Compiling to different architectures/mobile?

558 views
Skip to first unread message

Ian Ozsvald

unread,
Jul 5, 2011, 8:01:46 AM7/5/11
to shedskin...@googlegroups.com
Whilst making coffee I had a random thought...

Since ShedSkin makes pure-C code, can it be compiled to different
architectures like Arm? If so, can it also make static C libraries
rather than executables? I.e. could it be used to make python-written
modules that are used on a mobile device simply as libraries with a
standard C interface? It might be a nice way to let Python devs make
extension modules for Android/iPhone devices?

Shoot this down if the idea is silly...

i.

--
Ian Ozsvald (A.I. researcher, screencaster)
i...@IanOzsvald.com

http://IanOzsvald.com
http://SocialTiesApp.com/
http://MorConsulting.com/
http://blog.AICookbook.com/
http://TheScreencastingHandbook.com
http://FivePoundApp.com/
http://twitter.com/IanOzsvald

Jérémie Roquet

unread,
Jul 5, 2011, 8:11:47 AM7/5/11
to shedskin...@googlegroups.com
Hi,

2011/7/5 Ian Ozsvald <i...@ianozsvald.com>:


> Since ShedSkin makes pure-C code, can it be compiled to different
> architectures like Arm?

It's C++ code, actually. But as long as there is a C++ compiler and
support for boehm gc, it should be ok.

> If so, can it also make static C libraries
> rather than executables? I.e. could it be used to make python-written
> modules that are used on a mobile device simply as libraries with a
> standard C interface? It might be a nice way to let Python devs make
> extension modules for Android/iPhone devices?

I think yes.
You may want to have a look at shedskin for maemo¹, btw :-)

Best regards,

¹ http://wiki.maemo.org/ShedSkin

--
Jérémie

Mark Dufour

unread,
Jul 5, 2011, 8:17:27 AM7/5/11
to shedskin...@googlegroups.com
It's C++ code, actually. But as long as there is a C++ compiler and
support for boehm gc, it should be ok.


libpcre is also needed for the 're' module, as well as complex numbers (don't ask.. ;-)). but this is also a very common library.

thanks,
mark.
--
http://www.youtube.com/watch?v=E6LsfnBmdnk

Ian Ozsvald

unread,
Jul 5, 2011, 9:36:41 AM7/5/11
to shedskin...@googlegroups.com
Thank you both. I guess that libpcre and libboehm (it is mandatory
too, isn't it?) should compile on mobile platforms. I was just musing
to myself about other directions that ShedSkin might open up.
Cheers,
i.

> --
> You received this message because you are subscribed to the Google Groups
> "shedskin-discuss" group.
> To post to this group, send email to shedskin...@googlegroups.com.
> To unsubscribe from this group, send email to
> shedskin-discu...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/shedskin-discuss?hl=en.

Fahrzin Hemmati

unread,
Jul 5, 2011, 11:49:14 AM7/5/11
to shedskin...@googlegroups.com
I was actually thinking of this yesterday but thought the C++ combined
with BoehmGC would be a bad idea for embedded processors. I don't
remember how stuck Shedskin is to BoehmGC, but it might be possible to
create a stub GC (or use incref/decref) for embedded processors.

Maybe BoehmGC isn't too slow on a phone, I'll look into running shedskin
stuff on my Palm (HP) Pre Plus soon.

--fahhem

Sal

unread,
Jul 5, 2011, 1:06:28 PM7/5/11
to shedskin...@googlegroups.com
I've built and run shedskin apps for the iPhone - it works great actually.

It required commenting a few things out, and swapping in the boehm gc for iOS port.

Of course, no native ui widgets available - but I used phonegap to do the ui in html5 and it called shedskin c++ for all the actual app logic. Phonegap supports connecting html5 -> native c++ via a plugin architecture. Works wonderfully.

High powered, efficient apps on the iPhone via python is a bit of paradise compared to apples own obj-c, I must say. Huge potential for shedskin adoption there if someone packaged things up this way for the general public...

Mark Dufour

unread,
Jul 5, 2011, 2:34:32 PM7/5/11
to shedskin...@googlegroups.com


On Tue, Jul 5, 2011 at 5:49 PM, Fahrzin Hemmati <fah...@gmail.com> wrote:
I was actually thinking of this yesterday but thought the C++ combined with BoehmGC would be a bad idea for embedded processors. I don't remember how stuck Shedskin is to BoehmGC, but it might be possible to create a stub GC (or use incref/decref) for embedded processors.


please note that the original boehmgc was released about 25 years ago.... ;-)
Reply all
Reply to author
Forward
0 new messages