This library uses bindgen
to generate the bindings.
XPLM303
To generate the bindings yourself, rather than using the pre-built ones,
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.
xplane-sdk-sys
inherits the bindgen
requirements. They are
documented here.
To future prove this library, it allows you to specify additional SDK versions to generate 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
.