Breakout session on WebAssembly
This breakout session was part of the Workshop on Web games. Notes taken by Mathias Westerdahl.
- Suggestion to create new APIs with wasm in mind
- be mindful with object creation
- suggest more C style functions like "generateData(view)" and it creates into that preallocated buffer
- Discussed memory mapping in WASM
- nothing going on in this area just yet
- Discussion about deobfuscation and protecting assets
- WASM doesn't add any protection here
- We talked about WebCrypto to protect assets, which might be something for game developers
- Also loading some "runtime key" to avoid "simple ripping off a game"
- Are there any resources for "regular" web developers to start using WASM?
- going from "C" to WASM is easier
- coming from JS to WASM is harder to understand
- Rust -> WASM is an example of one way to go, perhaps interesting for JS too
- Luke mentioned AssemblyScript for writing WASM close code
- Exception handling coming in WASM
- Discussion about SharedArrayBuffer and atomics
- is there feature detection for this?
- there is some, will likely change in the future
- Loading time/efficiency discussion
- Where is WASM currently in regards to loading shared libraries?
- Recent changes pave the way for load time dynamic linking (ES6 module imports)
- How to do cross origin sharing?
- Can save loading time on game portals
- Discussion about caching
- Luke mentioned a new suggested function "cache tput"
- Talked about caching into subdomain buckets
- Is there a difference in cost going from JS <-> WASM?
- Luke mentions a blog post with some performance numbers