Installation is as simple as running the following command (Go 1.17+):
go install github.com/wailsapp/wails/cmd/[email protected]
or if using Go 1.16:
go get -u github.com/wailsapp/wails/cmd/wails
Once installed, the wails update
command may be used for subsequent updates.
To get the latest pre-release with bleeding-edge features the -pre
flag can be appended wails update -pre
.
To finish the installation setup your Wails system by running the setup command wails setup
and filling your handle and email.
Generate a new project using the init command wails init
.
Select the default options.
Change into the project directory cd my-project
and compile your application using the build command wails build
.
If all went well, you should have a compiled program in the build directory. Run it with build/my-project
or double click myproject.exe
if on windows.
wails serve
While developing your apps using wails the preferred method is by the serve command wails serve
.
This produces a much faster lightweight build in debug mode, excluding npm
build scripts, saving time when developing the backend and also enabling use of npm run serve
for partial browser development of frontend!
npm run serve
Change into the frontend directory cd my-project/frontend
and serve your GUI using npm run serve
.
If you would like to start making an app right away, we suggest you explore Wails via our awesome tutorials. If you would prefer to get to know Wails a little better before building anything, we suggest having a look through the concepts. Finally if you are advanced user and would like to get right in to it head over to the API reference & Cli reference sections.