Skip to content

StoicDreams/RustWebUI

Repository files navigation

Web UI Workspace - Stoic Dreams

WebUI Version: 0.8.1

View Rust WebUI Docs - docs.rs/webui

View on crates.io - crates.io/crates/webui

View on GitHub - github.com/StoicDreams/RustWebUI

View Demo and Doc Site - webui.stoicdreams.com

Stoic Dreams Discord

About

Web UI is a framework with the purpose of simplifying and minizing boilerplate code when creating new SPA websites built in Rust and running solely on front-end webassembly (i.e. a web browser.)

Web UI is not suitable for those looking to build a website that is hosted and run on a webserver, only feeding html, css, and javascript to a browser.

Goals

  • Minimize boilerplate code when starting new website projects.
  • Adhere to Material UI standards.
  • Provide robust component systems for handling common display types, user input and interactions, and data processing.

Getting Started

Download

Clone this solution into a folder.

Install Required Dev Dependencies

Follow instructions here to install Rust for your system.

Make sure rust is up to date

rustup update

Install Rusts automatic formatting tool.

rustup component add rustfmt

Then you can run this command to apply formatting to your project.

cargo fmt

Install Rusts Clippy linting tool.

rustup component add clippy

Then you can run this command to find additional linting errors.

cargo clippy

Install Trunk executable - this will be used to run your website locally for testing in your browser.

cargo install trunk

Add waxm build target

rustup target add wasm32-unknown-unknown

Testing Changes to Web UI

Install webui executable from local development.

# From the workspace root folder
cargo install --path webui --features all

Delete any starter files that need refeshing (index.html, etc) and run webui

# From the webapp folder
webui

Run trunk serve --open from your UI project root (e.g. webapp) to run your site locally.

trunk serve --open

Increment Versions after updates

If a major or minor release update is required, then first manually apply the version update to webui/Cargo.toml, making sure to reset lower versions to 0.

Run this script to increment the patch version and apply the new version to any references / docs.

# From the workspace root folder
.\IncrementVersion.ps1

Publish Latest Updates to crates.io

First, commit any changes to Git.

Then, run the publish command from the webui folder to publish.

# From the webui folder
cargo publish

Web UI Save and Publish

This console app provides a single command to:

  • Sync static files from webapp to webui
  • Increment the Patch version for webui
  • Verify tests
  • Commit changes
  • Push to GitHub
  • Publish to crates.io

Install the webuisave script

# From the workspace root folder
cargo install --path webuisave

Run the script whenever you're ready to save and publish updates.

# From the workspace root folder
webuisave -c "Your commit message"
# Increment minor version
webuisave -c "Your commit message" --minor
# Increment major version
webuisave -c "Your commit message" --major

Other Resources

Rust Docs Yew Docs

Author

Erik Gassler - Stoic Dreams - Forging solutions for tomorrow's software development.

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

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published