Web UI

View on GitHub - github.com/StoicDreams/RustWebUI View on crates.io - crates.io/crates/webui

About

webui is a website framework for building webassembly SPA websites quickly and easily.

Goals

Development is just getting started, so we do not recommend using at this point for anything more than experimenting.

Getting Started

These instructions assume you have at least some familiarity with the Rust language and ecosystem.

If you are new to rust, then get started by reading The Rust Book to learn about the language.

This project was setup on a Mac, so for now instructions have not been verified on Windows or Linux machines, though it is expected to have little to no differences in this scope.

Install Required Dev Dependencies

Follow instructions here to install Rust for your system.

Make sure rust is up to date

bash rustup update

Install Trunk

bash cargo install trunk

Add waxm build target

bash rustup target add wasm-unknown-unknown

Start a new Rust project

Start by creating your project using cargo.

bash cargo new name_of_your_app cd name_of_your_app bash

Verify your Rust environment is setup correctly.

bash cargo run

Update your Cargo.toml file to include webui dependency.

```toml [package] name = "nameofyour_app" version = "0.1.0" edition = "2021"

[dependencies] webui = "0.1.2" ```

Add an index.html file to the root of your project folder (not the src folder).

Make sure to copy the exact contents as below. Head and body content will be filled in by the webui framework code.

html <!DOCTYPE html> <html lang="en"> <head> </head> <body></body> </html>

Author

Erik Gassler - Stoic Dreams - Just a simpleton who likes making stuff with bits and bytes.

Support - Visit Stoic Dreams' GitHub Sponsor page if you would like to provide support to Stoic Dreams.

License

MIT