alexdevero / leptos-app

Simple web app build with Rust Leptos framework.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Leptos Web App

This application is built using the Leptos framework for Rust. This README will guide you through setting up your environment and running the app locally.

Prerequisites

  • Rust: You should have Rust installed on your machine. You can download it here.

Getting Started

This tutorial uses Trunk for client-side rendering.

  1. Install Trunk: If not already installed, Trunk can be installed by running the command:
cargo install trunk
  1. Switch to Nightly Rust: This tutorial recommends using Nightly Rust. To use Nightly Rust with WebAssembly, run the following commands:
rustup toolchain install nightly
rustup default nightly
  1. Add wasm32 target: Add wasm32-unknown-unknown target so that Rust can compile your code to WebAssembly to run in the browser.
rustup target add wasm32-unknown-unknown
  1. Run the application: Now run the following command from the root of the leptos-app directory. Trunk should automatically compile the app and open it in your default browser. If you make edits to main.rs, Trunk will recompile your source code and live-reload the page.
trunk serve --open

With that, you should have the app running on your local machine.

About

Simple web app build with Rust Leptos framework.

License:MIT License


Languages

Language:Rust 59.5%Language:HTML 40.5%