The init command
Cargo NW can create Node Webkit project templates. It can generate a basic Rust WASM application or only a manifest file (if integrating with an existing project).
To create a WASM template run the following:
cargo nw init
Similarly to npm init
or cargo init
this will create a project in the current folder, using the folder as a project name.
The init
command accepts the following arguments:
name
- optional name of the project. If omitted,cargo nw
will use the current folder name and confirm the name with a prompt. Ifcargo nw
detects an existingCargo.toml
orpackage.json
file in the same folder, it will use the name from these pre-existing manifests.js
- (TODO) generate a classic Node Webkit JavaScript-based project (no WASM)manifest
- createnw.toml
manifest file onlyforce
- force overwrite any existing files (by default,cargo nw
will abort if it detects any existing files)