Technical details about WebAssembly system implementation

Following the Flight Simulator SDK documentation link from
@WasmWeekly
, I’m
finding the WebAssembly approach for creating Flight Simulator plugins very
interesting! I’ve been interested in using WebAssembly as a plugin mechanism
for software we develop. The benefits of API control / stability, good
performance, cross-platform compatibility, and robustness when running 3rd-
party code in-process is all fascinating. I was wondering if there is any
technical share out about how the system was implemented in Flight Simulator
with pros, cons, lessons learned, future direction, etc. It seems like a
pattern that could potentially be useful in a wide-range of software
applications and I’m curious to hear how problems like debugging from Visual
Studio were solved and what WASM runtime is used, etc.

Just wanted to check-in again and see if anyone knows if there was any
technical share out of how WASM was integrated into Microsoft Flight Simulator
or if there is a better venue to ask. I would appreciate any help! :slight_smile:

Microsoft Flight Simulator gets their WASM support from inNative. The SDK is
freely available here: https://github.com/innative-sdk/innative. The
inNative approach used by MSFS is to compile WASM into native code and build
it into a dynamic link library prior to execution. If you are intending to add
WASM support to your own software, using inNative would be a very simple way
of doing it as all of the tools and integration APIs are provided.
Alternatively, if you don’t want to ship open source, don’t like the license,
or need to JIT compile, you could roll your own development tools. The
WebAssembly org provides complete technical
documentation of the WebAssembly specifications, so you could implement your
own compiler, runtime, etc. From the perspective of developing add-ons for
Microsoft Flight Simulator, I will say that WASM totally sucks. The only real
benefit it offers for MSFS development is cross-platform support, but so far
that has been a bit of a bust. The trade-off to enable cross-platform is
extremely limited API access from within the WASM runtime. Combine lack of
functionality with poor debugging tools and the end result is an environment
where the set of the few things that can be done is vastly dominated by the
set of most things which cannot be done. Outside of Microsoft Flight
Simulator, integrating WebAssembly could be a good choice; it all depends on
what you are trying to allow plug-in developers to accomplish and how much
functionality you are willing to expose to the runtime. You might also be
interested in the “WASM Deep Dive” document that I created which can be found
here: WASM Deep Dive - SDK Discussion / Tutorials - Microsoft Flight
Simulator Forums

1 Like

I agree - the SDK we must work with is far too limiting.