Wails - Learn Desktop Application Development
This handbook is the result of my (ongoing) research on building cross-platform desktop applications using Wails and GoLang, combined with web technologies for creating the frontend UI/UX.
I’m planning to build something similar as shown below:
Key Features:
- Curved Edge Window Support: Design windows with aesthetically pleasing curved edges.
- This is not possible in Unix based OS yet.
- Complex Computation Support: Implement features like:
- Generating Fibonacci numbers for a given index.
- Calculating square roots (√) and squares of numbers.
- These will showcase the interaction between the webview frontend and the Go backend, highlighting the communication layer.
- Expression Tree Evaluation: Utilize a tree structure to parse and evaluate mathematical expressions.
Chapters
Svelte, Vite & Wails Project Setup
This chapter explains how to set up Wails for building desktop applications using Vite and SvelteKit.
Launch WebviewWindow
Learn about Wails WebviewWindow, its configurations, and how Wails manages this window using Go and runtime APIs. In this chapter, we will set up layout for our calculator app to serve as the foundation for visualizing our app and future enhancements.
Calculator Service in Go
In this chapter, we’ll explore how to communicate with the Wails backend using Services.
We’ll create a minimal calculator service in our Go backend, capable of interpreting basic mathematical tokens, constructing an expression tree, and evaluating it to compute the final result.
Communication in Webviews
We discussed briefly about Rendering Engines and JS runtimes in our previous chapter. Here we will discuss how Wails integrates Webviews and communicates with them to send/receive data.