Manifest File Format
cargo-nw
manifest file uses TOML configuration file format. By default, cargo-nw
searches for nw.toml
file in the current directory, however, you can specify an alternate file by specifying relative path or a path with a filename only. i.e. cargo nw app-lite build all
(will use app-lite.toml
file) or cargo nw ../build/app-full build all
(will use ../build/app-full.toml
file)
Most of the values specified in the manifest (except in the application section and script contents) can use internal variables that use $ prefix with the variable name in upper case (i.e. "$SOMEVAR"). For example:
[application]
...
version = "1.2.3"
title = "App Lite"
...
[windows]
resources = [{ ProductName = "$TITLE $VERSION" }]
There are two sections that can be present multiple times in the manifest: [[action]]
and [[dependency]]
. Sections that can be present multiple times are denoted by double brackets. These sections are processed in the order specified in the manifest.
The manifest contains the following sections:
- [application] - application options
- [description] - application description
- [package] - integration options
- [node-webkit] - node-webkit options (redistributable version etc.)
- [[action]] - optional - integration actions
- [[dependency]] - optional - dependency build options
- [macos-disk-image] - optional - (MacOS) - DMG Finder window layout.
- [windows] - optional - windows specific options
- [images] - optional - image filename overrides
- [languages] - optional - (InnoSetup) - installer languages
- [firewall] - optional - (InnoSetup) - firewall rules for your application (should be present if your application makes network requests)
- [snap] - optional - (Snap) - Snap configuration properties.