[Vm-dev] Squeak VM port to Google Native Client
Yoshiki Ohshima
yoshiki at vpri.org
Wed May 4 15:24:09 UTC 2011
At Wed, 4 May 2011 13:48:46 +0200,
Igor Stasenko wrote:
>
>
> On 4 May 2011 08:18, Yoshiki Ohshima <yoshiki at vpri.org> wrote:
> >
> > Hello,
> >
> > I'm playing with Google Native Client a bit and made a port of
> > Squeak VM to it. It is far from complete (even the state where
> > backspace or Cmd-p etc. does not work, sound does not work, etc.), It
> > now reached to the state where I can say the basic part of it is
> > working.
> >
> > The source code is available at:
> >
> > http://github.com/yoshikiohshima/NaClSqueak
> >
> > . Also, f you have Google Chrome 11 beta available, try to turn on
> > the Native Client on (by typing "about:flags" into the title bar) and
> > access:
> >
> > http://tinlizzie.org/~ohshima/squeak/squeak.html
> >
> > (The first try may take some time.)
> >
> > - It is gnuify-ed but we're still learning the JIT situation of
> > NaCl. So, it' need some work to port Cog.
> >
> > - The image data is embedded as a C array in this executable. You
> > can remove EMBEDDED_IMAGE_FILE flag off, and comment/uncomment the
> > corresponding part of squeak.html, it can load the image
> > separately via XMLHttpRequest of the browser.
> >
> > - There is some strange issue when you do fast drag the system
> > window.
> >
> > - As you can see, the source code is derived from the Unix VM. It
> > was hard for me to write some CMake stuff to set it up for the
> > cross compilation. A help to merge it back to the Unix code would
> > be greatly appreciated.
> >
>
> I recommend you to take a look on CMakeVMMaker.
> It is written in smalltalk, and generating cmake configuration files.
> Its also much simpler than cmake configs made by Ian (because i
> started making it without too deep knowledge
> about cmake), and actually i didn't wanted to make it too clever, like
> detecting a platform-specific subtleties,
> because then it ties your build to the platform where you compiling VM
> and therefore makes it harder to do a cross-compilation.
>
> So, with CMakeVMMaker you could just start from creating a new class
> with own configuration , and then gradually
> get a working configuration which (cross)compiles VM for your specific
> target, with your specific flags and
> set of plugins which proven to work.
>
> And of course, you can take a look at existing configurations for examples.
Sounds good! Cross compiling in mind from the beginning is very
good.
> > - If Google takes over the world and all apps become a Native Client
> > (may be even other browsers^^;), this port may be useful^^;
> >
>
> Yes, indeed. I like NaCl, because it will allow us to just run VM,
> instead of adopting it to browser in form of plugin.
>
> Do you have any description, what you need to do to get started
> building VM for NaCl?
> It would be interesting to read.
The documentation on it is scarse and some contradictions, but
basically all you need is reading header files and the "Pepper C
API" section of:
http://code.google.com/chrome/nativeclient/docs/reference/pepperc/index.html
with some guessworks and try and error.
-- Yoshiki
More information about the Vm-dev
mailing list