GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - MrMinimal/msfs-rust-aircraft: Rust Aircraft Template for MSFS 2020

BranchesTags
Open more actions menu

Latest commit

 

History

5 Commits
5 Commits

Folders and files

NameName
Last commit message
Last commit date
PackageDefinitions
PackageDefinitions
 
 
PackageSources
PackageSources
 
 
PackagesMetadata/mycompany-aircraft-wasm-gauge
PackagesMetadata/mycompany-aircraft-wasm-gauge
 
 
Sources
Sources
 
 
.gitignore
.gitignore
 
 
LICENSE.md
LICENSE.md
 
 
README.md
README.md
 
 
rust_aircraft.xml
rust_aircraft.xml
 
 

Repository files navigation

General

Microsofts MSFS SDK Sample GaugeAircraft in Rust 🦀

Because I didn't want to write logic in Microsoft's cursed RPN language, XML or C++.

grafik

Requirements

  1. Git for Windows (with Git Bash)
  2. Rust
  3. MSFS SDK

Developing

Compile the Rust logic

  1. cd Sources/Rust
  2. cargo build -v --target wasm32-wasip1 --release && wasm-opt -O1 --signext-lowering --enable-bulk-memory -o ../../Packages/mycompany-aircraft-wasm-gauge/SimObjects/Airplanes/MyCompany_Gauge_Aircraft/panel/gauge_logic.wasm target/wasm32-wasip1/release/gauge_logic.wasm

Open project in MSFS

  1. Enable MSFS developer mode
  2. File -> Open Project -> open the rust_aircraft.xml project file in this repo
  3. Debug -> Console
  4. Disable the "Autoset" checkbox in the top right of the console and disable any filters
  5. Editors -> Project Editor
  6. Clear all messages in Console
  7. Press the "Build All" button in the Project Editor
  8. Search for the "Gauge Aircraft" to fly

Updating code

  1. Change something in the Rust code and build using the command above
  2. Project Manager: File -> close project (optional but makes reload way faster)
  3. Tools -> Behaviours
  4. In the Behaviours window: "Quick reload" (rebuilds the project if it wasn't closed before. Rebuild only required if file naming or project structure changes)

Checking WASM state

  1. Start a flight with the "GaugeAicraft" that should now be available in the sim
  2. Debug -> Display WASM Debug Window
  3. Select the .wasm file from the dropdown

License

Microsoft Flight Simulator © Microsoft Corporation. This project was created under Microsoft's "Game Content Usage Rules" using assets from Microsoft Flight Simulator, and it is not endorsed by or affiliated with Microsoft.

The contents of distribution packages built from the sources in this repository are therefore licensed as follows: in the case of original source code from FBW or compiled artifacts generated from it, under GPLv3. in the case of assets covered by the "Game Content Usage Rules", under the license granted by those rules.

About

Rust Aircraft Template for MSFS 2020

Topics

flightsimfs2020msfs2020rust

Resources

Readme
GPL-3.0 license
Activity

Stars

22 stars

Watchers

0 watching

Forks

1 fork
Report repository

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.