samcrow / rust-xplm

Rust interfaces to the X-Plane plugin SDK
Apache License 2.0
39 stars 15 forks source link

Ready for production use? #10

Open kbrandwijk opened 2 years ago

kbrandwijk commented 2 years ago

I came across this great repo wanting to start writing X-Plane plugins in Rust instead of C++. I've read the readme, and the notes about drawing and display SDK parts needing 'some more work'. Is it realistic to start down the Rust path? Or will I find myself in a dead end because of missing SDK wrappers? I don't have much Rust knowledge, so I don't know how easy or hard it would be to contribute any missing pieces down the road.

What would be your advice at this point in the development?

samcrow commented 2 years ago

If you want to make a plugin that works with datarefs and commands, using Rust and this library should work without too much trouble.

Graphics and GUI are the main areas where Rust and the plugin APIs don't easily work together, and the Rust bindings are incomplete/missing. For those, C++ and C are better options.

Because the documentation for this library is currently not very detailed, it's good to have some experience with X-Plane plugins in C or C++ before using Rust.

Ev1dentSnow commented 2 years ago

If you want to make a plugin that works with datarefs and commands, using Rust and this library should work without too much trouble.

Graphics and GUI are the main areas where Rust and the plugin APIs don't easily work together, and the Rust bindings are incomplete/missing. For those, C++ and C are better options.

Because the documentation for this library is currently not very detailed, it's good to have some experience with X-Plane plugins in C or C++ before using Rust.

Would you recommend writing plugin code in Rust and then the GUI portion of a plugin with rust bindings using something like this? https://github.com/ocornut/imgui

samcrow commented 2 years ago

Yes, I haven't done that myself but it might be a good approach. If you can get that GUI library to work in the X-Plane environment. it should be fairly easy to use.