Tauri demo guide and download
The repository includes sdk/tauri/example, a complete WeChat-style IM desktop app (Tauri 2 with plain TypeScript): sign-in, one-to-one and group chat, message interactions, friends, audio and video calls, plus Tauri desktop features (system notifications, tray, multiple windows, drag and drop, and sending files by path). It's also what the SDK's end-to-end tests run against, so it's a quick way to check how the SDK really behaves on the desktop, and you can lift its UI structure, state management and event handling straight into your own project.
What it covers
| Area | Covers |
|---|---|
| Account | Password sign-in and sign-up, sign-in errors, sign-out, engine and connection status |
| Conversations | Conversation list (unread badges, pinned, muted, draft previews, last message), pinning and marking unread, clearing history |
| Messages | Text, images, files, voice (recording), video, location; emoji panel, quote replies, forwarding, reactions, recall, resending failed messages, read receipts, typing indicators, automatic draft saving, date separators |
| Friends | Adding friends (with a verification message), sending and accepting requests, remarks, blocklist, removing, friend profiles |
| Groups | Starting group chats (picking members), group settings (member grid, invite and remove, rename), leaving, dissolving |
| Desktop | System notifications (tap to open the conversation), tray mode, opening one conversation in several windows, sending files by path from drag and drop or the system dialog, taskbar badges, downloads and local previews |
| Audio and video | Voice and video calls: starting, answering and rejecting, mute and camera toggle, hang up |
Download
The demo source package (the full example app; dependencies point at the published npm and crates.io packages, so there's no need to clone the SDK repository): deeprespond-im-tauri-demo-1.0.0-alpha.zip. Checksums are in DEMO_PACKAGE_SHA256SUMS in the same directory.
To build the same package from the repository workspace:
make sdk-tauri-demo-package # 输出 release/sdk-tauri-<版本>/deeprespond-im-tauri-demo-<版本>.zipPrerequisites
- Node.js ≥ 20.19 and pnpm ≥ 9; Rust ≥ 1.90 (install with rustup).
- System dependencies (to build Tauri and WebKitGTK):
- Windows: the WebView2 runtime (included in Windows 10/11) and the Visual Studio C++ build tools.
- macOS: Xcode Command Line Tools (
xcode-select --install). - Linux: WebKitGTK 4.1 and other development packages. On Ubuntu/Debian:
sudo apt install libwebkit2gtk-4.1-dev build-essential curl wget file libxdo-dev libssl-dev libayatana-appindicator3-dev librsvg2-dev
- A deployed, reachable IM server, and the AppKey shown on the console Overview (you can use the
demoapp created when you signed up). - Audio and video calls must be turned on in the app's policies in the console, with a media service (LiveKit) address the desktop can reach. Whether Linux WebKitGTK includes WebRTC varies by distribution; see Platform limits.
Build and run
unzip deeprespond-im-tauri-demo-1.0.0-alpha.zip
cd deeprespond-im-tauri-demo-1.0.0-alpha
pnpm install
export IM_APP_KEY='org_name#app_name' # 控制台应用详情中的 AppKey
export IM_API_URL='https://im.example.com' # IM 服务地址
pnpm tauri dev # 开发运行(改动热更新)
pnpm tauri build # 生成安装包:Windows(NSIS)、macOS(.app)、Linux(deb/AppImage)- Server details come from environment variables. Without them the app still starts, and the sign-in page shows an initialization error.
- On Windows, set environment variables with
set IM_APP_KEY=…(CMD) or$env:IM_APP_KEY='…'(PowerShell). - Optional environment variables:
IM_TRAY=1(stay in the tray after all windows close, with notifications still working) andIM_SINGLE_INSTANCE=0(turn off the single-instance limit, for multi-process testing). - For notes on notifications, badges and other system integration (signing, Info.plist, installers), see Quickstart · Packaging and signing.
Tips
- Sign-in: enter a username and password on the sign-in card (accounts are created by your server, or register directly; the demo's sign-in card can switch to sign-up mode). The sign-in is saved in the system keychain, so it's restored automatically the next time the app starts.
- Testing with two users: only one instance can run per system user on a computer. To try two users messaging and notifying each other, run it on another computer, or sign in as the other user in a browser with the Web demo.
- Files by path: "+ → Desktop file" in a chat uses the system file dialog (Rust reads and uploads by path, without using page memory); you can also drag files into the chat window to send them.
- Notifications: on Linux they need the desktop environment's notification service (GNOME and KDE include one); on Windows they only fully work after installing through the installer; see Packaging and signing.
- Logs: "Me → Logs" shows the SDK's logs; look there first when troubleshooting.
Related docs
- Overview and installation: what the SDK is made of, requirements and versions.
- Quickstart: every step to build a desktop app that sends and receives messages from scratch.
- Engine and windows and Desktop features: full details of the engine options and desktop APIs the demo uses.
- The source is
sdk/tauri/examplein the repository; the end-to-end tests run through it (sdk/tauri/test/e2e).
