Configuration Reference
The following fields exist and can be configured:
features
- Type: array of strings
- Default: none
- Note: Which features to use.
default-features
- Type: boolean
- Default: true
- Note: Whether or not to use the default-features.
target
- Type: string
- Default: your host target triple for native builds,
wasm32-unknown-unknownfor web builds - Note: To get a list of supported targets, run
rustc --print target-list.
rustflags
- Type: string or array of strings
- Default: none
- Note: Extra command-line flags to pass to
rustc. The value may be an array of strings or a space-separated string. Flags defined in theRUSTFLAGSenvironmental variable or.cargo/config.tomlwill be appended to this value.
wasm-opt
- Type: boolean or array of strings
- Default: true for web
--releasebuilds, false for web development builds and native builds - Note: Whether or not to use
wasm-optto optimize the web binary. The specific flags to be used can be passed as array of strings ortruecan be passed to use default options (--strip-debugand-Os).
headers
- Type: array of strings
- Default: none
- Note: Headers may be in the format of
KEY:VALUEorKEY=VALUE. These headers are appended to the defaults set by the HTTP server. For a list of supported values, please see MDN's docs on HTTP headers.
unstable
- Type: map
- Note: Enable unstable CLI features. Only available when building the CLI with the
unstablefeature (enabled by default).
unstable.web-multi-threading
- Type: boolean
- Default: false
- Note: Enable Wasm multi-threading features.