Add WebAssembly porting
We are considering the possibilities of introducing WebAssembly as the deploying target for LunaSDK. WebAssembly is a platform-agnostic binary standard that enables web browsers to run native codes like C++ in a high-efficient way. To port LunaSDK to WebAssembly, several jobs must be done:
- Add wasm32 as the compile target for LunaSDK. Some third-party libraries may not provide wasm32 versions, which will be disabled on WebAssembly target, just like what we will do in iOS/Android platforms.
- Write a new OS api implementation layer for WebAssembly using APIs provided by web browsers. Some system-level features may not be supported on WebAssembly.
- Add WebGPU as the graphics backend for WebAssembly. WebGL support is not planned.
Note that this is just a draft of what we might do for adding WebAssembly support for LunaSDK. We plan to release WebAssembly porting on v0.9, but this is not a guarantee since technical difficulties are unknown to us for now. We will update our new developing schedule on this issue as we continue to work on it.
WebGPU backend (#41 ) will only be available on WebAssembly versions of LunaSDK.