Chore/repo cleanup - #146
Merged
Merged
Conversation
- Added standard community files (CODE_OF_CONDUCT.md, SECURITY.md, SUPPORT.md). - Configured .gitattributes to handle cross-OS line endings and exclude generated data from GitHub linguist stats. - Added Nix support (flake.nix, nix/default.nix, nix/shell.nix) for reproducible dev environments. - Created .vscode/settings.json to configure rust-analyzer and disable noisy markdown linting warnings. - Updated Cargo.toml with repository metadata, keywords, and disabled incremental builds. - Cleaned up Cross.toml by removing redundant amd64 architecture declarations and adding missing UI dependencies (libxkbcommon-dev, pkg-config). - Adjusted rustfmt.toml to strictly error on 100-character line width overflows. - Adjusted clippy nesting thresholds and applied formatting updates across source files.
- Replace hardcoded filter dispatch with a registry (ui/panels/filters) - Group TabletMapperApp's flat fields into ConsoleState/ThemeStoreState - Split overlay rendering (modals, toasts, debugger/perf viewports) out of layout.rs into app/overlays.rs - Bump toolchain to 1.97.1, reformat CI workflows, normalize line endings - Misc driver/engine/injector fixes carried over from prior work
Silences the float_literal_f32_fallback lint across the UI panels and theme code.
Replaces the hardcoded Release tab with live data pulled from GitHub. Fetches only happen when the tab is opened, results are cached to disk for offline use, and failed requests retry with exponential backoff and jitter. Release bodies are parsed into add/fix/improve /remove/info sections and YouTube links get a watch button.
Extracts @username mentions from each release body and lists the contributors with their avatar at the bottom of the card. Mentions found inline in the notes are also turned into clickable links, all pointing to the user's GitHub profile. Avatars load through egui's image loaders, enabled via the egui_extras http and image features.
Installs pre-commit (fmt + clippy) and pre-push (fmt + clippy + test) hooks that mirror the CI quality check workflow exactly, using cargo-husky's user-hooks mode with hand written scripts under .cargo-husky/hooks. Also forces LF line endings on those scripts so the shebang stays intact on Windows checkouts.
migrate_profiles_to_subdir moved any non-system JSON file from Settings/ into Settings/profiles/, and cache_releases wasn't in the exclusion list, so it got migrated and picked up by list_profiles as a fake preset.
- nix/default.nix installs the udev rules via postInstall so services.udev.packages picks them up for free. - nix/nixos-module.nix and nix/home-manager-module.nix expose services.nexttabletdriver.enable, wiring udev rules, the uinput kernel module, optional input group membership, and a systemd --user service. - flake.nix exposes both as nixosModules.default / homeManagerModules.default, plus checks that instantiate each module (with a throwaway package) to catch option-wiring bugs cheaply. - .github/workflows/nix.yml runs nix flake check and a real nix build of the package on changes under nix/, flake.nix and the udev rules. - scripts/README-linux.md documents the new flake-based NixOS setup.
…ird-party apps Lets games and plugins (Blender, Unity) embed NextTabletDriver's engine directly in-process via a C/C# ABI, instead of relying on the OS's synthetic mouse input -- which drops pressure and tilt on Windows since SendInput has no pressure channel. The embedded engine skips the injector entirely, so consumers get raw pressure/tilt data. - `sdk/`: new cdylib/staticlib crate exposing ntd_init/ntd_poll_state/ ntd_set_mode/ntd_set_active_area/ntd_shutdown, with a cbindgen C header and csbindgen-generated + hand-wrapped C# bindings. - `src/engine/interop/`: named-lock + seqlock shared memory + command channel so the desktop app and any number of SDK-embedding processes can coexist without fighting over the same HID device -- exactly one becomes the "owner" (opens the real device), the rest mirror its state and forward config writes. - `Pipeline::process()` no longer injects OS input itself; it returns a ProcessedFrame and the desktop app's tablet_manager does the injection, so the SDK can reuse the same pipeline without an injector dependency. - Root crate gains a default-on `gui` feature so `sdk/` can depend on it with `default-features = false` and pull in none of egui/eframe/gtk.
Clean up AI-generated-looking punctuation across the SDK crate, the engine::interop module, and docs/SDK.md.
…te, telemetry) tablet_manager.rs mixed owner acquisition, polling, SHM reading, and SDK command handling in one file; app/state/mod.rs mixed console, profile, theme-store, release-notes, and updater state on TabletMapperApp; telemetry.rs mixed the public capture API, the batching worker thread, and crash-report handling. Split each into per-responsibility submodules, no logic changes.
…ation) Replaces the 334 copied tablet configuration JSON files under tablets/ with a git submodule (tablets/OpenTabletDriver, pinned to branch 0.6.x) so OpenTabletDriver's LGPLv3-licensed content stays a separate, pinned external reference instead of being merged into this MIT-licensed source tree. config_loader.rs now embeds configs from the submodule's Configurations subfolder; the runtime disk-fallback path is unchanged. CI workflows now fetch submodules on checkout, and docs point new tablet contributions upstream to OpenTabletDriver. Closes #142
DeviceState/UiSnapshot dropped the driver-reported max pressure and hardcoded 8192 in the debugger panel instead, so tablets with a different pressure range showed the wrong max in the UI.
Some tablets (e.g. XP-Pen Star G640) ship two config variants that share a VID:PID but declare different InputReportLength values. Detection previously picked whichever candidate happened to be indexed first, which could select the wrong config and produce out-of-range raw HID coordinates. On Windows, query the OS-reported InputReportByteLength via HidP_GetCaps and compare it directly against each candidate's declared InputReportLength, the same static match OpenTabletDriver's Driver.cs performs. This works even for tablets that stay silent until the pen comes into proximity, unlike a live sample read. Falls back to a live read (with the platform-specific wire-length adjustment for the report-ID byte) when the static query isn't available.
The window and tray icons are decoded from this PNG into a raw RGBA buffer that stays resident for the app's lifetime (main.rs keeps it alive to rebuild the window on every tray restore). At 1024x1024 that buffer was ~4.2MB for an icon only ever rendered at taskbar/tray sizes; 256x256 already exceeds the largest standard ICO frame size and cuts the resident buffer to ~260KB.
Some tablets share the exact same VendorID, ProductID, and InputReportLength (e.g. Gaomon S620 vs. M106K Pro, both 256c:006f with InputReportLength 12), so the report-length check alone cannot tell them apart, causing detection to pick the wrong config depending on filesystem enumeration order. Parse the DeviceStrings regex patterns from the config JSON and match them against the device's USB string descriptors via HidDevice::get_indexed_string before accepting a candidate, mirroring OpenTabletDriver's Driver.DeviceMatchesStrings in Driver.cs. Refs #143
They were committed with mode 644 instead of 755, so cargo-husky's build script fails on Linux with "no executable file is found in .cargo-husky/hooks", breaking any build that runs cargo (CI included).
The InputReportLength path parameter is only read on Windows, and the Flock field in the Linux owner lock is held solely for its Drop side effect, so both trip lint denials on Linux CI builds.
systemd and the X11 tooling the driver depends on are not available on Darwin, so evaluating packages.default or devShells.default on those systems crashed flake evaluation entirely. Only Windows and Linux are supported targets, matching the existing Linux-only gate already used for the NixOS/home-manager checks.
Replaces panicking slice indexing in the Linux report-prefix path with get/get_mut, backticks a doc identifier flagged by doc_markdown, and pins the lock file's open behavior to non-truncating so its intent is explicit rather than left to suspicious_open_options guesswork.
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.
No description provided.