A native desktop keyboard configurator for QMK keyboards with VIA/Vial support, written in Rust.
Viar is a lightweight, Rust-native alternative to VIA and Vial. It communicates with keyboards over USB HID to remap keys and control RGB lighting in real time.
- Auto-detection and connection to VIA/Vial-enabled keyboards
- Visual keyboard layout rendering with accurate physical key positioning
- Real-time key remapping (changes take effect immediately on the device)
- RGB lighting control: brightness, effect, speed, hue, saturation
- Save lighting configuration to keyboard EEPROM
- Export and import keymaps as JSON
- Undo support (Ctrl+Z)
- Automatic lighting protocol detection (VialRGB, Vial legacy, VIA channels)
- Vial keyboard definition parsing (KLE format, LZMA-compressed from firmware)
- Graceful device disconnection handling
Preview of a keyboard layout with homerow mods as Tap Dances and with combos. Combos are shown with color matching dots on the keys that trigger their combo.

crates/
qmk-rs/ # Library: Experimental Simple qmk settings library for on-board qmk settings
argos-rs/ # Library: Experimental rust port of the argos module by BastardKB
via-protocol/ # Library: VIA/Vial HID protocol implementation
viar/ # Binary: egui desktop application
via-protocol is a standalone library with no GUI dependencies. It can be used independently to build other tools that communicate with VIA/Vial keyboards. See its README for API documentation.
viar is the GUI application built with egui/eframe.
Requires Rust edition 2024.
cargo build --releasecargo run -p viarWith debug logging:
RUST_LOG=debug cargo run -p viarHID device access requires appropriate permissions. Add a udev rule:
# /etc/udev/rules.d/99-hid.rules
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0666"Then reload:
sudo udevadm control --reload-rules && sudo udevadm trigger- A keyboard running QMK firmware with VIA or Vial enabled
- USB connection (no Bluetooth support)
The application follows a layered design:
- Raw HID --
KeyboardDevicesends and receives 32-byte HID reports - Command builder --
ViaCommandconstructs typed protocol messages - Protocol interface --
ViaProtocolprovides high-level operations (read keymap, detect lighting, etc.) - Application --
ViarAppmanages UI state, user interaction, and device communication
The GUI uses egui's immediate mode rendering with a state machine (AppScreen) driving screen transitions: detection, permission errors, device selection, loading, and the connected view with keymap and lighting tabs.
See repository for license information.