Skip to content

zduny/rust-webapp-template-api

Repository files navigation

{{project-name}}

Test Status

Rust web application template using zzrpc api.

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.

Prerequisites

To build the app wasm-pack needs to be installed.

How to use

Use cargo-generate:

cargo generate --git https://github.com/zduny/rust-webapp-template-api

To template users

Remember to update README.md, LICENSE and Cargo.toml files after creating new project using this template.

Development

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

Windows

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.

Dependencies

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.

  • zzrpc - RPC over mezzenger transports.

Please consider donating to support their further development:

ko-fi

See also

wasm-bindgen

web-sys

js_sys