openrgb-rs2

Rust client library for the OpenRGB SDK.
OpenRGB is an RGB Lighting control app that doesn't depend on manufacturer software.
See documentation and examples.
use ;
async
Performance
The OpenRGB SDK provides a few ways to write colors to devices: per led, per zone, or all leds (set_leds). From my testing it seemed that when updating large number of LEDs, set_leds is the fastest one. It's inconvenient to update in this way, as some controllers have multiple unrelated zones, such as motherboards, meaninig you have to keep track of the zone offset.
Command API
To ease this, the crate has a Command API, which translates arbitrary LED updates to a single all_leds update, ensuring both user friendliness and maximum performance. The entire API is sync, with only one asynchronous api call at the end.
use ;
async
Multiple devices
My case contains a few controllers that I would like to control in sync, like my RAM sticks and case fans. To make it easier to update those, the Command API also supports ControllerGroups.
use ;
const RAINBOW_COLORS: = ;
async
Syncing controller data
Syncing controller data with the data in OpenRGB requires an additional API call, which could be unnecessary in a lot of cases. Most of the (important) data will not change over a Controllers lifetime and usually you just want to write colors as fast as possible. Therefore, I chose to make syncing the controller data a separate method (Controller::sync_controller_data) instead of being automatically called after any request.
Original openrgb-rs
This repository is a clone of the repo previously maintaed by nicoulaj. I have attempted to reach out to them, but received no response. As a result I decided to republish the OpenRGB SDK under a new name (openrgb-rs2).
Whats different?
Support for OpenRGB protocol versions 4 and 5 is added. There's also now a friendlier to use API than before.
Internally there's some changes in how serializing/deserializing the protocol is done. I decided it was easier to read/write to a buffer, rather than directly to a stream as was previously done. For the end user there should not be much visible change though. I have not done any benchmarking, so I'm not sure about the performance. I can update my entire rig at about 300 FPS at release mode, so I'm not too worried about performance anyway.