3 ms·
What exactly is preventing you from making an off-screen WKWebView and pointing it at some bundled HTML/JS which allows the app to run arbitrary JS through some
by mort96 2y ago
What exactly is preventing you from making an off-screen WKWebView and pointing it at some bundled HTML/JS which allows the app to run arbitrary JS through some IPC? I guess App Store guidelines would come in the way, but I bet it it would be technically possible
- kevincox 2y agoIt is technically possible but the IPC will destroy you. You would need to transfer inputs and outputs as well as have JS shims to call it. Most of the code will be doing tons of memory accesses which will need to be transferred back and forth across the process boundary and orders of magnitude more cost. If you did want to try the best approach is probably to compile Dolphin to WASM and render via WebGPU. Then you can JIT WASM. But I suspect that the overall performance will still be lower. (Although a web version of Dolphin would still be super cool.)
- deleted 2y ago[deleted]
- voxic11 2y agoI don't think it would be as simple as compiling Dolphin to WASM. Since Dolphin itself implements a JIT compiler that emits native code you would need to also teach Dolphin to emit WASM code.