4 ms·
Nice one, and thanks for the write-up! I spent the weekend playing around with Rust/WebAssembly too - calling between Rust and WebAssembly is a bit more fiddl
by maffydub 9y ago
Nice one, and thanks for the write-up!
I spent the weekend playing around with Rust/WebAssembly too - calling between Rust and WebAssembly is a bit more fiddly than I expected, but I can understand why they did it.
I ended up trying to write a text adventure in Rust/WebAssembly for Ludum Dare (https://ldjam.com/events/ludum-dare/40 https://ldjam.com/events/ludum-dare/40). Due to other commitments, I ran out of time for the (48-hour) "competition", but am hoping to get something working in time for the (72-hour) "jam", which ends tonight.
(Brief blog on my initial experiences at https://maffydub.wordpress.com/2017/12/02/getting-started-with-rust-webassembly/ https://maffydub.wordpress.com/2017/12/02/getting-started-wi... .)
- wofo 9y agoAwesome! Happy to see the WASM backend is getting more and more attention
- frik 9y agoIt sucks, there is no way to view the code in Chrome DevTools. The WASM file isn't listed in DevTools "source" tab at all. https://aochagavia.github.io/js/rocket.wasm https://aochagavia.github.io/js/rocket.wasm A binary blob, that cannot be viewed except with an offline hexeditor. WASM sucks. Please remove support and go back to ASM.js, at least it was readable and fast. Or transpile to JS in the first place. Thanks for destroying the open web.
- maffydub 9y agoIt's listed in Chrome for me. If I go to https://www.hellorust.com/demos/add/index.html https://www.hellorust.com/demos/add/index.html, bring up the "Sources tab under Chrome Developer Tools and click on "Run", then a "wasm" item appears - clicking on that shows me the disassembly. Do you not see a "wasm" item? While WebAssembly clearly isn't as readable as non-minified JavaScript, it's probably not much worse than minified Javascript, and I really can't see any difference from a readability perspective between this and ASM.js.
- diggan 9y agoAdding another comment about that this is supported in Firefox as well. Using https://www.hellorust.com/demos/sha1/index.html https://www.hellorust.com/demos/sha1/index.html as a example, I can see the following: https://i.imgur.com/rnOtuty.png https://i.imgur.com/rnOtuty.png
- Bob2018 9y agoMaking it difficult to decompile the source code is a feature not a bug.