Skip to content

StoicDreams/WebUI

Repository files navigation

Web UI Workspace - Stoic Dreams

WebUI Version: 0.10.8

View Demo and Doc Site - webui.stoicdreams.com

View Rust WebUI Docs - docs.rs/webui

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

View on GitHub - github.com/StoicDreams/WebUI

Stoic Dreams Discord

About

Web UI is a Vanilla JavaScript Web Component library purpose of simplifying and minizing boilerplate code when creating new SPA websites.

Web UI Rust Crate is also being designed to allow running a Rust language WebAssembly companion that allows communication between your Rust services running in the browser and your JavaScript code and/or Web UI app services.

Web UI is very early in development and is subject to breaking changes at any time while we are in this experimental stage of development.

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

The following instructions are for our developers working on the Rust Web UI solution.

If you're wanting instructions on how to use Web UI to develop websites, whether for new or existing sites, then check out our Web UI documentation and Demo website.

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