Chrome Browser apps with Native Code

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Chrome Browser apps with Native Code

herux
Hello,
Do you think FreePascal can be used to compile applications for google chrome browser, such as the following link?

http://code.google.com/chrome/nativeclient/

thanks

herux
-
Reply | Threaded
Open this post in threaded view
|

Re: Chrome Browser apps with Native Code

Jonas Maebe-2

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).


Jonas_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Chrome Browser apps with Native Code

Neil Graham-2
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
NativeClient.  




_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal