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
125KB
2.5K
SLoC
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
extern
block. - Add
#[must_use]
to functions which return boolean "success" values. - Import rust FFI types.
- Add
Send
andSync
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 (namedCUESDK.framework
).
Windows
- Set the environment variable
CUE_SDK_LIB_FILES_PATH
to point to thelib
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.