While we could utilize web assembly using tauri, it would make more sense to integrate the native side of warp to give more flexibility across native platforms (ie desktop and possibly mobile), utilize optimizations that is not available on the browser (utilizing tcp and quic, upnp (if available and if desired), be able to utilize tor or other transport means (in the future), etc), and give an better experience while utilizing desktop and mobile while making it easier to debug issues.
Note:
- There might be some changes needed to be done to the UI (none that I am aware of), which might be small (webview might vary but I dont foresee any changes needed)
- The code that implements warp-wasm in js can possibly be reused when sending commands to tauri by checking to see if its the browser or tauri and use the correct function based on the check. Some that might not be reusable would be ones dealing with streams or events in which case would need to utilize tauri api to handle them in event handlers (or write a custom command to handle them on rust that can used from js via tauri command call)
- If building for tauri, we could exclude the warp-wasm module, cutting down the overall package size (it makes no sense to include it while building and using native calls)
- If included, we could have some type of flag or environment variable to be able to switch between the two (though would not be seamless and would likely need a restart to reinitialize)
- This would not be recommended due to the difference in how the data is stored locally
- At this time, this would be low priority but would be a nice-to-have type of thing on platforms where it would make more sense to utilize native over wasm where possible long term while utilizing wasm where feasible (eg browser).
While we could utilize web assembly using tauri, it would make more sense to integrate the native side of warp to give more flexibility across native platforms (ie desktop and possibly mobile), utilize optimizations that is not available on the browser (utilizing tcp and quic, upnp (if available and if desired), be able to utilize tor or other transport means (in the future), etc), and give an better experience while utilizing desktop and mobile while making it easier to debug issues.
Note: