Any plans on publishing a wasm version of the api? I have started experimenting with WebAssembly and it would be neat to integrate SFS directly.
Since there's a C++ api, it could probably be used as a basis for a wasm recompile.
WebAssembly module?
Re: WebAssembly module?
Hi,
we'll look into the WASM format as it becomes more prevalent and supported on various devices.
I don't think the C++ API is a good candidate however as it depends on low-level libs (socket libs, threading libs etc...) which I suppose can't be ported.
Cheers
we'll look into the WASM format as it becomes more prevalent and supported on various devices.
I don't think the C++ API is a good candidate however as it depends on low-level libs (socket libs, threading libs etc...) which I suppose can't be ported.
Cheers
Re: WebAssembly module?
WebAssembly is available on all major browsers today. Including the mobile ones. This is why I have started experimenting with it, since it has great potential for more advanced gaming being possible now.Lapo wrote:we'll look into the WASM format as it becomes more prevalent and supported on various devices.
The web APIs are not (yet) available natively in wasm. The standard solution is to have javascript glue code that interacts with the apis and talks to wasm. Here's a websocket example.I don't think the C++ API is a good candidate however as it depends on low-level libs (socket libs, threading libs etc...) which I suppose can't be ported.
So while the networking is handled by the regular browser WebSocket API, all the logic would be in WebAssembly, which is why I mentioned that the existing C++ codebase could be useful. The low-level library calls could be replaced with calls to javascript instead. Tools like Emscripten also help converting existing code.
Threading is just being added, it's available in Chrome 70.