Experiments with emscripten and D

bearophile bearophileHUGS at lycos.com
Thu Aug 15 14:36:05 PDT 2013


Piotr Szturmaj:

> Then open sdl.html in the web browser. It should print sorted 
> and mapped array contents and run simple graphics demo.

Very nice. D is meant to run efficiently, but the Web is very 
important. There are many situations where it could be useful to 
run D code in a browser, so your work is important.

Integration with asm.js too is useful. (Expecially when asm.js 
gets a garbage collection, as Mozilla says). Currently only C and 
C++ are perhaps the only two languages usable to write 
asm.js+WebGL games for the browser. This could become one of the 
few niches open for D. There is also WebCL 
(http://www.khronos.org/webcl/ ) for heavy computations in the 
browser.

I have found some related activity from Rust people:
https://github.com/mozilla/rust/issues/2235
https://github.com/Yoric/Mozilla-Student-Projects/issues/33
https://mail.mozilla.org/pipermail/rust-dev/2012-April/001607.html

Once your work is more more completed, the dlang site could show 
(in a sub-page) the compiler that compiles the online examples of 
the docs that's able to produce html+JS on the fly from the D 
code written in the browser.

Bye,
bearophile


More information about the Digitalmars-d mailing list