3.4 KiB
Development
This page covers project layout, local build commands, documentation generation, and the remaining roadmap.
Repository Layout
src/include/libvirtualhid/ Public C++ headers
src/core/ Shared profile, descriptor, and report logic
src/platform/windows/ Windows client backend and UMDF control channel
src/platform/windows/driver/ Windows UMDF2 driver package sources
src/platform/linux/ Linux uhid/uinput backend
src/platform/macos/ Future macOS backend
examples/ Minimal consumers and platform smoke tests
tests/ Unit and integration tests
cmake/ Package config and helper modules
docs/ Project documentation and Doxygen settings
third-party/doxyconfig/ LizardByte Doxygen configuration submodule
third-party/googletest/ GoogleTest submodule
Windows Library Build
On Windows, the normal library and tests are built with MSYS2/UCRT64 for MinGW
coverage. Build directories should use the cmake-build- prefix.
cmake -S . -B cmake-build-debug-mingw-ucrt64-ninja -G Ninja \
-DCMAKE_BUILD_TYPE=Debug
cmake --build cmake-build-debug-mingw-ucrt64-ninja
cmake-build-debug-mingw-ucrt64-ninja/tests/test_libvirtualhid.exe
The Windows UMDF driver package is a separate MSVC/WDK build. See Windows driver package.
Linux Build
Linux builds use the same CMake target shape. Integration tests that create real
devices require access to /dev/uhid and /dev/uinput; see
Platform support.
cmake -S . -B cmake-build-debug -G Ninja -DCMAKE_BUILD_TYPE=Debug
cmake --build cmake-build-debug
cmake-build-debug/tests/test_libvirtualhid
Documentation
Documentation is generated by the LizardByte doxyconfig submodule. The project
Doxygen input is defined in docs/Doxyfile. The docs target combines that
file with the shared doxyconfig settings at build time.
cmake --build cmake-build-debug-mingw-ucrt64-ninja --target docs
Keep Markdown pages focused on decisions or workflows that consumers and maintainers need. Avoid preserving old implementation-plan checklists once the code and tests provide a better source of truth.
Validation Targets
test_libvirtualhid: shared GoogleTest binary under the build directory'stestsdirectory.gamepad_adapter: example executable for profile and lifecycle diagnostics.run_gamepad_adapter_example: CMake target that runsgamepad_adapterfrom its generator-specific output path when a platform backend is available.- Windows driver helper scripts under
scripts/windows. - Linux consumer tests through SDL2, libinput,
uhid, anduinputwhere the host environment supports real virtual devices. - Doxygen docs target for README, Markdown pages, and public header rendering.
Roadmap
- Finish Windows streaming-host replacement validation, especially application compatibility for the UMDF/VHF HID backend and any XInput-only fallback story.
- Replace consumer-specific ViGEmBus installer/status/diagnostic flows with libvirtualhid driver-package checks.
- Validate Linux host-adapter behavior across the selected controller profiles.
- Define and implement the FreeBSD-supported backend subset.
- Prototype and document macOS virtual HID support, including signing, entitlement, and installer constraints.