Crates.io | livid-cli |
lib.rs | livid-cli |
version | 0.1.8 |
source | src |
created_at | 2022-04-16 00:17:04.641209 |
updated_at | 2023-11-16 13:03:32.065759 |
description | Builds and bundles your wasm web app |
homepage | |
repository | https://github.com/MoAlyousef/livid-rs |
max_upload_size | |
id | 568762 |
size | 16,566 |
dister builds and bundles your wasm web app.
cargo install livid-cli
rustup target add wasm32-unknown-unknown
cargo install wasm-bindgen-cli
livid build
).It can be downloaded from the binaryen repo's releases.
USAGE:
livid <SUBCOMMAND>
SUBCOMMANDS:
build Build your wasm web app
clean Clean output artifacts
serve Serve the generated index.html
deploy Creates a desktop app using the wasm web app for frontend
--help Prints this message or the help of the given subcommand(s)
From the manifest directory of your wasm rust applications directory, run:
livid build
or livid build --release
It should generate a dist folder in the manifest directory. The generated html index file can then be served by any server or by running livid serve
. If you prefer to use another server for development, pass the dist directory to the server:
python3 -m http.server --dir dist
If livid-cli finds an index.html shell in the manifest directory, it will use it and replace the {{SCRIPT}}
placeholder (à la emscripten shell html) with a script to load the generated js glue code.
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
{{SCRIPT}}
</body>
</html>
To create a desktop app:
livid deploy --width=800 --height=600 --title="app name"