Linux prototype for Microsoft Flight Simulator 2024 (FS2024) WASM gauge development
Windows support maybe if I feel like it
A GUI for testing FS2024 aircraft instrumentation without:
-
Constant MSFS reloads
-
Full WASM compilation cycles
-
Simulator dependencies (runtime dependencies)
Uses shared library compilation (.so/.dll) in a spec that allows for the same source to be used for both testing and WASM deployment
- ✅ Linux-native gauge testing
- ✅ Direct OpenGL rendering
- ✅ Shared library hot-reloading
- ✅ Same codebase for both emulation and WASM deployment
- ✅ ImGUI-based control panel
- 🔄 Windows support (in progress)
-
WASM gauges are good, very good. But they are slow to iterate on due to the need for constant simulator reloads and WASM compilation cycles.
-
This approach allows for native debuggers (GDB/LLDB) to be used directly on gauge code, enabling faster iteration and debugging.
-
Better resource monitoring and profiling capabilities.
-
In your existing WASM project, add the compatibility header
include/Emulator.hto your gauge source files. This header redefines some rendering functions to use the emulator's OpenGL context instead of the simulator's. -
define
EMULATORin your gauge source files to enable emulator-specific code. -
compile your gauge as a shared library (
.soon Linux,.dllon Windows) instead of a WASM module. (no changes to your existing build system should be needed) -
Create a
<GAUGE_NAME>.jsonnext to your shared library, this serves as a replacement for apanel.cfgin the sim, the schema is as follows:
{
"gauge": {
"size": {
"width": 800,
"height": 600
},
"string_params": ""
}
}- Clone this repo
- Build the emulator using
cmake(see below) - Run the emulator and load your gauge using the control panel
- MSFS does not provide a cross-platform shared library for its SDK functions (its built into the sim), so all bindings must be implemented manually in the emulator. As a result, only common rendering and simvars are supported. Networking and events are planned for future updates but are not currently available.