Does anyone have any good intro resources for WebAssembly for noobs? I've read articles here and there seen some in person demos, and honestly struggle to understand what it is / how it would / works relative to the current state of JavaScript frameworks. Often I'm approaching it from a JavaScript framework (React/Vue/Angular) approach as I'm a bit of a noob to the industry and that's generally my day job working on…
W3C recommends WebAssembly
131–140 of 350 posts
Re: W3C recommends WebAssembly
#132What's the horizon for WebAssembly capable browsers gaining enough marketshare that it becomes a viable compilation target?
WASM has been available in all modern browsers for a few years. Availability isn't whats limiting adoption. Here are the limitations as I see them: * Sandbox. WASM is a sandbox. Think of WASM as a language agnostic replacement for Flash. It is an island in a webpage isolated from that page. This is great for security so that the opaque binary running in that WASM island cannot modify the page in such ways as to viola…
It can do so via JavaScript glue for now, but there was spec proposals to allow direct access to the DOM.
Re: W3C recommends WebAssembly
#133Re: W3C recommends WebAssembly
#134Earlier quoted context omitted.
Please, can we stop having this argument every time there is an article about webassembly ? WASM not any more obfuscated than any minified JS. Being a bytecode doesn't make you "unfree". You have access to the same tool to debug JS and WASM. And the WASM specification is open. There is literally no difference between running JS or running WASM.
A binary format is no more obfuscated than minified JS? What now? Going to need some clarification on how that's the case.
Re: W3C recommends WebAssembly
#135Hopefully this also means that Javascript is going away for good
Re: W3C recommends WebAssembly
#136Earlier quoted context omitted.
This is a valid concern. Among many things it is much easier to audit higher level code than bytecode.
What can't you do? How is it any easier to audit minified JS than a WASM blob ? Everytime this argument is raised there is no valid argument to explain why WASM would be much worse than the current state of JS.
Re: W3C recommends WebAssembly
#137Earlier quoted context omitted.
I respect your point and semi-agree, but as someone who ran a small business in high school that usually involved reverse engineering obfuscated Javascript, I think you're overstating how hard it is to follow the logic of Javascript blobs. Yes, whole program flows can be insanely difficult to follow, but narrowing in on the logic of key functions is often what one needs when trying to learn from other's code.
So are you saying that reverse engineering javascript is easy? Or that it's easier than reverse engineering wasm? I don't know much about web assembly, but x86, which is much more complicated with thousands of instructions, has been successfully reverse engineered basically since forever. There are decompilers that can automatically reconstruct source code in C or C++ from a binary blob. Compared to javascript, the b…
That's a bit of an overstatement.
Disassembly of native executables is essentially a solved problem, and has been for decades. There is some variation in terms of how you define disassembly and how you deal with code that specifically tries to defeat disassembly, but it's solved enough that objdump -d is a decently effective tool.
Decompilation is more difficult. There were academic-quality decompilers by around the 90s, but these weren't really usable and tended to break on anything more complicated than toy examples. The JVM breathed new life into decompilers, and it's not until this point that you get decompilers that can routinely output code that is recompilable (and only in the Java domain).
In the mid-noughts, decompilation efforts returned to targeting native binaries again. This is helped by the developers of IDA Pro (the main tool used for reverse engineering) building a decompiler view into their application. There's also been more efforts on accurate static binary translation into IRs such as LLVM, which is often close enough to C to be effective, and I'm more familiar with these efforts than I am with full decompilers.
The creation of fully recompilable C source code from binaries is still a challenge, in part because machine semantics are more well-defined than C, and you basically have a tradeoff between readable output and semantically-correct (free of undefined behavior). Control-flow recovery is still challenging; signatures are needed to deal with statically-linked pieces of the standard library; and structure and type recovery is routinely of extremely poor quality.
Re: W3C recommends WebAssembly
#138Whatever you think about javascript, I love the historic separation between content and interactivity. I dislike that so many static pages won't load without JS and that we're moving further in that direction. I hope the evolution towards "browser as OS" doesn't hurt the content vs interactivity separation. Could we ever lose the HTML centered model? That could mean we lose hackability and the ability to write extens…
Even if we don't lose the HTML-centered model, we are probably going to lose control of our browsers. Eventually somebody is going to ship a product that's nothing more than a browser implemented in WASM that runs inside your browser. The "inner browser" won't have content filtering, privacy controls, DOM inspector, or a Javascript debugger (for the Javascript engine running on the "inner browser") that you can inter…
Re: W3C recommends WebAssembly
#139Re: W3C recommends WebAssembly
#140What's the debugging situation like for developing WASM apps? I'm doing a lot of TypeScript+WebGL work right now, and though TS is fairly nice, my use case requires being aware of not allocating too many new objects frequently, and that kind of control would be easier in something like C++ or Rust. I've been thinking of hacking together a small test project with WASM+WebGL to see what it's like, but I get the sense i…
EDIT: Here's an article from yesterday about this: https://developers.google.com/web/updates/2019/12/webassembl...