10 ms·
WebAssembly Specification Prototype
- deleted 10y ago[deleted]
- deleted 10y ago[deleted]
- legulere 10y ago⌘⃣F⃣ "todo" ⇒ 29 finds The binary and text representation sections still lack almost anything. This really seems like an early prototype.
- sunfish 10y agoIndeed; WebAssembly as a whole is still being designed. For example, it doesn't have an official text format yet, and while there is a binary format implemented in multiple browsers now, it's still evolving. The TODOs mark places where there are ongoing design discussions.
- icefox 10y agoAnd the project is in search of a logo. You can find a bunch of proposals here: https://github.com/WebAssembly/design/issues/112 https://github.com/WebAssembly/design/issues/112
- monocasa 10y agoHah. https://cloud.githubusercontent.com/assets/296238/8255083/14525dea-1663-11e5-89a4-775133a69162.png https://cloud.githubusercontent.com/assets/296238/8255083/14...
- vmorgulis 10y agoSomething in text: https://github.com/WebAssembly/design/issues/112#issuecomment-196945637 https://github.com/WebAssembly/design/issues/112#issuecommen... \\//
- grenoire 10y agoSome of these are atrocious... Do NOT let programmers design brand identities.
- stepanhruda 10y agoLike two of them are pretty good though
- andybak 10y agoIt's nothing to do with being a programmer - it's to do with not being a designer. Believe it or not some people are good at both.
- binji 10y agoAs sunfish mentions below, this spec document is being conservative in describing things that are still being discussed. There are experimental implementations in Firefox, Chrome and Edge. See https://webassembly.github.io/demo/ https://webassembly.github.io/demo/. There's more information about the current binary format here: https://github.com/WebAssembly/design/blob/master/BinaryEncoding.md https://github.com/WebAssembly/design/blob/master/BinaryEnco... There's a prototype spec interpreter here: https://github.com/WebAssembly/spec/tree/master/ml-proto https://github.com/WebAssembly/spec/tree/master/ml-proto There's a build waterfall testing multiple tools here: https://wasm-stat.us/console https://wasm-stat.us/console, including the experimental LLVM toolchain, the emscripten-wasm toolchain[0], binaryen[1], and sexpr-wasm[2]. WebAssembly is still under development, but I don't think it's fair to call it an early prototype. [disclaimer: I'm a WebAssembly contributor] [0]: https://github.com/kripken/emscripten/wiki/WebAssembly https://github.com/kripken/emscripten/wiki/WebAssembly [1]: https://github.com/WebAssembly/binaryen https://github.com/WebAssembly/binaryen [2]: https://github.com/WebAssembly/sexpr-wasm-prototype/ https://github.com/WebAssembly/sexpr-wasm-prototype/
- minionslave 10y agoI have a question about WebAssembly. 1- With WASM, would developing for the web become similar to how desktop apps are written? For example, could I use C# and design a UI in xaml, compile to WASM for the web? 2- No more JavaScript?
- spankalee 10y agoWASM doesn't have access to the DOM, or a GC, or very easy interop with JavaScript, so the answer is mostly "no".
- stupidcar 10y agoAll that is planned though, just not for the MVP: https://github.com/WebAssembly/design/blob/master/GC.md https://github.com/WebAssembly/design/blob/master/GC.md
- mintplant 10y agoNo idea why you've been downvoted. I'm interning at Mozilla right and as that design document says, GC and DOM access for WASM are very much on people's radar - they just won't make it into the initial roll-out.
- warbiscuit 10y agoI hope DOM access comes very close on the heels of the initial design... Javascript is an interesting language (particularly after it's recent revival), but IMO it's recent jumpstart would never have happened if it weren't for one killer feature: access to the HTML DOM. People would (and have) forgiven many other things, just for the utility of that as the presentation layer. I certainly would have picked up whatever language the browsers were pushing, where DOM access was a requirement. Conversely, I remember trying to get java applets to interact with HTML -- you have to message things through a tiny hole to/from javascript; which was (one of the many) things which made everyone hate java applets.
- megalodon 10y ago
- icefox 10y agoIt looks like Wasm.instantiateModule(b, m) currently takes the binary wasm and memory to create a module, when would you pass in a linear memory object? Does converting a wast always produce two files?
- sunfish 10y agoWebAssembly modules can still import an external linear address space, but they can now also define their own linear address space, with their own initialization data included in the module file.
- icefox 10y agoSo if I understand that correctly unlike the current text ast format that is floating around the Binary Format doesn't include the contents of (memory ...)? So foo.wasm + foo.mem = foo.wast?
- sunfish 10y agowasm modules can include their own initializers now, so .mem files won't be needed. This is the Data Section in the WebAssembly docs. .wast is actually just a testing file format that's currently serving the purpose of a text format in the absence of a real one. It isn't expected to be part of typical user workflows.
- dccoolgai 10y agoI can't wait until the first time I have to maintain something someone compiled into this monstrosity. The minimal performance gains will be so worth destroying the debuggable web. Sorry for the snark, but watching this slow-motion trainwreck plow into the Open Web that I love is excruciating. Pre-edit to respond to the inevitable "But you already can't read and debug minified JS": yeah, you actually can if you're good enough. I do it all the time... my complaint is that the bar for "good enough" is being moved from "can read and debug scripting language" to "can read and debug Assembly"... which I know you can do, but geez. I guess what I'm saying is the Open Web should only run on (reasonably) readable languages. Hate JS? Stand in line, but if you want to replace it on the web, replace it with something a normal person could interpret without a compiler.
- kevinwang 10y agoWould this be any different than debugging code currently written in a language that compiles to asm? For example, people debug C code, compiled to asm, on their computers. Would it be different to debug C code, compiled to webassembly, in a browser? Although I can't disagree that debugging js directly in browser tools is a nice experience.
- dccoolgai 10y agoPretend you don't have the C code, though - only the WASM binary... because I know it's hard for all of the Rockstartup Cowboys on HN to imagine being a quotidian schmuck like me... I am the guy - like probably most devs - who comes in after the Rockstar hangover to clean up and maintain the mess. Pretend the relationship with the initial developers went sour (as is often the case)... and you're left with this steaming pile of binary WASM. Now what? Seems like these guys making WASM never thought of me or the others in the silent majority of "poor schmucks" ..or just wrote that off entirely with a modicum of lip service in the form of "but we'll have a text version of Assembly you can burn your eyes with" and that's what I find so troubling about the whole thing. Now I have to learn how to read and debug assembly (which I did in College...but honestly, man).
- 10y ago