cyberneticlibrary

Build Tauri V2 Rust WASM apps

integrating-tauri-rust-frontendsskillsetup L30
Sheshiyer/skill-clusters
What it does

Integrate Rust/WASM frontend frameworks with Tauri v2

Best for

When integrating Leptos, Yew, Dioxus, or Sycamore WASM frameworks into Tauri v2

Inputs
  • · Framework choice (Leptos, Yew, Dioxus, Sycamore), Trunk.toml, Cargo.toml
Outputs
  • · Configured WASM build, Trunk dev server, Tauri bridge setup
Requires
  • · Tauri CLI
  • · Cargo
  • · Trunk (bundler for Rust/WASM)
  • · Node.js
Preconditions
  • · Tauri v2 project initialized
  • · Rust toolchain installed
  • · withGlobalTauri enabled in tauri.conf.json
  • · Framework dependencies in Cargo.toml
Failure modes
  • · withGlobalTauri not enabled (window.__TAURI__ unavailable)
  • · crate-type not set to ["cdylib", "rlib"]
  • · SSR enabled when CSR required
  • · Trunk dev port doesn't match tauri.conf.json devUrl
  • · WASM optimization flags too aggressive (panics on runtime error)
  • · Hot-reload ws_protocol misconfigured for mobile
Trust signals
  • · Framework-specific examples (Leptos with wasm-bindgen, Yew with html! macro)
  • · Trunk.toml configuration with hot-reload and size optimization
  • · Binary size optimization in release profile (opt-level z, lto true, panic abort)
  • · Tauri API invocation pattern (async invoke with serde-wasm-bindgen)