105 points · by aragonite · 2y ago · 44 comments
Also, back when I was playing with and contributing to webview I did some RAM usage tests, and WebKitGTK actually did worse than Electron. We did briefly look into Netsurf or a 'lite' version of WebKit but RAM usage ended up being the same, and WebKitGTK3 was too popular and easy to use for the devs to want to switch to anything else.
And finally for all platforms, you will probably be eating up a lot of RAM (and impacting launch times) by using WebView2/NSWebView/WebKitGTK, which is probably not the primary browser that most users use and have running and loaded into RAM. This should improve improve if you run more than 1 Tauri/electron app - but that seems unlikely to me.
WebUI doesn't solve all of these problems (users must have a compatible web browser installed) and has some quirks, but it mostly solves the RAM usage issue (checks for what browser is already loaded, starts a new instance) and compiles into very small .AppImage/.app/.exe applications as users would expect.
I would only recommend WebUI if you have a HTML/CSS/JS frontend that you absolutely can't depart with, or have some other scenario/limitation that forces you have to use a browser. Otherwise, it's so much better to just use a native framework :) (As a side note, Tauri used to use webview as a backend, but eventually switched to a rewrite.)
- (Auto) Updating.
- Embedding other files (and actually distribute them).
- Plugins (I guess plugins can be made for the various language bindings and implemented via event handlers).
- Disabling Edge's annoyances (IE it looks like Edge's menu that shows up when selecting text is happening, I guess its image hover thing is there, and maybe more annoyances).
- The menu on macOS is the menu of the launched browser.
FWIW I maintain an app built with Tauri and generally really like it.
I realise 2MB is really small these days, I just found myself thinking "2MB wouldn't even fit on a floppy disk!"
I'm sure Caddy and nginx and the like are at least 2MB, but they have a lot of features. Googling around a bit for small web servers, I found this fun blog post: https://lipanski.com/posts/smallest-docker-image-static-webs... They ended up with a static web server in a 154KB Docker image.
almost yeah
Let me tell you as someone who has used virtual machines, done native development, and used tools like WSL...MSYS is really nice in context.
It's not as fast as bare native, but it's leagues better than a virtual machine and plenty fast enough for daily work. It has lots of the latest tooling (just recently it updated to GCC14 a couple days after GCC14 released). It has all the nice toolchains set up with a simple pacman call instead of having to compile everything yourself or go to esoteric sources to get it installed.
Most importantly, it just works the vast majority of the time. I very rarely have to fix something because of an MSYS concern. Almost all of my time is spent actually developing.
(Although they are for different work: That is NOT true on WSL, where it feels like I spend weeks just trying to get it up and working for a few days of productive work)
I want more projects to have windows native instructions rather than copping out and using a kind of fake Unix environment
But it just pales in comparison to the mountain of great tools, addons, plugins, packages and so on available in a Unix environment. I mean heck, what do you even do for something like clang-format?
I see in other comments you mentioned Powershell and CMake and TBH these are two things i avoided whenever i used Windows. CMake is used too much to be able to avoid it on Linux (which is currently my main OS) but it is not a tool i'd use myself if i had the choice.
If i had to use a tool that generates build files, i'd rather use premake[0] as it is a self-contained binary with very simple Lua-based scripts (by default they look declarative but you can extend it as much as you want - i've even used a script to generate CMake files since these can be parsed by Qt Creator). The only downside is that on Unix systems it doesn't know concept of a shared library (can be "taught" with a custom script but it isn't something that is available out of the box).
This project doesn't have a build system at all, nor should it: it is a single source file that you might add to your existing project and build using your build system... and even that source just includes the header, so presumably you wouldn't even do that and would just include the header from your existing code. It would be absolutely ridiculous for this header to have its own build system.
https://developer.android.com/reference/android/webkit/WebVi...
It would be great to have this library work on the two most popular platforms, ideally with as little Java on Android as possible.
* is header-only
* supports EDGE on Windows without the need to have the WebView2 SDK or to bundle a runtime DLL
* supports fetch intercepting and some other customisation
* is modern C++ rather than a sort of mashup of C/C++
then check out the one in the CHOC library here: https://github.com/Tracktion/choc/blob/main/gui/choc_WebView...
Aside from template based code, this is a disadvantage in my book usually
> Internally, some absolutely hideous shenanegans are involved to make this possible!
Yeah, like literally embedding a dll in the header file.
Pretty cool, but seems kinda fragile.
(In fact, it's less fragile than a loose DLL, because you don't run the risk of your DLL failing to install/being moved/accidentally loading some other random version of the same DLL etc)