scs-sdk-rs

Crates.ioscs-sdk-rs
lib.rsscs-sdk-rs
version0.2.2
sourcesrc
created_at2023-04-30 12:14:35.837564
updated_at2023-04-30 13:39:50.895401
descriptionBindings for SCS Software SDK
homepage
repositoryhttps://git.rainplus.org/LuoRain/scs-rs
max_upload_size
id852721
size214,392
雨 (YUCLing)

documentation

README

SCS SDK Bindings

Usage Example

#[no_mangle]
#[scs_sdk_rs::proc_macros::scs_telemetry_init]
// pub extern "C" fn scs_telemetry_init(version: scs_sdk_rs::scs_u32_t, params: *const scs_sdk_rs::scs_telemetry_init_params_t) -> scs_sdk_rs::scs_result_t
pub fn init() {
    let version_params_ptr = params as *const scs_sdk_rs::scs_telemetry_init_params_v101_t;

    unsafe {
        // example for using params
        let version_params = *version_params_ptr;

        version_params.common.log.unwrap()(scs_sdk_rs::SCS_LOG_TYPE_message, "The Rust telemetry plugin is loaded.".as_ptr() as *const i8);
    }

    // ...

    scs_sdk_rs::SCS_RESULT_ok
}
Commit count: 0

cargo fmt