Crates.io | cargo-node |
lib.rs | cargo-node |
version | 0.1.0 |
source | src |
created_at | 2019-10-04 08:50:07.287065 |
updated_at | 2019-10-04 08:50:07.287065 |
description | A cargo sub command to build, run and deploy rust wasm applications as browser, electron or cordova app. |
homepage | |
repository | https://github.com/FloVanGH/cargo-node |
max_upload_size | |
id | 169807 |
size | 74,553 |
A cargo sub command to build, run and deploy rust wasm applications as browser, electron or cordova app.
Currently you could use the following commands:
cargo node build
cargo node run
cargo node deploy
You could use the additional flags on the command line:
cargo node run --target browser
cargo node deploy --release
cargo node run --example my_example
cargo install cargo node
Before you could use cargo node you have to install npm
version 6.9.0. It is included in the Node.js
version 10.16.3. You could download it from https://nodejs.org/dist/v10.16.3/.
Rust's cargo
is presumed. All other dependencies of cargo node will be installed automatic.
cargo node
provides an optional configuration file which you can put next to cargo
's [Cargo.toml
].
Example:
[[apps]]
# Name of the executable
name = "my app"
# Defines the window width of the electron window
width = 300
# Defines the height of the electron window
height = 100
# Path of the assets folder with images, fonts, ...
assets = "assets/"
# Add custom fonts to your project
[[apps.fonts]]
font_family = "My Font"
src = "fonts/MyFont.ttf"
Licensed under MIT license (LICENSE).