[package]
Package directive controls the packaging properties of the redistributable.
-
archive
- ZIP archive format. Currenly onlyDEFLATE
andSTORE
formats are supported. Cargo NW supportsBZIP2
andZSTD
, unfortunately target operating systems do not alwasy support these formats and they should not be used. -
signatures
- when set totrue
this will generate.sha256sum
files containing SHA256 hash of the resulting file. This can be used to fingerprint and validate the validity of the downloadable file. Beware - this is a superficial validation and does not protect you from malicious activity. For proper validation of redistributables you should use GPG key signing. -
source
- the source folder of the project relative to thenw.toml
manifest. -
build
- The build directive supports two objects:WASM
andNPM
.WASM
will runwasmpack
on the root folder before the integration process begins.NPM
will runnpm install --omit dev
on the root folder before the integration process begins.
-
resources
- location of setup resources (icon files) relative to the location of the manifest file. By default this folder isresources/setup
-
include
- include filters allowing glob or regex selection of the files that should be copied from the application root folder into the redistributable. By default, all files are included. -
exclude
- exclusion filter allowing glob or regex filtering of the files being copied to the redistributable application folder. In a typical configuration these should be set to exclude all folders that should be be a part of your redistributable, for exampleexclude = { glob = ["{bin/*,src/*,target/*,test/*,*.lock,*.toml,.git*}"]}
If needed, you can specify multiple glob and regex entries that will be combined during the filtering process.