Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2011-05

Chrome Browser apps with Native Code

3 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Jonas Maebe
to herux
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

Reply by email

Neil Graham
to Jonas Maebe
Jonas Maebe wrote 6 lines
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.

Reply by email