Crates.io | simconnect-sys |
lib.rs | simconnect-sys |
version | 0.24.3 |
source | src |
created_at | 2023-11-25 06:59:36.313743 |
updated_at | 2024-06-15 19:37:40.127515 |
description | FFI bindings for SimConnect. |
homepage | https://github.com/jcramb/simconnect-rs/tree/main/simconnect-sys |
repository | https://github.com/jcramb/simconnect-rs/ |
max_upload_size | |
id | 1048099 |
size | 1,653,026 |
simconnect-sys
FFI bindings for SimConnect.
Currently supported version of simconnect-sys
is using SimConnect SDK 0.24.3
.
Crate will be updated for each new SimConnect SDK release with the version indicating the SDK version it targets.
[dependencies]
simconnect-sys = { version = "0.24.3", features = [ "static" ] }
use simconnect_sys::*;
// open handle to SimConnect
let mut handle = std::ptr::null_mut();
let hr = unsafe { SimConnect_Open(
&mut handle,
CString::new("Example").as_ptr(),
std::ptr::null_mut(),
0,
std::ptr::null_mut(),
0,
) };
if hr != 0 || handle.is_null() {
println!("SimConnect_Open failed");
}
See examples/sys-basic for a working example of using the FFI bindings for SimConnect.
static
- Statically link to SimConnect lib.vendored
- Use vendored SimConnect lib.SIMCONNECT_DIR
(default=C:\MSFS SDK\SimConnect SDK
)
.
├── include/
│ └── SimConnect.h
└── lib/
├── SimConnect.lib
└── static/
└── SimConnect.lib
SIMCONNECT_NO_VENDOR
vendored
feature, ensuring vendored libs are not used.This project is licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed under the terms of both the Apache License, Version 2.0 and the MIT license without any additional terms or conditions.