XiaoMouz

showdevice

A desktop tool that splits device enumeration, UI rendering and device recognition into layers, with a C# Windows host, GTK on Linux and recognition supplied by local plugins.

v0.1.1
Published at
Oct 25, 2026
0
Stars
131
Download
Synced at
2d ago

Latest release

v0.1.1Oct 25, 2026, 02:45 PM
Downloads slow? Switch the source anytime above

README

Project Overview

ShowDevice separates reading devices from drawing a window: a Rust core enumerates and schedules, Windows uses a C# host, macOS ships an .app, and Linux runs GTK behind a small Python launcher. Which device families are recognized comes from local plugins; the core carries no built-in device list.

Item Value
Role Enumerate and display attached HID devices
Stack C# + Rust
Version v0.1.1
License MIT
Platforms Windows, macOS, Linux
Traction 0 stars

Key Features

  • Subcommands: enumerate lists devices, snapshot takes a snapshot, watch keeps listening, demo uses simulated data, validate checks a plugin, schemas exports JSON Schema, new-plugin scaffolds one.
  • JSON Lines output: watch streams deltas line by line, a refresh on stdin forces one poll, and closing stdin exits.
  • Cadence: one worker thread per device, a 30-second poll, a 5-second hotplug check, and manual refreshes no closer than 2 seconds apart.
  • No empty frames: nothing is pushed to the UI when nothing changed.

Extension Model

  • A local package is plugin.json, permissions.json and an executable.
  • Copy it to dist/plugins/<package> and restart the host; run validate before loading.

Build and Run

Windows needs the .NET 10 SDK and Rust MSVC, then cargo test --workspace, cargo build --workspace, cargo run -p showdevice -- package . and dotnet build apps/windows/ShowDevice.csproj -p:Platform=x64 -p:RuntimeIdentifier=win-x64; ./scripts/build.ps1 does the same. Close any running ShowDevice before rebuilding the dist folder, or the executable stays locked.

On macOS build Rust first, then sh apps/macos/build.sh, which produces dist/ShowDevice.app. On Linux install libudev-dev, libgtk-4-dev, python3-gi and gir1.2-gtk-4.0, then run python3 apps/linux/main.py.

Requirements

  • The build needs network access for dependencies; the runtime has no networking.
  • Linux may require access permission for confirmed HID devices; the app never changes permissions and never loads drivers.
  • SHOWDEVICE_HOME points at a project directory containing dist; SHOWDEVICE_DEMO=1 is for development demos only.

Caveats

  • At v0.1.1, plugins are executables, so vet where they come from.
  • demo labels simulated devices explicitly and normal mode never falls back to simulated data.
  • Three platforms mean three host implementations, so the UI differs in the details.

A skeleton for people building device tools rather than a ready-made device manager.

Release history

Sort