nix-rust-leptos
OfficialBuild Leptos CSR apps with Nix, Trunk, Crane.
Authorjuspay
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Conventions for building Leptos CSR apps with Nix (crane + Trunk). This guide standardizes the production build workflow and tooling integration to reduce setup time and errors across teams.
Core Features & Use Cases
- Trunk-based production builds: Use craneLib.buildTrunkPackage to manage wasm compilation, wasm-bindgen, wasm-opt, Tailwind CSS, asset hashing, SRI, and cross-reference rewriting.
- Workspace guidance: Run from the crate directory or use postUnpack to target the client crate in a workspace.
- Source filtering: Preserve HTML, CSS, and JS in the source filter to keep frontend assets intact during packaging.
- Tailwind CSS integration: Include Tailwind CSS in nativeBuildInputs and use the data-trunk tailwind hook.
- JS interop patterns: Use a dedicated bridge.rs for non-Leptos JS helpers and prefer leptos-use for browser APIs with safe cleanup.
Quick Start
Initialize a Leptos CSR project with Nix and Crane, then run the Trunk-based build to produce a production-ready client bundle.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: nix-rust-leptos Download link: https://github.com/juspay/AI/archive/main.zip#nix-rust-leptos Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 510,000+ vetted skills library on demand.