From 1d138af47a8c25f885580678a98ea23aab1fc112 Mon Sep 17 00:00:00 2001 From: Brian Obot Date: Sat, 21 Mar 2026 12:08:20 +0100 Subject: [PATCH 1/3] Add detail instructions on setting up the Projects in the README file --- README.md | 89 ++++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 79 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 6df42c5..77b0185 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,89 @@ # Rust/UI - Inspired by shadcn/ui, built for Rust fullstack apps. A component registry for Leptos — built with Tailwind CSS, copy-paste ready. - [![Rust/UI](https://www.rust-ui.com/og-image.png)](https://www.rust-ui.com) -## Getting Started +## Why Rust/UI? +Rust/UI isn't a component library you install as a crate. It’s a collection of re-usable components that you copy and paste into your apps. + +- Full Control: The code is yours. No node_modules or opaque crate dependencies for your UI. +- Styling: Built with Tailwind CSS for easy customization. +- Framework: Designed specifically for the Leptos fullstack ecosystem. +- Type Safe: Leverages Rust's powerful type system for component props. + + +## Getting Started Visit [rust-ui.com](https://www.rust-ui.com) to browse components and get install commands. -## Run the Project +### Quick Start +1. Ensure you have the following installed: + - [Tailwind CSS](https://tailwindcss.com/docs/installation/tailwind-cli) + - [Cargo Leptos](https://github.com/leptos-rs/cargo-leptos) -```bash -pnpm install -cargo leptos watch -``` +2. Add Dependencies + + Add the necessary support crates to your Cargo.toml: + + ```toml + [dependencies] + leptos = { version = "0.6", features = ["hydrate"] } + lucide-leptos = "0.1" # Common for icons + # Add any other required utils mentioned in component docs + ``` + +3. Browse the [registry](https://www.rust-ui.com/), find a component (e.g., `Button`), and copy the source into your project's components/ directory. + ```rust + use crate::components::ui::button::Button; + + #[component] + pub fn App() -> impl IntoView { + view! { + + } + } + ``` -## License -MIT — [Max Wells](https://www.rust-ui.com) +## Development +If you want to run this project locally to preview components or contribute: + +1. Clone the repo + ```bash + git clone git@github.com:rust-ui/ui.git rust-ui + cd rust-ui + ``` + +2. Install JS dependencies (for Tailwind/Tooling) + ```bash + pnpm install + ``` + +3. Install Rust dependencies (Leptos) + ```bash + cargo install --locked cargo-leptos + ``` + + *Install `lld` to be used for linking instead of the default `ld` linker + ```bash + brew install lld + ``` + +4. Run the dev server + ```bash + cargo leptos watch + ``` + +## Contribution +We love contributions! Whether it's a new component, a bug fix, or a CSS tweak. + +- Fork the Project [Currently Disabled]. +- Create your Feature Branch (git checkout -b feature/AmazingComponent). +- Commit your Changes (git commit -m 'Add some AmazingComponent'). +- Push to the Branch (git push origin feature/AmazingComponent). +- Open a Pull Request. + + +## License +Distributed under the MIT License. See [LICENSE](LICENSE) for more information. Crafted by [Max Wells](https://www.rust-ui.com) From fc2dcd865133f5b90f99edcd96d382d6aea70e47 Mon Sep 17 00:00:00 2001 From: Brian Obot Date: Sat, 21 Mar 2026 12:39:44 +0100 Subject: [PATCH 2/3] Add detail instructions on setting up the Projects in the README file --- README.md | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 77b0185..d1e6c37 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,12 @@ Visit [rust-ui.com](https://www.rust-ui.com) to browse components and get instal 1. Ensure you have the following installed: - [Tailwind CSS](https://tailwindcss.com/docs/installation/tailwind-cli) - [Cargo Leptos](https://github.com/leptos-rs/cargo-leptos) + + Ensure you have the Rust toolchain and the WASM target installed: + ```bash + rustup target add wasm32-unknown-unknown + cargo install --locked cargo-leptos + ``` 2. Add Dependencies @@ -27,8 +33,8 @@ Visit [rust-ui.com](https://www.rust-ui.com) to browse components and get instal ```toml [dependencies] leptos = { version = "0.6", features = ["hydrate"] } - lucide-leptos = "0.1" # Common for icons - # Add any other required utils mentioned in component docs + lucide-leptos = "0.1" # Standard icon set + tailwind_fuse = "0.3" # Recommended for easy class merging ``` 3. Browse the [registry](https://www.rust-ui.com/), find a component (e.g., `Button`), and copy the source into your project's components/ directory. @@ -47,7 +53,7 @@ Visit [rust-ui.com](https://www.rust-ui.com) to browse components and get instal ## Development -If you want to run this project locally to preview components or contribute: +If you'd like to contribute or preview the registry locally: 1. Clone the repo ```bash @@ -64,8 +70,9 @@ If you want to run this project locally to preview components or contribute: ```bash cargo install --locked cargo-leptos ``` - - *Install `lld` to be used for linking instead of the default `ld` linker + + ### Linker Optimization (Optional) + *Note for macOS Users*: To use the faster lld linker, install it via Homebrew and ensure it's in your PATH, or configure your .cargo/config.toml to point to the absolute path. ```bash brew install lld ``` @@ -78,7 +85,7 @@ If you want to run this project locally to preview components or contribute: ## Contribution We love contributions! Whether it's a new component, a bug fix, or a CSS tweak. -- Fork the Project [Currently Disabled]. +- Fork the Project. - Create your Feature Branch (git checkout -b feature/AmazingComponent). - Commit your Changes (git commit -m 'Add some AmazingComponent'). - Push to the Branch (git push origin feature/AmazingComponent). From 7c3adf81704c999b72f7776983bdb6657a36e42b Mon Sep 17 00:00:00 2001 From: Brian Obot Date: Sun, 22 Mar 2026 10:59:44 +0100 Subject: [PATCH 3/3] Add detail instructions on setting up the Projects in the README file --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d1e6c37..e304b48 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ If you'd like to contribute or preview the registry locally: 1. Clone the repo ```bash - git clone git@github.com:rust-ui/ui.git rust-ui + git clone git@github.com:rust-ui/ui.git rust-ui cd rust-ui ```