3 ms·
I like the approach of go-winloader, I'd be happy to include an example of using it with webview into the readme. I agree, including 2 DLLs on Windows is ugly,
by zserge 6y ago
I like the approach of go-winloader, I'd be happy to include an example of using it with webview into the readme. I agree, including 2 DLLs on Windows is ugly, however I believe that using CGo for webview would be a long-term win, because new features of webview may emerge in webview.h and they will be available in all language bindings immediately, including Go. I might be wrong, but I think if there is a solution to include both DLLs (webview.dll and WebView2Loader.dll) into a single executable in Go - that could simplify life for everyone.
- jchw 6y agoHonestly, if you embed both DLLs, the only thing preventing you from being able to build with CGo off is the bindings implementation since it relies on CGo features. However, it might be possible to have one’s cake and eat it too here, if there is one implementation using Windows-specific Go features that embeds the DLLs and one implementation that uses the existing CGo approach on other platforms. Essentially, the binding to webview.h would be abstracted away from the Webview Go interface implementation. I will continue to work on go-winloader in my spare time, and hopefully will have an interesting webview pull request in the near-ish future.