What's the idea - to embed C++ objects into the JS VM?

On Thu, Jun 18, 2015 at 11:05:49AM -0600, Owen Densmore wrote:
> As was announced yesterday, WebAssembly language (replacing asm.js) is
> seriously real.  Here's a FAQ
> ​    ​
> https://github.com/WebAssembly/design/blob/master/FAQ.md#faq
> 
> ​And Brendan Eich:
>     https://brendaneich.com/2015/06/from-asm-js-to-webassembly/​
> 
> ​There is still hope for JS itself, however.  JS can import wasm:
> 
> Is WebAssembly only for C/C++ programmers?
> 
> As explained in the high-level goals
> <https://github.com/WebAssembly/design/blob/master/HighLevelGoals.md>, to
> achieve a Minimum Viable Product, the initial focus is on C/C++
> <https://github.com/WebAssembly/design/blob/master/CAndC++.md>.
> However, byintegrating
> with JS at the ES6 Module interface
> <https://github.com/WebAssembly/design/blob/master/MVP.md#modules>, web
> developers don't need to write C++ to take advantage of libraries that
> others have written; reusing a modular C++ library can be as simple as using
> a module from JS <http://jsmodules.io/>.
> 
> Beyond the MVP, another high-level goal
> <https://github.com/WebAssembly/design/blob/master/HighLevelGoals.md> is to
> improve support for languages other than C/C++. This includes allowing
> WebAssembly code to allocate and access garbage-collected (JS, DOM, Web
> API) objects
> <https://github.com/WebAssembly/design/blob/master/FutureFeatures.md#gcdom-integration>.
> Even before GC support is added to WebAssembly, it is possible to compile a
> language's VM to WebAssembly (assuming it's written in portable C/C++) and
> this has already been demonstrated (1 <http://ruby.dj/>, 2
> <https://kripken.github.io/lua.vm.js/lua.vm.js.html>, 3
> <https://syntensity.blogspot.com/2010/12/python-demo.html>). However,
> "compile the VM" strategies increase the size of distributed code, lose
> browser devtools integration, can have cross-language cycle-collection
> problems and miss optimizations that require integration with the browser.
> 
> ​My guess is that Java or GWT (Google Web Toolkit) will eventually be able
> compile to wasm​. So you're right again, Frank!
> 
> 
>    -- Owen

> ============================================================
> FRIAM Applied Complexity Group listserv
> Meets Fridays 9a-11:30 at cafe at St. John's College
> to unsubscribe http://redfish.com/mailman/listinfo/friam_redfish.com


-- 

----------------------------------------------------------------------------
Prof Russell Standish                  Phone 0425 253119 (mobile)
Principal, High Performance Coders
Visiting Professor of Mathematics      [email protected]
University of New South Wales          http://www.hpcoders.com.au
----------------------------------------------------------------------------

============================================================
FRIAM Applied Complexity Group listserv
Meets Fridays 9a-11:30 at cafe at St. John's College
to unsubscribe http://redfish.com/mailman/listinfo/friam_redfish.com

Reply via email to