title: WebAssembly + WebView + Javascript Interface for heavy calculations?
body: <p>So I'm working on this app which currently are written natively for the web, android and ios. This app does some heavy lifting in the background which we are looking for ways to improve, but keeping three sources of basically the same code sucks. </p>
  
  <p>One way is to make a library in C++ which is then used in the apps and through WebAssembly on the web. This however requires us to generate new versions of the android/apps and publish them to their respective stores. </p>
  
  <p>But then I thought that WebAssembly might be usable on all platforms. But since we still want to offer a native experience on the mobile platforms I'm thinking that a WebView could be used to with a javascript interface to communicate with the library in WebAssembly and present the data natively. Updates to the library would only have to be done once and all apps always has the latest version of the library.</p>
  
  <p>Would this be possible and would it still offer high performance? Would the webview and javascript interface be bottlenecks?</p>