"Emscripten (is) open source project which utilizes LLVM to compile C and C++ to JavaScript, with the goal of allowing existing codebases to be automatically ported to standard web technologies."
Most of VMs of "managed" programming languages/platforms, such as Java, .NET, Ruby, Python etc. are written in C or C++.
With ability to compile C/C++ to JavaScript, it is now possible to run complete VMs on JavaScript in any web browser or node.js!
Then, it is possible to call between host (JavaScript) and hosted languages.
To make optimization of languages compiled to JavaScript faster,
a subset of language is used ("js.asm").
So JavaScript is now a real "assembly language of the web" (and more).
When this could be useful?
Re-using existing code, maybe.
No comments:
Post a Comment