cue-sdk-sys

Crates.iocue-sdk-sys
lib.rscue-sdk-sys
version0.0.5
sourcesrc
created_at2020-09-04 00:56:02.773169
updated_at2020-11-07 23:31:09.518097
descriptionFFI Bindings for the Corsair iCUE SDK.
homepagehttps://github.com/scottroemeschke/cue-sdk-sys
repositoryhttps://github.com/scottroemeschke/cue-sdk-sys
max_upload_size
id284495
size121,846
Scott Meschke (scottroemeschke)

documentation

https://docs.rs/cue-sdk_sys

README

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.
Commit count: 20

cargo fmt