
# Windows

This page has miscellaneous guides related to developing Wails applications for Windows.

## Handling the WebView2 Runtime Dependency

Wails applications built for Windows have a runtime requirement on the Microsoft [WebView2 Runtime](https://developer.microsoft.com/en-us/microsoft-edge/webview2/).
Windows 11 will have this installed by default, but some machines won't. Wails offers an easy approach to dealing with this dependency.

By using the `-webview2` flag when building, you can decide what your application will do when a suitable runtime is not detected (including if the installed runtime is too old).
The four options are:

1. Download
2. Embed
3. Browser
4. Error

### Download

This option will prompt the user that no suitable runtime has been found and then offer to download and run the official
bootstrapper from Microsoft's WebView2 site. If the user proceeds, the official bootstrapper will be downloaded and run.

### Embed

This option embeds the official bootstrapper within the application. If no suitable runtime has been found, the
application will offer to run the bootstrapper. This adds ~150k to the binary size.

### Browser

This option will prompt the user that no suitable runtime has been found and then offer to open a browser to the official
WebView2 page where the bootstrapper can be downloaded and installed. The application will then exit, leaving the installation
up to the user.

### Error

If no suitable runtime is found, an error is given to the user and no further action taken.
