/TauriLeptosTailwindTemplate

A template i forked from https://github.com/michalvavra/tauri-leptos-example Currently the most complete Tauri+Leptos+Tailwind template.

Primary LanguageRustOtherNOASSERTION

image

Tauri Leptos Example (With TailwindCSS)

See Prerequisites section.

# Build and develop for desktop
cargo tauri dev

# Build and release for desktop
cargo tauri build

Prerequisites

# Tauri CLI
cargo install --locked tauri-cli@2.0.0-beta.22

# Rust nightly (required by Leptos)
rustup toolchain install stable --allow-downgrade

# WASM target
rustup target add wasm32-unknown-unknown

# Trunk WASM bundler
cargo install --locked trunk

# `wasm-bindgen` for Apple M1 chips (required by Trunk)
cargo install --locked wasm-bindgen-cli

# `esbuild` as dependency of `tauri-sys` crate (used in UI)
npm install --global --save-exact esbuild

# Optional: `tailwindcss` for UI styling
npm install --global tailwindcss

Running

Run in Dev mode

cargo tauri dev

Build in Production

cargo tauri build

Credits

All credit for the counter example in ./src-ui/src/lib.rs goes to authors and contributors of gbj/leptos GitHub repository, MIT License, Copyright 2022 Greg Johnston.