News for hackers. Stuff that matters.
Re:Rocket – A Rust game running on WASM by maffydub on Monday December 04, 2017 @08:38AM (#15843665)
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). 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-wi... .)

Re:Rocket – A Rust game running on WASM by wofo on Monday December 04, 2017 @08:40AM (#15843676)
Awesome! Happy to see the WASM backend is getting more and more attention
Re:Rocket – A Rust game running on WASM by frik on Monday December 04, 2017 @08:44AM (#15843703)
It 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

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.

Re:Rocket – A Rust game running on WASM by maffydub on Monday December 04, 2017 @09:46AM (#15844160)
It's listed in Chrome for me.

If I go to 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.

Re:Rocket – A Rust game running on WASM by diggan on Monday December 04, 2017 @10:40AM (#15844632)
Adding another comment about that this is supported in Firefox as well. Using https://www.hellorust.com/demos/sha1/index.html as a example, I can see the following:

https://i.imgur.com/rnOtuty.png

Re:Rocket – A Rust game running on WASM by Bob2018 on Monday December 04, 2017 @10:01AM (#15844295)
Making it difficult to decompile the source code is a feature not a bug.