Wails v0.18.2

This version brings new functionality to the Event subsystem.

A huge thank you to everyone that was involved in this release!

Even more Linux!

We’ve been busy on the Linux front and now have support for:

  • Linux Mint
  • KDE Neon
  • Elementary
  • Kali Linux
  • Parrot
  • Zorin
  • Void Linux
  • Manjaro Linux (re-enabled)

Plus better support for existing distributions:

  • Fedora
  • CentOS
  • Debian
  • Arch
  • Gentoo

Refactored Runtime

The Javascript part of the runtime has been refactored to bring in some improvements. It has been assembled as a standard node module that may now be imported by frontend code to get access to the runtime methods.

  1. import Wails from '@wailsapp/runtime';
  2. Wails.Events.On('myevent', () => {
  3. // etc
  4. })

This is going to allow us to improve the runtime with minimal impact on application code.

Method deprecation (renaming)

The original, lower cased methods for the JS runtime have been deprecated. The driver for this has been to unify the Go and JS runtime signatures. The new methods are the same as the old ones, just capitalised.

Event Updates

This release sees a huge refactor of the runtime to improve maintainability and testability. With it come a number of new methods which are designed to simplify coordination between the frontend and backend. For the time being, these are only available in the JS runtime.

OnMultiple

Events.OnMultiple(eventName, callback, maxCallbacks)

Registers a listener that will call callback a maximum of maxCallbacks times. After this time, the listener will be removed.

Once

Events.Once(eventName, callback)

Registers a listener that will be destroyed after being notified once. Shorthand for Events.OnMultiple(eventName, callback, 1).

Heartbeat

Events.Heartbeat(eventName, timeInMilliseconds, callback)

Heartbeat will emit eventName every timeInMilliseconds until it is acknowledged by Event.Acknowledged. When that happens, callback is invoked.

Acknowledge

Events.Acknowledge(eventName)

Acknowledge will acknowledge the heartbeat event eventName.

Binding updates

It’s now possible to bind Go methods with zero return types correctly. This will return an undefined in the promise callback.

Misc Updates

  • wails issue now includes npm, gcc and node versions. Thanks Byron!
  • wails issue now also relies on /etc/os-release in Linux for system information, replacing the requirement for lsb. Thanks Nikolai Zimmermann!
  • React template now working on Windows
  • Angular template still NOT working for Windows

We will be spending the next month improving documentation and bug fixing. Please let us know what bugs you find in v0.18.2 and we will look at them with the highest priority!

We hope you enjoy the final v0.* release! See you at v1.0.0!