A basic template for building a frontend application using Leptos with Rust, compiled to WebAssembly (WASM).
- Rust (stable)
- wasm32 target:
rustup target add wasm32-unknown-unknown - Trunk:
cargo install trunk
trunk serve --openThis will compile the app to WASM and serve it at http://localhost:8080.
trunk build --releaseThe output will be in the dist/ directory.
leptos-basic-template/
├── src/
│ ├── main.rs # Entry point
│ └── lib.rs # Root App component
├── index.html # HTML entry point used by Trunk
├── Trunk.toml # Trunk configuration
└── Cargo.toml # Rust dependencies
leptoswith thecsrfeature for client-side rendering compiled to WASM