Giter Club home page Giter Club logo

xplm-sys's Introduction

xplm-sys: Rust bindings for the X-Plane plugin SDK

This library provides Rust bindings to the X-Plane plugin SDK.

SDK versions

This crate supports SDK version 4.0.1, which is supported on X-Plane 12.04 and later. Plugins can be used with earlier X-Plane versions as long as they do not use newer APIs.

Some features in earlier versions of the SDK have been removed. This library currently does not provide a way to access them.

Documentation

The types and functions are documented on the X-Plane plugin API website.

Compiling and linking

This library currently can be compiled on Mac OS, Linux, and Windows.

On Mac OS and Windows, plugins must be dynamically linked with libraries that provide stub implementations of the SDK functions. This crate includes those libraries and tells Cargo to link them.

License

Licensed under either of

at your option.

Files in the SDK folder are provided under a separate license, provided in SDK/license.txt.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you shall be dual licensed as above, without any additional terms or conditions.

xplm-sys's People

Contributors

greluc avatar samcrow avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

xplm-sys's Issues

Error generating on windows, doesn't implement Debug

error[E0277]: `[u8; 40]` doesn't implement `std::fmt::Debug`
     --> C:\git\rust\xplm-sys\target\debug\build\xplm-sys-2d2d1c6f68d72b6b\out/bindgen.rs:59717:5
      |
59717 |     pub __bindgen_padding_0: [u8; 40usize],
      |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `[u8; 40]` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
      |
      = help: the trait `std::fmt::Debug` is not implemented for `[u8; 40]`
      = note: required because of the requirements on the impl of `std::fmt::Debug` for `&[u8; 40]`
      = note: required for the cast to the object type `dyn std::fmt::Debug`

I get the following error trying to generate the bindings on Windows 10 with Clang 7.0 installed

Upgrade SDK to 4.0

It would be helpful to upgrade the SDK, as 4.0 adds AArch64 (Apple Silicon) support for MacOS clients.

Failure to Compile

Some bits have changed in the past 2 years and at least with Rustc 1.42.0, the build fails due to the bindgen dependency not able to be built. Looks like some of its dependencies have gone away too. What would be the effort to update the bindgen dependency to the most recent version?

   Compiling syntex_syntax v0.58.1
error[E0423]: expected function, tuple struct or tuple variant, found struct `ast::Name`
   --> /home/jeremy/.cargo/registry/src/github.com-1ecc6299db9ec823/syntex_syntax-0.58.1/src/symbol.rs:146:27
    |
146 |                       name: ast::Name($index),
    |                             ^^^^^^^^^
...
165 | / declare_keywords! {
166 | |     // Invalid identifier
167 | |     (0,  Invalid,        "")
168 | |
...   |
231 | |     (56, CrateRoot, "{{root}}")
232 | | }
    | |_- in this macro invocation

   Compiling env_logger v0.4.3
error: aborting due to previous error

using bindgen, reproducing build

Hi,

I'm trying to generate the bindings myself. But I always run into problems when using bindgen. No matter if I use the CLI or the build.rs variant of bindgen. I always get the error that the header files are not found (Unable to generate bindings: ClangDiagnostic("src/combined.h:5:10: fatal error: 'XPStandardWidgets.h' file not found\n")).
Could you please share the steps on how to use bindgen with this setup?

I'm still a beginner with Rust and C, but would love to help with xplm-sys and rust-xplm and learn something in the process. :-)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.