Tauri’s most notable feature is being “small” - the packaged artifacts are very small. This is because unlike Electron, it doesn’t require a complete Chromium engine. It’s essentially a “packager” that uses different webview engines on different platforms. For example, Tauri uses Microsoft Edge WebView2 on Windows, WKWebView on macOS, and webkitgtk on Linux.
The cost is that it cannot guarantee cross-platform compatibility and consistency.
Personally, I think this issue is severe, perhaps even more serious than you or I might imagine.
I haven’t studied webviews, nor do I understand the specific performance of webviews on different platforms, but I frequently develop on both macOS and Linux. I can clearly observe that when using Tauri to build small tools, WebkitGTK on Linux performs poorly. Specifically, page loading is noticeably slower than on other platforms, the crash rate is relatively high, and more importantly, WebkitGTK’s rendering performance differs significantly from other platforms.
Of course, WKWebView has its issues too, but at least it performs well on macOS and has significantly better compatibility with Chromium than WebkitGTK.
Electron may have a large package size, but at least it doesn’t have consistency issues. Sometimes size isn’t a big problem, but for Tauri, this creates significant testing work for applications with large distribution volumes.
Personally, I think if Tauri wants to solve this problem, future options include:
servo looks like a perfect choice. However, currently, servo is a less reliable option than WebkitGTK. It would probably take servo several years to catch up with WebkitGTK.
CEF stands for Chromium Embedded Framework. Currently, CEF has two major issues: first, each release brings breaking changes, which is very unfriendly for a low-level library; second, it’s quite large - if you embed CEF in an application, the installation package size directly exceeds 100MB. Ideally, the system should directly share the same CEF.
The current Tauri v2 version definitely cannot摆脱 (get rid of) using WebkitGTK on Linux platforms. However, the official team seems to prioritize the CEF route because they have already forked a cef-rs project:
https://github.com/tauri-apps/cef-rs
Also, do you think Tauri and Electron are in competition?
I’ve only briefly looked at Electron documentation but have never used Electron to write applications. Personally, I think Tauri and Electron only have a small overlap. Tauri’s frontend API is too limited to meet daily desktop application development needs. Therefore, Tauri’s user base can only be developers who know both Rust and frontend. Frontend developers are a dime a dozen, but Rust developers are rare animals (compared to frontend, Java).