Crates.io | cargo-nw |
lib.rs | cargo-nw |
version | 0.1.1 |
source | src |
created_at | 2022-12-10 23:44:44.784422 |
updated_at | 2023-07-28 19:32:40.909353 |
description | Cargo subcommand for building NW application deployment packages (redistributables) for Windows, MacOS and Linux. |
homepage | |
repository | https://github.com/aspectron/cargo-nw |
max_upload_size | |
id | 734098 |
size | 465,318 |
cargo-nw
Application deployment package builder for Node-Webkit
cargo-nw
allows creation custom application deployment packages for NW applications by bundling application files with NW binaries.
This tool was created to build NW Rust WASM applications, but it can be used with any new or existing project.
The deployment is controlled by nw.toml
manifest file that allows full customization of information packages in distributables, creation of additional actions (such as program executions during different stages of the build process), copying groups of files using globs or regex filters.
For application icons, only a single large-size .png
file needs to be supplied - cargo-nw
will automatically resize and generate all appropriate icon variations and file formats. Custom icons can be supplied for each OS.
NOTE: To create a redistributable for each platform, you need to run cargo-nw
on that specific platform.
.desktop
file on Linuxcargo install cargo-nw
For detailed documentation please see Cargo NW Documentation
The nw.toml
package manifest file contains TOML specification for the project. It is typically located in the project root.
[application]
name = "my-app"
title = "My App"
version = "0.1.0"
organization = "My Organization"
[description]
short = "This is my app" # max 78 chars
long = """
Lorem ipsum dolor sit amet, consectetur adipiscing elit,
sed do eiusmod tempor incididunt ut labore et dolore magna
aliqua. Ut enim ad minim veniam, quis nostrud exercitation
ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit
esse cillum dolore eu fugiat nulla pariatur.
"""
[package]
exclude = ["resources/setup"]
execute = [
{ build = { cmd = "my-package-script $OUTPUT" } },
]
[nwjs]
version = "0.70.1"
ffmpeg = false
[windows]
uuid = "95ba1908-ff47-4281-4dca-7461bc1ee058"
group = "App Group" # Windows start menu group
run_on_startup = "everyone"
run_after_setup = true
resources = [
{ Custom = { name = "CustomString", value = "My Info" }},
]
[languages]
languages = ["english","french"]
[firewall]
application = "in:out"
in = [ "bin\\windows-x64\\my-utility.exe" ]
out = [ "bin\\windows-x64\\test.exe" ]