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!


Idea

Steve avatar image
Steve suggested B21 commented

Allow read access to the Work directory from JavaScript

As suggested by FlyingRaccoon, reposting my previous question as an idea so people can vote on this.


With the current version of the SDK, JavaScript can only read files in the package folder. It would be great to be able to read files in the work directory too. Allowing this would open up many possibilities for WASM modules to write a data to a file and have JavaScript consume it, without needing to send this data in tiny chunks over L-Vars.

wasmhtml
10 |10000

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

1 Comment

·
B21 avatar image
B21 commented

I really don't think we want file-io as the preferred method of passing structured data in real-time between systems. Would the JS be polling the file to see if anything new is in there?

A basic implementation of event-driven async message passing (e.g. callbacks) would fit the JS model particularly well, i.e. the JS would register a callback that the WASM could trigger. Ideally this would be possible in both directions. If bridging JS and wasm/c++ structured data is too complex, the lowest common denominator would be an argument including a string payload, so similar to your file-io but without the polling.

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 a Comment

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

Your Opinion Counts

Share your great idea, or help out by voting for other people's ideas.