Readit News logoReadit News
jchw · 4 years ago
The lead Wails developer has contributed a good deal of functionality and improvements to go-webview2, a library I wrote for interfacing with Windows WebView2 without needing CGo. While not a whole lot of people use go-webview2 directly (indeed, most people use it via Wails 2,) I am still glad that so many improvements made it upstream for whoever just wants direct bindings rather than a cross platform framework.
hogyncymraeg · 4 years ago
Hey there :-) Thanks for making both go-webview2 and winloader, and taking the time to review the PRs. That reminds me, I need to diff where we are at as I think we got out of sync.
jchw · 4 years ago
No worries; It shouldn’t be too bad. I would like to make some improvements to upstream go-webview2 when I get a chance; thanks to GitHub Actions, I bet I could implement some proper testing, which would be nice.
tmp_anon_22 · 4 years ago
What happened to go-webview1?
jchw · 4 years ago
Webview2 is the name of the Windows component that go-webview2 wraps. It’s a little bit confusing, because go-webview2 also happens to export an interface compatible with webview/webview, which is another library (although not Go-specific.)

edit: if you’re wondering why Webview2 is webview2, the reason for that is because Webview2 is based off of Chromium Edge and webview from WinRT is based off of MSHTML Edge. And if you are wondering why not support that, I considered it, but it’s somewhat harder to do, because while Webview2 is mostly pure COM interfaces, WinRT Webview uses… WinRT. Which is a bit more complicated. Avoiding CGo for that would probably involve worse blackmagic, possibly requiring some assembler to mimic what’s going on in WinRT.

mftb · 4 years ago
It's just called webview/webview[0]. The fact is a little obscured now because it's been used from so many other languages, but Go/C/C++ were the original targets.

[0]https://github.com/webview/webview

krapp · 4 years ago
Today must be "Electron Alternative Day" on HN:

Tauri 1.0 – Electron Alternative Powered by Rust[0]

Sciter – Multiplatform HTML/CSS/JavaScript UI Engine for Applications[1]

[0]https://news.ycombinator.com/item?shownew&id=31764015

[1]https://news.ycombinator.com/item?shownew&id=31765566

masklinn · 4 years ago
This and Sciter were clearly posted in response to (or to ride on the coattails of) Tauri's 1.0.

Sciter was specifically mentioned in tauri's thread, it's the subject of the top comment. Wener both mentioned wails in response to tauri's announcement, and posted this.

nobleach · 4 years ago
Interesting that the authors chose to commit their .vscode directory... given that this project was donated licenses by JetBrains. Maybe it's just a convenience thing.

On another tangent, I love seeing what music the authors were listening to while coding. Some might argue that it has no place in a README but... it's a nice touch.

seanw444 · 4 years ago
I thought the music was cool too. I'd kinda like to see it in more project READMEs. Obviously not half the page, but a nice little section of mentions. Could be a cool way to find new music.
nobleach · 4 years ago
Years ago when I worked on a team of folks with similar music tastes, I'd put the album link in PRs for feature branches. Just a way of saying, "this week, while working on this feature, I was listening to this". It was just a fun thing to do.
herewulf · 4 years ago
Maybe in addition to README, LICENSE, CONTRIBUTING, and so on, MUSIC should be standard practice for repositories. :)

Of course, I do all my serious coding while listening to the fine music of MASTER BOOT RECORD.

hogyncymraeg · 4 years ago
That was probably from back in the day. Hardcore Goland user now! The music was more to promote bands that some people would never have heard of.
toastal · 4 years ago
I disagree and maybe I'm not 'fun', but to me there's a lot of garbage in this README. Scrolling through the plaintext document with lists of badges, manually managed table of contents, photos of contributors, miscellaneous HTML, you can see that there's so much content that isn't helping you understand the project—things that should be I a homepage or separate dedicated file. I can't read this without rendering it. The music while somewhat interesting, I don't think has a place in this document—especially linking out a proprietary music streaming platform.
dimitrios1 · 4 years ago
Ease up on the high expectations. It's just a fun project on github, not a publication in an academic journal.
throw03172019 · 4 years ago
They did put it at the bottom of the README. I would understand your frustration if it was at the top or in-between important content.
onionisafruit · 4 years ago
.vscode committed to a repository is a bit of a warning flag to me. It tells me this repo is doing some non-standard stuff that needs special IDE configuration to account for.
mcluck · 4 years ago
Or it just includes some conveniences. A lot of my projects include a .vscode folder so that anyone who uses VS Code can debug the application right away. If you want to use your own IDE or even just run everything from the terminal, it all still works.
Matthias247 · 4 years ago
You can open the files in it and see what it does. It's absolutely nothing standard that you couldn't do without it. But having it committed will help others to use the same workflows more easily.
kitd · 4 years ago
It contains some useful debug launch configs that would take time to work out otherwise, and also some settings that appear to make the Node part and Go part work it bit more nicely together.

I don't think there are any red flags there IMHO.

skrtskrt · 4 years ago
Sufficiently complex projects are going to need some IDE config to get everything running and integrated with IDE tooling.
hogyncymraeg · 4 years ago
Nope. Just an old directory that made it in there at some point.
elashri · 4 years ago
or using codespaces for development
the__alchemist · 4 years ago
Would there be interest in a cross-platform GUI written in C++ or Rust that uses HTML/CSS/JS as its layout and animation language, but runs natively on CPU/GPU without a browser layer?
marklar423 · 4 years ago
That would be cool, but wouldn't any (full) implementation of the HTML/CSS/JS spec end up as a browser anyways? Unless you narrow the scope and only support a subset of HTML.
skavi · 4 years ago
Take that concept a bit further and you’ve basically gone down the same path as Flutter.
krapp · 4 years ago
The thing is, HTML/CSS/JS is good as a layout paradigm but garbage as an actual GUI layout and language, because they were intended for hypertext documents, not applications.

If you're going to do that, maybe consider versions of those intended to work as a native GUI layer, but which are as easy to develop as the web.

FractalHQ · 4 years ago
> intended for hypertext documents, not applications

They’ve been evolving for so many years that the initial intent behind their design isn’t very relevant. Especially if you consider modern tooling, language versions, webgl, svg, canvas, and so much more.

Deleted Comment

tomc1985 · 4 years ago
This existed, it was called XUL, and it was glorious

If there is one tech that we need to bring back from the dead, it is XUL

(XUL is the GUI toolkit powering Firefox, or at least was until they ripped almost all of it out and replaced it with "modern" (gag) HTML+CSS UI)

zsims · 4 years ago
Unsure if joking. XUL was awful.
42e6e8c8-f7b8-4 · 4 years ago
I think you're looking for https://www.areweguiyet.com/ click "webrenderer"
wolframhempel · 4 years ago
Could you elaborate on what you mean by "without a browser layer"? Would there still be a webview / blink etc. implementation?
ducktective · 4 years ago
I hope not. HTML/CSS were supposed to be used for "hyper text" and "magazine-like" content
ironmagma · 4 years ago
Computers were supposed to be used for computing and printing solutions to polynomial equations. Is that really relevant to what computers are needed for anymore?
cokeandpepsi · 4 years ago
isn't that what chrome is? either way QML is kind of what most people seem to be looking for and it's widely used
badrabbit · 4 years ago
Spent some time learning this and playing with this till I ran into a roadblock that it doesn't support multiple windows which was a deal breaker for my idea. Wish I had the time to learn and contribute a PR. It was a great tool otherwise. I needed to do electron without the bloat and backend JS. There are no good solutions from what I researched, things like QT are still king in this area it seems.
mbreese · 4 years ago
When you say multiple windows, what do you mean? Both GH links mention using iframes. So do you mean multiple “windows” within the primary application window? Or do you mean multiple primary windows?

Are you talking about tabs? Or multiple windows (like finder/explorer)?

badrabbit · 4 years ago
Multiple actual windows, Each window on a different monitor.
wener · 4 years ago
Asked for the same thing, but it's impossible or too hard to do it.

- https://github.com/wailsapp/wails/discussions/1452

- https://github.com/tauri-apps/tauri/issues/2709

pstuart · 4 years ago
Huh? Per the wails thread:

> No multi window currently but planned after v2 release

u1tron · 4 years ago
These days any apps or framework written rust seems exotic.

Atleast both are better than electron.

hogyncymraeg · 4 years ago
Multiple windows has some interesting nuances but we do aim to tackle that post v2. You would be surprised at just how much is involved in refining something like this, even with just a single window to worry about.
badrabbit · 4 years ago
Oh I don't doubt that one bit. Thank you for your hard work on it.
xhevahir · 4 years ago
NeutralinoJS supports this, apparently: https://github.com/neutralinojs/neutralinojs/issues/249
badrabbit · 4 years ago
Still JS.
gaws · 4 years ago
Are tabs an option?
badrabbit · 4 years ago
Nope, content needs to be on multiple monitors at once.
kitd · 4 years ago
Love the logo, and quite appropriate given the name and the lead is obviously Welsh!

https://github.com/leaanthony

Cymru am byth!

dotancohen · 4 years ago

  > Cymru am byth!
Plzeh nz olgu!

Aeolun · 4 years ago
Welsh sounds like something Cthulhu worshippers would use.
hogyncymraeg · 4 years ago
Syt mae? Qatar amdani! :-)
throwaway2016a · 4 years ago
This looks interesting. I'ma fan of Go for backend and command line tool dev but haven't been able to find good front-end solutions. I'll have to keep an eye out for v2 of this since it is supposedly nearing release.

In a similar vein: I've been experimenting a lot with Flutter and while I don't like Dart that much, the tooling around it (being able to use the IDE and quickly test my apps in different mobile devices and desktop for instance) is really good.

londons_explore · 4 years ago
Electron has a reputation for poor performance and slurping RAM...

But most of that is down to the architecture choice (using an HTML renderer) rather than the implementation.

I assume that means Wails has the same disadvantage?

francisl · 4 years ago
You must break down the part that led to that reputation.

Electron uses its own renderer (chrome). Meaning it can't share memory with the os browser and make download size way bigger. It bundles nodejs. Again make download size bigger Nodejs needs to create multiple processes which each of them can use a lot of memory. It use a bridge between the UI and backend (to do os stuff) while JS is nowaday fast, Go/Java/C#/etc are still faster

Wails on the other hand. Uses the os browser. (Download size is reduce and can share memory) Go is compiled to native, no runtime needed. (Download size is reduce, lower on memory, run faster) Same bridge performance bottleneck, but you can perform critical stuff in Go and get an advantage.

HTML renderers are fast. Code your UI with performance in mind, use a library like svelte or solidjs combine with something like wails (or anything that will do the same thing in java/c#/swift) and you won't see a difference between any native apps in most cases. Also you gain the ability to share your UI code with the web.