Skip to content

Device registry schema v1

Device manifests live in devices/*.toml. One file describes one product, while its connections array describes the physical links that can expose that product.

These curated manifests are intentionally distinct from the generated catalogs in data/upstream. Upstream data can seed a manifest and, after review and replay testing, establish an experimental protocol or capability without a project-owned device. It must not silently enable live I/O. When sources disagree, apply the research process in evidence-policy.md and keep unresolved fields visible and disabled.

The registry parser rejects unknown fields, duplicate identifiers, invalid ranges, unpinned evidence, and claims of verified support without a verification record. Run this after every manifest edit:

Terminal window
cargo run -p razers-cli -- registry validate devices
schema_version = 1
id = "razer.example-device"
display_name = "Razer Example Device"
kind = "mouse"
[support]
status = "detected"
notes = "Identity only; no hardware commands have been verified."

id is stable and namespaced. It accepts lowercase ASCII letters, digits, dots, and hyphens. Product kinds currently include mouse, keyboard, headset, speaker, mouse-mat, laptop, receiver, and accessory.

Support status is one of:

  • detected: identity is known, without a working-command claim;
  • experimental: evidence-backed behavior and replay tests exist; RazeRS hardware testing is optional and limitations remain visible;
  • verified: listed platform/firmware records passed RazeRS hardware tests;
  • regressed: behavior that previously passed currently fails;
  • unsupported: the device or capability is confirmed not to work.
[[connections]]
id = "wired"
role = "control"
transport = "usb-hid-feature"
[connections.match]
vid = 0x1532
pid = 0x0001
usage_page = 0xff00 # optional
usage = 0x0001 # optional
interface_number = 2 # optional
[connections.protocol]
family = "razer-report-90"
report_id = 0
transaction_id = 0x1f
response_delay_us = 600
busy_retries = 5
[connections.protocol.quirks]
include_report_id_in_payload = false
validate_response_crc = true
validate_command_echo = true

Matching must be narrow enough to avoid opening an ordinary input interface or a different logical device exposed by the same product. Interface details may remain absent while support is only detected, but must be established before live writes.

Capabilities describe semantic behavior and select a typed driver. Each capability has its own support state; product-level support must not hide partial results.

[capabilities.dpi]
status = "experimental"
driver = "dpi-u16-xy"
minimum = 100
maximum = 26000
step = 50
axes = "xy"
persistence = ["host-profile"]

Supported persistence scopes are session, host-profile, device-setting, and onboard-profile-slot. Automatically restoring a host profile after reconnect is not the same as writing an onboard slot.

The initial schema has typed definitions for DPI, polling rate, lighting, and battery. Schema additions require parser validation, documentation, and a versioning decision.

Every manifest requires a pinned source:

[[evidence]]
source = "OpenRazer"
repository = "openrazer/openrazer"
commit = "0123456789abcdef0123456789abcdef01234567"
path = "driver/example.c"
symbol = "USB_DEVICE_ID_RAZER_EXAMPLE"
license = "GPL-2.0-or-later"

Use a complete commit SHA and exact path/symbol. Evidence states where a fact came from. A reviewed body of evidence can establish experimental support; one catalog row alone cannot.

A verified product must include at least one record:

[[verification]]
platform = "linux-x86_64"
firmware = "1.03"
result = "passed"
capabilities = ["identity", "dpi", "polling-rate"]
notes = "Tested over the wired control interface."

Verification is scoped to the stated platform, firmware, connection, and capabilities.