Low level Rust bindings for the X-Plane SDK.
XPLM303
To generate your own bindings instead of using the pre-built ones,
activate the generate-bindings
feature by adding the following to your Cargo.toml
:
toml
xplane-sdk-sys = { version = "*", features = ["generate-bindings"] }
This will invoke bindgen
at compile-time in a build script to generate the bindings.
You must specify the location of the SDK in your filesystem by setting the XPLANE_SDK_PATH
environment variable.
xplane-sdk-sys
inherits the bindgen
requirements. They are
documented here.
To ensure the library is future-proof, it offers the option to define extra SDK versions for binding generation.
To achieve this, you need to adjust the XPLANE_SDK_VERSIONS
environment variable accordingly.
It expects a semicolon-separated list of SDK versions. Defining it as XPLM400;XPLM401
, as an example, will
result in the generation of bindings for the SDK version 4.0.0
and 4.0.1
respectively.