LunaSDK icon indicating copy to clipboard operation
LunaSDK copied to clipboard

Add WebAssembly porting

Open JX-Master opened this issue 2 years ago • 1 comments

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:

  1. 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.
  2. 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.
  3. 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.

JX-Master avatar Nov 26 '23 08:11 JX-Master

WebGPU backend (#41 ) will only be available on WebAssembly versions of LunaSDK.

JX-Master avatar Nov 26 '23 08:11 JX-Master