--- title: Frontend Runtime description: The Wails JavaScript runtime package for frontend integration sidebar: order: 1 --- The Wails frontend runtime is the standard library for Wails applications. It provides a number of features that may be used in your applications, including: - Window management - Dialogs - Browser integration - Clipboard - Menus - System information - Events - Context Menus - Screens - WML (Wails Markup Language) The runtime is required for integration between Go and the frontend. There are 2 ways to integrate the runtime: - Using the `@wailsio/runtime` package - Using a pre-built bundle ## Using the npm package The `@wailsio/runtime` package is a JavaScript package that provides access to the Wails runtime from the frontend. It is used by all standard templates and is the recommended way to integrate the runtime into your application. By using the `@wailsio/runtime` package, you will only include the parts of the runtime that you use. The package is available on npm and can be installed using: ```shell npm install --save @wailsio/runtime ``` ## Using a pre-built bundle Some projects will not use a Javascript bundler and may prefer to use a pre-built bundled version of the runtime. This version can be generated locally using the following command: ```shell wails3 generate runtime ``` The command will output a `runtime.js` (and `runtime.debug.js`) file in the current directory. This file is an ES module that can be imported by your application scripts just like the npm package, but the API is also exported to the global window object, so for simpler applications you can use it as follows: ```html
``` :::caution It is important to include the `type="module"` attribute on the `