@wtfrank said in Using WebAssembly and C++:
WASM sets up an array, which is treated as the memory for the WASM code. You have to copy the in-game objects into this array. And wasm supports only basic types (int, uint of various lengths). There's probably code in emscripten which will wrap all of this up for you and copy javascript objects in and out, but I've only used WASM with byte data.
There's some example code here that uses C++ https://github.com/screepers/cppreeps
Alright, thanks for you help!