cue-sdk
A high level rust wrapper for the native iCUE SDK.
If you are looking for low-level (and unsafe) access, check out the parent crate for this repository cue-sdk-sys.
Quick Start
Make sure you set the required environment variables for the cue-sdk-sys dependency crate.
If you need the binaries, the easiest place to get them is on the Github Releases Page. Since we can't build them from scratch (not open source) you have to get them yourself.
This version of the crate is built against version 3.0.55 of the iCUE SDK.
Example Code
use LedColor;
use initialize;
let sdk = initialize
.expect;
let mut devices = sdk.get_all_devices.expect;
let new_color = LedColor ;
for d in &mut devices
//flush the colors buffer (send to device hardware)
sdk.flush_led_colors_update_buffer_sync
.expect;
You can note from the following example, most "write" operations can fail for a variety of reasons including but not limited to:
- device state changes (devices have been unplugged/plugged in)
- ffi interfacing (pointer derefs, etc) fail due to undocumented breaking changes in the iCUE SDK, or a bug in the crate code
- another client has requested exclusive access
Examples
For additional examples see the example code
and run examples with cargo run --example {example_name}.
Features
async
The async feature gives additional methods/structs which return futures
instead of taking callbacks/closures.