4 ms·
Does the project contain C++ code?
by amelius 6y ago
Does the project contain C++ code?
- cultofmetatron 6y agov8 is c++ and by their own page, they use node whihch embeds c++ so I'd say yes
- nim2020 6y agono, not directly. all primary code is written in rust
- iudqnolq 6y agoThey use whatever is the system WebView on the platform you run the code on. On Windows that's the Edge engine, on MacOS it's Safari's engine, etc. Those are all some combination of C and C++. See https://github.com/tauri-apps/wry https://github.com/tauri-apps/wry Edit: s/IE or Edge/Edge
- wffurr 6y agoThat seems to eliminate one of main advantages of electron, the consistent runtime environment. If your html/css/is has to work correctly in EdgeHTML, Safari Webview, and Blink, you are limited to the lowest common denominator features. Electron with Chromium has the largest feature set out of all of those.
- knubie 6y agoI can’t speak for other developers but my app runs on electron and the web (because why not?), so I need to make sure my app works with those browsers as well. A lot of the big electron apps I’m aware of are the same (slack, notion, discord, etc).
- iudqnolq 6y agoSlack used to use a similar approach but gave up in part because platform webviews are more outdated than browsers on average.
- derefr 6y agoElectron has two "sides" to it — a renderer process, and a NodeJS process, that communicate over IPC (where as far as the renderer is concerned, the NodeJS process is kind of like a very intrusive browser extension.) AFAIK, if you're writing a greenfield Electron app, it's best to do as little as possible in the renderer side, and as much as possible in the Node.js side, because the Node.js side has things like native threads and mmap(2), and everything running within the Node.js process can share that state, but things on the renderer side have to use it through RPC. I would assume that this project is similar, but with arbitrary Rust code in place of Node.js (is that right?) In that case, it doesn't matter how featureful the renderer is, as you're just using it as a GUI framework with a declarative view-model format. Just like a XAML or QML, but it's HTML+CSS. As such, idiomatically, you won't be using fancy browser APIs like threads or WebRTC within the renderer; instead, you'll be using native code on the "app side" and then passing the renderer data. The features of Tauri itself are "whatever native libraries you want to bring into your Rust binary." (Plus whatever conveniences it already builds in, of course.)
- flyingswift 6y agoThis is actually untrue, you want to do as much as possible in the renderer process. The main NodeJS process is responsible for all user interaction, including mouse clicks and keyboard input. If you block the main process, the entire app will become unresponsive
- parker-codes 6y agoFor Windows it will actually install Webview2 if it's not there already so it's not running on deprecated IE. https://github.com/tauri-apps/wry#windows https://github.com/tauri-apps/wry#windows
- iudqnolq 6y agoGood to know. Still awful on MacOS, and you'd presumably need to check distro by distro for Linux.
- ksec 6y agoSo basically on Windows it will use Edge. The idea is good, but this is not the first time someone try this. At the end it is all about testing, tools that needs to make 100% ( not 99% or 99.99% ) sure functions and rendering on all platform are intended as it is.
- Thaxll 6y agoSo you need to make sure your code works on 3 different platform eventhough you're using a tool that's supposed to fix that problem in the first place? I don't know the extend of WebView in Electron is it something common?
- iudqnolq 6y agoWorse, it needs to run on every version on every os. Windows 10 has an evergreen webview, but on Mac for compatibility reasons the webview is only updated with a new OS release. Edit: This is not something you run into with electron. It's the reason electron apps are so big, they bundle the whole browser engine.
- nklayman 6y agoA ton of time and resources have been put into making web apps work across multiple rendering engines. These days, it can be difficult to have something break on one platform if you are using a modern development stack. The webview engines that Tauri uses are all quite modern, see https://github.com/tauri-apps/wry/discussions/202 https://github.com/tauri-apps/wry/discussions/202 for more details.