A command-line utility to assist in compiling Rust code to WASM modules compatible with MSFS 2020 and 2024
You can install the utility by running cargo install --git https://github.com/navigraph/cargo-msfs
The tool supports the following commands:
- install – Installs the SDK for a specified MSFS version.
- remove – Removes the SDK for a specified MSFS version.
- update – Updates the SDK for a specified MSFS version.
- build – Builds a crate for a specified MSFS version. (note: this runs
wasm-opt
automatically!) - info – Gets information on installed SDKs.
The tool currently supports the following MSFS versions:
msfs2020
– Microsoft Flight Simulator 2020msfs2024
– Microsoft Flight Simulator 2024
cargo-msfs <COMMAND> [OPTIONS]
command
(required) – The command to run. Acceptable values:install
,remove
,update
,build
,info
.msfs_version
(optional) – Specifies the MSFS version for commands that require it (install
,remove
,update
,build
).-i, --in-folder
(optional) – The path to the crate to build. Required only for thebuild
command.-o, --out-wasm
(optional) – The full path (including filename) to output the compiled WASM file. Required only for thebuild
command.
cargo-msfs install --msfs-version msfs2020
cargo-msfs remove --msfs-version msfs2024
cargo-msfs update --msfs-version msfs2020
cargo-msfs build --msfs-version msfs2024 -i /path/to/crate -o /path/to/output.wasm
cargo-msfs info
This project is licensed under the MIT License.