[Lazarus] Firefox OS

Jy V jyv110 at gmail.com
Tue Jul 16 18:07:03 CEST 2013


Hello Mark,

 So can anybody provide step-by-step instructions for writing a "Hello,
>>> World!" in Javascript, compiling it to asm.js, and running that from a
>>> (Linux) shell? Even better, converting the asm.js to native code so it can
>>> be run without a wrapper?
>>>
>> asm.js is just a subset of JavaScript. It runs on current browsers as is.
>> Specs: http://asmjs.org/spec/latest/
>>
>
> Which is no *&%%&$ use to somebody trying to run e.g. the FPC test suite
> under makefile control.


It looks like you are motivated enough about this feature,
as I do have common interest on this feature,
so let's try to discuss about it,

the step required are the following,
pascal source ode converter to javascript source code,
this is why I was talking about the Gold Parser which is not really a
parser but more a translator,
anyway, since you may have knowledge and skills to use the Code DOM of FPC,
you may be able to generate appropriate javascript source code respecting
the asm.js constraints,

then you will need http://code.google.com/p/fpcjs/
this wrapper will help you to encapsulate the OdinMonkey library
 (this is the actual asm.js compiler),

you will need to retrieve the OdinMonkey library from the latest FireFox
Beta build,
located on my computer in
C:\Program Files (x86)\Nightly
I guess the main library entry points are located in mozjs.dll
so the wrapper fpcjs may need some search and replace replace,

finally you should be able to follow the sample on the main project page:
http://code.google.com/p/fpcjs/

if you do obtain any kind of result,
I would like to be updated about it,

Regards, Jerome
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20130716/60a9209e/attachment-0003.html>


More information about the Lazarus mailing list