# This is a Rust's Design System based on Material 3 spec
## Status
working on, (not ready usable)
see project website at https://material-rs.gitlab.io/material_you_rs
## Development
### Prerequisites
- rust [install rust](https://www.rust-lang.org/tools/install)
- add wasm32 target
```bash
rustup target add wasm32-unknown-unknown
```
- install wasm tools, wasm-pack and wasm-bingend-cli, and cargo-watch (for live reload)
```bash
cargo install wasm-pack wasm-bindgen-cli cargo-watch
```
- some http server for example `python http.server`
### Run
- clone the repo
```bash
git clone https://gitlab.com/material-rs/material_you_rs
```
- build and serve website
```bash
cd /path/of/material_you_rs
wasm-pack build website --target no-modules
cd website
python3 -m http.server
```
now you can see example site on your browser
### Development whatching file's changes
- for development and live reload
```bash
cd /path/of/material_you_rs
cargo watch -w . -i .git -i .gitignore -i Cargo.lock -i target -i website/pkg "wasm-pack build website --target no-modules"
```
- and in another termninal serve site
```bash
cd /path/of/material_you_rs/website
python3 -m http.server
```
## Goals
- provide material's design spec in a rust's api for use in rustwasm based environments
- provide a zero js design system for rust
> ***currently we working on yew's api, but in the future we hope can provide an api for all rustwasm frameworks***
## Roadmap
- implement basic token mappings of material design
- implement theming provider
- implement components
- implement theme generator
## Usage
>> **warning**
>> this section is outdated, usage and examples needs be updated.
- add dependency to your `Cargo.toml`
```bash
cargo add material_you
```
- import library and add the theme provider
```rust
use yew::prelude::{function_component, html};
use material_you::provider::MaterialProvider;
#[function_component(MyApp)]
fn my_app() -> Html {
// MaterialProvider provides context info for material design
// for theming, icons, typography
html! { {"My App"}