cue-sdk-sys
The cue-sdk-sys crate is a low-level unsafe Rust bindings to the native Corsair iCUE SDK.
Source Generation Process
The follow describes the steps taken to generate the source code, and what manual tweaks were made to the generated code.
- Run bindgen with the following arguments:
bindgen <path_to_CUESDK.h> -- -x c++ -std=gnu++14 - Combine function calls into a single
externblock. - Add
#[must_use]to functions which return boolean "success" values. - Import rust FFI types.
- Add
SendandSynctraits to non-auto send/sync structs since the iCUE SDK documentation shares that the SDK is thread-safe.
Building
- Download the proper iCUE SDK release for your operating system.
MacOS
- Set the environment variable
CUE_SDK_FRAMEWORK_PATHto point to the CUESDK directory with the framework (namedCUESDK.framework).
Windows
- Set the environment variable
CUE_SDK_LIB_FILES_PATHto point to thelibfolder of the CUESDK.. - Add the
redistCUESDK folder to your path to develop and run end-to-end tests, and include it in your final (built) release package to the end user.