当前位置:网站首页>tauri vs electron
tauri vs electron
2022-06-26 13:13:00 【Cloud man notes】
Here is the custom directory title
1. tauri vs electron
1.1. Tauri What is it?
Tauri It's a cross platform GUI frame , And Electron Their ideas are basically similar to .Tauri The front-end implementation of is also based on Web Series language ,Tauri The back end uses Rust.Tauri You can create smaller 、 Run faster 、 More secure cross platform desktop applications .
1.2. Front end view
tauri At this time, the fire is viewed against the background of this time point , I think the most important one is 2 Point is rust and webview2.
rust
- rust How popular is it? There is not much to say here , Just throw a few links ,linux Kernel acceptance rust, deno use rust, Microsoft embraces rust, fuchsia Of rust Code proportion exceeds 50%, Apple In the underlying all-in rust, continuity 6 Year of stackoverflow Most popular language .
- tauri Adopted rust Corresponding electronjs Of nodejs, No, nodejs This runtime, It will be thinner .nodejs The biggest advantage of is asynchronous event driven libuv and js Language .rust be based on future Of tokio Wait for the library to have a comparison ,( And familiar async await Out of the box ).rust A strong hug wasm It is very tempting for developers of various languages .
- rust It is positioned as system programming by many developers , For the system api The advantages of integration and invocation are great .
- rust There are many advantages : Compile time memory security 、 Zero cost abstraction 、 Support high concurrency 、 Rich type system 、 Easy-to-use cargo Package management 、ffi Compile friendly ( and node-gyp More friendly than )
- The disadvantage is that the learning threshold is high , But for the c/c++ For developers, package management 、 Standard library 、 Compile time memory security is tempting .
webview2
- tauri Rendering libraries used wry stay macos Use Webkit.framework, stay windows The following applies webview2.
- Microsoft webview2 runtime Our support is quite strong . For promotion office application 、outlook And so on ,2021 year 4 The month begins windows 2101 Push above version . The specific coverage data is not clear at present ( Let's see if there is any great God who can reveal ).
- Different applications can share webview2.electronjs The shared runtime you want to implement is webview2 Realized .
- webview2 runtime 122MB, win11 With pre-installed ,win11 Previous versions can be embedded into the application's installation package , You can reuse unstable versions edge Browser's runtime( The stable version is not reused ), It can also be downloaded separately ( recommend , It's different tauri Apps can share runtime).
- webview2 runtime The evergreen model can even be better than electronjs Of chromium Update faster .
- Microsoft's internal desktop applications have gradually changed from electron Switch to webview2.
To make a long story short tauri It's a frame stuck with a point in time , It is a phenomenal framework for the spiral development of desktop applications .
1.3. Open source project author's opinion
As Electron alternatives , There are more and more such frameworks ,tauri Just one of them , They all try to solve Electron Two obvious problems of :
- The bag is too big , because electron Will automatically insert Chromium and nodejs, A man who does nothing electron After the project is compressed, it will probably 50m.
- Memory consumption is too high , because Chromium It eats memory itself , In addition, it provides access to the operating system nodejs, Considerable memory consumption , Not friendly to gadget projects .
tauri Look at the , No more stuffing Chromium and nodejs, The front end uses the operating system webview, Back end and operating system integration rust Realization , In theory, it should be better than nodejs Be lean and efficient , Similar projects :
- NeutralinoJS The front end is embedded with a webview, The back end directly implements a c++ Realized http server.
- Chromely The front end is embedded with a CEF, The back-end using .NET.
- electrino and tauri similar , Using the system's webview, And implement a back end (windows The following seems to be based on .NET).
- go-astilectron Still based on Electron, But the back end is replaced by go Language .
- wails webview+go Backend
But the problem with such projects is : immature , Basically, just look at the documents , As a solution for developing desktop applications , Operating system access api Very few , Not even ( Or no documentation ?), It is difficult to develop a formal project , But it's worth paying attention to , Once mature , replace Electron There is great hope .
边栏推荐
- What are the common categories of software testing?
- 利用scrapy爬取句子迷网站优美句子存储到本地(喜欢摘抄的人有福了!)
- 倍福PLC通过MC_ReadParameter读取NC轴的配置参数
- Machine learning notes - seasonality of time series
- 倍福CX5130换卡对已有的授权文件转移操作
- D - skiing
- I - Dollar Dayz
- Uva11582 [fast power]colossal Fibonacci numbers!
- 倍福TwinCAT通过Emergency Scan快速检测物理连接和EtherCAT网络
- 倍福NC轴状态转移图解析
猜你喜欢

倍福PLC实现绝对值编码器原点断电保持---bias的使用

C语言:练习题二

组合模式(Composite )

Do you know the limitations of automated testing?

Composite mode

To solve the difficulties of small and medium-sized enterprises, Baidu AI Cloud makes an example

倍福CX5130换卡对已有的授权文件转移操作

Unit practice experiment 8 - using cmstudio to design microprogram instructions based on basic model machine (1)

原型模式(prototype)

Power Designer - Custom Comment button
随机推荐
Use the script to crawl the beautiful sentences of the sentence fan website and store them locally (blessed are those who like to excerpt!)
Learning Processing Zoog
Electron official docs series: Processes in Electron
Summary of wechat applet test points
Processsing mouse interactive learning
Mode pont
H - Sumsets POJ 2229
Source code learning: atomicinteger class code internal logic
National standard gb28181 protocol easygbs cascaded universal vision platform, how to deal with live message 403?
Solution of Splunk iowait alarm
装饰器(Decorator)
P2393 yyy loves Maths II
Basic principle and application routine of Beifu PLC rotary cutting
Electron official docs series: Contributing
倍福CX5130换卡对已有的授权文件转移操作
D - 滑雪
zoopeeper设置acl权限控制(只允许特定ip访问,加强安全)
倍福TwinCAT通过Emergency Scan快速检测物理连接和EtherCAT网络
UVA10341 solve it 二分
I - Dollar Dayz