Restarting StandaloneModule.wasm

Hi,
Is there a way to just restart the StandalonModule.wasm without restarting MSFS, in order to save time?

During testing of wasm code, I now update the wasm in the Community\my wasm\modules\ after making changes to the code. Then I restart MSFS to contine testing.

I want to just update wasm, restart the loading of the wasm to the running MSFS. Is that possible and if yes, how?

1 Like

Good question and very necessary!

I had the same question. As far as I can tel, there is no way to do this, which makes it quite painful to hack on a WebAssembly addon.

Hi,

I noticed that the WASM module is reloaded by the sim, when you update the filesize value in the manifest.json file (or in the layout.json, don’t know by hearth). The reload is confirmed by the devmode console, it will mention the reload textually. Good luck, hope this helps you speed up your dev.

Best,
Maurice

PS, I just notice this is already a quite old topic, but anyways.

3 Likes

Hello @VFRMau,

This is an older post, but I’m also struggling to find a way to restart the WASM module in a running MSFS2020. So far no success.

  • I updated the filesize in the layout.json (your suggestion above)
  • I used a method provided by @ImpoliteGem5317 by running below batch-file
@echo off
copy /b "D:\MSFS2020\Community\fsuipc-lvar-module\layout.json"+,,"D:\MSFS2020\Community\fsuipc-lvar-module\layout.json"
copy /b "D:\MSFS2020\Community\fsuipc-lvar-module\modules\FSUIPC7_WASM.wasm"+,,"D:\MSFS2020\Community\fsuipc-lvar-module\modules\FSUIPC7_WASM.wasm"

But no success unfortunately :frowning:

I can’t believe that there exists no method, otherwise developing a WASM module for FS2020 is a real nightmare?

1 Like

Hi @HBilliet,

I haven’t developed any code for MSFS for a while now, so chances are that the above mentioned method may simply not work anymore. Sometimes, sim updates may break a non-documented work flow.

Just to clarify, in the above work flow, I first copy all the new files into the Community folder, and only afterwards update the file size in the layout.json.

Best of wishes with your efforts,
Maurice

Hello @VFRMau,

That is indeed the workflow that I used.

Your script above is just copying the file on its own, but updating the date/time, right? Something that should even be irrelevant if you copy a new file in the Community folder (implying that you have to update the layout.json file to update the filesize as well). I even build the wasm file directly into the community folder, spares me one copy action.

But thanks anyway!

Isn’t that what the ‘resync’ under aircraft editor does?