<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Wails Blog</title><description>Build beautiful desktop applications using Go and modern web technologies.</description><link>https://v3.wails.io/</link><language>en</language><item><title>Alpha 10 Released - A New Chapter for Wails</title><link>https://v3.wails.io/blog/2024-12-03-alpha10-and-new-release-strategy.md/</link><guid isPermaLink="true">https://v3.wails.io/blog/2024-12-03-alpha10-and-new-release-strategy.md/</guid><pubDate>Tue, 03 Dec 2024 00:00:00 GMT</pubDate><content:encoded>&lt;div&gt;&lt;h1 id=&quot;alpha-10-released---a-new-chapter-for-wails&quot;&gt;Alpha 10 Released - A New Chapter for Wails&lt;/h1&gt;&lt;/div&gt;
&lt;p&gt;We’re thrilled to announce the release of &lt;strong&gt;Wails v3 Alpha 10&lt;/strong&gt; - and it’s big! While our release cadence may have seemed slow recently, there’s been an incredible amount of work happening behind the scenes. Today marks not just another release, but a shift in how we approach the development of Wails.&lt;/p&gt;
&lt;div&gt;&lt;h2 id=&quot;why-the-wait&quot;&gt;Why the Wait?&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;Like many development teams, we fell into the trap of trying to achieve perfection before each release. We wanted to squash every bug, polish every feature, and ensure everything was just right. But here’s the thing - software is never truly bug-free, and waiting for that mythical state only delays getting improvements into your hands.&lt;/p&gt;
&lt;div&gt;&lt;h2 id=&quot;our-new-release-strategy&quot;&gt;Our New Release Strategy&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;Starting today, we’re adopting a &lt;strong&gt;daily release strategy&lt;/strong&gt;. Any new changes merged during the day will be released at the end of that day. This approach will:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Get bug fixes and features to you faster&lt;/li&gt;
&lt;li&gt;Provide more frequent feedback loops&lt;/li&gt;
&lt;li&gt;Speed up our journey to Beta&lt;/li&gt;
&lt;li&gt;Make the development process more transparent&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This means you might see more frequent, smaller releases rather than occasional large ones. We believe this will benefit everyone in the Wails community.&lt;/p&gt;
&lt;div&gt;&lt;h2 id=&quot;how-you-can-help&quot;&gt;How You Can Help&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;We’ve been overwhelmed by the number of people wanting to contribute to Wails! To make it easier for contributors to get involved, we’re implementing a new system:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Firstly, we are opening up bug reporting for alpha releases. The frequent releases allow us to do this.&lt;/li&gt;
&lt;li&gt;Issues marked with &lt;strong&gt;“Ready for Work”&lt;/strong&gt; are open for community contributions&lt;/li&gt;
&lt;li&gt;These issues have clear requirements and are ready to be tackled&lt;/li&gt;
&lt;li&gt;Most importantly, &lt;strong&gt;we need people testing PRs&lt;/strong&gt; - this is one of the most valuable contributions you can make&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Testing doesn’t require deep knowledge of the codebase, but it provides immense value by ensuring changes work across different environments and use cases.&lt;/p&gt;
&lt;div&gt;&lt;h2 id=&quot;whats-next&quot;&gt;What’s Next?&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;With our new daily release strategy, expect to see rapid progress toward Beta. We’re committed to maintaining momentum and getting Wails v3 to a stable release as quickly as possible without sacrificing quality.&lt;/p&gt;
&lt;p&gt;And who knows? There might be a few surprises along the way… 😉&lt;/p&gt;
&lt;div&gt;&lt;h2 id=&quot;thank-you&quot;&gt;Thank You&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;To everyone who has contributed code, tested releases, reported bugs, or simply used Wails - thank you. Your support and feedback drive this project forward.&lt;/p&gt;
&lt;p&gt;Here’s to more frequent releases, faster iteration, and an exciting journey ahead!&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;Want to get involved? Check out our &lt;a href=&quot;https://github.com/wailsapp/wails&quot;&gt;GitHub repository&lt;/a&gt; for issues marked “ready for work”, or join our community to help test the latest changes.&lt;/em&gt;&lt;/p&gt;</content:encoded></item><item><title>The Road to Wails v3</title><link>https://v3.wails.io/blog/2023-01-17-v3-roadmap.md/</link><guid isPermaLink="true">https://v3.wails.io/blog/2023-01-17-v3-roadmap.md/</guid><pubDate>Tue, 17 Jan 2023 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;starlight-image-zoom-zoomable&gt;&lt;img alt=&quot;multiwindow screenshot&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;auto&quot; width=&quot;2860&quot; height=&quot;1626&quot; src=&quot;https://v3.wails.io/_astro/multiwindow.Cd0UiyZe_bLLp0.webp&quot;&gt;&lt;button aria-label=&quot;Zoom image: multiwindow screenshot&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; fill=&quot;currentColor&quot; viewBox=&quot;0 0 24 24&quot;&gt;&lt;use href=&quot;#starlight-image-zoom-icon-zoom&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/button&gt;&lt;/starlight-image-zoom-zoomable&gt;&lt;/p&gt;
&lt;div&gt;&lt;h1 id=&quot;introduction&quot;&gt;Introduction&lt;/h1&gt;&lt;/div&gt;
&lt;p&gt;Wails is a project that simplifies the ability to write cross-platform desktop
applications using Go. It uses native webview components for the frontend (not
embedded browsers), bringing the power of the world’s most popular UI system to
Go, whilst remaining lightweight.&lt;/p&gt;
&lt;p&gt;Version 2 was released on the 22nd of September 2022 and brought with it a lot
of enhancements including:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Live development, leveraging the popular Vite project&lt;/li&gt;
&lt;li&gt;Rich functionality for managing windows and creating menus&lt;/li&gt;
&lt;li&gt;Microsoft’s WebView2 component&lt;/li&gt;
&lt;li&gt;Generation of Typescript models that mirror your Go structs&lt;/li&gt;
&lt;li&gt;Creating of NSIS Installer&lt;/li&gt;
&lt;li&gt;Obfuscated builds&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Right now, Wails v2 provides powerful tooling for creating rich, cross-platform
desktop applications.&lt;/p&gt;
&lt;p&gt;This blog post aims to look at where the project is at right now and what we can
improve on moving forward.&lt;/p&gt;
&lt;div&gt;&lt;h1 id=&quot;where-are-we-now&quot;&gt;Where are we now?&lt;/h1&gt;&lt;/div&gt;
&lt;p&gt;It’s been incredible to see the popularity of Wails rising since the v2 release.
I’m constantly amazed by the creativity of the community and the wonderful
things that are being built with it. With more popularity, comes more eyes on
the project. And with that, more feature requests and bug reports.&lt;/p&gt;
&lt;p&gt;Over time, I’ve been able to identify some of the most pressing issues facing
the project. I’ve also been able to identify some of the things that are holding
the project back.&lt;/p&gt;
&lt;div&gt;&lt;h2 id=&quot;current-issues&quot;&gt;Current issues&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;I’ve identified the following areas that I feel are holding the project back:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The API&lt;/li&gt;
&lt;li&gt;Bindings generation&lt;/li&gt;
&lt;li&gt;The Build System&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;&lt;h3 id=&quot;the-api&quot;&gt;The API&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;The API to build a Wails application currently consists of 2 parts:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The Application API&lt;/li&gt;
&lt;li&gt;The Runtime API&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The Application API famously has only 1 function: &lt;code dir=&quot;auto&quot;&gt;Run()&lt;/code&gt; which takes a heap of
options which govern how the application will work. Whilst this is very simple
to use, it is also very limiting. It is a “declarative” approach which hides a
lot of the underlying complexity. For instance, there is no handle to the main
window, so you can’t interact with it directly. For that, you need to use the
Runtime API. This is a problem when you start to want to do more complex things
like create multiple windows.&lt;/p&gt;
&lt;p&gt;The Runtime API provides a lot of utility functions for the developer. This
includes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Window management&lt;/li&gt;
&lt;li&gt;Dialogs&lt;/li&gt;
&lt;li&gt;Menus&lt;/li&gt;
&lt;li&gt;Events&lt;/li&gt;
&lt;li&gt;Logs&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;There are a number of things I am not happy with the Runtime API. The first is
that it requires a “context” to be passed around. This is both frustrating and
confusing for new developers who pass in a context and then get a runtime error.&lt;/p&gt;
&lt;p&gt;The biggest issue with the Runtime API is that it was designed for applications
that only use a single window. Over time, the demand for multiple windows has
grown and the API is not well suited to this.&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;thoughts-on-the-v3-api&quot;&gt;Thoughts on the v3 API&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;Wouldn’t it be great if we could do something like this?&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;func&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;main&lt;/span&gt;&lt;span&gt;() {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;    &lt;/span&gt;&lt;span&gt;app&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;:=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;wails&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;NewApplication&lt;/span&gt;&lt;span&gt;(options.App{})&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;    &lt;/span&gt;&lt;span&gt;myWindow&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;:=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;app&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;NewWindow&lt;/span&gt;&lt;span&gt;(options.Window{})&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;    &lt;/span&gt;&lt;span&gt;myWindow&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;SetTitle&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&quot;&lt;/span&gt;&lt;span&gt;My Window&lt;/span&gt;&lt;span&gt;&quot;&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;    &lt;/span&gt;&lt;span&gt;myWindow&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;On&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;events&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;Window&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;Close&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;func&lt;/span&gt;&lt;span&gt;() {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;        &lt;/span&gt;&lt;span&gt;app&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;Quit&lt;/span&gt;&lt;span&gt;()&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span&gt;})&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;    &lt;/span&gt;&lt;span&gt;app&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;Run&lt;/span&gt;&lt;span&gt;()&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;This programmatic approach is far more intuitive and allows the developer to
interact with the application elements directly. All current runtime methods for
windows would simply be methods on the window object. For the other runtime
methods, we could move them to the application object like so:&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;app&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;:=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;wails&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;NewApplication&lt;/span&gt;&lt;span&gt;(options.App{})&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;app&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;NewInfoDialog&lt;/span&gt;&lt;span&gt;(options.InfoDialog{})&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;app&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;Log&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;Info&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&quot;&lt;/span&gt;&lt;span&gt;Hello World&lt;/span&gt;&lt;span&gt;&quot;&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;This is a much more powerful API which will allow for more complex applications
to be built. It also allows for the creation of multiple windows,
&lt;a href=&quot;https://github.com/wailsapp/wails/issues/1480&quot;&gt;the most up-voted feature on GitHub&lt;/a&gt;:&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;func&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;main&lt;/span&gt;&lt;span&gt;() {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;    &lt;/span&gt;&lt;span&gt;app&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;:=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;wails&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;NewApplication&lt;/span&gt;&lt;span&gt;(options.App{})&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;    &lt;/span&gt;&lt;span&gt;myWindow&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;:=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;app&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;NewWindow&lt;/span&gt;&lt;span&gt;(options.Window{})&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;    &lt;/span&gt;&lt;span&gt;myWindow&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;SetTitle&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&quot;&lt;/span&gt;&lt;span&gt;My Window&lt;/span&gt;&lt;span&gt;&quot;&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;    &lt;/span&gt;&lt;span&gt;myWindow&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;On&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;events&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;Window&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;Close&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;func&lt;/span&gt;&lt;span&gt;() {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;        &lt;/span&gt;&lt;span&gt;app&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;Quit&lt;/span&gt;&lt;span&gt;()&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span&gt;})&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;    &lt;/span&gt;&lt;span&gt;myWindow2&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;:=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;app&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;NewWindow&lt;/span&gt;&lt;span&gt;(options.Window{})&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;    &lt;/span&gt;&lt;span&gt;myWindow2&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;SetTitle&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&quot;&lt;/span&gt;&lt;span&gt;My Window 2&lt;/span&gt;&lt;span&gt;&quot;&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;    &lt;/span&gt;&lt;span&gt;myWindow2&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;On&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;events&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;Window&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;Close&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;func&lt;/span&gt;&lt;span&gt;() {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;        &lt;/span&gt;&lt;span&gt;app&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;Quit&lt;/span&gt;&lt;span&gt;()&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span&gt;})&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;    &lt;/span&gt;&lt;span&gt;app&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;Run&lt;/span&gt;&lt;span&gt;()&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;div&gt;&lt;h3 id=&quot;bindings-generation&quot;&gt;Bindings generation&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;One of the key features of Wails is generating bindings for your Go methods so
they may be called from Javascript. The current method for doing this is a bit
of a hack. It involves building the application with a special flag and then
running the resultant binary which uses reflection to determine what has been
bound. This leads to a bit of a chicken and egg situation: You can’t build the
application without the bindings and you can’t generate the bindings without
building the application. There are many ways around this but the best one would
be not to use this approach at all.&lt;/p&gt;
&lt;p&gt;There were a number of attempts at writing a static analyser for Wails projects
but they didn’t get very far. In more recent times, it has become slightly
easier to do this with more material available on the subject.&lt;/p&gt;
&lt;p&gt;Compared to reflection, the AST approach is much faster however it is
significantly more complicated. To start with, we may need to impose certain
constraints on how to specify bindings in the code. The goal is to support the
most common use cases and then expand it later on.&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;the-build-system&quot;&gt;The Build System&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;Like the declarative approach to the API, the build system was created to hide
the complexities of building a desktop application. When you run &lt;code dir=&quot;auto&quot;&gt;wails build&lt;/code&gt;,
it does a lot of things behind the scenes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Builds the backend binary for bindings and generates the bindings&lt;/li&gt;
&lt;li&gt;Installs the frontend dependencies&lt;/li&gt;
&lt;li&gt;Builds the frontend assets&lt;/li&gt;
&lt;li&gt;Determines if the application icon is present and if so, embeds it&lt;/li&gt;
&lt;li&gt;Builds the final binary&lt;/li&gt;
&lt;li&gt;If the build is for &lt;code dir=&quot;auto&quot;&gt;darwin/universal&lt;/code&gt; it builds 2 binaries, one for
&lt;code dir=&quot;auto&quot;&gt;darwin/amd64&lt;/code&gt; and one for &lt;code dir=&quot;auto&quot;&gt;darwin/arm64&lt;/code&gt; and then creates a fat binary using
&lt;code dir=&quot;auto&quot;&gt;lipo&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;If compression is required, it compresses the binary with UPX&lt;/li&gt;
&lt;li&gt;Determines if this binary is to be packaged and if so:
&lt;ul&gt;
&lt;li&gt;Ensures the icon and application manifest are compiled into the binary
(Windows)&lt;/li&gt;
&lt;li&gt;Builds out the application bundle, generates the icon bundle and copies it,
the binary and Info.plist to the application bundle (Mac)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;If an NSIS installer is required, it builds it&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This entire process, whilst very powerful, is also very opaque. It is very
difficult to customise it and it is very difficult to debug.&lt;/p&gt;
&lt;p&gt;To address this in v3, I would like to move to a build system that exists
outside of Wails. After using &lt;a href=&quot;https://taskfile.dev/&quot;&gt;Task&lt;/a&gt; for a while, I am a
big fan of it. It is a great tool for configuring build systems and should be
reasonably familiar to anyone who has used Makefiles.&lt;/p&gt;
&lt;p&gt;The build system would be configured using a &lt;code dir=&quot;auto&quot;&gt;Taskfile.yml&lt;/code&gt; file which would be
generated by default with any of the supported templates. This would have all of
the steps required to do all the current tasks, such as building or packaging
the application, allowing for easy customisation.&lt;/p&gt;
&lt;p&gt;There will be no external requirement for this tooling as it would form part of
the Wails CLI. This means that you can still use &lt;code dir=&quot;auto&quot;&gt;wails build&lt;/code&gt; and it will do
all the things it does today. However, if you want to customise the build
process, you can do so by editing the &lt;code dir=&quot;auto&quot;&gt;Taskfile.yml&lt;/code&gt; file. It also means you can
easily understand the build steps and use your own build system if you wish.&lt;/p&gt;
&lt;p&gt;The missing piece in the build puzzle is the atomic operations in the build
process, such as icon generation, compression and packaging. To require a bunch
of external tooling would not be a great experience for the developer. To
address this, the Wails CLI will provide all these capabilities as part of the
CLI. This means that the builds still work as expected, with no extra external
tooling, however you can replace any step of the build with any tool you like.&lt;/p&gt;
&lt;p&gt;This will be a much more transparent build system which will allow for easier
customisation and address a lot of the issues that have been raised around it.&lt;/p&gt;
&lt;div&gt;&lt;h2 id=&quot;the-payoff&quot;&gt;The Payoff&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;These positive changes will be a huge benefit to the project:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The new API will be much more intuitive and will allow for more complex
applications to be built.&lt;/li&gt;
&lt;li&gt;Using static analysis for bindings generation will be much faster and reduce a
lot of the complexity around the current process.&lt;/li&gt;
&lt;li&gt;Using an established, external build system will make the build process
completely transparent, allowing for powerful customisation.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Benefits to the project maintainers are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The new API will be much easier to maintain and adapt to new features and
platforms.&lt;/li&gt;
&lt;li&gt;The new build system will be much easier to maintain and extend. I hope this
will lead to a new ecosystem of community driven build pipelines.&lt;/li&gt;
&lt;li&gt;Better separation of concerns within the project. This will make it easier to
add new features and platforms.&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;&lt;h2 id=&quot;the-plan&quot;&gt;The Plan&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;A lot of the experimentation for this has already been done and it’s looking
good. There is no current timeline for this work but I’m hoping by the end of Q1
2023, there will be an alpha release for Mac to allow the community to test,
experiment with and provide feedback.&lt;/p&gt;
&lt;div&gt;&lt;h2 id=&quot;summary&quot;&gt;Summary&lt;/h2&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;The v2 API is declarative, hides a lot from the developer and not suitable for
features such as multiple windows. A new API will be created which will be
simpler, intuitive and more powerful.&lt;/li&gt;
&lt;li&gt;The build system is opaque and difficult to customise so we will move to an
external build system which will open it all up.&lt;/li&gt;
&lt;li&gt;The bindings generation is slow and complex so we will move to static analysis
which will remove a lot of the complexity the current method has.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;There has been a lot of work put into the guts of v2 and it’s solid. It’s now
time to address the layer on top of it and make it a much better experience for
the developer.&lt;/p&gt;
&lt;p&gt;I hope you are as excited about this as I am. I’m looking forward to hearing
your thoughts and feedback.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;‐ Lea&lt;/p&gt;
&lt;p&gt;PS: If you or your company find Wails useful, please consider
&lt;a href=&quot;https://github.com/sponsors/leaanthony&quot;&gt;sponsoring the project&lt;/a&gt;. Thanks!&lt;/p&gt;
&lt;p&gt;PPS: Yes, that’s a genuine screenshot of a multi-window application built with
Wails. It’s not a mockup. It’s real. It’s awesome. It’s coming soon.&lt;/p&gt;</content:encoded><category>wails</category><category>v3</category></item><item><title>Wails v2 Released</title><link>https://v3.wails.io/blog/2022-09-22-v2-release-notes.md/</link><guid isPermaLink="true">https://v3.wails.io/blog/2022-09-22-v2-release-notes.md/</guid><pubDate>Thu, 22 Sep 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;starlight-image-zoom-zoomable&gt;&lt;img alt=&quot;montage screenshot&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;auto&quot; width=&quot;1600&quot; height=&quot;984&quot; src=&quot;https://v3.wails.io/_astro/montage.C8PycInQ_jr10r.webp&quot;&gt;&lt;button aria-label=&quot;Zoom image: montage screenshot&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; fill=&quot;currentColor&quot; viewBox=&quot;0 0 24 24&quot;&gt;&lt;use href=&quot;#starlight-image-zoom-icon-zoom&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/button&gt;&lt;/starlight-image-zoom-zoomable&gt;&lt;/p&gt;
&lt;div&gt;&lt;h1 id=&quot;its-here&quot;&gt;It’s here!&lt;/h1&gt;&lt;/div&gt;
&lt;p&gt;Today marks the release of &lt;a href=&quot;https://wails.io&quot;&gt;Wails&lt;/a&gt; v2. It’s been about 18
months since the first v2 alpha and about a year from the first beta release.
I’m truly grateful to everyone involved in the evolution of the project.&lt;/p&gt;
&lt;p&gt;Part of the reason it took that long was due to wanting to get to some
definition of completeness before officially calling it v2. The truth is,
there’s never a perfect time to tag a release - there’s always outstanding
issues or “just one more” feature to squeeze in. What tagging an imperfect major
release does do, however, is to provide a bit of stability for users of the
project, as well as a bit of a reset for the developers.&lt;/p&gt;
&lt;p&gt;This release is more than I’d ever expected it to be. I hope it gives you as
much pleasure as it has given us to develop it.&lt;/p&gt;
&lt;div&gt;&lt;h1 id=&quot;what-is-wails&quot;&gt;What &lt;em&gt;is&lt;/em&gt; Wails?&lt;/h1&gt;&lt;/div&gt;
&lt;p&gt;If you are unfamiliar with Wails, it is a project that enables Go programmers to
provide rich frontends for their Go programs using familiar web technologies.
It’s a lightweight, Go alternative to Electron. Much more information can be
found on the &lt;a href=&quot;https://wails.io/docs/introduction&quot;&gt;official site&lt;/a&gt;.&lt;/p&gt;
&lt;div&gt;&lt;h1 id=&quot;whats-new&quot;&gt;What’s new?&lt;/h1&gt;&lt;/div&gt;
&lt;p&gt;The v2 release is a huge leap forward for the project, addressing many of the
pain points of v1. If you have not read any of the blog posts on the Beta
releases for &lt;a href=&quot;https://v3.wails.io/blog/wails-v2-beta-for-mac&quot;&gt;macOS&lt;/a&gt;,
&lt;a href=&quot;https://v3.wails.io/blog/wails-v2-beta-for-windows&quot;&gt;Windows&lt;/a&gt; or
&lt;a href=&quot;https://v3.wails.io/blog/wails-v2-beta-for-linux&quot;&gt;Linux&lt;/a&gt;, then I encourage you to do so as it
covers all the major changes in more detail. In summary:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Webview2 component for Windows that supports modern web standards and
debugging capabilities.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://wails.io/docs/reference/options#theme&quot;&gt;Dark / Light theme&lt;/a&gt; +
&lt;a href=&quot;https://wails.io/docs/reference/options#customtheme&quot;&gt;custom theming&lt;/a&gt; on Windows.&lt;/li&gt;
&lt;li&gt;Windows now has no CGO requirements.&lt;/li&gt;
&lt;li&gt;Out-of-the-box support for Svelte, Vue, React, Preact, Lit &amp;#x26; Vanilla project
templates.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://vitejs.dev/&quot;&gt;Vite&lt;/a&gt; integration providing a hot-reload development
environment for your application.&lt;/li&gt;
&lt;li&gt;Native application
&lt;a href=&quot;https://wails.io/docs/guides/application-development#application-menu&quot;&gt;menus&lt;/a&gt; and
&lt;a href=&quot;https://wails.io/docs/reference/runtime/dialog&quot;&gt;dialogs&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Native window translucency effects for
&lt;a href=&quot;https://wails.io/docs/reference/options#windowistranslucent&quot;&gt;Windows&lt;/a&gt; and
&lt;a href=&quot;https://wails.io/docs/reference/options#windowistranslucent-1&quot;&gt;macOS&lt;/a&gt;. Support for Mica &amp;#x26;
Acrylic backdrops.&lt;/li&gt;
&lt;li&gt;Easily generate an &lt;a href=&quot;https://wails.io/docs/guides/windows-installer&quot;&gt;NSIS installer&lt;/a&gt; for
Windows deployments.&lt;/li&gt;
&lt;li&gt;A rich &lt;a href=&quot;https://wails.io/docs/reference/runtime/intro&quot;&gt;runtime library&lt;/a&gt; providing utility
methods for window manipulation, eventing, dialogs, menus and logging.&lt;/li&gt;
&lt;li&gt;Support for &lt;a href=&quot;https://wails.io/docs/guides/obfuscated&quot;&gt;obfuscating&lt;/a&gt; your application using
&lt;a href=&quot;https://github.com/burrowers/garble&quot;&gt;garble&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Support for compressing your application using &lt;a href=&quot;https://upx.github.io/&quot;&gt;UPX&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Automatic TypeScript generation of Go structs. More info
&lt;a href=&quot;https://wails.io/docs/howdoesitwork#calling-bound-go-methods&quot;&gt;here&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;No extra libraries or DLLs are required to be shipped with your application.
For any platform.&lt;/li&gt;
&lt;li&gt;No requirement to bundle frontend assets. Just develop your application like
any other web application.&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;&lt;h1 id=&quot;credit--thanks&quot;&gt;Credit &amp;#x26; Thanks&lt;/h1&gt;&lt;/div&gt;
&lt;p&gt;Getting to v2 has been a huge effort. There have been ~2.2K commits by 89
contributors between the initial alpha and the release today, and many, many
more that have provided translations, testing, feedback and help on the
discussion forums as well as the issue tracker. I’m so unbelievably grateful to
each one of you. I’d also like to give an extra special thank you to all the
project sponsors who have provided guidance, advice and feedback. Everything you
do is hugely appreciated.&lt;/p&gt;
&lt;p&gt;There are a few people I’d like to give special mention to:&lt;/p&gt;
&lt;p&gt;Firstly, a &lt;strong&gt;huge&lt;/strong&gt; thank you to &lt;a href=&quot;https://github.com/stffabi&quot;&gt;@stffabi&lt;/a&gt; who has
provided so many contributions which we all benefit from, as well as providing a
lot of support on many issues. He has provided some key features such as the
external dev server support which transformed our dev mode offering by allowing
us to hook into &lt;a href=&quot;https://vitejs.dev/&quot;&gt;Vite&lt;/a&gt;’s superpowers. It’s fair to say that
Wails v2 would be a far less exciting release without his
&lt;a href=&quot;https://github.com/wailsapp/wails/commits?author=stffabi&amp;#x26;since=2020-01-04&quot;&gt;incredible contributions&lt;/a&gt;.
Thank you so much @stffabi!&lt;/p&gt;
&lt;p&gt;I’d also like to give a huge shout-out to
&lt;a href=&quot;https://github.com/misitebao&quot;&gt;@misitebao&lt;/a&gt; who has tirelessly been maintaining
the website, as well as providing Chinese translations, managing Crowdin and
helping new translators get up to speed. This is a hugely important task, and
I’m extremely grateful for all the time and effort put into this! You rock!&lt;/p&gt;
&lt;p&gt;Last, but not least, a huge thank you to Mat Ryer who has provided advice and
support during the development of v2. Writing xBar together using an early Alpha
of v2 was helpful in shaping the direction of v2, as well as give me an
understanding of some design flaws in the early releases. I’m happy to announce
that as of today, we will start to port xBar to Wails v2, and it will become the
flagship application for the project. Cheers Mat!&lt;/p&gt;
&lt;div&gt;&lt;h1 id=&quot;lessons-learnt&quot;&gt;Lessons Learnt&lt;/h1&gt;&lt;/div&gt;
&lt;p&gt;There are a number of lessons learnt in getting to v2 that will shape
development moving forward.&lt;/p&gt;
&lt;div&gt;&lt;h2 id=&quot;smaller-quicker-focused-releases&quot;&gt;Smaller, Quicker, Focused Releases&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;In the course of developing v2, there were many features and bug fixes that were
developed on an ad-hoc basis. This led to longer release cycles and were harder
to debug. Moving forward, we are going to create releases more often that will
include a reduced number of features. A release will involve updates to
documentation as well as thorough testing. Hopefully, these smaller, quicker,
focussed releases will lead to fewer regressions and better quality
documentation.&lt;/p&gt;
&lt;div&gt;&lt;h2 id=&quot;encourage-engagement&quot;&gt;Encourage Engagement&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;When starting this project, I wanted to immediately help everyone who had a
problem. Issues were “personal” and I wanted them resolved as quickly as
possible. This is unsustainable and ultimately works against the longevity of
the project. Moving forward, I will be giving more space for people to get
involved in answering questions and triaging issues. It would be good to get
some tooling to help with this so if you have any suggestions, please join in
the discussion &lt;a href=&quot;https://github.com/wailsapp/wails/discussions/1855&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;div&gt;&lt;h2 id=&quot;learning-to-say-no&quot;&gt;Learning to say No&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;The more people that engage with an Open Source project, the more requests there
will be for additional features that may or may not be useful to the majority of
people. These features will take an initial amount of time to develop and debug,
and incur an ongoing maintenance cost from that point on. I myself am the most
guilty of this, often wanting to “boil the sea” rather than provide the minimum
viable feature. Moving forward, we will need to say “No” a bit more to adding
core features and focus our energies on a way to empower developers to provide
that functionality themselves. We are looking seriously into plugins for this
scenario. This will allow anyone to extend the project as they see fit, as well
as providing an easy way to contribute towards the project.&lt;/p&gt;
&lt;div&gt;&lt;h1 id=&quot;looking-to-the-future&quot;&gt;Looking to the Future&lt;/h1&gt;&lt;/div&gt;
&lt;p&gt;There are so many core features we are looking at to add to Wails in the next
major development cycle already. The
&lt;a href=&quot;https://github.com/wailsapp/wails/discussions/1484&quot;&gt;roadmap&lt;/a&gt; is full of
interesting ideas, and I’m keen to start work on them. One of the big asks has
been for multiple window support. It’s a tricky one and to do it right, and we
may need to look at providing an alternative API, as the current one was not
designed with this in mind. Based on some preliminary ideas and feedback, I
think you’ll like where we’re looking to go with it.&lt;/p&gt;
&lt;p&gt;I’m personally very excited at the prospect of getting Wails apps running on
mobile. We already have a demo project showing that it is possible to run a
Wails app on Android, so I’m really keen to explore where we can go with this!&lt;/p&gt;
&lt;p&gt;A final point I’d like to raise is that of feature parity. It has long been a
core principle that we wouldn’t add anything to the project without there being
full cross-platform support for it. Whilst this has proven to be (mainly)
achievable so far, it has really held the project back in releasing new
features. Moving forward, we will be adopting a slightly different approach: any
new feature that cannot be immediately released for all platforms will be
released under an experimental configuration or API. This allows early adopters
on certain platforms to try the feature and provide feedback that will feed into
the final design of the feature. This, of course, means that there are no
guarantees of API stability until it is fully supported by all the platforms it
can be supported on, but at least it will unblock development.&lt;/p&gt;
&lt;div&gt;&lt;h1 id=&quot;final-words&quot;&gt;Final Words&lt;/h1&gt;&lt;/div&gt;
&lt;p&gt;I’m really proud of what we’ve been able to achieve with the V2 release. It’s
amazing to see what people have already been able to build using the beta
releases so far. Quality applications like &lt;a href=&quot;https://varly.app/&quot;&gt;Varly&lt;/a&gt;,
&lt;a href=&quot;https://getsurge.io/&quot;&gt;Surge&lt;/a&gt; and &lt;a href=&quot;https://october.utf9k.net/&quot;&gt;October&lt;/a&gt;. I
encourage you to check them out.&lt;/p&gt;
&lt;p&gt;This release was achieved through the hard work of many contributors. Whilst it
is free to download and use, it has not come about through zero cost. Make no
mistakes, this project has come at considerable cost. It has not only been my
time and the time of each and every contributor, but also the cost of absence
from friends and families of each of those people too. That’s why I’m extremely
grateful for every second that has been dedicated to making this project happen.
The more contributors we have, the more this effort can be spread out and the
more we can achieve together. I’d like to encourage you all to pick one thing
that you can contribute, whether it is confirming someone’s bug, suggesting a
fix, making a documentation change or helping out someone who needs it. All of
these small things have such a huge impact! It would be so awesome if you too
were part of the story in getting to v3.&lt;/p&gt;
&lt;p&gt;Enjoy!&lt;/p&gt;
&lt;p&gt;‐ Lea&lt;/p&gt;
&lt;p&gt;PS: If you or your company find Wails useful, please consider
&lt;a href=&quot;https://github.com/sponsors/leaanthony&quot;&gt;sponsoring the project&lt;/a&gt;. Thanks!&lt;/p&gt;</content:encoded><category>wails</category><category>v2</category></item><item><title>Wails v2 Beta for Linux</title><link>https://v3.wails.io/blog/2022-02-22-v2-beta3-release-notes.md/</link><guid isPermaLink="true">https://v3.wails.io/blog/2022-02-22-v2-beta3-release-notes.md/</guid><pubDate>Tue, 22 Feb 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;starlight-image-zoom-zoomable&gt;&lt;img alt=&quot;wails-linux screenshot&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;auto&quot; width=&quot;727&quot; height=&quot;613&quot; src=&quot;https://v3.wails.io/_astro/wails-linux.B7JzX2qH_Z1Ft58j.webp&quot;&gt;&lt;button aria-label=&quot;Zoom image: wails-linux screenshot&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; fill=&quot;currentColor&quot; viewBox=&quot;0 0 24 24&quot;&gt;&lt;use href=&quot;#starlight-image-zoom-icon-zoom&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/button&gt;&lt;/starlight-image-zoom-zoomable&gt;&lt;/p&gt;
&lt;p&gt;I’m pleased to finally announce that Wails v2 is now in beta for Linux! It is
somewhat ironic that the very first experiments with v2 was on Linux and yet it
has ended up as the last release. That being said, the v2 we have today is very
different from those first experiments. So without further ado, let’s go over
the new features:&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;new-features&quot;&gt;New Features&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;&lt;starlight-image-zoom-zoomable&gt;&lt;img alt=&quot;wails-menus-linux screenshot&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;auto&quot; width=&quot;719&quot; height=&quot;607&quot; src=&quot;https://v3.wails.io/_astro/wails-menus-linux.DguBKf1w_nWfTM.webp&quot;&gt;&lt;button aria-label=&quot;Zoom image: wails-menus-linux screenshot&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; fill=&quot;currentColor&quot; viewBox=&quot;0 0 24 24&quot;&gt;&lt;use href=&quot;#starlight-image-zoom-icon-zoom&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/button&gt;&lt;/starlight-image-zoom-zoomable&gt;&lt;/p&gt;
&lt;p&gt;There were a lot of requests for native menu support. Wails has finally got you
covered. Application menus are now available and include support for most native
menu features. This includes standard menu items, checkboxes, radio groups,
submenus and separators.&lt;/p&gt;
&lt;p&gt;There were a huge number of requests in v1 for the ability to have greater
control of the window itself. I’m happy to announce that there’s new runtime
APIs specifically for this. It’s feature-rich and supports multi-monitor
configurations. There is also an improved dialogs API: Now, you can have modern,
native dialogs with rich configuration to cater for all your dialog needs.&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;no-requirement-to-bundle-assets&quot;&gt;No requirement to bundle assets&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;A huge pain-point of v1 was the need to condense your entire application down to
single JS &amp;#x26; CSS files. I’m happy to announce that for v2, there is no
requirement to bundle assets, in any way, shape or form. Want to load a local
image? Use an &lt;code dir=&quot;auto&quot;&gt;&amp;#x3C;../../../assets/blog-images&gt;&lt;/code&gt; tag with a local src path. Want to
use a cool font? Copy it in and add the path to it in your CSS.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Wow, that sounds like a webserver…&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Yes, it works just like a webserver, except it isn’t.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;So how do I include my assets?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;You just pass a single &lt;code dir=&quot;auto&quot;&gt;embed.FS&lt;/code&gt; that contains all your assets into your
application configuration. They don’t even need to be in the top directory -
Wails will just work it out for you.&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;new-development-experience&quot;&gt;New Development Experience&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;Now that assets don’t need to be bundled, it’s enabled a whole new development
experience. The new &lt;code dir=&quot;auto&quot;&gt;wails dev&lt;/code&gt; command will build and run your application, but
instead of using the assets in the &lt;code dir=&quot;auto&quot;&gt;embed.FS&lt;/code&gt;, it loads them directly from disk.&lt;/p&gt;
&lt;p&gt;It also provides the additional features:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Hot reload - Any changes to frontend assets will trigger an auto reload of the
application frontend&lt;/li&gt;
&lt;li&gt;Auto rebuild - Any changes to your Go code will rebuild and relaunch your
application&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In addition to this, a webserver will start on port 34115. This will serve your
application to any browser that connects to it. All connected web browsers will
respond to system events like hot reload on asset change.&lt;/p&gt;
&lt;p&gt;In Go, we are used to dealing with structs in our applications. It’s often
useful to send structs to our frontend and use them as state in our application.
In v1, this was a very manual process and a bit of a burden on the developer.
I’m happy to announce that in v2, any application run in dev mode will
automatically generate TypeScript models for all structs that are input or
output parameters to bound methods. This enables seamless interchange of data
models between the two worlds.&lt;/p&gt;
&lt;p&gt;In addition to this, another JS module is dynamically generated wrapping all
your bound methods. This provides JSDoc for your methods, providing code
completion and hinting in your IDE. It’s really cool when you get data models
auto-imported when hitting tab in an auto-generated module wrapping your Go
code!&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;remote-templates&quot;&gt;Remote Templates&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;&lt;starlight-image-zoom-zoomable&gt;&lt;img alt=&quot;remote-linux screenshot&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;auto&quot; width=&quot;972&quot; height=&quot;425&quot; src=&quot;https://v3.wails.io/_astro/remote-linux.Dbz_yhBP_ZOYJQa.webp&quot;&gt;&lt;button aria-label=&quot;Zoom image: remote-linux screenshot&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; fill=&quot;currentColor&quot; viewBox=&quot;0 0 24 24&quot;&gt;&lt;use href=&quot;#starlight-image-zoom-icon-zoom&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/button&gt;&lt;/starlight-image-zoom-zoomable&gt;&lt;/p&gt;
&lt;p&gt;Getting an application up and running quickly was always a key goal for the
Wails project. When we launched, we tried to cover a lot of the modern
frameworks at the time: react, vue and angular. The world of frontend
development is very opinionated, fast moving and hard to keep on top of! As a
result, we found our base templates getting out of date pretty quickly and this
caused a maintenance headache. It also meant that we didn’t have cool modern
templates for the latest and greatest tech stacks.&lt;/p&gt;
&lt;p&gt;With v2, I wanted to empower the community by giving you the ability to create
and host templates yourselves, rather than rely on the Wails project. So now you
can create projects using community supported templates! I hope this will
inspire developers to create a vibrant ecosystem of project templates. I’m
really quite excited about what our developer community can create!&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;cross-compilation-to-windows&quot;&gt;Cross Compilation to Windows&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;Because Wails v2 for Windows is pure Go, you can target Windows builds without
docker.&lt;/p&gt;
&lt;p&gt;&lt;starlight-image-zoom-zoomable&gt;&lt;img alt=&quot;build-cross-windows screenshot&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;auto&quot; width=&quot;877&quot; height=&quot;557&quot; src=&quot;https://v3.wails.io/_astro/linux-build-cross-windows.r9YNaMhc_Z23d8kN.webp&quot;&gt;&lt;button aria-label=&quot;Zoom image: build-cross-windows screenshot&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; fill=&quot;currentColor&quot; viewBox=&quot;0 0 24 24&quot;&gt;&lt;use href=&quot;#starlight-image-zoom-icon-zoom&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/button&gt;&lt;/starlight-image-zoom-zoomable&gt;&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;in-conclusion&quot;&gt;In Conclusion&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;As I’d said in the Windows release notes, Wails v2 represents a new foundation
for the project. The aim of this release is to get feedback on the new approach,
and to iron out any bugs before a full release. Your input would be most
welcome! Please direct any feedback to the
&lt;a href=&quot;https://github.com/wailsapp/wails/discussions/828&quot;&gt;v2 Beta&lt;/a&gt; discussion board.&lt;/p&gt;
&lt;p&gt;Linux is &lt;strong&gt;hard&lt;/strong&gt; to support. We expect there to be a number of quirks with the
beta. Please help us to help you by filing detailed bug reports!&lt;/p&gt;
&lt;p&gt;Finally, I’d like to give a special thank you to all the
&lt;a href=&quot;https://v3.wails.io/credits#sponsors&quot;&gt;project sponsors&lt;/a&gt; whose support drives the project in many
ways behind the scenes.&lt;/p&gt;
&lt;p&gt;I look forward to seeing what people build with Wails in this next exciting
phase of the project!&lt;/p&gt;
&lt;p&gt;Lea.&lt;/p&gt;
&lt;p&gt;PS: The v2 release isn’t far off now!&lt;/p&gt;
&lt;p&gt;PPS: If you or your company find Wails useful, please consider
&lt;a href=&quot;https://github.com/sponsors/leaanthony&quot;&gt;sponsoring the project&lt;/a&gt;. Thanks!&lt;/p&gt;</content:encoded><category>wails</category><category>v2</category></item><item><title>Wails v2 Beta for MacOS</title><link>https://v3.wails.io/blog/2021-11-08-v2-beta2-release-notes.md/</link><guid isPermaLink="true">https://v3.wails.io/blog/2021-11-08-v2-beta2-release-notes.md/</guid><pubDate>Mon, 08 Nov 2021 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;starlight-image-zoom-zoomable&gt;&lt;img alt=&quot;wails-mac screenshot&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;auto&quot; width=&quot;1024&quot; height=&quot;822&quot; src=&quot;https://v3.wails.io/_astro/wails-mac.BlEDenIK_ZhzjyX.webp&quot;&gt;&lt;button aria-label=&quot;Zoom image: wails-mac screenshot&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; fill=&quot;currentColor&quot; viewBox=&quot;0 0 24 24&quot;&gt;&lt;use href=&quot;#starlight-image-zoom-icon-zoom&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/button&gt;&lt;/starlight-image-zoom-zoomable&gt;&lt;/p&gt;
&lt;p&gt;Today marks the first beta release of Wails v2 for Mac! It’s taken quite a while
to get to this point and I’m hoping that today’s release will give you something
that’s reasonably useful. There have been a number of twists and turns to get to
this point and I’m hoping, with your help, to iron out the crinkles and get the
Mac port polished for the final v2 release.&lt;/p&gt;
&lt;p&gt;You mean this isn’t ready for production? For your use case, it may well be
ready, but there are still a number of known issues so keep your eye on
&lt;a href=&quot;https://github.com/wailsapp/wails/projects/7&quot;&gt;this project board&lt;/a&gt; and if you
would like to contribute, you’d be very welcome!&lt;/p&gt;
&lt;p&gt;So what’s new for Wails v2 for Mac vs v1? Hint: It’s pretty similar to the
Windows Beta :wink:&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;new-features&quot;&gt;New Features&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;&lt;starlight-image-zoom-zoomable&gt;&lt;img alt=&quot;wails-menus-mac screenshot&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;auto&quot; width=&quot;1024&quot; height=&quot;693&quot; src=&quot;https://v3.wails.io/_astro/wails-menus-mac.B75EsaZh_ZHeWIz.webp&quot;&gt;&lt;button aria-label=&quot;Zoom image: wails-menus-mac screenshot&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; fill=&quot;currentColor&quot; viewBox=&quot;0 0 24 24&quot;&gt;&lt;use href=&quot;#starlight-image-zoom-icon-zoom&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/button&gt;&lt;/starlight-image-zoom-zoomable&gt;&lt;/p&gt;
&lt;p&gt;There were a lot of requests for native menu support. Wails has finally got you
covered. Application menus are now available and include support for most native
menu features. This includes standard menu items, checkboxes, radio groups,
submenus and separators.&lt;/p&gt;
&lt;p&gt;There were a huge number of requests in v1 for the ability to have greater
control of the window itself. I’m happy to announce that there’s new runtime
APIs specifically for this. It’s feature-rich and supports multi-monitor
configurations. There is also an improved dialogs API: Now, you can have modern,
native dialogs with rich configuration to cater for all your dialog needs.&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;mac-specific-options&quot;&gt;Mac Specific Options&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;In addition to the normal application options, Wails v2 for Mac also brings some
Mac extras:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Make your window all funky and translucent, like all the pretty swift apps!&lt;/li&gt;
&lt;li&gt;Highly customisable titlebar&lt;/li&gt;
&lt;li&gt;We support the NSAppearance options for the application&lt;/li&gt;
&lt;li&gt;Simple config to auto-create an “About” menu&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;&lt;h3 id=&quot;no-requirement-to-bundle-assets&quot;&gt;No requirement to bundle assets&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;A huge pain-point of v1 was the need to condense your entire application down to
single JS &amp;#x26; CSS files. I’m happy to announce that for v2, there is no
requirement to bundle assets, in any way, shape or form. Want to load a local
image? Use an &lt;code dir=&quot;auto&quot;&gt;&amp;#x3C;img&gt;&lt;/code&gt; tag with a local src path. Want to use a cool font? Copy
it in and add the path to it in your CSS.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Wow, that sounds like a webserver…&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Yes, it works just like a webserver, except it isn’t.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;So how do I include my assets?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;You just pass a single &lt;code dir=&quot;auto&quot;&gt;embed.FS&lt;/code&gt; that contains all your assets into your
application configuration. They don’t even need to be in the top directory -
Wails will just work it out for you.&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;new-development-experience&quot;&gt;New Development Experience&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;Now that assets don’t need to be bundled, it’s enabled a whole new development
experience. The new &lt;code dir=&quot;auto&quot;&gt;wails dev&lt;/code&gt; command will build and run your application, but
instead of using the assets in the &lt;code dir=&quot;auto&quot;&gt;embed.FS&lt;/code&gt;, it loads them directly from disk.&lt;/p&gt;
&lt;p&gt;It also provides the additional features:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Hot reload - Any changes to frontend assets will trigger and auto reload of
the application frontend&lt;/li&gt;
&lt;li&gt;Auto rebuild - Any changes to your Go code will rebuild and relaunch your
application&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In addition to this, a webserver will start on port 34115. This will serve your
application to any browser that connects to it. All connected web browsers will
respond to system events like hot reload on asset change.&lt;/p&gt;
&lt;p&gt;In Go, we are used to dealing with structs in our applications. It’s often
useful to send structs to our frontend and use them as state in our application.
In v1, this was a very manual process and a bit of a burden on the developer.
I’m happy to announce that in v2, any application run in dev mode will
automatically generate TypeScript models for all structs that are input or
output parameters to bound methods. This enables seamless interchange of data
models between the two worlds.&lt;/p&gt;
&lt;p&gt;In addition to this, another JS module is dynamically generated wrapping all
your bound methods. This provides JSDoc for your methods, providing code
completion and hinting in your IDE. It’s really cool when you get data models
auto-imported when hitting tab in an auto-generated module wrapping your Go
code!&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;remote-templates&quot;&gt;Remote Templates&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;&lt;starlight-image-zoom-zoomable&gt;&lt;img alt=&quot;remote-mac screenshot&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;auto&quot; width=&quot;1024&quot; height=&quot;533&quot; src=&quot;https://v3.wails.io/_astro/remote-mac.Uj73kjQT_2mEGhQ.webp&quot;&gt;&lt;button aria-label=&quot;Zoom image: remote-mac screenshot&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; fill=&quot;currentColor&quot; viewBox=&quot;0 0 24 24&quot;&gt;&lt;use href=&quot;#starlight-image-zoom-icon-zoom&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/button&gt;&lt;/starlight-image-zoom-zoomable&gt;&lt;/p&gt;
&lt;p&gt;Getting an application up and running quickly was always a key goal for the
Wails project. When we launched, we tried to cover a lot of the modern
frameworks at the time: react, vue and angular. The world of frontend
development is very opinionated, fast moving and hard to keep on top of! As a
result, we found our base templates getting out of date pretty quickly and this
caused a maintenance headache. It also meant that we didn’t have cool modern
templates for the latest and greatest tech stacks.&lt;/p&gt;
&lt;p&gt;With v2, I wanted to empower the community by giving you the ability to create
and host templates yourselves, rather than rely on the Wails project. So now you
can create projects using community supported templates! I hope this will
inspire developers to create a vibrant ecosystem of project templates. I’m
really quite excited about what our developer community can create!&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;native-m1-support&quot;&gt;Native M1 Support&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;Thanks to the amazing support of &lt;a href=&quot;https://github.com/matryer/&quot;&gt;Mat Ryer&lt;/a&gt;, the
Wails project now supports M1 native builds:&lt;/p&gt;
&lt;p&gt;&lt;starlight-image-zoom-zoomable&gt;&lt;img alt=&quot;build-darwin-arm screenshot&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;auto&quot; width=&quot;1776&quot; height=&quot;1094&quot; src=&quot;https://v3.wails.io/_astro/build-darwin-arm.B5DEDCzx_aClAz.webp&quot;&gt;&lt;button aria-label=&quot;Zoom image: build-darwin-arm screenshot&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; fill=&quot;currentColor&quot; viewBox=&quot;0 0 24 24&quot;&gt;&lt;use href=&quot;#starlight-image-zoom-icon-zoom&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/button&gt;&lt;/starlight-image-zoom-zoomable&gt;&lt;/p&gt;
&lt;p&gt;You can also specify &lt;code dir=&quot;auto&quot;&gt;darwin/amd64&lt;/code&gt; as a target too:&lt;/p&gt;
&lt;p&gt;&lt;starlight-image-zoom-zoomable&gt;&lt;img alt=&quot;build-darwin-amd screenshot&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;auto&quot; width=&quot;1778&quot; height=&quot;1090&quot; src=&quot;https://v3.wails.io/_astro/build-darwin-amd.DSM082Wq_Z1WwWg2.webp&quot;&gt;&lt;button aria-label=&quot;Zoom image: build-darwin-amd screenshot&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; fill=&quot;currentColor&quot; viewBox=&quot;0 0 24 24&quot;&gt;&lt;use href=&quot;#starlight-image-zoom-icon-zoom&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/button&gt;&lt;/starlight-image-zoom-zoomable&gt;&lt;/p&gt;
&lt;p&gt;Oh, I almost forgot… you can also do &lt;code dir=&quot;auto&quot;&gt;darwin/universal&lt;/code&gt;… :wink:&lt;/p&gt;
&lt;p&gt;&lt;starlight-image-zoom-zoomable&gt;&lt;img alt=&quot;build-darwin-universal screenshot&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;auto&quot; width=&quot;1748&quot; height=&quot;1192&quot; src=&quot;https://v3.wails.io/_astro/build-darwin-universal.DbwmCna4_Z2iLh9X.webp&quot;&gt;&lt;button aria-label=&quot;Zoom image: build-darwin-universal screenshot&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; fill=&quot;currentColor&quot; viewBox=&quot;0 0 24 24&quot;&gt;&lt;use href=&quot;#starlight-image-zoom-icon-zoom&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/button&gt;&lt;/starlight-image-zoom-zoomable&gt;&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;cross-compilation-to-windows&quot;&gt;Cross Compilation to Windows&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;Because Wails v2 for Windows is pure Go, you can target Windows builds without
docker.&lt;/p&gt;
&lt;p&gt;&lt;starlight-image-zoom-zoomable&gt;&lt;img alt=&quot;build-cross-windows screenshot&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;auto&quot; width=&quot;1748&quot; height=&quot;1192&quot; src=&quot;https://v3.wails.io/_astro/build-cross-windows.B-eoqoZl_VKaN2.webp&quot;&gt;&lt;button aria-label=&quot;Zoom image: build-cross-windows screenshot&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; fill=&quot;currentColor&quot; viewBox=&quot;0 0 24 24&quot;&gt;&lt;use href=&quot;#starlight-image-zoom-icon-zoom&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/button&gt;&lt;/starlight-image-zoom-zoomable&gt;
bu&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;wkwebview-renderer&quot;&gt;WKWebView Renderer&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;V1 relied on a (now deprecated) WebView component. V2 uses the most recent
WKWebKit component so expect the latest and greatest from Apple.&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;in-conclusion&quot;&gt;In Conclusion&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;As I’d said in the Windows release notes, Wails v2 represents a new foundation
for the project. The aim of this release is to get feedback on the new approach,
and to iron out any bugs before a full release. Your input would be most
welcome! Please direct any feedback to the
&lt;a href=&quot;https://github.com/wailsapp/wails/discussions/828&quot;&gt;v2 Beta&lt;/a&gt; discussion board.&lt;/p&gt;
&lt;p&gt;And finally, I’d like to give a special thank you to all the
&lt;a href=&quot;https://v3.wails.io/credits#sponsors&quot;&gt;project sponsors&lt;/a&gt;, including
&lt;a href=&quot;https://www.jetbrains.com?from=Wails&quot;&gt;JetBrains&lt;/a&gt;, whose support drive the
project in many ways behind the scenes.&lt;/p&gt;
&lt;p&gt;I look forward to seeing what people build with Wails in this next exciting
phase of the project!&lt;/p&gt;
&lt;p&gt;Lea.&lt;/p&gt;
&lt;p&gt;PS: Linux users, you’re next!&lt;/p&gt;
&lt;p&gt;PPS: If you or your company find Wails useful, please consider
&lt;a href=&quot;https://github.com/sponsors/leaanthony&quot;&gt;sponsoring the project&lt;/a&gt;. Thanks!&lt;/p&gt;</content:encoded><category>wails</category><category>v2</category></item><item><title>Wails v2 Beta for Windows</title><link>https://v3.wails.io/blog/2021-09-27-v2-beta1-release-notes.md/</link><guid isPermaLink="true">https://v3.wails.io/blog/2021-09-27-v2-beta1-release-notes.md/</guid><pubDate>Mon, 27 Sep 2021 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;starlight-image-zoom-zoomable&gt;&lt;img alt=&quot;wails screenshot&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;auto&quot; width=&quot;836&quot; height=&quot;687&quot; src=&quot;https://v3.wails.io/_astro/wails.CDgJqw_F_Z1Q80WA.webp&quot;&gt;&lt;button aria-label=&quot;Zoom image: wails screenshot&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; fill=&quot;currentColor&quot; viewBox=&quot;0 0 24 24&quot;&gt;&lt;use href=&quot;#starlight-image-zoom-icon-zoom&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/button&gt;&lt;/starlight-image-zoom-zoomable&gt;&lt;/p&gt;
&lt;p&gt;When I first announced Wails on Reddit, just over 2 years ago from a train in
Sydney, I did not expect it to get much attention. A few days later, a prolific
tech vlogger released a tutorial video, gave it a positive review and from that
point on, interest in the project has skyrocketed.&lt;/p&gt;
&lt;p&gt;It was clear that people were excited about adding web frontends to their Go
projects, and almost immediately pushed the project beyond the proof of concept
that I had created. At the time, Wails used the
&lt;a href=&quot;https://github.com/webview/webview&quot;&gt;webview&lt;/a&gt; project to handle the frontend,
and the only option for Windows was the IE11 renderer. Many bug reports were
rooted in this limitation: poor JavaScript/CSS support and no dev tools to debug
it. This was a frustrating development experience but there wasn’t much that
could have been done to rectify it.&lt;/p&gt;
&lt;p&gt;For a long time, I’d firmly believed that Microsoft would eventually have to
sort out their browser situation. The world was moving on, frontend development
was booming and IE wasn’t cutting it. When Microsoft announced the move to using
Chromium as the basis for their new browser direction, I knew it was only a
matter of time until Wails could use it, and move the Windows developer
experience to the next level.&lt;/p&gt;
&lt;p&gt;Today, I am pleased to announce: &lt;strong&gt;Wails v2 Beta for Windows&lt;/strong&gt;! There’s a huge
amount to unpack in this release, so grab a drink, take a seat and we’ll
begin…&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;no-cgo-dependency&quot;&gt;No CGO Dependency!&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;No, I’m not joking: &lt;em&gt;No&lt;/em&gt; &lt;em&gt;CGO&lt;/em&gt; &lt;em&gt;dependency&lt;/em&gt; 🤯! The thing about Windows is that,
unlike MacOS and Linux, it doesn’t come with a default compiler. In addition,
CGO requires a mingw compiler and there’s a ton of different installation
options. Removing the CGO requirement has massively simplified setup, as well as
making debugging an awful lot easier. Whilst I have put a fair bit of effort in
getting this working, the majority of the credit should go to
&lt;a href=&quot;https://github.com/jchv&quot;&gt;John Chadwick&lt;/a&gt; for not only starting a couple of
projects to make this possible, but also being open to someone taking those
projects and building on them. Credit also to
&lt;a href=&quot;https://github.com/tadvi&quot;&gt;Tad Vizbaras&lt;/a&gt; whose
&lt;a href=&quot;https://github.com/tadvi/winc&quot;&gt;winc&lt;/a&gt; project started me down this path.&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;webview2-chromium-renderer&quot;&gt;WebView2 Chromium Renderer&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;&lt;starlight-image-zoom-zoomable&gt;&lt;img alt=&quot;devtools screenshot&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;auto&quot; width=&quot;1691&quot; height=&quot;656&quot; src=&quot;https://v3.wails.io/_astro/devtools.C7MMlcMs_28gPgw.webp&quot;&gt;&lt;button aria-label=&quot;Zoom image: devtools screenshot&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; fill=&quot;currentColor&quot; viewBox=&quot;0 0 24 24&quot;&gt;&lt;use href=&quot;#starlight-image-zoom-icon-zoom&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/button&gt;&lt;/starlight-image-zoom-zoomable&gt;&lt;/p&gt;
&lt;p&gt;Finally, Windows developers get a first class rendering engine for their
applications! Gone are the days of contorting your frontend code to work on
Windows. On top of that, you get a first-class developer tools experience!&lt;/p&gt;
&lt;p&gt;The WebView2 component does, however, have a requirement to have the
&lt;code dir=&quot;auto&quot;&gt;WebView2Loader.dll&lt;/code&gt; sitting alongside the binary. This makes distribution just
that little bit more painful than we gophers are used to. All solutions and
libraries (that I know of) that use WebView2 have this dependency.&lt;/p&gt;
&lt;p&gt;However, I’m really excited to announce that Wails applications &lt;em&gt;have no such
requirement&lt;/em&gt;! Thanks to the wizardry of
&lt;a href=&quot;https://github.com/jchv&quot;&gt;John Chadwick&lt;/a&gt;, we are able to bundle this dll inside
the binary and get Windows to load it as if it were present on disk.&lt;/p&gt;
&lt;p&gt;Gophers rejoice! The single binary dream lives on!&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;new-features&quot;&gt;New Features&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;&lt;starlight-image-zoom-zoomable&gt;&lt;img alt=&quot;wails-menus screenshot&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;auto&quot; width=&quot;1432&quot; height=&quot;966&quot; src=&quot;https://v3.wails.io/_astro/wails-menus.CxgjfHvb_Z2fKPvm.webp&quot;&gt;&lt;button aria-label=&quot;Zoom image: wails-menus screenshot&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; fill=&quot;currentColor&quot; viewBox=&quot;0 0 24 24&quot;&gt;&lt;use href=&quot;#starlight-image-zoom-icon-zoom&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/button&gt;&lt;/starlight-image-zoom-zoomable&gt;&lt;/p&gt;
&lt;p&gt;There were a lot of requests for native menu support. Wails has finally got you
covered. Application menus are now available and include support for most native
menu features. This includes standard menu items, checkboxes, radio groups,
submenus and separators.&lt;/p&gt;
&lt;p&gt;There were a huge number of requests in v1 for the ability to have greater
control of the window itself. I’m happy to announce that there’s new runtime
APIs specifically for this. It’s feature-rich and supports multi-monitor
configurations. There is also an improved dialogs API: Now, you can have modern,
native dialogs with rich configuration to cater for all your dialog needs.&lt;/p&gt;
&lt;p&gt;There is now the option to generate IDE configuration along with your project.
This means that if you open your project in a supported IDE, it will already be
configured for building and debugging your application. Currently VSCode is
supported but we hope to support other IDEs such as Goland soon.&lt;/p&gt;
&lt;p&gt;&lt;starlight-image-zoom-zoomable&gt;&lt;img alt=&quot;vscode screenshot&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;auto&quot; width=&quot;1024&quot; height=&quot;412&quot; src=&quot;https://v3.wails.io/_astro/vscode.mi9D5S2a_2bYpKW.webp&quot;&gt;&lt;button aria-label=&quot;Zoom image: vscode screenshot&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; fill=&quot;currentColor&quot; viewBox=&quot;0 0 24 24&quot;&gt;&lt;use href=&quot;#starlight-image-zoom-icon-zoom&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/button&gt;&lt;/starlight-image-zoom-zoomable&gt;&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;no-requirement-to-bundle-assets&quot;&gt;No requirement to bundle assets&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;A huge pain-point of v1 was the need to condense your entire application down to
single JS &amp;#x26; CSS files. I’m happy to announce that for v2, there is no
requirement to bundle assets, in any way, shape or form. Want to load a local
image? Use an &lt;code dir=&quot;auto&quot;&gt;&amp;#x3C;img&gt;&lt;/code&gt; tag with a local src path. Want to use a cool font? Copy
it in and add the path to it in your CSS.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Wow, that sounds like a webserver…&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Yes, it works just like a webserver, except it isn’t.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;So how do I include my assets?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;You just pass a single &lt;code dir=&quot;auto&quot;&gt;embed.FS&lt;/code&gt; that contains all your assets into your
application configuration. They don’t even need to be in the top directory -
Wails will just work it out for you.&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;new-development-experience&quot;&gt;New Development Experience&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;&lt;starlight-image-zoom-zoomable&gt;&lt;img alt=&quot;browser screenshot&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;auto&quot; width=&quot;1568&quot; height=&quot;705&quot; src=&quot;https://v3.wails.io/_astro/browser.BWnFGTeO_ZexAmb.webp&quot;&gt;&lt;button aria-label=&quot;Zoom image: browser screenshot&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; fill=&quot;currentColor&quot; viewBox=&quot;0 0 24 24&quot;&gt;&lt;use href=&quot;#starlight-image-zoom-icon-zoom&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/button&gt;&lt;/starlight-image-zoom-zoomable&gt;&lt;/p&gt;
&lt;p&gt;Now that assets don’t need to be bundled, it’s enabled a whole new development
experience. The new &lt;code dir=&quot;auto&quot;&gt;wails dev&lt;/code&gt; command will build and run your application, but
instead of using the assets in the &lt;code dir=&quot;auto&quot;&gt;embed.FS&lt;/code&gt;, it loads them directly from disk.&lt;/p&gt;
&lt;p&gt;It also provides the additional features:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Hot reload - Any changes to frontend assets will trigger and auto reload of
the application frontend&lt;/li&gt;
&lt;li&gt;Auto rebuild - Any changes to your Go code will rebuild and relaunch your
application&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In addition to this, a webserver will start on port 34115. This will serve your
application to any browser that connects to it. All connected web browsers will
respond to system events like hot reload on asset change.&lt;/p&gt;
&lt;p&gt;In Go, we are used to dealing with structs in our applications. It’s often
useful to send structs to our frontend and use them as state in our application.
In v1, this was a very manual process and a bit of a burden on the developer.
I’m happy to announce that in v2, any application run in dev mode will
automatically generate TypeScript models for all structs that are input or
output parameters to bound methods. This enables seamless interchange of data
models between the two worlds.&lt;/p&gt;
&lt;p&gt;In addition to this, another JS module is dynamically generated wrapping all
your bound methods. This provides JSDoc for your methods, providing code
completion and hinting in your IDE. It’s really cool when you get data models
auto-imported when hitting tab in an auto-generated module wrapping your Go
code!&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;remote-templates&quot;&gt;Remote Templates&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;&lt;starlight-image-zoom-zoomable&gt;&lt;img alt=&quot;remote screenshot&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;auto&quot; width=&quot;800&quot; height=&quot;394&quot; src=&quot;https://v3.wails.io/_astro/remote.DC2XnSc7_BwlDL.webp&quot;&gt;&lt;button aria-label=&quot;Zoom image: remote screenshot&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; fill=&quot;currentColor&quot; viewBox=&quot;0 0 24 24&quot;&gt;&lt;use href=&quot;#starlight-image-zoom-icon-zoom&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/button&gt;&lt;/starlight-image-zoom-zoomable&gt;&lt;/p&gt;
&lt;p&gt;Getting an application up and running quickly was always a key goal for the
Wails project. When we launched, we tried to cover a lot of the modern
frameworks at the time: react, vue and angular. The world of frontend
development is very opinionated, fast moving and hard to keep on top of! As a
result, we found our base templates getting out of date pretty quickly and this
caused a maintenance headache. It also meant that we didn’t have cool modern
templates for the latest and greatest tech stacks.&lt;/p&gt;
&lt;p&gt;With v2, I wanted to empower the community by giving you the ability to create
and host templates yourselves, rather than rely on the Wails project. So now you
can create projects using community supported templates! I hope this will
inspire developers to create a vibrant ecosystem of project templates. I’m
really quite excited about what our developer community can create!&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;in-conclusion&quot;&gt;In Conclusion&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;Wails v2 represents a new foundation for the project. The aim of this release is
to get feedback on the new approach, and to iron out any bugs before a full
release. Your input would be most welcome. Please direct any feedback to the
&lt;a href=&quot;https://github.com/wailsapp/wails/discussions/828&quot;&gt;v2 Beta&lt;/a&gt; discussion board.&lt;/p&gt;
&lt;p&gt;There were many twists and turns, pivots and u-turns to get to this point. This
was due partly to early technical decisions that needed changing, and partly
because some core problems we had spent time building workarounds for were fixed
upstream: Go’s embed feature is a good example. Fortunately, everything came
together at the right time, and today we have the very best solution that we can
have. I believe the wait has been worth it - this would not have been possible
even 2 months ago.&lt;/p&gt;
&lt;p&gt;I also need to give a huge thank you :pray: to the following people because
without them, this release just wouldn’t exist:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/misitebao&quot;&gt;Misite Bao&lt;/a&gt; - An absolute workhorse on the
Chinese translations and an incredible bug finder.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/jchv&quot;&gt;John Chadwick&lt;/a&gt; - His amazing work on
&lt;a href=&quot;https://github.com/jchv/go-webview2&quot;&gt;go-webview2&lt;/a&gt; and
&lt;a href=&quot;https://github.com/jchv/go-winloader&quot;&gt;go-winloader&lt;/a&gt; have made the Windows
version we have today possible.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/tadvi&quot;&gt;Tad Vizbaras&lt;/a&gt; - Experimenting with his
&lt;a href=&quot;https://github.com/tadvi/winc&quot;&gt;winc&lt;/a&gt; project was the first step down the path
to a pure Go Wails.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/matryer&quot;&gt;Mat Ryer&lt;/a&gt; - His support, encouragement and
feedback has really helped drive the project forward.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And finally, I’d like to give a special thank you to all the
&lt;a href=&quot;https://v3.wails.io/credits#sponsors&quot;&gt;project sponsors&lt;/a&gt;, including
&lt;a href=&quot;https://www.jetbrains.com?from=Wails&quot;&gt;JetBrains&lt;/a&gt;, whose support drives the
project in many ways behind the scenes.&lt;/p&gt;
&lt;p&gt;I look forward to seeing what people build with Wails in this next exciting
phase of the project!&lt;/p&gt;
&lt;p&gt;Lea.&lt;/p&gt;
&lt;p&gt;PS: MacOS and Linux users need not feel left out - porting to this new
foundation is actively under way and most of the hard work has already been
done. Hang in there!&lt;/p&gt;
&lt;p&gt;PPS: If you or your company find Wails useful, please consider
&lt;a href=&quot;https://github.com/sponsors/leaanthony&quot;&gt;sponsoring the project&lt;/a&gt;. Thanks!&lt;/p&gt;</content:encoded><category>wails</category><category>v2</category></item></channel></rss>