[fpc-pascal] Chrome Browser apps with Native Code
Lerc at screamingduck.com
Fri Jun 3 13:41:19 CEST 2011
On Sun, 2011-05-29 at 10:35 +0200, Jonas Maebe wrote:
> On 29 May 2011, at 09:33, herux wrote:
> > Do you think FreePascal can be used to compile applications for google
> > chrome browser, such as the following link?
> Probably not without changes to the code generator and RTL. Google native client relies on being able to verify the machine code (similar to how Java bytecode is verified before execution), which means that it must conform to certain constraints (I don't know them by heart).
It's possibly quite feasable without too much in the way of changes.
Chances are the code generator is fine, I would imagine it does all the
non privelaged stuff.
I made a proof of concept plugin for FireFox a while back using VX32
which is a similar x86 sandbox system to NativeClient.
I made a FPC build with a target for the plugin and had code compiling
and running in-browser. Here's a link to to the google code.page
http://code.google.com/p/thefbi/wiki/Intro That has the plugin and my
mutant hacked FPC.
My plugin has a low level interface to IO so an embedded target was the
easiest to adjust. For the most part a similar thing should work for
NativeClient as well, I don't think a full RTL conversion would be
required, or even meaningful in a NativeClient context. Things like
Tasks, console IO, sockets, files, windows etc. aren't usable from
More information about the fpc-pascal