Last I messed with it, Electron is structured such that the UI thread is decoupled from where you're supposed to run your "logic" (for performances reasons, I assume—similar patterns are really common in GUI systems, in general) and they already have to communicate at arm's length, so 1) it's not that big a stretch to wrap some native library on the "logic" side, and 2) if you're calling back-and-forth between logic and UI a lot, rather than sitting in your logic code for long periods of time, it'd expect it to do very little for performance.