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.
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!
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.
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!
If this is implemented it would make Devs life waaay easier