Live data from Hacker News

WebAssembly support now shipping in all major browsers

blog.mozilla.org

111–120 of 346 posts

Re: WebAssembly support now shipping in all major browsers

#111
post #91

Great. We will soon have an entire JVM running inside each browser's tab, just to run an animated slider. Maybe even more than one. Plus a .NET VM, several Python and Ruby interpreters, and so on. Because webmasters will keep loading ready-made plugins from CDNs, exactly like they are doing now, except that the new generation of web software will carry their own interpreter or runtime with them, because the developer…

And to have different pythons running together we need docker with ubuntu.

Re: WebAssembly support now shipping in all major browsers

#112
post #2

Ok, now we need GC and DOM interop. Because reinventing layouts is pain.

Cheerp is our solution to emit mixed mode WebAssembly/JavaScript from the same C++ codebase. It generates bridges to JS code transparently to work around the interoperability limitations of WebAssembly. https://github.com/leaningtech/cheerp-meta/wiki/Cheerp-Tutor...

Re: WebAssembly support now shipping in all major browsers

#113
post #44

Earlier quoted context omitted.

Red herring. People install or explicitly download code they want to run. The general public doesn't even realize that most web pages are full of code (js not html) and most developers have gotten so used to it they feel entitled. The goal should be to try harder to use less code, not enable native execution. I understand, engineers like to think about what is possible (wouldn't it be cool if..!) but sometime they ne…

99%+ of people don't think like you and don't care about the distinction between code on the browser and code on the OS. "A red herring is something that misleads or distracts from a relevant or important issue. It may be either a logical fallacy or a literary device that leads readers or audiences towards a false conclusion." I don't see how my comment is a red herring. Computers are for running code. That's what th…

I definitely don't disagree with your statements, but I think OP meant more akin to "the web is not for running other peoples code". Ie, the web is for content, not applications.

This may not be what OP meant.. but it's something I can agree with to a degree. I love web apps, don't get me wrong, but I wish we had meaningful fallbacks for those who want content without features.

Re: WebAssembly support now shipping in all major browsers

#114
post #90
post #75

Earlier quoted context omitted.

WASM is used to run native code in the Web browser without going through JavaScript. With it, it should be possible to run code at near-native performance in the browser. WASM is an intermediate representation which is output by your compiler (of your favorite language) and consumed by the browser's compiler to emit native code. WASM is a bit similar to LLVM IR, but it's architecture independent. Compare this to, say…

But is this how it is implemented by actual browsers? if memory serves v8 is pretty much reusing most of JS VM for WASM?

WASM requires a much simpler VM than JS. It doesn't take most of a JS VM.

Re: WebAssembly support now shipping in all major browsers

#115

Unfortunately SIMD is still not supported on any browsers and with the move away from SIMD.js it looks like this might take a while. We've been working on porting over our fairly large barcode scanner library to WebAssembly. While the performance is close to what we have on other platforms ( http://websdk.scandit.com ), the major bottleneck for now is not being able to use optimized code relying on SIMD (and not havi…

Have you tested performance on older and lower spec devices? Does it still hold up?

Re: WebAssembly support now shipping in all major browsers

#116

Can't wait for DOM interop and get away from JS on frontend. Seriously JS should not be the lingua franca of the web :)

>> Seriously JS should not be the lingua franca of the web But neither should this. Really, keep your code off my computer as much as possible.

HTML, CSS, SVG and other things your browser will interpret might be more complex than JavaScript and surely their implementation contains bugs and exploits. Hell, I recently learned about CSV injection (comma separated values). You can't realistically discard JavaScript and think that you're safe. The world is full of complex data formats ready to be exploited. Proper solution is to embrace sandboxes and put many walls around it, so inevitable bugs won't be exploited.

Re: WebAssembly support now shipping in all major browsers

#117

For those in the know, what doors is web assembly expected to open? Better cross platform platforms via a browser wrap? Will new types of browser applications be possible that aren't now in JS only world? What are they?

Imagine something like the Java VM, available without the need of 3rd party installations, that interfaces actual HTML (instead of being locked down into a frame), and has no limitation on language support.

That's the plan. That "interfaces actual HTML" thing isn't available yet, but you can already hack around it.

Re: WebAssembly support now shipping in all major browsers

#118
post #11
post #6

Earlier quoted context omitted.

In order to port other languages (Haskell, Go, Python) to target WASM, we definitely need the possibility of writing a GC in WASM. But to build an efficient GC, we need multithreading and synchronization/memory barrier primitives.

Multi threading brings in all kinds of security issues

What kinds of security issues? I really can't think of any besides some issues with too many threads spawned (that can be trivially blocked).

Re: WebAssembly support now shipping in all major browsers

#119
post #4

Do any mobile browsers support it yet? The article is unclear.

Safari does on iOS 11: https://webkit.org/blog/7956/new-webkit-features-in-safari-1... https://developer.apple.com/library/content/releasenotes/Gen...

But does a WebView?

I recently discovered that while Safari supports WebRTC, a "WebView" or a safari view that is added to the home screen does not.

Re: WebAssembly support now shipping in all major browsers

#120

For those in the know, what doors is web assembly expected to open? Better cross platform platforms via a browser wrap? Will new types of browser applications be possible that aren't now in JS only world? What are they?

I'm excited for all of the ports of C++ projects the web will get.

For example imagine being able to run a full self hosted C++ compiler itself from a browser on any device with a browser.

Post reply on HN