Generating Javascript or asm.js from LDC?

Laeeth Isharc via digitalmars-d-ldc digitalmars-d-ldc at puremagic.com
Sat Sep 5 06:11:45 PDT 2015


On Saturday, 5 September 2015 at 12:51:20 UTC, Laeeth Isharc 
wrote:
> On Saturday, 5 September 2015 at 01:32:43 UTC, Adam D. Ruppe 
> wrote:
>> On Friday, 4 September 2015 at 18:47:06 UTC, Laeeth Isharc 
>> wrote:
>>> Is this by any chance possible?
>>
>> I'm not entirely sure myself, but my theory is if you can feed 
>> the llvm code out of ldc and into the emscripten backend... 
>> the basics should just work, D can pretend to be C, and we 
>> build up from there. Indeed, the whole D runtime might even 
>> build - if we're really lucky - since some Linux functions are 
>> apparently supported by emscripten.
>>
>> But I haven't actually tried doing it.
>
> I'd love to try, and will if/when I get the time.
>
> There's value to me in being able to have a single codebase 
> because I am less interested in doing anything that looks 
> superb from a presentation point of view and more interested in 
> web as one platform for some simple tools I have been working 
> on.

for example I have a charting application.  at the moment I just 
use MathGL (no relation to OpenGL) to generate a static PNG.  I'd 
like to turn that into something interactive.  will need a native 
client, but a web one as a backup.  so would be great to have a 
single codebase.


More information about the digitalmars-d-ldc mailing list