Re:Breaking the WASM/JS communication performance barrier
by MuffinFlavored on Saturday July 26, 2025 @04:25PM
(#44696707)
https://github.com/webview/webview_deno
Tell me how you'd do "native C/C++ FFI (to like a .so or .dylib or .dll)" between the webview using WASM or anything other than "WebKit's built in JSON-string based IPC"
Like a <button> that triggers a DLL call. How would you achieve it with WASM? How does WASM act as the bridge to the DOM and/or native? It doesn't, right?
Re:Breaking the WASM/JS communication performance barrier
by Evan-Almloff on Saturday July 26, 2025 @06:20PM
(#44697369)
Most of the optimizations apply equally to calling into webview JS from a native application for something like dom manipulation. There is a wry example that uses the system webview in the repo: https://github.com/ealmloff/sledgehammer_bindgen/blob/master...
Re:Breaking the WASM/JS communication performance barrier
by MuffinFlavored on Saturday July 26, 2025 @06:54PM
(#44697545)
https://github.com/ealmloff/sledgehammer_bindgen/blob/master...
This is fetch(), which I have to imagine is much less performant than Electron with a require('native-module')
VSCode IPC is kinda similar as it's designed to facilitate comms over an enforced process isolation barrier to protect the main thread from slow extensions etc. but it's actually IPC there (as in, there are multiple processes at the os level). The wasm/js stuff is handled within the same v8 context - it's not actually ipc.
(Happy to be corrected here, but this is my understanding)