Home / Projects / Port Monitor — Desktop Serial Port Monitor
active
2026

Port Monitor — Desktop Serial Port Monitor

A lightweight desktop serial port monitoring application built with Tauri 2 and Leptos (Rust → WASM), featuring real-time data streaming, configurable filters, and auto-detection of USB, Bluetooth, and PCI serial devices.

Tech Stack TauriLeptosRustWebAssemblyTailwind CSSTrunkBun
About Project

What is Port Monitor — Desktop Serial Port Monitor?

Port Monitor started as a hands-on exploration of building desktop applications entirely in Rust — using Tauri 2 for the native shell and Leptos compiled to WebAssembly for the frontend. The goal was simple: create a practical tool for reading and debugging serial port data, something I needed while working on hardware projects like weighbridge integrations.

The app auto-detects available serial ports, lets you configure connection parameters (baud rate, data bits, parity, flow control), and streams incoming data to a color-coded console in real-time. A built-in filter system allows you to slice and clean incoming data on the fly — adjusting offset, length, and excluding unwanted characters — all without disconnecting from the port.

Under the hood, the backend spawns a dedicated OS thread for reading serial data and bridges it to the frontend via Tauri's event system. The entire application — frontend and backend — is written in Rust, with Tailwind CSS handling the styling. It ships as a compact native binary with auto-update support via GitHub Releases.
Key Features

What makes this project special?

Auto-Detect Serial Ports

Scans and lists all available serial ports — USB, Bluetooth, and PCI — with a single click, displaying device type and product name for easy identification.

Real-Time Data Streaming

Streams serial data to a color-coded console with timestamps, auto-scroll, and clear separation between info, data, warning, and error messages — powered by a dedicated native thread and Tauri's event bridge.

Dynamic Data Filters

Apply offset, length, and character exclusion filters to incoming data in real-time — toggled on or off without interrupting the active serial connection.

Full Connection Configuration

Fine-tune every serial parameter — baud rate (50 to 921,600), data bits, stop bits, parity mode, and flow control — matching any hardware device's requirements.

Auto-Update via GitHub Releases

Checks for new versions on launch and prompts with a one-click update dialog — powered by Tauri's updater plugin with signed releases distributed through GitHub.

Challenges & Solutions

Lessons from the development process

01

Bridging Native Threads with a WASM Frontend

Serial port reading is a blocking operation that must run on a dedicated OS thread, but the Leptos frontend lives in the browser's event loop via WebAssembly. Bridging these two worlds required using Tauri's event system — the backend thread emits events with timestamped data, and the frontend listens reactively. Graceful shutdown uses an atomic flag shared between the main thread and the reader thread.

02

Handling Incomplete and Noisy Serial Data

Serial devices don't always send clean, newline-terminated messages. Data can arrive fragmented across multiple reads or include garbage characters. I implemented a timeout-based buffer flush that accumulates partial data and emits it after a quiet period, ensuring no data is lost while still providing line-by-line output to the console.

03

Display Scaling in a Fixed-Size Desktop Window

The app uses a fixed 800×600 window, but high-DPI displays (125%+ scaling) reduce the effective CSS pixel width below Tailwind's responsive breakpoints — causing the layout to unexpectedly stack vertically. The fix was removing all responsive breakpoints entirely, since the window size is known and constant, and designing purely for the fixed viewport.

Tech Stack
TauriLeptosRustWebAssemblyTailwind CSSTrunkBun
Info
Year 2026
Status active
Category Desktop / Developer Tool