Rust bindings for the X-Plane SDK

crates.io crates.io

This library uses bindgen to generate the bindings.

Features

Generate your own bindings

To generate the bindings yourself, rather than using the pre-built once, activate the generate-bindings feature.

toml xplane-sdk-sys = { version = "*", features = ["generate-bindings"] }

This will invoke bindgen at compile time in a build script to generate the bindings. You'll have to specify the location of the SDK in your filesystem by setting the XPLANE_SDK environment variable. xplane-sdk-sys expects to find the CHeaders directory in the specified folder.

Custom SDK versions

To future prove this library, it allows you to specify additional SDK version to generator bindings for.

To do this you'll have to set the XPLANE_SDK_VERSIONS environment variable accordingly. Setting it to XPLM400;XPLM401 will, for example, generate bindings for SDK version 4.0.0 and 4.0.1.