xmpp/src-tauri
2026-05-07 17:53:39 +03:00
..
capabilities adding tauri 2026-05-07 17:53:39 +03:00
icons adding tauri 2026-05-07 17:53:39 +03:00
src adding tauri 2026-05-07 17:53:39 +03:00
build.rs adding tauri 2026-05-07 17:53:39 +03:00
Cargo.toml adding tauri 2026-05-07 17:53:39 +03:00
README.md adding tauri 2026-05-07 17:53:39 +03:00
tauri.conf.json adding tauri 2026-05-07 17:53:39 +03:00

Tauri wrapper for XMPP client

npm run tauri icon путь/к/картинке.png

Native desktop wrapper around the $mol XMPP client, packaged via Tauri 2.

Prerequisites

  1. Rust toolchain — install via rustup.
  2. Node.js — for the Tauri CLI.
  3. WebView2 runtime (Windows 10+ has it built-in).
  4. mam dev tool (already used for the $mol build).
# from c:\dev\mam\xmpp
npm install

This pulls @tauri-apps/cli from package.json.

Dev (live reload)

In terminal 1 — start the $mol dev server at the repo root:

cd c:\dev\mam
mam

This serves the app at http://localhost:9080/xmpp/.

In terminal 2 — start Tauri pointing at that URL:

cd c:\dev\mam\xmpp
npm run tauri:dev

A native window opens loading the XMPP client. Edits to xmpp.view.ts / .view.tree / .view.css rebuild the bundle (via mam) and the WebView reloads.

Production build

cd c:\dev\mam\xmpp
npm run tauri:build

The static frontend (xmpp/index.html + xmpp/-/web.js + locale json) is packed into the executable. Output in src-tauri/target/release/bundle/.

Icons

tauri build needs PNG/ICO icons in src-tauri/icons/. Generate them once from any source PNG:

npm run tauri icon path/to/source.png

This populates src-tauri/icons/ with all the sizes referenced in tauri.conf.json.

Notes

  • index.html references -/web.js (the bundled file). Same path works in both mam's dev server and the static Tauri bundle.
  • CSP is disabled (security.csp: null) so the WebView can connect to arbitrary wss:// XMPP servers.
  • IndexedDB / Web Audio / clipboard paste / file picker — all standard WebView features, work out of the box.