Rust web application template.
Implements a simple chat application.
Includes:
- warp server,
- browser client,
- Web Worker for client,
- native client,
common
library project for sharing code between the above.
To build the app wasm-pack needs to be installed.
Use cargo-generate:
cargo generate --git https://github.com/zduny/rust-webapp-template
Remember to update README.md
, LICENSE
and Cargo.toml
files after creating new project using this template.
Slightly simpler and more colorful example is available here.
Use shell scripts to format code, lint, build, test, run or clean:
./format.sh
./clippy.sh
./build.sh
./test.sh
./run.sh
./build_and_run.sh
./clean.sh
Native client isn't included in run.sh
(and build_and_run.sh
) script,
to run native client (most likely in another terminal window/tab) type:
./app_client
Above scripts are available in Batch file form in windows
directory.
NOTE: They have to be run from said windows
directory, don't move them to project root directory before running them.
This template uses following Rust crates developed by me:
-
js-utils - various JavaScript related utilities.
-
mezzenger - message passing infrastructure for Rust.
-
kodec - message encoding/decoding interface.
Please consider donating to support their further development: