plane icon Welcome to Microsoft Flight Simulator’s SDK Q&A Platform!

You have questions regarding the SDK? DevMode Tools? SimConnect? You would like to submit an idea for future improvements, seek help or exchange knowledge? You’re in the right place.


Please take a moment to read the platform’s guidelines before you get started!


question

snek avatar image
snek asked Qbit published

Please add support for unix paths in sim WASI runtime

As the WASI standard mandates unix paths, many languages that can target it (for example Rust) are not compatible with the sim, because it uses windows paths for preopen announcement. It would be possible to support the unix paths quite easily, and without breaking support for the windows paths that the official c++ uses. Basically, for every preopen file descriptor that is named using a windows path, add a duplicate preopen entry that is named using a unix path. The sim currently advertises `.` and `\work` to WASI modules. This means you just need to add `/work` as an additional preopen. Windows itself supports forward slashes, so no additional changes beyond adding preopens should be needed.
defaulthelpwasmdevs
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

hollandFBW avatar image
hollandFBW answered IcemanFBW commented

Please do this! I am aware C++ is the only officially supported language, but with a simple change it would make life much easier for many devs!

1 comment
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

IcemanFBW avatar image IcemanFBW commented ·
To add onto this, Rust has many advantages over C++, including far better memory safety which can prevent many of the issues that lead to gauge crashes with C++. Furthermore, it has similar performance - we are running computationally intensive systems code in Rust, whose execution per frame only takes a few microseconds. Other developers, including Synaptic among others, have taken notice and are using our Rust SDK bindings for their own aircraft currently in progress - so this affects more than just us.
0 Likes 0 ·
SjotgunSjonnie avatar image
SjotgunSjonnie answered

The work described by @snek is very small but would be a huge help! Being stuck on Rust 1.5.0 isn't great as there are new useful features coming to the language all the time. I started learning the language end of last year and designed and built large parts of the FBW A320 systems logic with it. This language is awesome and it would be super awesome to continue to be able to use its improved features.

Thanks!

10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

Qbit avatar image
Qbit answered Qbit published

If this is implemented it would make Devs life waaay easier

10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 19.1 MiB each and 23.8 MiB total.