An open API service indexing awesome lists of open source software.

https://github.com/lukethacoder/leptos-playground

🦀 playing around with leptos
https://github.com/lukethacoder/leptos-playground

leptos rust tailwindcss

Last synced: 5 months ago
JSON representation

🦀 playing around with leptos

Awesome Lists containing this project

README

        





Logo

leptos-playground



playing around with leptos


## Installation

Install [trunk](https://trunkrs.dev/) (if you havn't already)

```
cargo install trunk
```

Set rust to the nightly toolchain

Just for this project:

```
rustup toolchain install nightly
rustup override set nightly
```

For every rust project:
```
rustup toolchain install nightly
rustup default nightly
```

Make sure you've added the `wasm32-unknown-unknown` target so that Rust can compile your code to WebAssembly to run in the browser.

```
rustup target add wasm32-unknown-unknown
```

> Make sure you have TailwindCSS installed. You can manually run the `npx @tailwindcss/cli -i input.css -o style/output.css` command and it will ask if you want to install.

## Development

Run the development server with:

```
trunk serve --open
```

## Non-windows Machine Development

To get this up and running on a non-windows machine, edit the [Trunk.toml](./Trunk.toml) file:

```diff
[[hooks]]
stage = "pre_build"
- command = "powershell"
+ command = "sh"
command_arguments = ["-c", "npx tailwindcss -i input.css -o style/output.css"]
```

## Deploy to Vercel

Make sure you have the Vercel CLI installed

```
pnpm i -g vercel
```

Push build to vercel

> NOTE: this assumes you've already run `trunk build`

```
vercel --prod
```