Skip to content


Trunk is a WASM web application bundler for Rust. Learn more about Trunk at This guide is accurate as of Trunk 0.17.5.

  • Use SSG, Tauri doesn’t officially support server based solutions.
  • Use address = "" so that the webserver is available on the network for mobile development.
  • Use ws_protocol = "ws" so that the hot-reload websocket can connect properly for mobile development.
  • Enable withGlobalTauri to ensure that Tauri APIs are available in the window.__TAURI__ variable and can be imported using wasm-bindgen.

  1. Update Tauri configuration:
"build": {
"beforeDevCommand": "trunk serve",
"beforeBuildCommand": "trunk build",
"devPath": "http://localhost:8080",
"distDir": "../dist"
"app": {
"withGlobalTauri": true
  1. Update Trunk configuration:
ignore = ["./src-tauri"]
address = ""
ws_protocol = "ws"

© 2024 Tauri Contributors. CC-BY / MIT