Avalonia/.NET 10 Port: Consolidated Windows/macOS/Linux support#508
Draft
tzarc wants to merge 19 commits into
Draft
Avalonia/.NET 10 Port: Consolidated Windows/macOS/Linux support#508tzarc wants to merge 19 commits into
tzarc wants to merge 19 commits into
Conversation
Replaces the Windows WinForms and macOS Swift applications with a single
Avalonia/.NET 10 codebase targeting Linux (x64, arm64), macOS (universal),
and Windows (x64).
Removed:
- windows/ WinForms C# application
- macos/ Swift/Xcode application
New application structure (src/):
- QmkToolbox.Core: platform-agnostic bootloader detection, flash/reset/EEPROM
operations, USB device model, and service interfaces
- QmkToolbox.Desktop: Avalonia UI with MVVM (CommunityToolkit.Mvvm), HID
console, key tester, settings, and platform service implementations
- QmkToolbox.Tests: xUnit test suite covering bootloader factory, flash
commands, USB device parsing, settings serialisation, and resource layout
Flash tool changes:
- Binaries sourced from qmk_flashutils releases and bundled per-platform
under resources/flashutils/{linux-x64,linux-arm64,osx,win-x64}/
- Added picotool (RP2040/RP2350) and wb32-dfu-updater_cli (WB32) — not
present in the old platform-specific bundles
- Per-platform flashutils_release_* manifest files used for version-gated
extraction; stale installs are wiped and re-extracted on version change
HID / hidapi:
- libhidapi bundled per-platform under resources/hidapi/ from qmk_hidapi
releases; loaded at runtime via NativeLibrary rather than P/Invoke paths
- HidConsoleDevice and HidApiListener replace the platform-specific HID
listeners in the old Windows/macOS codebases
Platform services:
- Linux: udev rules (50-qmk.rules) and qmk_id helper sourced from qmk_udev
releases and extracted to /etc/udev/rules.d at runtime via UdevInstaller
- Windows: driver installation preserved via embedded qmk_driver_installer
- USB hotplug via Usb.Events (wraps IOKit/udev/WMI per-platform)
- Serial port resolution via DesktopSerialPortService (WMI on Windows,
/dev/serial/by-id on Linux, IORegistryExplorer on macOS)
Build and release:
- scripts/fetch-tools.sh downloads qmk_flashutils, qmk_hidapi, qmk_driver_installer,
and qmk_udev from their respective GitHub releases into resources/
- scripts/publish-all.sh produces self-contained per-platform binaries
- scripts/make-app.sh / make-pkg-macos.sh / make-installer-win.sh package
platform-specific installers
- GitHub Actions CI matrix builds all four targets and uploads artifacts
- Husky pre-commit hook enforces dotnet-format
Known limitation:
- Trimming disabled pending compatibility issues with Avalonia and
System.Management (WMI) under NativeAOT/trimmed runtimes
This was
linked to
issues
May 4, 2026
Member
Author
|
GHA workflows are currently set up so they produce binaries on my own fork, will pivot those to main QMK GitHub org closer to merge time. |
…orms. - Eliminates the use of WMI on Windows by directly querying the device tree for USB events. - Ensures that trimming is effective on all platforms, reducing the application size and improving performance.
|
Thank you for this! I was really surprised there wasn't already official Linux support for Toolbox when I started setting up QMK on my new keyboard today edit: Successfully flashed my QMMK Pro with it using a firmware compiled on config.qmk.fm 😄 (Linux kernel 7.0.10-1-cachyos w/ KDE 6.6.5 on Wayland) |
e68d435 to
19e6dd1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Replaces the Windows WinForms and macOS Swift applications with a single Avalonia/.NET 10 codebase targeting Linux (x64, arm64), macOS (universal), and Windows (x64).
Raising for visibility. This is a very considerable PR, given the complete rewrite.
Non-maintainers: Don't expect merge any time soon.
Prebuilt binaries can be found on my fork's releases: https://github.com/tzarc/qmk_toolbox/releases/tag/beta-xplat
Removed:
New application structure (src/):
Flash tool changes:
HID / hidapi:
Platform services:
Build and release:
Types of Changes