A cross-platform desktop application built with Tauri v2, Rust, Vue 3, and TypeScript for controlling Modbus RTU relay devices. s
- Automatic relay detection
- Connect / disconnect relay devices
- Real-time relay control
- Sequence execution
- Blink animations
- Event logging
- Cross-platform support
- Modern desktop UI
- Vue 3
- TypeScript
- Vite
- Rust
- Tokio
- Tauri v2
- Modbus RTU
- Serial Port
- RS485
┌──────────────┐
│ Vue Frontend │
└──────┬───────┘
│ invoke()
▼
┌──────────────┐
│ Tauri │
└──────┬───────┘
│
▼
┌──────────────┐
│ Rust Backend │
└──────┬───────┘
│
▼
┌──────────────┐
│ Modbus RTU │
└──────┬───────┘
│
▼
┌──────────────┐
│ Relay Device │
└──────────────┘
- 8 Relay Channels
- Modbus RTU Protocol
- RS485 Communication
Used to connect the desktop application to the relay controller.
USB-powered LED bulb connected through relay outputs.
await invoke("relay_set", {
channel: 1,
on: true,
});#[tauri::command]
pub async fn relay_set(
state: State<'_, RelayState>,
channel: u16,
on: bool,
) -> Result<(), String> {
set_coil(conn, channel, on).await
}- Rust
- Node.js
- pnpm
pnpm installpnpm tauri devpnpm tauri buildThis project was created to explore how modern web technologies can be combined with Rust to build native desktop applications capable of interacting with real hardware.
The application demonstrates:
- Frontend ↔ Rust communication
- Native desktop integrations
- Modbus RTU communication
- Hardware control using Tauri
A companion Ratatui-based terminal application was created using the same concepts and relay communication patterns: