-
Notifications
You must be signed in to change notification settings - Fork 12
WebAssembly #19
Comments
Per https://github.com/WebAssembly/design/blob/master/FAQ.md#why-create-a-new-standard-when-there-is-already-asmjs the main advantages over JS are:
Given that (1) is pretty rarely a concern (there's much lower-hanging fruit than parse time---e.g. there were recent changes to the require algorithm that make it way faster), I don't think there's much to do here unless (2) starts materializing. |
I think the lowest hanging fruit and first task is being able to |
@benjamingr It could be done via an (already existing?) polyfill. As that polyfill could live in user modules, there seems to be no reason to include it in core nor to take any steps to support webasm until v8 supports it natively. |
Yes, see my above comment about TF (which will support it natively as it seems) |
Just throwing in my 2 cents. I am under the impression, given quite a bit of recent interest and there now being about 180,000 (mostly) semantically versioned packages, that Node (with npm) is by far the most up-to-date and relevant ecosystem of software for the web. I have been mainly a JavaScript programmer for several years. I like JavaScript and the various dialects. However, I believe that the most realistic way to evaluate Brendan Eich & co's introduction of web assembly is as a deprecation of JavaScript. Now, they would not be so politically/practically impertinent as to say such as thing as I have just done. But I believe that this is what the leadership of their actions suggest. Therefore, it seems to me a priority to integrate what is currently the most relevant software repository in the body of Node packages, with the new binary and non-JavaScript web assembly system, for the purposes of both taking advantage of the vast body of (soon to be) legacy JavaScripts, and/or converting them, and/or integrating with new web assembly software. Of course, these are easily classified as being premature remarks, but within a few years we will see. |
@runvnc WebAssembly is not a JavaScript replacement. |
here is a native v8 wasm interpter https://github.com/WebAssembly/v8-native-prototype |
I'm going to close this until it becomes relevant. In retrospect I was a bit quick on the gun here. |
v8: http://v8project.blogspot.com/2016/03/experimental-support-for-webassembly.html (available behind a flag in v8 5.1). Mozilla: https://hacks.mozilla.org/2016/03/a-webassembly-milestone/ (available behind a config flag in Nightly). ChakraCore: https://blogs.windows.com/msedgedev/2016/03/15/previewing-webassembly-experiments/ (avaibale in a separate branch). |
so wasm is now available in node.js on the latest in master. just run |
Hi, I notice the current v8 version is 5.0.71.52, besides Google announced the experimental support of WebAssembly with v8 5.1.117 in March (http://v8project.blogspot.com/2016/03/experimental-support-for-webassembly.html), so is there any plan that NodeJS will upgrade to this version soon? Thank you! |
V8 5.1 is in node.js master. node.js v6 will probably upgrade to 5.1 in the next month or two. |
@pannous node V 7 now has the newer webassembly js api. Try
|
great, thanks! |
I'm getting |
|
Aha, I misinterpreted a previous comment as it bing available flag less and got very excited 😄 Thank you for the quick answer! |
Update: even node.js v8.0 doesn't use v8 5.6, so no wasm experiments for the next months? See nodejs/node#9618 for v8-5.5 progress
So do people just use wavm to experiment? Or is there a simple way to produce/target old wasm 0b binary format? |
Some reasons why WebAssembly can become very important for node.js:
Regarding 2 (as originally identified by @benjamingr) : This can even suddenly bring node.js on par with the JVM, with all its positive business implications. Why not asm.js? It's kind of awkward/deprecated, plus faster load time in wasm is a real thing: You don't want your 5MB c++ lib to be parsed via asm.js! |
@pannous you can use @targos 5.5 branch here nodejs/node#9618 , this will get you up to version 0x0c. If you need 0x0d for now you can use chrome dev channel or firefox-nightly and browerify |
If you want to live on the bleeding edge, you can build the V8 master + Node integration branch here: https://github.com/v8/node/tree/vee-eight-lkgr. This has V8 5.7. Note: this is |
@pannous This is not the best place for this style of discussion – at least 10 subscribers on this thread get pinged on every message posted here. I would suggest #node-dev on IRC. I'm If you're on linux (Ubuntu), you could try the latest V8+Node integration build binaries from the build page: https://build.chromium.org/p/client.v8.fyi/builders/V8%20-%20node.js%20integration. |
With V8 working on WebAssembly and the big announcement I wonder in what ways we could leverage WebAssembly in NG?
It sounds like another tool available for our toolbox - and I wonder what we can do with it?
Ideas:
require
ing WebAssembly throughrequire
?Concerns:
The text was updated successfully, but these errors were encountered: