New opportunities for D => ASM.js
Etienne via Digitalmars-d
digitalmars-d at puremagic.com
Tue May 13 10:15:30 PDT 2014
I've been reading on Emscripten and LDC and how they would be nice
together, and came across this nice little library:
http://www.leaningtech.com/duetto/examples/
It's a C++ server/client framework that compiles to JS through clang =>
LLVM bytecode => ASM.js.
I'd like to point out that asm.js is a very fast subset of the
javascript language that allows almost native speeds (3x slowdown vs C
only) which enables games to be run in the browser without external
dependencies.
This had me thinking of forking the Emscripten project in order to
support the druntime / phobos library & give it access to the browser
DOM interface, as to allow javascript web applications to be written
fully in D (to produce interfaces like openUI5 and more).
This would have multiple advantages:
- Suitable for huge front-end development frameworks using safe typing
and contractual programming
- Opens the door to petaFLOPS of distributed CPU power based simply on
website visitation without affecting user experience
- Allows Javascript proprietary code to be harder to de-obfuscate or
reverse engineer
- FAST Browser-based database engines and full runtime capabilities can
be developed (and added as browser extensions for persistence) to be
actively used by the server with a simple interface
And most of all, it simplifies web development.
I'm not going to instantly call for a project to be started, but I'd
love to hear some why do's and why don'ts b/c I don't like to rely on my
point of view alone.
More information about the Digitalmars-d
mailing list