5 releases

0.0.5 Nov 7, 2020
0.0.4 Sep 12, 2020
0.0.3 Sep 6, 2020
0.0.2 Sep 6, 2020
0.0.1 Sep 4, 2020

#8 in #cue


Used in cue-sdk

MIT license

125KB
2.5K SLoC

cue-sdk-sys

GithubRepo CratesIO DocsRS

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.

  1. Run bindgen with the following arguments: bindgen <path_to_CUESDK.h> -- -x c++ -std=gnu++14
  2. Combine function calls into a single extern block.
  3. Add #[must_use] to functions which return boolean "success" values.
  4. Import rust FFI types.
  5. Add Send and Sync traits 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_PATH to point to the CUESDK directory with the framework (named CUESDK.framework).

Windows

  • Set the environment variable CUE_SDK_LIB_FILES_PATH to point to the lib folder of the CUESDK..
  • Add the redist CUESDK 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.

Dependencies